473,584 Members | 2,897 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 2263
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 "lefthander s" 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
2578
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 I could not configure Apache myself. The REAL problem is that PHPmyAdmin works and sees my test database Wines.... But my PHP program does not!
0
1424
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.. I have a php request_form that I use 2 different ways: by itself (url directly to the form) and as an include to be displayed in existing php pages....
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 can not seem to get any of the functions working on it. So I have now dopwnloaded the latest version hoping that this will fix the error. I have...
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. I've used it on both Windows and FreeBSD (sadly I do most of my work on Windows though) and have noticed that the output the prompt and output on...
0
3938
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 version of this document can be found at: http://prdownloads.sourceforge.net/souptonuts/README_mysql.txt?download
2
2897
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 the site, I made : rpm -i MySQL-server-5.0.18-0.i386.rpm then i have errors that relate to many conflicts. I cannot figure out why -and- cannot...
1
3202
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: warning: MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 file /etc/my.cnf from install of...
6
1316
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 a new field in the MySQL table. Basically, it looks a little something like this.. <?php session_start(); include ('user_conn.php'); ...
3
8809
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 successful 'sudo make install.' Before every attempt I even do a sudo make distclean to make sure I haven't gotten things mucked up from a prior attempt. ...
0
7897
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8190
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8331
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7940
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8200
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6590
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5705
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3850
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1441
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.