php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15933 PHP 4.* binary does not connect to mysql from a cron job
Submitted: 2002-03-07 09:50 UTC Modified: 2002-06-06 01:00 UTC
From: gpankhurst at hotmail dot com Assigned:
Status: No Feedback Package: MySQL related
PHP Version: 4.1.0 OS: Sco Unixware 7.1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gpankhurst at hotmail dot com
New email:
PHP Version: OS:

 

 [2002-03-07 09:50 UTC] gpankhurst at hotmail dot 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 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-07 10:07 UTC] gpankhurst at hotmail dot com
I forgot to mention that the scripts connect fine from the command line and only failed to connect from cron.
 [2002-03-07 10:36 UTC] 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-06-06 01:00 UTC] php-bugs at lists dot php dot net
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".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 04 04:01:29 2024 UTC