This is a discussion on "[SOLVED] PHP-MySQL sitw not woking on webhost, but works on XAMPP" within the PHP Forum section. This forum, and the thread "[SOLVED] PHP-MySQL sitw not woking on webhost, but works on XAMPP are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] PHP-MySQL sitw not woking on webhost, but works on XAMPP
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Hello people,
I got this strange problem. I have created a website that does not work with my webhost but works on my local machine when I use XAMPP. Configuration: webhost: PHP: 4.4.7 MySQL: 4.1.22 - standard XAMPP: PHP: 5.2.4 MySQL: 5.0.45 I get the error Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/biology/public_html/demo/register.php on line 9 It amazes me that the site works smooth on my local machine. Do you think this problem is due to version difference? If yes, then can someone suggest PHP and MySQL 5 webhosts? Thank you! Just in case you need the URL its demo.biologyformhtcet.com!
Last Blog Entry: Cross browser nuisance (Feb 11th, 2008)
|
|
|
|
#2
|
||||
|
||||
|
Re: PHP-MySQL sitw not woking on webhost, but works on XAMPP
I think the actual function is mysql_num_rows() but from the error you are receiving I'd guess that the query is not be executed.
Where you have: mysql_query(query string); change it to:
Have you put in the right database connection string for your server? The connection for your localhost and the connection for your server will be different no doubt.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#3
|
|||
|
|||
|
Re: PHP-MySQL sitw not woking on webhost, but works on XAMPP
[SOLVED]
Well guys, the problem is solved. I think it was compatibility issues of PHP and MySQL because I tested it on a PHP 5 and MySQL 5 webhost (http://www.whost.in) and got it to work without any hassles. Thanks Alex for taking the time. Quote:
Last Blog Entry: Cross browser nuisance (Feb 11th, 2008)
Last edited by RohanShenoy; Jan 21st, 2008 at 19:08. |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Clear:both does not works in IE6 | attila001122 | Web Page Design | 10 | Dec 30th, 2007 14:43 |
| Xampp | nashultz07 | Databases | 6 | Aug 4th, 2007 20:49 |
| webhost | cyclone2876 | Hosting & Domains | 7 | Jun 30th, 2007 12:02 |
| What webhost to use ? | amandeep | Hosting & Domains | 3 | May 28th, 2006 15:51 |