sniko Posted June 11, 2015 Share Posted June 11, 2015 (edited) Not running at all. This is what I have You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Not running at all. The queries or the cron? Please be more specific when describing a problem. Seriously change the way you code. Your editor (or you) is adding stars, which will result in a parse error, which will result in a FATAL error, which will result in the file not running. Tip:Some simple debugging will help you. Look at your error logs, put verbose error reporting on (error_reporting(E_ALL); ini_set('display_errors', 1);) and work from there. Don't work blind and rely on people always helping you because you cannot be bothered/don't know how to debug. Note:When describing a problem, please be more descriptive! A report like "Not running at all." is ambiguous (what isn't running? the file? the cron? the query?) and definitely doesn't help us debug it. Obligatory:http://blog.teamtreehouse.com/how-to-debug-in-php (Please read.) Edited June 11, 2015 by sniko Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted June 11, 2015 Share Posted June 11, 2015 Not running at all. The queries or the cron? Please be more specific when describing a problem. Seriously change the way you code. Your editor (or you) is adding stars, which will result in a parse error, which will result in a FATAL error, which will result in the file not running. Tip:Some simple debugging will help you. Look at your error logs, put verbose error reporting on (error_reporting(E_ALL); ini_set('display_errors', 1);) and work from there. Don't work blind and rely on people always helping you because you cannot be bothered/don't know how to debug. Note:When describing a problem, please be more descriptive! A report like "Not running at all." is ambiguous (what isn't running? the file? the cron? the query?) and definitely doesn't help us debug it. The queries. And I'm not sure what the go is there. It's annoying, but it's only when I post the scripts on here that I get the stars Quote Link to comment Share on other sites More sharing options...
sniko Posted June 11, 2015 Share Posted June 11, 2015 The queries. And I'm not sure what the go is there. It's annoying, but it's only when I post the scripts on here that I get the stars Then run the file manually and check the output. There will be output because of your or die(mysql_error());. Have you forgot to run the SQL statements to create the tables/columns? Have you misspelled a table/column name? Do you have an open connection to your database? Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted June 11, 2015 Share Posted June 11, 2015 Then run the file manually and check the output. There will be output because of your or die(mysql_error());. Have you forgot to run the SQL statements to create the tables/columns? Have you misspelled a table/column name? Do you have an open connection to your database? No errors are displaying. I'm not sure if there is an open connection or not. And no I don't think I've forgotten or misspelt anything.. This is not the only custom cron I've had problems with.. Quote Link to comment Share on other sites More sharing options...
sniko Posted June 11, 2015 Share Posted June 11, 2015 No errors are displaying. I'm not sure if there is an open connection or not. And no I don't think I've forgotten or misspelt anything.. This is not the only custom cron I've had problems with.. Then I would assume you're not supplying the correct GET value in the code field and it's just running up until exit;, thus no output. How are you manually running the cron? Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted June 11, 2015 Share Posted June 11, 2015 Then I would assume you're not supplying the correct GET value in the code field and it's just running up until exit;, thus no output. How are you manually running the cron? If that is the entire cron then there is no cron code so we can probably rule that out. I think at least one problem would be his event_add function which is declared at the top of his file before any of his includes so it doesn't understand his global variables. Also, there is no function called mysql_escape() unless it's a custom function you create inside your event add function that should be changed to $db->escape. Bottom line I think you should remove that event_add function from your cron since it is in one of your included files. Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted June 11, 2015 Share Posted June 11, 2015 Then I would assume you're not supplying the correct GET value in the code field and it's just running up until exit;, thus no output. How are you manually running the cron? Just entering it into my address bar Quote Link to comment Share on other sites More sharing options...
sniko Posted June 11, 2015 Share Posted June 11, 2015 If that is the entire cron then there is no cron code so we can probably rule that out. I think at least one problem would be his event_add function which is declared at the top of his file before any of his includes so it doesn't understand his global variables. Also, there is no function called mysql_escape() unless it's a custom function you create inside your event add function that should be changed to $db->escape. Bottom line I think you should remove that event_add function from your cron since it is in one of your included files. Yep, nice spot. :D Just entering it into my address bar Entering what? Do you have anything in the query string? Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted June 11, 2015 Share Posted June 11, 2015 Yep, nice spot. :D Entering what? Do you have anything in the query string? I'm entering /lotto_cron.php at the end of my url Quote Link to comment Share on other sites More sharing options...
sniko Posted June 11, 2015 Share Posted June 11, 2015 I'm entering /lotto_cron.php at the end of my url See: http://makewebgames.io/showthread.php/46077-Lottery-Mod?p=312094&viewfull=1&highlight=you%27re%20not%20supplying%20the%20correct%20GET%20value%20in%20the%20code%20field#post312094 Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted June 11, 2015 Share Posted June 11, 2015 If that is the entire cron then there is no cron code so we can probably rule that out. I think at least one problem would be his event_add function which is declared at the top of his file before any of his includes so it doesn't understand his global variables. Also, there is no function called mysql_escape() unless it's a custom function you create inside your event add function that should be changed to $db->escape. Bottom line I think you should remove that event_add function from your cron since it is in one of your included files. No.Cron code? - - - Updated - - - See: http://makewebgames.io/showthread.php/46077-Lottery-Mod?p=312094&viewfull=1&highlight=you%27re%20not%20supplying%20the%20correct%20GET%20value%20in%20the%20code%20field#post312094 How about this? You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Still getting no results though.. Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted June 11, 2015 Share Posted June 11, 2015 Your cron code should be in your database connection file,....Another test you can do is do bit by bit of the script instead of the whole script to see what is the error... Quote Link to comment Share on other sites More sharing options...
sniko Posted June 11, 2015 Share Posted June 11, 2015 No.Cron code? - - - Updated - - - How about this? You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Still getting no results though.. That will result in a parse error, thus a white screen, thus nothing. Okay, I'm done. Starting to think you're a troll. Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted June 11, 2015 Share Posted June 11, 2015 Your cron code should be in your database connection file,....Another test you can do is do bit by bit of the script instead of the whole script to see what is the error... Where do I find this? And what would I enter? Aha! :/ Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted June 11, 2015 Share Posted June 11, 2015 That will result in a parse error, thus a white screen, thus nothing. Okay, I'm done. Starting to think you're a troll. And that is what I'm trying to figure out. Why is it returning just a plain white screen with no errors, and I'm getting no results? And troll? Really, I'm not a troll, I'm just a complete dumb ass, who has no clue what I'm doing, and thinking about just giving up on it, because I can't code for crap. And like you say, I'm never going to learn anything, so I may as well give up on it while I'm ahead of it.. Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted June 11, 2015 Share Posted June 11, 2015 (edited) MTG already answered the question in your other thread about the setup of your cron code... http://makewebgames.io/showthread.php/45849-Help-with-getting-my-Cron-to-work?highlight=cron To be honest I think it's the cron it self not set properly not the php page. Just a test you can see if the error reporting is working or not I added extra ss to the events table should throw an error if you don't get the error than you have your error reporting disabled. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Edited June 11, 2015 by lucky3809 Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted June 11, 2015 Share Posted June 11, 2015 MTG already answered the question in your other thread about the setup of your cron code... http://makewebgames.io/showthread.php/45849-Help-with-getting-my-Cron-to-work?highlight=cron To be honest I think it's the cron it self not set properly not the php page. Just a test you can see if the error reporting is working or not I added extra ss to the events table should throw an error if you don't get the error than you have your error reporting disabled. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Fatal error: Call to a member function escape() on a non-object in /home/braidz/public_html/lotto_cron.php on line 8 Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted June 11, 2015 Share Posted June 11, 2015 (edited) So your error reporting is on, so now test inserting an event You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Edited June 11, 2015 by lucky3809 Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted June 11, 2015 Share Posted June 11, 2015 So your error reporting is on, so now test inserting an event You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Fatal error: Call to a member function query() on a non-object in /home/braidz/public_html/lotto_cron.php on line 11 Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted June 11, 2015 Author Share Posted June 11, 2015 Fatal error: Call to a member function query() on a non-object in /home/braidz/public_html/lotto_cron.php on line 11 something is wrong with your db wrapper try include the file inside the cron usually found class/class_db_mysql.php or class/class_db_mysqli.php Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted June 11, 2015 Share Posted June 11, 2015 something is wrong with your db wrapper try include the file inside the cron usually found class/class_db_mysql.php or class/class_db_mysqli.php So what do you mean by the. include_once ("class_db_mysql.php") in the cron file? Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted June 11, 2015 Share Posted June 11, 2015 (edited) So have you changed your variables? $db or the function is not there for query?? I don't get why you got that error because in your script you are using it, unless you are changing the variables on purpose, to have us play a guessing game, all i can think of... I ran the same insert query and it worked on mccodes. you might also have a illegal copy of mccodes with all the problems you been having. Edited June 11, 2015 by lucky3809 Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted June 11, 2015 Share Posted June 11, 2015 So have you changed your variables? $db or the function is not there for query?? I don't get why you got that error because in your script you are using it, unless you are changing the variables on purpose, to have us play a guessing game, all i can think of... I ran the same insert query and it worked on mccodes. you might also have a illegal copy of mccodes with all the problems you been having. I wouldn't have a clue, that's how it is in my global_func.php folder. - - - Updated - - - And I am using.Ravan's at the moment... Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted June 11, 2015 Author Share Posted June 11, 2015 I wouldn't have a clue, that's how it is in my global_func.php folder. - - - Updated - - - And I am using.Ravan's at the moment... is this in your cron file? You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted June 11, 2015 Share Posted June 11, 2015 Ok this should work and this is the last time I am posting a full script for you, you really need to learn yourself or you will get nowhere: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 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.