Keytachi Posted April 28, 2007 Share Posted April 28, 2007 Hello. I dont understand much (none) of PHP, and i downloaded a pre-made website, so i could create a registration page (and use their template etc.). But when i hosted it, i got the following errors: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152 Warning: Invalid argument supplied for foreach() in /home2/onloanet/public_html/www/pirate-key/core/common.php on line 39 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152 here is the line 152: $result = mysql_query($queryMain[0], $this->link); and here the line 39: foreach($rows as $r){ If you need previous lines, tell me Thank you for your help, and for putting up to a noob Gr. Key Link to comment https://forums.phpfreaks.com/topic/49093-some-errors/ Share on other sites More sharing options...
taith Posted April 28, 2007 Share Posted April 28, 2007 on $result = mysql_query($queryMain[0], $this->link); scrap $this->link... its completly unnecessary... Link to comment https://forums.phpfreaks.com/topic/49093-some-errors/#findComment-240523 Share on other sites More sharing options...
Keytachi Posted April 28, 2007 Author Share Posted April 28, 2007 thanks, that eliminated most of the errors, but i have this one: Parse error: syntax error, unexpected T_IF in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 153 here is the line 152 and 153: $result = mysql_query($queryMain[0] if ($result === false) return $this->_setDbError($queryMain[0]); again, thank you for your help Gr. Key Link to comment https://forums.phpfreaks.com/topic/49093-some-errors/#findComment-240531 Share on other sites More sharing options...
taith Posted April 28, 2007 Share Posted April 28, 2007 $result = mysql_query($queryMain[0]); Link to comment https://forums.phpfreaks.com/topic/49093-some-errors/#findComment-240533 Share on other sites More sharing options...
Keytachi Posted April 28, 2007 Author Share Posted April 28, 2007 i think that now this next errors are from the host are they not? Warning: mysql_query() [function.mysql-query]: Access denied for user 'onloanet'@'localhost' (using password: NO) in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152 Warning: mysql_query() [function.mysql-query]: Access denied for user 'onloanet'@'localhost' (using password: NO) in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152 Warning: Invalid argument supplied for foreach() in /home2/onloanet/public_html/www/pirate-key/core/common.php on line 39 Warning: mysql_query() [function.mysql-query]: Access denied for user 'onloanet'@'localhost' (using password: NO) in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152 i have attached the Mysql file, so if you want, you can check the other lines [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/49093-some-errors/#findComment-240561 Share on other sites More sharing options...
taith Posted April 28, 2007 Share Posted April 28, 2007 AAAAH!!! VILE CLASSES! *runs away* ohya... lol... it means one or more of your username/password/host are wrong... lol Link to comment https://forums.phpfreaks.com/topic/49093-some-errors/#findComment-240564 Share on other sites More sharing options...
Keytachi Posted April 28, 2007 Author Share Posted April 28, 2007 <?php $config = array( 'template' => 'offlike', 'default_lang' => 'en', // Default lang // Don't change 'lang' => 'en', // Site Default lang 'db_type' => 'mysql', 'db_host' => 'pirate-key.no.ip.org', 'db_port' => '3306', 'db_username' => 'Keytachi', 'db_password' => 'pass', 'db_name' => 'Pirates_Key', 'db_encoding' => 'utf8' // don't change ); $news_forum_id = 0; // forum id for "news" $bugs_forum_id = 0; // forum id for "bugtracker" $templates = array('offlike'); ?> here is the config.php file... in the db_host im supposed to type in my exteranl adress right? in the db_name i used the name i see in the navicat connection... the odd thing is that, after i added the final "s" in "Pirates" i got the following error: Warning: main(config.php) [function.main]: failed to open stream: No such file or directory in /home2/onloanet/public_html/www/pirate-key/index.php on line 23 i went to index.php changed the directory of 'config.php' to '/home2/onloanet/public_html/www/pirate-key/config.php' and then i got the error back Link to comment https://forums.phpfreaks.com/topic/49093-some-errors/#findComment-240574 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.