RE: [PHP] mysql.lock file location
| From: | Donald Tyler | Date: | Thu, 25 Sep 2003 15:39:23 +0000 |
| Subject: | RE: [PHP] mysql.lock file location | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163928@lists.php.net to get a copy of this message | ||
Yeah I do that too. But I was reluctant to do that with something that
just seemed like a fix for a problem that shouldnt even exist.
If the server with my scripts is configured correctly, then I should
never have to specify a .sock file. I hope...
-----Original Message-----
From: Jackson Miller [mailto:jackson@coldfeetcreative.com]
Sent: Thursday, September 25, 2003 10:15 AM
To: Donald Tyler
Subject: Re: [PHP] mysql.lock file location
On Thursday 25 September 2003 8:55, you wrote:
> Is there no way for me to change the default location for PHP? I have
> quite a few scripts that I really dont want to have to do that to. I
> would rather reconfigure PHP.
You can set default mysql settings in php.ini which allows you to set a
socket
file. Then you leave the default settings out of mysql_connect all
together.
I _think_ that you can then connect with
mysql_connect("localhost","username","password") and it will use the
socket
file set in php.ini.
If that doesn't work you can try editing the client section of
/etc/my.cnf
Also, I always set up my apps in a way that the db connection is only in
one
place and just called from all the scripts that need it. You can do
this
with an include or using object oriented coding. This way if you ever
have
to make a system wide change you don't have to go to all the scripts and
change it.
Hope that helps.
-Jackson
>
> -----Original Message-----
> From: Jackson Miller [mailto:jackson@coldfeetcreative.com]
> Sent: Thursday, September 25, 2003 8:24 AM
> To: Donald Tyler
> Subject: Re: [PHP] mysql.lock file location
>
> On Thursday 25 September 2003 8:17, Donald Tyler wrote:
> > Hi,
> >
> > Does anyone know how to tell PHP to look in a different location for
>
> the
>
> > mysql.lock file? It's currently looking in /tmp/ and that's wrong.
>
> mysql_connect(":/path/to/mysql.lock","username","password");
>
> -Jackson
>
> > Thanks
> >
> >
> >
> >
> >
> > Donald
--
jackson miller
cold feet creative
615.321.3300 / 800.595.4401
jackson@coldfeetcreative.com
cold feet presents Emma
the world's easiest email marketing
Learn more @ http://www.myemma.com