Forum Moderators: phranque
One of our sites makes use of an open source shop solution, OSCommerce. One of the features of OSCommerce is that it can rewrite URLs, turning something like:
[yoursite.com...]
into
[yoursite.com...]
The rewriting is done in php, within the OSCommerce application - it doesn't use mod_rewrite.
This site is currently running just fine on a shared server. We've just tried to migrate it to a dedicated server, running much the same setup (FreeBSD and Apache).
The rewritten URLs result in an Internal Server Error (500). The only relevant entry in the log file is:
Premature end of script headers: /execscriptdir/php.cgi
Any idea where I should start looking? Is this an apache config problem or a php config problem? I realise that this isn't much info, but any hints or pointers would be much appreciated.
OS: FreeBSD 4.10
Apache version: 1.3.31
PHP Version: 4.3.10
PHP Running as: CGI
TIA
You're having trouble with php and not just osCommerce, right?
I won't pretend to be an expert on his, but I have a suggestion or two;
The most obvious suggestion;
Since you're running php as CGI, perhaps your setup requires you to begin all php files with #!<path-to-cgi>
Or perhaps it has something to do with wrong file permissions? You can test it by setting permissions to 777 for a test file.
Eivind
PHP is actually running fine - all normal PHP stuff works. The issue is specifically to do with how the server handles it when you call a url like this:
[domain.com...]
The current server serves up index.php, whereas the new server chokes on it, presumably because it looks for a directory called index.php but can't find it.