Re: where php at?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tedd wrote:
At 12:45 PM +1100 3/28/06, Chris wrote:

tedd wrote:

At 11:26 PM +0200 3/27/06, Ryan A wrote:

Ooops, and lets not forget this one:

curl http://www.yoursite.com/path/to/script/yourscript.php

you can put that in your cron job by going to cpanel.... its a long way
round but sometimes it can be useful....you should have CURL installed of
course.
The good thing about the above is it does not matter where the heck your php
is installed or if you have the "shebang" or not...

HTH again.

Cheers,
Ryan




Thanks Ryan, but that failed to work as well.


Are you getting errors emailed to you? What are they? If you're not, make sure you set the email address appropriately and then let us know what errors you get.

If you use the "shebang" method:

#!/path/to/php

make sure you set the file to executable - it should be 755.


Chris:

No, I'm not getting anything emailed to me -- and I'm using this email address.

The file is executable and is set at 755.

Last night I was able to access a file, but the errors I received were first a permission thing, which I changed. Then I received a bunch of emails back as I tried to get the thing to work -- can't find directory and such.

But, I was not using anything like:

/usr/local/bin/php /full/path/to/myscript.php

but rather something like:

/home/tedd/public_html/e1.sh

where in the e1.sh file was php code.

However, after reading so much about doing the usr/local/... thing, I now can't get the /home/tedd/... thing to do anything.

Last thought.. add something like this:

echo "I am in file " . __FILE__ . " at line " . __LINE__ . " at time " . date('r') . "\n";

to the top of the script that is meant to be running.

Every time it runs it will email you.

If you don't get an email, get your host to check their logs to make sure it's being triggered properly.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux