Yirtne Posted December 9, 2004 Posted December 9, 2004 Hello all. I've just set up a new osCommerce web site. When I try running it locally on my machine (apache2/php4/winxp) everything works perfectly, but when I put the site on my production server (apache2/php5/linux) the links do not work. well, they work when they make you jump to another php file (example: index.php -> login.php), but if I try to click on one category, it simply sends me back to the welcome screen. the website is configured correctly: the file configure.php is ok. Since I have installed the modification for disabling register_globals, I thought maybe that was the problem: so I have tried installing a new oscommerce solution from scratch with register_globals activated, and links stop working at the second screen of the installation procedure (just after selecting to install a new site instead of upgrading). I think it's something related to cookies and session handling, but I can't find the solution. any help would be greatly appreciated.
♥Vger Posted December 9, 2004 Posted December 9, 2004 You really should not be using php5 on a production server - but that's your decision. If you have seen the thread on php5 problems then you will know that you need to go to admin/includes/classes/upload.php and comment out $this on line 31 to read //$this. Unless you do this you will not be able to access your osCommerce control panel. Other problems may be related to 'white space' in some of your files (especially the cnfigure.php files). Try placing the cursor above or below the start or end of the file, and if you can do this then you need to backtrack until the cursor stops immediately before the start or immediately after the end of the php code. You also need to make sure that 'Force Cookie Use' is not enabled if you are using a shared ssl. Vger
Yirtne Posted December 9, 2004 Author Posted December 9, 2004 You really should not be using php5 on a production server - but that's your decision. If you have seen the thread on php5 problems then you will know that you need to go to admin/includes/classes/upload.php and comment out $this on line 31 to read //$this. Unless you do this you will not be able to access your osCommerce control panel. Other problems may be related to 'white space' in some of your files (especially the cnfigure.php files). Try placing the cursor above or below the start or end of the file, and if you can do this then you need to backtrack until the cursor stops immediately before the start or immediately after the end of the php code. You also need to make sure that 'Force Cookie Use' is not enabled if you are using a shared ssl. Vger <{POST_SNAPBACK}> I haven't changed upload.php yet, but the problem is on the entire site and not just in the admin panel so it shouldn't be relevant. It seems I have no white spaces in my configure files, in fact I had this problem with the installation as well. I'm not using a shared ssl either (don't know very well how ssl works anyway). you can check it out at this link: http://uva.stenal.it/ the site is in italian language, but it's pretty similar to the oscommerce default. try clicking on the categories and you'll see what I mean.
burt Posted December 9, 2004 Posted December 9, 2004 you can check it out at this link:http://uva.stenal.it/ the site is in italian language, but it's pretty similar to the oscommerce default. try clicking on the categories and you'll see what I mean. <{POST_SNAPBACK}> Works perfect for me...I'm browsing your categories right now.
Yirtne Posted December 9, 2004 Author Posted December 9, 2004 Ha! I got it!!!! It was the directive register_long_arrays causing troubles when set to off in php.ini. probably it defaults to On in php4 and to Off in php5. btw, should I really consider switching back to php4? I normally prefer to use recent software configurations, and as far as I know there aren't many drawbacks or security leaks in using php5. Am I wrong? maybe there's something I don't know about.
♥Vger Posted December 9, 2004 Posted December 9, 2004 Normally any new release of PHP is backwards compatible - so that sites which worked on earlier versions also work on the newer version. This is not the case with php5. The problems extend well beyond osCommerce and include a whole number of Content Management System programmes. One hosting company in the United Kingdom upgraded to php5 without warning their customers, and they had thousands of websites stop functioning. It's your choice, but personally I'd stick with an earlier version until php5 is sorted out. Vger
Recommended Posts
Archived
This topic is now archived and is closed to further replies.