Re: php / mysql connection after recent update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 11 March 2010 10:30, Chris Allison
<chris.charles.allison@xxxxxxxxxxxxxx> wrote:
>
>
> On 11 March 2010 10:23, Chris Allison <chris.charles.allison@xxxxxxxxxxxxxx> wrote:
>>
>> Morning,
>>
>> Since updating yesterday, all my php scripts that connect to a mysql database (whether local or over the network) stopped being able to connect.  I had to append the port number to the host definition in the mysql connect function call to get them to work again.  I have been unable to find what has changed.  Any ideas where the change may have happened.
>>
>> thanks
>>
>> Chris Allison
>>
>
> Hi,
>
> Digging a bit deeper, the php.ini directive mysql_default_port is not set, though it has never been set in my php.ini.  setting that to 3306 solved the problem.
>
> Sorry for the noise.
>
> Cheers
>
> Chris


Hi,

This would appear to be an upstream bug/feature. from the
mysql_connect doc page comments:


"The php.ini file suggests that PHP will select the port by using the
$MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services, but in this
case it is not so.  /etc/services on my machine has 3306 listed, but
it didn't get picked up."

cheers

Chris


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux