473,411 Members | 2,083 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,411 software developers and data experts.

Problem getting PHP to recognize MySQL, Using PHP 4.3.7 and MySQL 4.0.20


Hi there!

I have both PHP 4.0( RPM) installed and MySQL 4.0.20 installed with the
mysqld daemon up and running. But when I look at the output of phpinfo() ,
I do not see it there, which is worrisome and so I tried to recompile PHP
and do ./configure with the --with-mysql=path but I don't really know
where my mysql's header files should be , is there any way to find that
out by using any of the mysql commands?

I did try to do ./configure for PHP4 without any parameters and when I
looked at the output, I do see that PHP seems to recognize that mySQL is
there :

....
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock
checking for inline... (cached) inline
.....

Hence, why is that when I do phpinfo() , mySQL still doesn't show up?

I suspect that mysql isn't working correctly with php, because if I use
the mysql_connect() function in my php, I get the error "Fatal error: Call
to undefined function: mysql_connect() "
and yet it DOES seem like PHP recognizes mysql is there.

That "unable to recognize mysql_connect function" error comes up after
installing PHP using ./configure with or without any parameters.

Please help, thanks. I am pretty sure my MySQL is properly installed
because I can mysql into the server and set up my database

##-----------------------------------------------#
Article posted from PHP Freaks NewsGroup
http://www.phpfreaks.com/newsgroup
Get Addicted: comp.lang.ph
##-----------------------------------------------##
Jul 17 '05 #1
6 3852
das dsf wrote:
Hence, why is that when I do phpinfo() , mySQL still doesn't show up? (snip) Please help, thanks. I am pretty sure my MySQL is properly installed
because I can mysql into the server and set up my database


Have you uncommented the line

;extension=mysql.so

in php.ini?
--
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |
Jul 17 '05 #2
I did not see a line called extension=mysql.so , but I did see a commented
out line for extension=msql.so . Should I uncomment and rename it mysql.so
?

Moreover, I only found a php.ini-recommended file which is what I was
referring to from above.

"Pedro Graca" <he****@hotpop.com> wrote in message
news:sl*******************@ID-203069.user.uni-berlin.de...
das dsf wrote:
Hence, why is that when I do phpinfo() , mySQL still doesn't show up?

(snip)
Please help, thanks. I am pretty sure my MySQL is properly installed
because I can mysql into the server and set up my database


Have you uncommented the line

;extension=mysql.so

in php.ini?
--
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |

Jul 17 '05 #3
John top-posted [corrected]:
"Pedro Graca" <he****@hotpop.com> wrote in message
news:sl*******************@ID-203069.user.uni-berlin.de...
das dsf wrote:
> Hence, why is that when I do phpinfo() , mySQL still doesn't show up? (snip)
> Please help, thanks. I am pretty sure my MySQL is properly installed
> because I can mysql into the server and set up my database


Have you uncommented the line

;extension=mysql.so

in php.ini?


I did not see a line called extension=mysql.so , but I did see a commented
out line for extension=msql.so . Should I uncomment and rename it mysql.so
?


Try it :)
Moreover, I only found a php.ini-recommended file which is what I was
referring to from above.


The output of phpinfo() should tell you what php.ini your PHP is using.
So, find that file and make sure it has a line that enables MySQL.

--
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |
Jul 17 '05 #4
On 2 Jul 2004 09:22:31 GMT, Pedro Graca <he****@hotpop.com> wrote:
John top-posted [corrected]:
"Pedro Graca" <he****@hotpop.com> wrote in message
news:sl*******************@ID-203069.user.uni-berlin.de...
das dsf wrote:
> Hence, why is that when I do phpinfo() , mySQL still doesn't show up?
(snip)
> Please help, thanks. I am pretty sure my MySQL is properly installed
> because I can mysql into the server and set up my database

Have you uncommented the line

;extension=mysql.so

in php.ini?
I did not see a line called extension=mysql.so , but I did see a commented
out line for extension=msql.so . Should I uncomment and rename it mysql.so
?


Try it :)


No, don't try it. MSQL and Mysql are different databases. Not at all
compatable.
Moreover, I only found a php.ini-recommended file which is what I was
referring to from above.


The output of phpinfo() should tell you what php.ini your PHP is using.
So, find that file and make sure it has a line that enables MySQL.


Or compile php with the --with-mysql=/path/to/mysql set correctly.

--
gburnore@databasix dot com
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
DataBasix | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ 3 4 1 4 2 ݳ޳ 6 9 0 6 9 ÝÛ³
Black Helicopter Repair Svcs Division | Official Proof of Purchase
================================================== =========================
Want one? GET one! http://www.databasix.com
================================================== =========================
Jul 17 '05 #5
Gary L Burnore wrote:
On 2 Jul 2004 09:22:31 GMT, Pedro Graca <he****@hotpop.com> wrote:
John top-posted [corrected]:
I did not see a line called extension=mysql.so , but I did see a commented
out line for extension=msql.so . Should I uncomment and rename it mysql.so
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^^^^^^^^


Try it :)


No, don't try it. MSQL and Mysql are different databases. Not at all
compatable.


--
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |
Jul 17 '05 #6
What distro are you using? I know I've had many hard times getting php
and mysql to play nice on redhat/fedora systems when using RPM's that
weren't fromt the distro (i.e. the RPM from mysql.com). The problem
was that the php rpm expected an older version of the mysql.so (I
think it was mysql.so.10 or maybe 11) and MySQL 4 and higher used a
newer version. That might be something to look into.
Jul 17 '05 #7

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

Similar topics

2
by: Marcus | last post by:
I am having some problems with trying to perform calculations on time fields. Say I have a start time and an end time, 1:00:00 and 2:30:00 (on a 24 hour scale, not 12). I want to find the...
10
by: Jack | last post by:
How would I add a variable that I will assign to a list of $_POST variables that I extract from a form? My form passes a value for $q. That works fine. What I want to do is run an if/else on it...
0
by: Gary Cote | last post by:
>Description: I've recently compiled mysql 4.0.14 on redhat 8.0. The installation fails, however, when running mysql_install_db. I've attached a transcript below. I gather from searching the...
0
by: das dsf | last post by:
Hi there! I have both PHP 4.0( RPM) installed and MySQL 4.0.20 installed with the mysqld daemon up and running. But when I look at the output of phpinfo() , I do not see it there, which is...
0
by: Steve | last post by:
Hi, Yesterday I signed up for another dedicated linux server with the hosting company I use and I am having problems getting MySQL 4.1.3 working on it. I've tried just about everything I can...
9
by: Paradigm | last post by:
I am using an Access2K front end to a MYSQL database. If I enter a new record in a continuous form the record appears as #deleted as soon as I move to a different record in the form until I requery...
3
by: Juan Antonio Villa | last post by:
Hello, I'm having a problem replicating a simple database using the binary log replication, here is the problem: When the master sends an update to the slave, an example update reads as follows:...
4
jepler
by: jepler | last post by:
I find myself in a circular reference loop that I can't seem to resolve. I recently upgraded from MySQL 4.0.x to MySQL 4.1.21 on OS 10.3.9 Server. Then, I *thought* I set my open master root password...
4
by: Frank Lopes | last post by:
I've seen many people asking the same question in other forums but I haven't been able to solve this problem. First the environment: Windows Vista Ultimate running IIS6 Now the story:...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.