Jump to content
MakeWebGames

Recommended Posts

Posted (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 by sniko
  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

Posted
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

Posted
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?
Posted
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..

Posted
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?

Posted
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.

Posted
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

Posted
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?

Posted
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 - - -

 

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..

Posted
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.

Posted
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! :/

Posted
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..

Posted (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 by lucky3809
Posted
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

Posted
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

Posted
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

Posted
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?

Posted (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 by lucky3809
Posted
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...

Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...