Warning: mysql_fetch_assoc():

Status
Not open for further replies.

chatflash

New Member
Messages
9
Reaction score
0
Points
0
Hey im new here so dont shoot me when im posting in the rong section ;)

I was a client from freehostia, but after that the have lots of downtime the last week i go search to some other free company and come to you.

I have make a account, upgrade to the php v2, upload my site, insert the database.
But now after done al these things i get this errors:

Code:
Warning:  mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /backup/home/*********/public_html/include/settings.php on line 9

Warning:  mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /backup/home/*********/public_html/include/functions.php on line 75

Warning:  mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /backup/home/*********/public_html/include/functions.php on line 103

Warning:  mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /backup/home/*********/public_html/include/functions.php on line 172

Warning:  mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /backup/home/*********/public_html/include/functions.php on line 179

Warning:  mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /backup/home/*********/public_html/include/functions.php on line 186

Warning:  Smarty error: unable to read resource: "index.tpl" in /backup/home/*********/public_html/Smarty/Smarty.class.php on line 1095

The site have worked by freehostia so thats not the problem, the have (i think) lower versions than you are.

Please can sombody help me about this, im working now from yesterday to get my site back online.

Thanxs for evrybody that can help me!
Edit:
Is there nobody that can help me out with this? :dunno:
 
Last edited:

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
Have you checked all the details related to your files' location, MySQL Database username and passwords.

Note:
* Files' location may be relative. Check them out..
* Your MySQL Username and Database Name will be prefixed with yourusername_


I think, the problem is your PHP Statement that opens the connection with MySQL DB. Check it out. Check for DBName and Password.
 
Last edited:

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
Somewhere you're doing a mysql_query() that isn't returning a result set.

Long story short, the query is invalid. That could be caused by a bum database, a missing character/quote, or any number of things.

The good news is if you can find where the problem is in that mysql_query(), you're good to go. I'd look at the database first, since you said it worked on another free host. If the database structure is even slightly different (such as an invalid table name, or a column is missing the letter "n" at the end (or any other letter)), the query will fail and error.



The bad news of course is that its erroring and without being able to see the DB structure and the script in question, it's gunna be hard to tell whats wrong. Any chance of posting the first 10 lines or so of the script (since the first error is at line 9, and everything after that appears to be a result of that error, the first 10 should be plenty) so myself and others can see what's wrong, just to make sure it's not a problem with the php code itself?


Edit: Ninja'd, but two sets of ideas on what could be wrong :)

In any case, if you do post the code, PLEASE FOR THE LOVE OF ALL THINGS SACRED REMOVE YOUR USERNAME AND PASSWORD FROM ANY LOG IN COMMANDS IN THE SCRIPT! Thank you :)
 
Last edited:

chatflash

New Member
Messages
9
Reaction score
0
Points
0
first to you guys, thanxs for the answer. :cool:

Freehostia is back but have a lot of downtime also today, but the same script is working there, you can see it working http://chatflashnl.freehostia.com/ (when the stay online ;))
And this is my adres here: http://chatflash.x10hosting.com/

This are the 10 lines of the settings.php file:
Code:
<?php
require_once('functions.php');
db_connect();

// GET ADDITIONAL CONFIGURATIONS FROM SQL //
$config = array();
$sql = "SELECT * FROM pm_config WHERE id = '1'";
$result = mysql_query($sql);
$config = mysql_fetch_assoc($result);

// Don't edit pass this line edit past this line
// ----------------------------------------------

its a code from http://www.phpsugar.com/

Hope you have enouf info to help me, when you need somthing more please ask :D


--Edit--
And yes the database connection is good, i had before make a mistake (forget the _) and than i get some other message, that cant connect to db etc.
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
I'm pretty sure you just have to wait for your PHP to update. It can take up to 12 hours after you submit your request.
 

GG-Xtreme

New Member
Messages
430
Reaction score
0
Points
0
Is there a config.php file also? What software is your site running? Has it been 12 hours since you upgraded your PHP?
 

chatflash

New Member
Messages
9
Reaction score
0
Points
0
I have received the mail that its have been updated (before this mail i have the mail that my requist was accepted).
And above in the control panel stay "PHP 5.2.4 - Intermediate Ver."
And below by php version stay " Intermediate PHP Configuration - You currently have this version"

i asume that i have te new version now? when im rong, tell me please.

yes there is a config.php, in the config stay MySQL information, Site information, Email server information.
When you exactly want the code please let me now.

I using PHP Melody form phpsugar (http://www.phpsugar.com/phpmelody.html)
Requirements:
* MySQL (version 4 or higher)
* PHP (version 4.2 or higher - PHP 5 compatible)
* GD library (Required for CAPTCHA & user avatars)
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
Yes. That mail states that your account PHP version has been upgraded to Intermediate i.e., V2.

X10 has MySQL 4.2, PHP 5.2.4, GD Library Installed.
 

chatflash

New Member
Messages
9
Reaction score
0
Points
0
Yes. That mail states that your account PHP version has been upgraded to Intermediate i.e., V2.

X10 has MySQL 4.2, PHP 5.2.4, GD Library Installed.

Yes so i have update (and working) V2 of php, x10 have the the good things and still it dont work :dunno:
The code working @ freehostia.
And yes i have tested it there on php version 4 and 5, after it i have switch back to php 4 because i need that fot some other site, so its compatible with it and not only because the developer say so an there site ;)
 
Status
Not open for further replies.
Top