A
A
Andrey Terentiev2014-09-04 16:06:21
PHP
Andrey Terentiev, 2014-09-04 16:06:21

Why is PhpExcel not working on hosting?

Good time of the day. There is a web application, works on php, phpExcel is used. On local hosting (OpenServer), everything works fine (an excel file is filled from the database and given for download), transferred everything to paid hosting, the excel file processing function stopped working (PHP open_basedir error seems to), wrote to the hoster, this error was fixed, but now PhpExcel gives me this: FILE
Has anyone encountered or knows what could be the problem? Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Terentiev, 2014-09-04
@jkwe45

Found a simple solution:
ob_end_clean();

V
vdem, 2014-09-04
@vdem

From the official PHP documentation (you could have looked it up yourself):

open_basedir string
Restricts the specified directory tree to files that can be opened with PHP, including the file itself. This directive is NOT affected by safe mode.
When a script tries to open a file, for example with fopen() or gzopen(), the location of the file is checked. If the file is outside the specified directory tree, PHP will refuse to open it. All symbolic links will be expanded, so there is no way around this restriction. If the file does not exist, then the symbolic link cannot be read and the filename (read) will be considered by open_basedir .

As far as I remember, many files with classes are connected in PHPExcel, so apparently there is no access to them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question