473,508 Members | 2,365 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP not seeing Mysql.

I am trying to use PHPNuke on a linux box but I think PHP does not see
the Mysql Server.
When I use the test php program I get this error

"Fatal error: Call to undefined function: mysql_connect() in
/home/david/html/html/test.php on line 3"

I am using Debian unstable. Is there some setting I need to look at in
the php.ini file?
Jul 17 '05 #1
6 2256
On Wed, 04 Aug 2004 17:26:56 -0400, David Scribler wrote:
I am trying to use PHPNuke on a linux box but I think PHP does not see
the Mysql Server.
When I use the test php program I get this error

"Fatal error: Call to undefined function: mysql_connect() in
/home/david/html/html/test.php on line 3"

I am using Debian unstable. Is there some setting I need to look at in
the php.ini file?

Did you compile PHP with mysql enabled?

Regards,

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/

Jul 17 '05 #2
Ian.H wrote:
On Wed, 04 Aug 2004 17:26:56 -0400, David Scribler wrote:

I am trying to use PHPNuke on a linux box but I think PHP does not see
the Mysql Server.
When I use the test php program I get this error

"Fatal error: Call to undefined function: mysql_connect() in
/home/david/html/html/test.php on line 3"

I am using Debian unstable. Is there some setting I need to look at in
the php.ini file?


Did you compile PHP with mysql enabled?

Regards,

Ian

I did an apt-get on mysql. Since mysql is a default I would asume that
it was compiled in. I could be wrong.
Jul 17 '05 #3
>>>"Fatal error: Call to undefined function: mysql_connect() in
/home/david/html/html/test.php on line 3"

I am using Debian unstable. Is there some setting I need to look at in
the php.ini file?


Did you compile PHP with mysql enabled?

Regards,

Ian

I did an apt-get on mysql. Since mysql is a default I would asume that
it was compiled in. I could be wrong.


"Did you compile *PHP* with mysql enabled?"
is a very different question from
"Did you install MySQL? (client)"

If you compiled PHP *before* installing MySQL, chances are it
won't have the support for MySQL. Even if you compiled it
*after* installing MySQL, MySQL support may not be the default.

Gordon L. Burditt
Jul 17 '05 #4
On Wed, 04 Aug 2004 17:50:41 -0400, David Scribler wrote:
"Fatal error: Call to undefined function: mysql_connect() in
/home/david/html/html/test.php on line 3"

I am using Debian unstable. Is there some setting I need to look at in
the php.ini file?


Did you compile PHP with mysql enabled?

I did an apt-get on mysql. Since mysql is a default I would asume that
it was compiled in. I could be wrong.

No idea about Linux.. but my BSD installs went like:
[ SQL ]
- install MySQL
[ PHP ]
- ./configure --lotsa=stuff --with-mysql=/usr/local
- install
The only chance you'd have the way you have it is if there's a build
option with your package system, for example, FreeBSD ports I can do with
some things:
# cd /usr/ports/foo/bar
# make PREFIX=/usr install
Whether you have this option with your PHP package where you could specify
'WITH_MYSQL=yes' or similar, the pkg _might_ automagically download and
configure MySQL then much like a dependency might be.

I've never used a Linux box so no idea how those pkgs work, but might be
something to look for, but I'd suspect install MySQL first, _then_
maybe the option with the PHP install... man pages maybe more help =)

Regards,

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/

Jul 17 '05 #5
On Wed, 04 Aug 2004 17:50:41 -0400, David Scribler in comp.lang.php wrote:
Ian.H wrote:

Did you compile PHP with mysql enabled?

Regards,

Ian

I did an apt-get on mysql. Since mysql is a default I would asume that
it was compiled in. I could be wrong.


On Debian (Sarge), one needs the 'php4-mysql' package installed in order
for php to work with mysql. I'm sure testing is similiar.

Any easy way to check (if you have aptitude installed) is thus;

'aptitude search php|less' see if the 'i' symbol is beside the
'php4-mysql' package. If not installing it should fix things up.

--
ATTENTION
This room is fullfilled mit special electronische equippment.
Fingergrabbing and pressing the cnoeppkes from the computers is
allowed for die experts only! So all the "lefthanders" stay away
and do not disturben the brainstorming von here working
intelligencies. Otherwise you will be out thrown and kicked
anderswhere! Also: please keep still and only watchen
astaunished the blinkenlights.
Jul 17 '05 #6
marathon wrote:
On Wed, 04 Aug 2004 17:50:41 -0400, David Scribler in comp.lang.php wrote:
Ian.H wrote:


Did you compile PHP with mysql enabled?

Regards,

Ian


I did an apt-get on mysql. Since mysql is a default I would asume that
it was compiled in. I could be wrong.

On Debian (Sarge), one needs the 'php4-mysql' package installed in order
for php to work with mysql. I'm sure testing is similiar.

Any easy way to check (if you have aptitude installed) is thus;

'aptitude search php|less' see if the 'i' symbol is beside the
'php4-mysql' package. If not installing it should fix things up.

Thanks I just ran apt-get on that package restarted php and it seems to
be working. Thanks
Jul 17 '05 #7

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

Similar topics

3
2555
by: James | last post by:
Please help - getting very desperate! Sun, 12 October 2003 05:39 I have PHPDEV 4.2.3 from Firepages.com.au as the upgrade to 4.3.0 did not work. I also had an abortive download from PHP.NET as...
0
1420
by: james | last post by:
I am new to php and need some help getting the session variables into include files. (after-thought, Sorry for the drawn out post but I really, really need help....;) Here's what I'm doing.. ...
4
1305
by: mikey | last post by:
Hi all, I'm having great problems trying to install the latest MySQl RPM package onto my Red Hat Linux OS. There is already MySQL v 3.0 pre-installed with the RH Linux distribution disk but I...
0
718
by: Jeff D. Hamann | last post by:
I've asked this question on the emacs newsgroup and didn;t get an answer, so I thought I might post the question here. I've been using emacs sql-mode for some time now (with MySQL) and love it....
0
3925
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
2
2889
by: trihanhcie | last post by:
I m currently working on a Unix server with a fedora 3 as an os My current version of mysql is 3.23.58. I'd like to upgrade the version to 5.0.18. After downloading from MYSQL.COM the package on...
1
3193
by: manish deshpande | last post by:
Hi, When i'm installing MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm by the following command: rpm -i MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm the following error is being shown: ...
6
1313
The1corrupted
by: The1corrupted | last post by:
Okay, I've toyed with this and it seems you either get all (inactive and active users) on a list or you get none at all... I'm trying to split them and it's not being nice about it. I've even made...
3
8792
by: menzies | last post by:
Hi, I"m new to this forum, but I have been trying all day to install DBD::mysql onto my Intel MacBook. I've read lots of forums pages and none have gotten me to a successful 'make test' or a...
0
7223
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
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5624
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
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1547
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
414
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.