Jump to content

Recommended Posts

Not sure if this is the right category but it's the closest I could find.

 

I am trying to run a cron job and I get a permission denied when the cron job is run.

 

But in that script I have this at the top:

$dbhost = "localhost";
$dbname = "mydb_name";
$dbuser = "mehere";
$dbpass = "mypassword";
mysql_connect ( $dbhost, $dbuser, $dbpass) or die("Could not connect: ".mysql_error());
mysql_select_db($dbname) or die(mysql_error());

$curr_date=date("Y-m-d");
//delete table here
$query = "select this from that where thois = that"
$result=mysql_query($query) or die(mysql_error());

 

But when it says "permission denied" it looks like I am not even running the script?

 

To administrator: if this belongs in another forum that is seldom-used, could you keep this here for a short while until I get an answer and then move it? :-)

 

I am pointing to the correct directory int he cron job:

 

/home/myname/cronjobs/runthis.php

 

 

Link to comment
https://forums.phpfreaks.com/topic/265197-cron-wont-run/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.