bullprint Posted March 4, 2007 Posted March 4, 2007 I hope someone can help or point me in the right direction. oscommerce with PHP5, MySQL 5 Apache2 and FC5 & PLESK 8.1 I have 2 sites I need to transfer to the new server and 1 clean install that needs doing. the problem is errors on trying to run http://www.domain.com/install Warning: require(includes/functions/general.php) [function.require]: failed to open stream: No such file or directory in /var/www/vhosts/domain.com/httpdocs/install/includes/application.php on line 22 Fatal error: require() [function.require]: Failed opening required 'includes/functions/general.php' (include_path='/usr/share/pear') in /var/www/vhosts/domain.com/httpdocs/install/includes/application.php on line 22 I get similar errors on a store transfer from a php4 mysql4 setup on the transfer I can get parts of the store working (but not the admin or search, I havn't tried a lot of other pages yet) by changing require('includes/configure.php') to require('configure.php) in application_top.php and the other require statment in application_top.php eg. databas_table.php and filenames.php and the define('DIR_WS_INCLUDES', './includes/'); I am at a loss on the way forward here. any help or pointers would be great Stuart
bullprint Posted March 4, 2007 Author Posted March 4, 2007 I belive the problem is that PHP5 does not see relative paths like php4 did so if you have a require(includes/xxx.php) statement in another file that was "required" PHP5 will not pick it up unless it is an absolute path to the file. Is there a setting in php.ini or prefreable one that can be set in the .htaccess file?
bullprint Posted March 4, 2007 Author Posted March 4, 2007 I have gone through and changed all the files manually. But I am a little puzzled that no one had posted anything simliar. Has this never come up before?
typohosting.nl Posted April 13, 2007 Posted April 13, 2007 Indeed, it happened to me as well. Using php5, I had to change require statements in several php script. A php script in directory a/b/c which required another php script in /a/b/c/d contained the statement require('c/d/somescript.php'). I had to remove the c/ and from that point it worked again (it becomes require('d/somescript.php') At this point i've just finished the install sequence. The last thing I had to do was change the configure.php script in the admin/includes directory and change the value of DIR_WS_INCLUDES manually, removing includes/ (and leave it empty: define('DIR_WS_INCLUDES', ''); ) Hopefully this is the last script to change... ps: Don't forget to change the php values if needed: You can just put the next two lines in the .htaccess file in the catalog directory: php_value register_globals 1 php_value register_long_arrays On Using: Suse linux 10.0, apache 2.0.54, mysql 4.1.13, php 5.0.4
Recommended Posts
Archived
This topic is now archived and is closed to further replies.