I have googled this to the edge of my ability and the current results don't seem to apply to me.
A couple days ago, the admin made some changes to the system, and the script I had to run nightly stopped working. When I would attempt to run the script I would get the following:
PHP Warning: mysql_connect(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /Path/UpdateDB.php on line 2
PHP Warning: mysql_connect(): No such file or directory in /Path/UpdateDB.php on line 2
PHP Warning: mysql_select_db(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /Path/UpdateDB.php on line 3
PHP Warning: mysql_select_db(): No such file or directory in /Path/UpdateDB.php on line 3
PHP Warning: mysql_select_db(): A link to the server could not be established in /Path/UpdateDB.php on line 3
No connection.
I contacted the admin and she said that she made some changes. When I ran that script this morning I just got the failure messages that I set up that are giving me this error:
MySQL error Data truncated for column 'GameID' at row 1
Now I checked all the other that were talking about the tables being strict and having my data be too large, but GameID is an int and the largest value that I have is 1737690.
At one point I set the failure to echo my statement, and then manually tried to run that in phpmyadmin and it worked. So that makes me believe it's something with the path it's trying to use.
EDIT: This is the email from the admin:
Some updates were done last break. OSX has php installed at /usr/bin/php. We installed a local php at /usr/local/bin/php and configured it to work with mysql. You you need to ensure you use php at /usr/local/bin/php.
I have restored your crontab file. I also added a MAILTO and PATH. All are commented out for now. If you uncomment the UpdateDB.php you should also uncomment the MAILTO and PATH. MAILTO will send any output to your email address. PATH will ensure that /usr/local/bin/php is used instead of /usr/bin/php.
#MAILTO=evan.lepolt@gmail.com
#PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/local/mysql/bin
#0 * * * * cd ~/Path; php UpdateDB.php;
I have updated the PATH you get when you SSH to ucfilespace.uc.edu. So it now has /usr/local/bin first so /usr/local/bin/php will be used instead of /usr/bin/php if you use php command.
/usr/local/bin/php has the mysql socket defined as /tmp/mysql.sock. So you script should now work via cron and at command line also.