Chris wrote:
I'm trying to help a friend migrate his application to php 5 from
another system. The problem seems to be that he references files
(require, include, etc) that have a .php3 extension, however there
are no files in those locations with the .php3. There are files with
.php extensions. It's running on a system that has php 4 on it.
If you can ssh in to the server, go to the base folder of the app and:
grep -nri 'php3' *
and make sure there are no references in the code to php3 files.
Else try the same in windows search or using your editor, see if it
has a 'find in files' type option.
So I'm sure either php or Apache is rewriting the files somehow, but
I don't know how.
Check for a .htaccess file.
See if apache is set up to handle php3 files, look for something like
this in the config:
AddType application/x-httpd-php .php3
If this is causing a fatal error, your logs should also tell you where
to start looking. The apache2 error logs are pretty good, eg:
[date] [error] [client ipaddr] PHP Warning:
include(../includes/db.php): failed to open stream: No such file or
directory in /path/to/file.php
I think you misunderstood. I have lots of file with things like
require "admin.php3"
But there is no admin.php3 anywhere. There is however a file admin.php.
Since this works on the old server then something on that system is
translating a request for a .php3 file to .php I'm guessing. Apache or
php but I don't know which.
The old server is a Linux system, while the new one is a bsd system (OS X).
Both systems have the
AddType application/x-httpd-php .php3
Line in their configuration.
Thanks,
Jim.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php