Portal Home > Knowledgebase > Articles Database > PHP / SQL


PHP / SQL




Posted by blaug12, 01-03-2008, 12:47 PM
Hi! I run a website that uses PHP and MySql. It was working fine till today, when our webhost (Lunarpages) decided to upgrade their servers. Now my site's scripts don't work, everytime I click on a link from the home page I get this: MySQL: query error: SELECT * FROM abcProducts WHERE nID = Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/abc/public_html/includes/products.php on line 111 What do I do guys? Can recommend a reliable person/company to fix this for me? Thanks Rick

Posted by derek.bodner, 01-03-2008, 12:59 PM
does your site require register_globals to be turned on? It seems like the value in the where clause isn't being populated anymore.

Posted by blaug12, 01-03-2008, 01:22 PM
I am sorry, but I just dont know. How can I find out? Thanks.

Posted by derek.bodner, 01-03-2008, 01:37 PM
put up a page that has only the following: Then load that page in a web browser, search for the following: register_globals Off Off And paste the results here.

Posted by blaug12, 01-03-2008, 02:50 PM
You were right! This is what they say (after 7 hours from openig the support ticket): I apologize for the inconvenience. Customers on our Massar server were notified on December 19, 2007 that MySQL and Mail Service Upgrades would be taking place December 28 - 30, 2007. This was also posted on our forum: http://www.lunarforums.com/lunarpage...-t45427.0.html On Sunday, December 30, 2007 at 11pm PST, we will upgrade the following: MySQL Where PHP 5.X is installed, this will be upgraded to the latest version 5.2.4. PHP 4.4.4 will be upgraded to 4.4.7 on the server. MySQL will upgrade to 5.0.27 from 4.1 series. The MySQL upgrade is due to the older MySQL 4 and 4.1 versions having been phased out for support by MySQL last year. Additionally, MySQL 5 is already running on our newest Linux shared servers, so this will allow us to run the same version across our entire Linux server network. For further information on the now deprecated MySQL 4 / 4.1 please see: http://dev.mysql.com/doc/refman/4.1/en/ For more details on MySQL and specifically MySQL 5 series, please review the Wikipedia article on it at http://en.wikipedia.org/wiki/MySQL Most scripts should run normally without issues on MySQL 5, however, if you are running any scripts which are older or not up-to-date, please ensure to obtain the most current copy of the script from the script development site so that the script will function properly with MySQL 5. If you have installed the script via Fantastico, please upgrade in Fantastico in cPanel to the most recent version if you have not already done so. Some scripts such as phpBB or SMF may need patched if you do not have the most up-to-date copy. Please note that running an older copy of any script is a security risk as you should always have the most up-to-date, secured copies of scripts on your account. Finally, please note that PHP register_globals will be set to Off in our global php.ini file. You can change this back to on simply by adding a php.ini file onto your account with the following details: register_globals = On This can be placed into your public_html folder. Feel free to contact us if you require further assistance or have any questions, or consult our forums at http://lunarforums.com

Posted by blaug12, 01-03-2008, 02:53 PM
So (keeping in mind I have no knowledge of php) what should I do. I know how to create a text file and can rename it to php.ini and save it in the public_html folder. Is that it? The text file to say (only) register_globals = On ? Would really appreciate any feedback, thanks again. Rick



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
BrowserDefender Help (Views: 580)
Re. HELM Web Hosting (Views: 618)