MySQL is running but PHP says its not....
well sorry for yet another mysql/php problem but i'm pretty stumped.
My versions are. php 5.0.4 mysql 4.1.11 apache 2.0.54 I can post my config files if requested. basically I'm coming from slackware 10.2 to FC4. I installed all 3 packages using YUM and configured the packges via various help files and tutorials I've found on the net and mostly here on this forum. When i run phpinfo() i see all the mysql details, and I can run php scripts no problem(I can even serialize objects across requests via sessions WOOT!), however when i try to connect using this line Code:
mysql_connect("host","user","pwd") or die("Cannot connect to databse"); I've searched the forums and documentation of all 3 packages and I just can't seem to resolve this. I can make it work on win32 but i really do not want to resort to that. Any help would be greatly appreciated -Paul |
First off, are you sure that your mysql server is excepting connections from that user. Could you post the php error message that is geneated, and you could post the relavent sections of you php.ini file and someone maybe able to help you a little better?
|
Quote:
I am sure it is running and accepting connections via the termial mysql -u root -p 'mypass' works just fine for me. in php it doesn't spit an error message or warning, it simply does nothing. Using phpmyadmin, it returns "error 2003: cannot connect to mysql" I've checked the process is running, i've checked the socket is listening, I can connect via termial....php&apache work honky-dorey....I'm pretty stumpped. I'll now post my config files for apache, php, and mysql |
php.ini
Code:
[PHP] |
php.ini ct'd
Code:
allow_url_fopen = On |
Apache httpd.conf
Code:
# Code:
[mysqld] |
You should turn Display_Errors to On so it will actually display your error messages. Or you should look in your error logs and see if you have any errors. Without an error message it's tough for us to figure out what is wrong.
|
Well, without seeing your error, could you see if you have these packages installed:
php-mysql mod_auth_mysql mysql-server If you do a "rpm -qa|grep mysql" it should tell you. |
Quote:
I ran that command and it spit this out at me mysql-connector-odbc mysql-devl1 libdbi-dbd-mysql mysql-5.0.18 php-mysql-5.1.2 mod_auth-mysql-3.0.0 |
That's kind of what I thought..... Do these 2 commands:
Code:
yum install mysql-server |
Quote:
ok so....I didn't have the server installed? Was i just using the client or something like that? (its installing as we speak...) |
It looks that way. Did you have any success after the installation was complete?
|
Quote:
I now have FC5 on a dev server so I have all the time in the world. I'm now having problems loading any apache 2.2 extensions. I havn't investigated further yet but now that my weekend got rained out I have some time. -Cheers |
All times are GMT -5. The time now is 06:03 PM. |