Connecting Tech Pros Worldwide Forums | Help | Site Map

PHP Not Recognizing MySQL

solitary.wanderer52@gmail.com
Guest
 
Posts: n/a
#1: Nov 3 '06
I am running PHP5 under Linux. Just a newbie and would like to have it
integrated with MySQL. When I execute
phpinfo() in a webpage, I see tons of info on php, but nothing on
MySQL. Perhaps this is because I installed
MySQL after I installed PHP. Is there a way to get PHP to recognize
MySQL?

Thanks, Steve

Andy Hassall
Guest
 
Posts: n/a
#2: Nov 3 '06

re: PHP Not Recognizing MySQL


On 3 Nov 2006 12:44:49 -0800, solitary.wanderer52@gmail.com wrote:
Quote:
>I am running PHP5 under Linux. Just a newbie and would like to have it
>integrated with MySQL. When I execute
>phpinfo() in a webpage, I see tons of info on php, but nothing on
>MySQL. Perhaps this is because I installed
>MySQL after I installed PHP. Is there a way to get PHP to recognize
>MySQL?
Recompile PHP with the --with-mysql option passed to "configure", see
http://uk2.php.net/mysql for more.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
solitary.wanderer52@gmail.com
Guest
 
Posts: n/a
#3: Nov 3 '06

re: PHP Not Recognizing MySQL




On Nov 3, 2:20 pm, Andy Hassall <a...@andyh.co.ukwrote:
Quote:
On 3 Nov 2006 12:44:49 -0800, solitary.wandere...@gmail.com wrote:
>
Quote:
I am running PHP5 under Linux. Just a newbie and would like to have it
integrated with MySQL. When I execute
phpinfo() in a webpage, I see tons of info on php, but nothing on
MySQL. Perhaps this is because I installed
MySQL after I installed PHP. Is there a way to get PHP to recognize
MySQL? Recompile PHP with the --with-mysql option passed to "configure", seehttp://uk2.php.net/mysqlfor more.
>
--
Andy Hassall :: a...@andyh.co.uk ::http://www.andyh.co.ukhttp://www.and....co.uk/space:: disk and FTP usage analysis tool
I have a Debian-based system and installed them using the install
utility, Synaptic. Is there a way of doing the above using this
utility?


Steve

Andy Hassall
Guest
 
Posts: n/a
#4: Nov 3 '06

re: PHP Not Recognizing MySQL


On 3 Nov 2006 13:45:27 -0800, solitary.wanderer52@gmail.com wrote:
Quote:
>On Nov 3, 2:20 pm, Andy Hassall <a...@andyh.co.ukwrote:
Quote:
>On 3 Nov 2006 12:44:49 -0800, solitary.wandere...@gmail.com wrote:
>>
Quote:
>I am running PHP5 under Linux. Just a newbie and would like to have it
>integrated with MySQL. When I execute
>phpinfo() in a webpage, I see tons of info on php, but nothing on
>MySQL. Perhaps this is because I installed
>MySQL after I installed PHP. Is there a way to get PHP to recognize
>MySQL? Recompile PHP with the --with-mysql option passed to "configure", seehttp://uk2.php.net/mysqlfor more.
>
>
>I have a Debian-based system and installed them using the install
>utility, Synaptic. Is there a way of doing the above using this
>utility?
Sorry, don't know, I always compile it from source and I haven't used Debian.

Maybe: http://www.google.co.uk/search?q=debian+php+mysql+php5

As it's also possible to add PHP extensions as shared modules then presumably
your system's package manager will be able to add these separately without
having to recompile PHP.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jeff North
Guest
 
Posts: n/a
#5: Nov 3 '06

re: PHP Not Recognizing MySQL


On 3 Nov 2006 12:44:49 -0800, in comp.lang.php
solitary.wanderer52@gmail.com
<1162586689.662665.267820@h48g2000cwc.googlegroups .comwrote:
Quote:
>| I am running PHP5 under Linux. Just a newbie and would like to have it
>| integrated with MySQL. When I execute
>| phpinfo() in a webpage, I see tons of info on php, but nothing on
>| MySQL. Perhaps this is because I installed
>| MySQL after I installed PHP. Is there a way to get PHP to recognize
>| MySQL?
>|
>| Thanks, Steve
PHP5 has mySQL disabled by default.
Have you set the php.ini file to use the mysql extension?
I use Windows so the following my not be exactly correct for Unix
Open php.ini in text editor
Locate the ; Dynamic Extensions ; text within the file
Scroll down until you find ;extension=php_mysql.so
Remove the semi-colon from the line
Save file
Stop and restart web server.
use phpinfo() to see if access is now available.
---------------------------------------------------------------
jnorthau@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Todd
Guest
 
Posts: n/a
#6: Nov 4 '06

re: PHP Not Recognizing MySQL


"apt-cache search php5-mysql"
Will search the package database for the mysql module for php5. If it shows
you should be able to:
"apt-get install php5-mysql"

I don't use php5, but this works for php4-mysql.

Regards.

<solitary.wanderer52@gmail.comwrote in message
news:1162586689.662665.267820@h48g2000cwc.googlegr oups.com...
Quote:
>I am running PHP5 under Linux. Just a newbie and would like to have it
integrated with MySQL. When I execute
phpinfo() in a webpage, I see tons of info on php, but nothing on
MySQL. Perhaps this is because I installed
MySQL after I installed PHP. Is there a way to get PHP to recognize
MySQL?
>
Thanks, Steve
>

Closed Thread


Similar PHP bytes