Re: [PHP-DB] Corn job anomaly

[email protected] (Karl DeSaulniers) Tue, 20 Sep 2016 03:00:19 -0500
Newsgroups php.db
Message-ID <[email protected]>
> On Sep 20, 2016, at 12:16 AM, Karl DeSaulniers <[email protected]> =
wrote:
>=20
>> On Sep 19, 2016, at 6:14 AM, Richard =
<[email protected]> wrote:
>>=20
>>=20
>>=20
>>> Date: Monday, September 19, 2016 03:26:54 -0500
>>> From: Karl DeSaulniers <[email protected]>
>>>=20
>>> I am hoping someone can enlighten me on this issue I am having.
>>> I am trying to set up a cron job to run a php file.
>>> I am getting a strange error though.
>>>=20
>>> /home/(protected directory)/auto_reminder.php: line 1: ?php: No
>>> such file or directory /home/(protected
>>> directory)/auto_reminder.php: line 2: =3D: command not found
>>> /home/(protected directory)/auto_reminder.php: line 3: /*WordPress:
>>> No such file or directory
>>>=20
>>> This is lines 1, 2 and 3 from my code.
>>>=20
>>> <?php=20
>>> $error_log =3D "";
>>> /*WordPress Optons Table*/
>>>=20
>>> Am I correct in thinking that the error is saying that php doesn't
>>> exist? Has anyone ever experienced this? Is this a server related
>>> issue? Any clue on how to fix?
>>=20
>> What do you have on the "command-line" part of your crontab entry?
>> Your php script will need to be called as a php cgi or cli. Because
>> of the way things get set up via cron, it's best to include the full
>> path to the php binary on the cron command-line.
>>=20
>=20
> Hey thanks Richard. That was the problem.
> Sorry, I am new to command line and cron jobs.=20
> Was probably a newb question, however, now it is saying that my =
database user is not allowed access.
> I have a mysql connection inside my script that reads the database to =
get user email addresses to send a reminder email to.
>=20
> Is there supposed to be a call or directive to load mysql in my =
command line as well?
> Man this is frustrating.
>=20
> Much thanks for your input!
>=20
> Best,
>=20
> Karl DeSaulniers
> Design Drumm
> http://designdrumm.com
>=20

Heh, I just noticed the subject line. Got to love auto-correct!
I feel like a corn job at this point...  (:  /)

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com=