Bug #15933 Updated: PHP 4.* binary does not connect to mysql from a cron job

From: Date: Thu, 06 Jun 2002 05:00:07 +0000
Subject: Bug #15933 Updated: PHP 4.* binary does not connect to mysql from a cron job
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-9592@lists.php.net to get a copy of this message
ID: 15933 Updated by: php-bugs@lists.php.net Reported By: gpankhurst@hotmail.com -Status: Feedback +Status: No Feedback Bug Type: MySQL related Operating System: Sco Unixware 7.1 PHP Version: 4.1.0 New Comment: No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". Previous Comments: ------------------------------------------------------------------------ [2002-03-07 10:36:15] jtate@php.net Did you check that the necessary environment variables were set? Cron doesn't read your profile before launching the executable. Check to see that php from within cron can read the php.ini file. ------------------------------------------------------------------------ [2002-03-07 10:07:17] gpankhurst@hotmail.com I forgot to mention that the scripts connect fine from the command line and only failed to connect from cron. ------------------------------------------------------------------------ [2002-03-07 09:50:07] gpankhurst@hotmail.com I have a few PHP scripts that execute from a php binary from a cron job. Since changing to version 4 they fail to connect to the database with a :- "Can't connect to local MySQL server through socket '/tmp/mysql.sock'" error, or :- "Can't connect to MySQL server on 'xxxx'" if I don't use the local socket method of connecting. I've tried these versions of php and a few different versions of mysql all with the above same results php-4.0.3pl1 php-4.0.6 php-4.1.0 I've reverted the binary to version php-3.0.18 and it all works fine As the scripts are quite simple I only need mysql with the php binary, my configuration for the binaries is :- ./configure --enable-track-vars --with-mysql=/usr/local/mysql ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15933&edit=1

« previous php.bugs (#9592) next »