473,385 Members | 1,341 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

PHP Not Recognizing MySQL

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

Nov 3 '06 #1
5 2764
On 3 Nov 2006 12:44:49 -0800, so*****************@gmail.com wrote:
>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 :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Nov 3 '06 #2


On Nov 3, 2:20 pm, Andy Hassall <a...@andyh.co.ukwrote:
On 3 Nov 2006 12:44:49 -0800, solitary.wandere...@gmail.com wrote:
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

Nov 3 '06 #3
On 3 Nov 2006 13:45:27 -0800, so*****************@gmail.com wrote:
>On Nov 3, 2:20 pm, Andy Hassall <a...@andyh.co.ukwrote:
>On 3 Nov 2006 12:44:49 -0800, solitary.wandere...@gmail.com wrote:
>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 :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Nov 3 '06 #4
On 3 Nov 2006 12:44:49 -0800, in comp.lang.php
so*****************@gmail.com
<11**********************@h48g2000cwc.googlegroups .comwrote:
>| 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.
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Nov 3 '06 #5
"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.

<so*****************@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
>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

Nov 4 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: John | last post by:
All: I have PHP 4.2.2 and MySQL 3.23.54 running on a RH9 server. I've been using the MySQL database for other things but have now decided to use PHP. Currently, I can't get PHP to recognize...
2
by: Dale Anderson | last post by:
I have a schema that I'm trying to read. The schema has an element named 'GrantApplication' and one with a namespace prefix named 'SF424:GrantApplication'. When I try to read this schema in, I...
0
by: Feldman Alex | last post by:
Hello friends. Do anyone know wich C# api's should i use for recognizing removable/network drives? Example : I need to know when cd inserted to CD drive Thank a lot Alex
5
by: Marc Violette | last post by:
<Reply-To: veejunk@sympatico.ca> Hello, I'm hoping someone can help me out here... I'm a beginner ASP.NET developper, and am trying to follow a series of exercises in the book entitled...
0
by: Glenn Venzke | last post by:
I'm using a ColdFusion app to consume a .NET webservice with 3 methods and I'm running into a problem. The first time I added a web reference & compiled the service (with VS.NET standard edition...
5
by: solitary.wanderer52 | last post by:
I just finished installing PHP5 on Linux (Debian/Ubuntu/Mepis)/Apache2 using Synaptic. I have tried creating simple html pages, placing them in /var/www and pointing the browser at...
1
by: thecoolone | last post by:
I am trying to loop through a mysql result array with the following code: while($count = mysql_fetch_assoc($result)) { $var1=array(); $var1=$count; $var2=array_slice($var1, 5, -1);...
15
by: John Gonsalves | last post by:
I'm experiencing problems related to IIS/ASP.NET not recognizing writes to web.config that my web application performs. Specifically I have a web application that provides an interface allowing...
1
by: thulaseeram | last post by:
hi, i am using the following code for uploading <div id="iframe" name="iframe" style="width:850px; height:120px;"> <iframe name="attach_frame" id="attach_frame"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.