473,226 Members | 1,418 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,226 software developers and data experts.

Another "Fatal error: Call to undefined function: mysql_connect()"Question

I have searched the newsgroups and the web trying to solve this problem
and just can't get it. Maybe someone will be able to help. I am
getting the following error when I try to view a test page in my
browser. This test page just reads a table in mysql and outputs the
results.

Fatal error: Call to undefined function: mysql_connect() in
/var/web/public/test.php on line 2

I'm using:
Apache 2
MySQL 4.1.12
PHP 4.4.0

I have tried upgrading PHP to PHP5. I went back down to PHP4. I
verified that mysql.so was being loaded. I tried using the OLD_PASSWORD
feature in mysql. Verified that the PHP module is loaded in apache.

What is weird however (at least I think) is when I run the following via
telnet:

php ./test.php

It pulls up the page, connects successfully to the database and displays
the records. No error message.

Does anyone have any suggestions for other things for me to try. Thanks
in advance for your help.

Grant
Jul 23 '05 #1
5 4124
Do you have MYSQL loaded and setup to sartup in your startup init - it
is not setup automatically to do so in some distributions. I usually
get that when the service is not running.

Jul 23 '05 #2
la***@portcommodore.com wrote:
Do you have MYSQL loaded and setup to sartup in your startup init - it
is not setup automatically to do so in some distributions. I usually
get that when the service is not running.


Yes, MySQL does start at boot time and is running. As I mentioned in my
post, when I run PHP from the command prompt, it connects and pulls
data. It gives me this error message when I try to load the page via a
web browser.
Jul 23 '05 #3
What is weird however (at least I think) is when I run the following via
telnet:

php ./test.php


mysql is included in you PHP-CGI configuration but not in you PHP Apache
Module.

Florent
Jul 23 '05 #4
Florent Clairambault wrote:
What is weird however (at least I think) is when I run the following
via telnet:

php ./test.php

mysql is included in you PHP-CGI configuration but not in you PHP Apache
Module.

Florent


How do I include it in my PHP Apache Module?
Jul 23 '05 #5
Hello:

I'm new to php and mysql I'm working on debian woody with php 4.3 and mysql 4.0. I cant change versions since the program I'm installing requires exactly those I get this same error but when i try to exec the php scrit thru a shell this is wht it returns:
php(507): unaligned access to 0x2000000001779a2c, ip=0x4000000000297a90

What con u tell me about this. And of course the browsers dont work either.

BTW how do I load mysql.so to the apache,cgi, and cfi configs of php.ini. Is it just by adding extension=mysql.so?

Thanks!!
Aug 5 '05 #6

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

Similar topics

4
by: KathyB | last post by:
I have the following script in an html page: function goToPosition() { varGoTo = document.write(document.cookie("Position")); document.scrollTo(0, varGoTo); } </head> <body...
13
by: Don Vaillancourt | last post by:
What's going on with Javascript. At the beginning there was the "undefined" value which represented an object which really didn't exist then came the null keyword. But yesterday I stumbled...
25
by: Nitin Bhardwaj | last post by:
Well, i'm a relatively new into C( strictly speaking : well i'm a student and have been doing & studying C programming for the last 4 years).....and also a regular reader of "comp.lang.c" I...
2
by: Alex Nitulescu | last post by:
Hi. I have the following HTML (snip): _____________________________________________ <body MS_POSITIONING="GridLayout" onload="Init()"> <form id="frmWebServerAdvanced_1Test" method="post"...
18
by: Microsoft | last post by:
When I try this in my code I alwas get an errormessage: "Object reference not set to an instance of an object" Dim g As System.Drawing.Graphics g.DrawString("Test", New Font("Arial", 12,...
2
by: Terry Lee Tucker | last post by:
Let me explain: I have written a "C" function which contains calls to other functions, all of which work with an API to a mileage database product called PCMiler. These functions make...
4
by: three-eight-hotel | last post by:
I'm somewhat of a newbie to PHP coding, but have developed a site using the technology, and have been pleasantly surprised by the capabilities offered. I am more comfortable in the ASP world,...
4
by: dougans | last post by:
Hey there, Hope someone can help me, completely stuck with immigrating from php4 to OOP based php5. == index.php -- include(database.inc.php);
9
by: Rohit | last post by:
I am trying to initialize an array whose initializers depend on value of Enums. I take enum and then decide the initializer value, so that even if enum value changes because of addition to list...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.