Excel5 works on XAMPP but not on remote host

Topics: Developer Forum, Project Management Forum, User Forum
Mar 25, 2010 at 9:37 AM

Hello,

We managed to set the script to generate excel5 on localhost, but when we uploaded it on remote host, it's not generating file, and these are the errors:

Notice: Uninitialized string offset: 19 in /var/www/sites/C1012/sekopak.com/subdomains/www2/html/includes/excel/Classes/PHPExcel/Reader/Excel5.php on line 5612 Notice: Uninitialized string offset: 20 in /var/www/sites/C1012/sekopak.com/subdomains/www2/html/includes/excel/Classes/PHPExcel/Reader/Excel5.php on line 5612 Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /var/www/sites/C1012/sekopak.com/subdomains/www2/html/includes/create_xls.php on line 185 10:32:08 Excel fajl generisan Warning: realpath(): SAFE MODE Restriction in effect. The script whose uid is 1001 is not allowed to access /tmp owned by uid 0 in /var/www/sites/C1012/sekopak.com/subdomains/www2/html/includes/excel/Classes/PHPExcel/Shared/File.php on line 133 Warning: tempnam(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/sites/C1012:/usr/lib/php:/tmp:/usr/share/pear:/var/lib/dtc/etc/dtc404:/usr/share/php:/usr/local/lib/php/phplib:) in /var/www/sites/C1012/sekopak.com/subdomains/www2/html/includes/excel/Classes/PHPExcel/Writer/Excel5/Worksheet.php on line 359 Warning: fopen(): Filename cannot be empty in /var/www/sites/C1012/sekopak.com/subdomains/www2/html/includes/excel/Classes/PHPExcel/Writer/Excel5/Worksheet.php on line 360 Warning: tempnam(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/sites/C1012:/usr/lib/php:/tmp:/usr/share/pear:/var/lib/dtc/etc/dtc404:/usr/share/php:/usr/local/lib/php/phplib:) in /var/www/sites/C1012/sekopak.com/subdomains/www2/html/includes/excel/Classes/PHPExcel/Shared/OLE/OLE_File.php on line 95 Warning: fopen(): Filename cannot be empty in /var/www/sites/C1012/sekopak.com/subdomains/www2/html/includes/excel/Classes/PHPExcel/Shared/OLE/OLE_File.php on line 96 Fatal error: Uncaught exception 'Exception' with message 'Can't create temporary file' in /var/www/sites/C1012/sekopak.com/subdomains/www2/html/includes/excel/Classes/PHPExcel/Shared/OLE/OLE_File.php:98 Stack trace: #0 /var/www/sites/C1012/sekopak.com/subdomains/www2/html/includes/excel/Classes/PHPExcel/Writer/Excel5.php(212): PHPExcel_Shared_OLE_PPS_File->init() #1 /var/www/sites/C1012/sekopak.com/subdomains/www2/html/includes/create_xls.php(187): PHPExcel_Writer_Excel5->save('../tmp/izvestaj...') #2 {main} thrown in /var/www/sites/C1012/sekopak.com/subdomains/www2/html/includes/excel/Classes/PHPExcel/Shared/OLE/OLE_File.php on line 98

When we try with excel2007 it works but background cells are all black :S - weird.

All server requirements are there, and we use latest version 1.7.2.

 

Please any help, we are desperate!

Thanks.

Developer
Mar 26, 2010 at 3:22 AM

1. Can you try with latest source code? I think at least some of the errors will be gone.

http://phpexcel.codeplex.com/SourceControl/list/changesets

2. Can you upload the xls template file you are reading so we can check? You can upload here:

http://phpexcel.codeplex.com/WorkItem/View.aspx?WorkItemId=10749

 

 

Mar 26, 2010 at 9:21 AM

Thanks for the replay.

We managed to fix this, the problem was that the Safe mode on server was turned on, when we turned it off, it's working well.

Hope turning safe mod off wouldn't make problems in the future.

Jan 20, 2011 at 7:31 AM

Turning safe mode off not really create any prob in future  but a little bit. Actually remote hosting can't save those file everytime you turn the host off. But hope you are still running well with your hosting provider, but whenever it create problem in future, my best suggestion is to change your remote hosting provider and your all the problem related to this issue would already get sorted out.