Bug #15933 Updated: PHP 4.* binary does not connect to mysql from a cron job
| From: | jtate@php.net | Date: | Thu, 07 Mar 2002 15:36:15 +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-1925@lists.php.net to get a copy of this message | ||
ID: 15933
Updated by: jtate@php.net
Reported By: gpankhurst@hotmail.com
-Status: Open
+Status: Feedback
Bug Type: MySQL related
Operating System: Sco Unixware 7.1
PHP Version: 4.1.0
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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