Forum Moderators: coopster

Message Too Old, No Replies

php-mysql recognition problem

it worked fine but something went wrong

         

Montbazin

10:48 pm on Jul 20, 2005 (gmt 0)

10+ Year Member



hello again

I probably did a wrong manipulation and PHP doesn't recognize MySql anymore.
It worked fine but now it's down.

Separately PHP works fine and MySQL works on the command line. I'm on a Linux Mandrake platform.

I have uninstalled an reinstalled "rpm php_mysql"l. I verified the presence of "/etc/php/34_mysql.ini" and it contains the line "extension = mysql.so" the way it should. But something else must be wrong?

Has someone an ide on this.?

Thanx
roberto

ergophobe

10:55 pm on Jul 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Wrong password, username or host?

Did you upgrade one or the other or did it just stop?

What does it show RE MySQL in phpinfo() output?

Montbazin

11:17 pm on Jul 20, 2005 (gmt 0)

10+ Year Member



No password, username or host are OK.
I have just reinstalled "rpm php_mysql" when I saw that the php-mysql link was down.
phpifo() mentions the existence of the "/etc/php/34_mysql.ini" file. Thats all I can tell.

roberto

ergophobe

12:03 am on Jul 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Where does it mention that? I checked phpinfo output from a couple servers and don't see any mention of a mysql.ini

Sorry, but I just set up my development servers and never have had any issues like that.

Montbazin

6:59 am on Jul 21, 2005 (gmt 0)

10+ Year Member



It's in the very beginning of the phpinfo() display, in a line called "additional .ini files parsed"

robeto

Montbazin

12:47 pm on Jul 21, 2005 (gmt 0)

10+ Year Member



I took the drastic resolution to make a "clean" reinstall of my Mandrake 9.1 distribution.

So everything works PHP, and also MySQL on the command line. I managed to create a base and enter some tables with some content. All that is fine...

But when I try to connetct to MySQL with

 mysql_connect($server,$user,$passw); or die ("error");

it eveven doesn't show the error message...
the proble remains with the function
 mysql_pconnect()

thanks for your help
roberto

jatar_k

3:56 pm on Jul 21, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



mysql_connect($server,$user,$passw); or die ("error");

you have an extra semi colon in there, it should be

mysql_connect($server,$user,$passw) or die ("error");

Montbazin

4:58 pm on Jul 21, 2005 (gmt 0)

10+ Year Member



I just found out tha it is something in the "php.ini" file.
when I change the name of the "php.ini" file to "php.ini-off"
and then I enter
/etc/init.d/httpd graceful 
everything becomes normat and PHP connects properly to thr MySql base.

But I wanted to implement php.ini with "register_globals = On" to be able to test my older websites which arte not using the

 $_POST['some_var'] 
variable.

Now there must be some instruction in"php.ini" which deactivates the communication between PHP and Mysql.

I deactivated the following instructions:

mysql.default_socket =
mysql.default_port =
mysql.default_host =
mysql.default_user =
mysql.default_password =

but it still doesnt connet.
roberto