|When running this on my server, I get the following error message:|
Warning: fopen(xlsfile://tmp/example.xls): failed to open stream: "xlsstream::stream_open" call failed in /home/squamish/public_html/admin/global/code/example_export.php on line 13
Cannot open xlsfile://tmp/example.xls
Is this anything to do with running in "safe_mode"? I did a little poking around and it looks like safe mode might get in the way of running fopen() properly.
|2005-01-20 04:48:51 - In reply to message 1 from Ben Keen|
If safe_mode is enabled, any call to fopen() "...checks whether the directory in which you are about to operate has the same UID (owner) as the script that is being executed".
If safe_mode is disabled, it could likely be that the directory specified in the fopen path doesn't exist, or PHP does not have the correct permissions to write to that directory.
|2005-01-27 14:24:18 - In reply to message 2 from Ignatius Teo|
|Hi Ignatius, |
Thanks for the help. It turns out that it *was* a safe mode problem. For those of you who find yourself in a similar boat, try the following:
upload a file called "php.ini" into the folder that you want the safe mode disabled. In it, just add this single line:
safe_mode = off
And that should do it! All the best - and thanks again, Ignatius - marvellous work!