Running php from cron - working up to a point

Hi there, I am struggling to try and work out what is going wrong with a cron job i have running daily which opens up an imap mailbox and extracts a rar file to a directory on the web server. The script works ok when run manually, and when it is running from cron, I can see that it opens up the mailbox and reads unread messages, however, there seems to be an issue with extracting the rar file when running from the cron. Permissions are set to 777 on the relevant folder where the rar is being extracted to, so I'm not sure what's going
on.

My cron line is as follows:

05 20  * * * nicky /usr/bin/php -q /u01/www/vhosts/www.mysite.co.uk/httpdocs/imap_get_rars.php >/dev/null

I'm a bit of a linux newb so any pointers in the right direction (or how to catch errors in this situation) would be great!

Your php script does not show any error?

Try the following:

exec 1>> <path-to-log>/phpScriptExec.log; exec 2>> <path-to-log>/phpScriptExec.err; /usr/bin/php -q /u01/www/vhosts/www.mysite.co.uk/httpdocs/imap_get_rars.php 

Change the exec part of the crontab line and it will place an error in the <path-to-log>/phpScriptExec.err.

Regards.

Thanks felipe, that helped me track down the problem. Some relative paths in my php script which I've changed to absolute and all working now.