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

[cobalt-users] Re: MySQL setup problems (WAS: RE: cobalt-users digest...)



> I changed in php3.ini the default host,userid and pasword to which i want
to
> use
> Is this enough ?
>
> I tested the mysql connect and this seems to be ok
> get the following message
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 46 to server version: 3.22.32
>
> So if i execute the php3 file still got the same error
> Fatal error: Call to unsupported or undefined function mysql_pconnect() in
> sql.inc.php3 on line 22
>
> How can I reinstall the php3 module with mysql support ?
>
> Thanks
>
> Steven

First, I do not recommend putting a user/pass combo into the php3.ini file.
You open up MySQL and possibly all your databases (depending on the
user/pass combo) to everyone using PHP on your server.

Try this small PHP script and see if it produces the same error:
(There is a line break between each command that should be on one line.)

<?php

 $connection = mysql_connect("localhost", "USERNAME", "PASSWORD") or die
("Database connection failed!");

 $db = mysql_select_db("DATABASENAME", $connection) or die ("Database select
failed!");

 mysql_close($connection);
?>

Be sure to replace all the UPPERCASE text with the proper values specific to
your system:

USERNAME/PASSWORD: Try the root MySQL user/pass for this test
DATABASENAME: Use 'test' if you haven't created any additional databases
yet.

If you *DO NOT* receive any error(s) when you run this script, then you have
a problem with persistent MySQL connections.  Check the php3.ini file for a
line that starts with 'mysql.allow_persistent  =' and make sure it says 'On'
after the '=' sign.

If this script fails, then you have a PHP3 installation that was built w/o
MySQL support.  In which case you should search for another PHP3 binary
installation with MySQL support built in, or compile it yourself.  If that
sounds too complicated, you might want to consider upgrading to PHP4 since
the binary distribution is automatically built with minimal MySQL support.

If you're still unable to proceed after trying everything mentioned above,
you should request the services of one of the many professionals on this
list who will install everything for you and make sure it runs properly.  It
might cost you a little bit of money, but at least it will work.

BC