Dazza Posted November 25, 2008 Share Posted November 25, 2008 Hello, I'll explain everything. I have entered the crons correctly in crontab, with the followong command line: curl http://********/crons/cron_hour.php?cod ... ********** The code is the same as the one in config.php I have contacted my host and they told me a file was corrupted, they fixed it and said it works. I must agree, because the day cron updates perfect (So I think) but the others are still not working, nor are they working manually. I'm no coder but decided to have a look at the cron scripts, I noticed an error on one of the hospital lines that I have corrected or so I believe. It was: $db->query("UPDATE users set hospital=hospital-1 WHERE hospital>0"); Its now: $db->query("UPDATE users SET hospital=hospital-1 WHERE 'hospital' > 0"); Now, after doing this I decide to run the cron manually and see if it works but I got this error msg (I believe its not related to the above change I made). Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in /home/*****/public_html/class/class_db_mysql.php on line 46 FATAL ERROR: Could not connect to database on localhost (Access denied for user 'root'@'localhost' (using password: NO)) Line 41 { $this->connection_id=mysql_pconnect($this->host, $this->user, $this->pass) or $this->connection_error(); } else { Line 46 $this->connection_id=mysql_connect($this->host, $this->user, $this->pass, 1) or $this->connection_error(); } mysql_select_db($this->database, $this->connection_id); return $this->connection_id; Line 50 } I realise the error msg says it cannot connect the my db, where/how can I change/view the log in details for this? The rest of my game works fine. Thanks in advance Quote Link to comment Share on other sites More sharing options...
Tezza` Posted November 25, 2008 Share Posted November 25, 2008 Re: [HELP] Crons wont update replace like 46 47 and 48 with this..... $this->connection_id=mysql_connect(host, user, >pass) or $this->connection_error(); } mysql_select_db(database, $this->connection_id); obvuastly make sure you have the correct user pass and datebase in, this used to always mess us with me. Quote Link to comment Share on other sites More sharing options...
Little Killer Posted November 25, 2008 Share Posted November 25, 2008 Re: [HELP] Crons wont update That sounds like the users i the config file is Wrong....Double check Info in config file Quote Link to comment Share on other sites More sharing options...
Dazza Posted November 25, 2008 Author Share Posted November 25, 2008 Re: [HELP] Crons wont update That sounds like the users i the config file is Wrong....Double check Info in config file Thats abit unclear. If you mean the code in config.php then yes i'v double checked it. Quote Link to comment Share on other sites More sharing options...
Little Killer Posted November 25, 2008 Share Posted November 25, 2008 Re: [HELP] Crons wont update i mean everything in the config file......or what ever other file you have that "Calls" the databse.........I thought that was Very clear..... Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) That mean.....in a connnecttion fail that user ROOT does NOT have access to YOUR database............and there is NO password set...... i said the code is second to check first off you need to makek sure the usre and databse is correct. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.