|
File uploads, HTML as PHP, and the Zend Optimizer
Hi,
I've been getting my site back in working order since phpsuexec was put on the servers and ran into a couple of issues. In case anyone else runs into them too, I'm posting them and the solutions here:
1. If you're putting all your .html files through the PHP interpreter, you might have had lines in your .htaccess like this:
RemoveHandler .html .htm .php
AddType application/x-httpd-php .html .htm .php
This worked fine before, but will cause a 500 Internal Server Error now. (I don't know where I got the RemoveHandler line from, but there it is.) The correct version is simply:
AddHandler application/x-httpd-php .html .htm .php
2. If you are uploading large files (podcasts, in my case) in PHP, you probably had lines in your .htaccess to increase the upload_max_filesize and post_max_size. Obviously, these will need to be moved into the php.ini file. However, unlike .htaccess, settings in a php.ini file do not apply to subdirectories. (Or at least they didn't in my case.) So if your PHP scripts that accept the uploads are in a subdirectory, you'll need to have the php.ini which increases the max upload size in there along with them.
3. For reasons unbeknownst to me, files named "error_log" have been showing up in directories where I have PHP files. They each contain error messages:
[15-Mar-2006 02:02:52] PHP Warning: Zend Optimizer does not support this version of PHP - please upgrade to the latest version of Zend Optimizer in Unknown on line 0
As far as I can tell, there's one of these entries for each request, but I'm not completely certain on that. I would have submitted a ticket on this, but it's not super serious and I didn't want to bother support again since I imagine they're really busy with people whose sites are down as a result of the change.
|