![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
Warning: mysql_query():supplied argument is not a valid MySQL-Link resourceHi everyone
Please help me. I'm trying to install a script but it comes up with this error message: "Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in D:\www\www.test4.co.za\....\lang\lang.php on line 35" This is on lines 35 and 57 which are identical, in red below: PHP Code:
PLEASE help me Thanking you in advance Last edited by admin : 07-Jul-2008 at 20:21.
Reason: Please insert your example PHP codes between [PHP] and [/PHP] tags
|
|||
|
#2
|
|||
|
|||
Re: Warning: mysql_query():supplied argument is not a valid MySQL-Link resource...So , the error says that on line 35 a "supplied argument is not a valid MySQL-Link resource in D:\www\www.test4.co.za\...."
The line is: $row = mysql_fetch_array($result, MYSQL_ASSOC); ...the arguments are: '$result' and 'MYSQL_ASSOC' I have only seen mysql_fetch_array( $result ); run without the 'MYSQL_ASSOC' constant in there. From this: http://www.php.net/mysql_fetch_array I see that it specifies the array type to be returned. Did you put the MYSQL_ASSOC in there or did it come like that? That may be a problem , but I don't think so. Something's comming up with that: D:\www\www.test4.co.za we see in the warning. You can check the values leading up to those arguments to see if they all are as expected. Try inserting the echo statement below into the corresponding location of your code and see what output you get: PHP Code:
Last edited by Howard_L : 08-Jul-2008 at 01:52.
|
|
#3
|
|||
|
|||
Re: Warning: mysql_query():supplied argument is not a valid MySQL-Link resourceHi
Thanx for replying. Was away for a while, so sorry for taking so long to post back. As you may have noticed, this error occurred on my local pc server (windows). I decided to upload the script into a subdomain of one of my live sites, and all worked 100%. It installed perfectly and I could further configure and use it without any issues. The site is linux. I'm thinking that it maybe configuration of the local server. I have no clue....I usually do everything locally, then upload to live site once I'm ready to launch the site. Could it be windows? |
|
#4
|
|||
|
|||
Re: Warning: mysql_query():supplied argument is not a valid MySQL-Link resourceYour home server is a Windows? Which one?
Can you run other php scripts? ...ones that can manipulate mysql? I think you can but as you say something is not set up right. Code:
But I imagine there are some default file searching parameters which might be a cause... what do you think? |
|
#5
|
|||
|
|||
Re: Warning: mysql_query():supplied argument is not a valid MySQL-Link resourceHi Howard,
My home server is windows xp. All php scripts run, this is the first to give me problems. Mysql works fine with php. I tried what you suggested, but results still the same: "Warning: mysql_query():supplied argument is not a valid MySQL-Link resource" I have no clue what's the issue is. I've just about checked everything I suspected. So frustrating... Thanks so much for your time and input. |
|
#6
|
|||
|
|||
Re: Warning: mysql_query():supplied argument is not a valid MySQL-Link resourceYou didn't get any values for either of those variables?
Try putting this echo before the section that errors. HTML Code:
What does it hold on the server where you get this script to work? Last edited by Howard_L : 19-Jul-2008 at 21:43.
|
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| run script command on ns2.26 | newbie06 | Computer Software Forum - Linux | 65 | 19-Aug-2009 08:50 |
| Str_Misaligned in Double Link List | Peter_APIIT | C Programming Language | 1 | 29-Feb-2008 21:50 |
| Cpanel downgrade MYSQL 4.1.X to MySQL 4.0.xx | Webhosting-live | Web Hosting Forum | 1 | 01-Sep-2006 03:54 |
| [Include] Doubly-linked List | dsmith | C Programming Language | 6 | 14-Apr-2006 14:12 |
| gzwrite(): supplied argument is not a valid stream resource in | JdS | MySQL / PHP Forum | 2 | 24-Mar-2003 08:57 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The