gee_fin Posted October 15, 2006 Posted October 15, 2006 Racking my brains here, I hope someone can help. I'm doing a new installation here on a new server, Linux/PHP5/MySQL. A few problems revolving around the PHP Warning: main(includes/languages/english/) [<a href='function.main'>function.main</a>]: failed to open stream: Success in /var/www/vhosts/xxxxx/httpdocs/admin/includes/application_top.php on line 133 style errors. From what I can see, the code is not being able to read the location/querystring. For example, the above line should have includes/languages/english/index.php and it's chopped off the index.php as the 'basename' function is not returning the actual location, similarly, I can't navigate past the first page of the shop as it won't read in any product_id or catid etc in the querystring/location. Is there a setting in the PHP.ini that would enable this? Delving into the code when clicking on a product it isn't able to pull in the product_id from the location (always searches on product_id = 0). Pleeeease help meeeee : :'( Graeme.
gee_fin Posted October 16, 2006 Author Posted October 16, 2006 I've found that commenting out the line below the admin/includes/application_top.php //set php_self in the local scope $PHP_SELF = (isset($HTTP_SERVER_VARS['PHP_SELF']) ?$HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']); allows it to load the language, but it still falls over when trying to select a page relying on the querystring. Register_globals is turned on locally, PHP version 5.0.4, really struggling to find what on earth is going wrong :(
gee_fin Posted October 16, 2006 Author Posted October 16, 2006 Solved. Appears it's the PHP Version 5+ compatibility with OsCommerce, initial issues appear solved by setting register_globals AND register_long_arrays to ON locally. ie. setup an .htaccess file in the root of your web directory and use the settings - php_value register_globals 1 php_value register_long_arrays 1 within it. Thanks for all your help :P
Recommended Posts
Archived
This topic is now archived and is closed to further replies.