Can't save files on my Webserver

Topics: Developer Forum, Project Management Forum, User Forum
Jan 31, 2009 at 8:18 PM
Hey guys,

im totaly impressed about your nice Excel-Class and implemented it in my web-projekt.
At my local development, it works fine! but not on the dedi-server. I have checked the directory and permissions also owner-rights, but it's all correct.

I use OpenSuSE v.10.3 with K. v.2.6.22.x

I hope you have ideas to save or output the file as head/download, i don't want back to PEARs Spreadsheet Excel Writer :-/

cheers
web
Developer
Jan 31, 2009 at 8:38 PM
Hmm... This sounds strange. Can you check if you are getting any error messages using this at the beginning of your script?

error_reporting(E_ALL);
ini_set('display_errors', '1');

Jan 31, 2009 at 8:44 PM
Edited Jan 31, 2009 at 8:47 PM
Hey

sorry, i forgot to tell that i used this error handlerto get any errors, but the script leaves blank after executing :-/
Also my apache error_log shows no errors, and the access_log shows nothing unusual things.

cheers
web
Developer
Jan 31, 2009 at 8:49 PM
Can you try with latest source from here? (some of the previous versions would prevent error messages from being shown)
http://www.codeplex.com/PHPExcel/SourceControl/ListDownloadableCommits.aspx

Jan 31, 2009 at 8:53 PM
Yes.. i try and post the result.

See you later, and ty!



cheers
web
Jan 31, 2009 at 9:00 PM
Hell yeah i become an error :-)

Warning: file_exists(): open_basedir restriction in effect. File(/usr/share/php5/PHPExcel/Writer/Excel2007.php) is not within the allowed path(s): (/srv/www/vhosts/domain.com/httpdocs:/tmp) in /srv/www/vhosts/domain.com/httpdocs/_test/PHPExcel 1.6.5/Classes/PHPExcel/IOFactory.php on line 170 Warning: file_exists(): open_basedir restriction in effect. File(/usr/share/php5/PEAR/PHPExcel/Writer/Excel2007.php) is not within the allowed path(s): (/srv/www/vhosts/domain.com/httpdocs:/tmp) in /srv/www/vhosts/domain.com/httpdocs/_test/PHPExcel 1.6.5/Classes/PHPExcel/IOFactory.php on line 170 Fatal error: Class 'ZipArchive' not found in /srv/www/vhosts/domain.com/httpdocs/_test/PHPExcel 1.6.5/Classes/PHPExcel/Writer/Excel2007.php on line 278

i think i can fix this :D

cheers
web



Developer
Jan 31, 2009 at 9:03 PM
Great! :)

Jan 31, 2009 at 10:50 PM
.. not really :-/


The error allready exist:

Warning: file_exists(): open_basedir restriction in effect. File(/usr/share/php5/PHPExcel/Writer/Excel2007.php) is not within the allowed path(s): (/srv/www/vhosts/domain/httpdocs:/tmp:/usr/share/php5/PEAR:/srv/www/vhosts/domain/httpdocs/_test/PHPExcel 1.6.5/Classes) in /srv/www/vhosts/domain/httpdocs/_test/PHPExcel 1.6.5/Classes/PHPExcel/IOFactory.php on line 170 Fatal error: Class 'ZipArchive' not found in /srv/www/vhosts/domain/httpdocs/_test/PHPExcel 1.6.5/Classes/PHPExcel/Writer/Excel2007.php on line 278

include_path: .:/usr/share/php5:/usr/share/php5/PEAR:/srv/www/vhosts/domain/httpdocs/_test/PHPExcel 1.6.5/Classes
open_basedir /srv/www/vhosts/domain/httpdocs:/tmp:/usr/share/php5/PEAR:/srv/www/vhosts/domain/httpdocs/_test/PHPExcel 1.6.5/Classes

php_zip and php_xml are enabled!


.. any ideas?

cheers
web
Developer
Jan 31, 2009 at 11:12 PM
Well, I think your server may be misconfigured somehow. I would start removing the open_basedir restriction in php.ini. That is if you have access, of course...