supernoc Posted November 8, 2008 Share Posted November 8, 2008 I have been attempting to solve this for 8 hours, and could really use some help and/or a fresh pair of eyes. Moving one of my websites between hosters (from a windows to linux environment). The site worked on the new hoster with the exception of checking out (placing an order) Here is what I know so far 1. When using IE, and attempting to checkout - the process would stop on checkout_process.php with a general "page can not be displayed" error. 2. When using Firefox, in the above situation, the process would stop on checkout_success.php with the below error; Warning: mysql_query(): 54 is not a valid MySQL-Link resource in /home/user/domains/mydomainname.com/public_html/includes/functions/database.php on line 44- select c.categories_id, cd.categories_name, c.parent_id from categories c, categories_description cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='1' order by cd.categories_name 3. In either situation the order was not recorded in the database 4. If I turned on emailing in the oscommerce admin, both IE and Firefox would stop at checkout_process.php and state 503 Webserver Unvailable 5. The hoster said this was in the logs: PHP crashed on opline 176 of mail() at /home/user/domains/mydomain.com/public_html/includes/classes/email.php:521 6. Both classes/email.php and functions/database.php are the same on both servers, and both identical to the stock 2.2 RC2A files The hoster states it is something in the code, but I am at a loss, after hours of searching forums, search engines, and comparing files. Thanks in advance for any help. Link to comment Share on other sites More sharing options...
Guest Posted November 8, 2008 Share Posted November 8, 2008 I have been attempting to solve this for 8 hours, and could really use some help and/or a fresh pair of eyes. Moving one of my websites between hosters (from a windows to linux environment). The site worked on the new hoster with the exception of checking out (placing an order) Here is what I know so far 1. When using IE, and attempting to checkout - the process would stop on checkout_process.php with a general "page can not be displayed" error. 2. When using Firefox, in the above situation, the process would stop on checkout_success.php with the below error; 3. In either situation the order was not recorded in the database 4. If I turned on emailing in the oscommerce admin, both IE and Firefox would stop at checkout_process.php and state 503 Webserver Unvailable 5. The hoster said this was in the logs: 6. Both classes/email.php and functions/database.php are the same on both servers, and both identical to the stock 2.2 RC2A files The hoster states it is something in the code, but I am at a loss, after hours of searching forums, search engines, and comparing files. Thanks in advance for any help. Your query is fine, it look sl iek there is no problem with the code. I would suggest your database is the issue. Some servers (despite popular belief) host case sensetive MYSQL databases. I found this ouit the hard way myself. Just a suggestion. Not sure its the answer you're looking for though. Another interesting one I've found is that some servers get cranky if values are stored in ''. Try removing those also to see if the query executes. The easiest way I find to solve these issues is to copy the query and run it from phpmyadmin or Navicat or whatever you use to manage your database. The it is much easier to test the query and tweak it to find out where it is failing. Dan Link to comment Share on other sites More sharing options...
supernoc Posted November 9, 2008 Author Share Posted November 9, 2008 Your query is fine, it look sl iek there is no problem with the code. I would suggest your database is the issue. Some servers (despite popular belief) host case sensetive MYSQL databases. I found this ouit the hard way myself. Just a suggestion. Not sure its the answer you're looking for though. Another interesting one I've found is that some servers get cranky if values are stored in ''. Try removing those also to see if the query executes. The easiest way I find to solve these issues is to copy the query and run it from phpmyadmin or Navicat or whatever you use to manage your database. The it is much easier to test the query and tweak it to find out where it is failing. Dan Thank you for the suggestions. I can confirm the query works fine in phpadmin, and that the database name, tables, and values are all identical. This one is puzzling. Of all the similar threads on the net, none had a solution that i have found. Link to comment Share on other sites More sharing options...
Jan Zonjee Posted November 9, 2008 Share Posted November 9, 2008 Thank you for the suggestions. I can confirm the query works fine in phpadmin, and that the database name, tables, and values are all identical. This one is puzzling. Of all the similar threads on the net, none had a solution that i have found. Are you sure there is not a contribution in there that uses the native PHP MySQL queries instead of the tep_db_query functions? That could mean there is another thread started with another link query identifier. Just guessing :). Link to comment Share on other sites More sharing options...
supernoc Posted November 9, 2008 Author Share Posted November 9, 2008 Are you sure there is not a contribution in there that uses the native PHP MySQL queries instead of the tep_db_query functions? That could mean there is another thread started with another link query identifier. Just guessing :). Ah, I never suspected that. How would you recommend I search for that in the files...? Link to comment Share on other sites More sharing options...
Jan Zonjee Posted November 9, 2008 Share Posted November 9, 2008 Ah, I never suspected that. How would you recommend I search for that in the files...? There are a lot of text editors that can search for a phrase in files in directories plus subdirectories. Then search for those PHP functions like mysql_fetch_array, mysql_num_rows, mysql_select_db which normally would only be found in includes/functions/database.php. If you find those outside that file then that might find the problem spot there. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.