Bug 74542
| Summary: | Fatal error: Call to undefined function: mysql_connect() | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | -M <callihn> |
| Component: | php | Assignee: | Joe Orton <jorton> |
| Status: | CLOSED NOTABUG | QA Contact: | David Lawrence <dkl> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 8.0 | CC: | callihn, eman, hagro01 |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i586 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2003-01-06 12:01:13 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
-M
2002-09-26 12:52:50 UTC
By the way I am not getting any email in reagrds to submitted bugs and have also had problems getting them to come up in a search by emaill address sometimes I get none and sometimes I get all but I always select all the status options. *** This bug has been marked as a duplicate of 72738 *** Sorry, didn't meant to DUPLICATE this one. Moving on to 8.0 release. I am having the same problem, but here are a few more (hopefully helpful) details. - Server 1: redhat 8.0 (apache, php, mysql) with all published updates - Server 2: a remote apache webserver - Running phpinfo() on Server 1 indicates that php was built with mysql ( -- with-mysql=shared,/usr ) but does not show any mysql extension settings (appears that php cannot find mysql??). - On Server 1, I cannot execute mysql_connect(---,---,---). - On Server 2, I can run php with mysql_connect() to Server 1 just fine. Do you have the php-mysql package installed? $ rpm -q php-mysql callihn, the reason you aren't receiving bugzilla messages (for instance, this one) is because your e-mail address is not correct in bugzilla, it is just set to "callihn". I have fixed the email addresses on this bug and others that were filed using the 'callihn' account. Please use the 'callihn' account from now on. I got this to work w/ the php-mysql-4.2.2-8.0.5 package in a single system
(i.e., localhost) configuration. Trick was:
1.) install the php-mysql package
otherwise /usr/lib/php4/mysql.so file was not present, and it is (apparently)
required
2.) ensure that the following line in /etc/php.ini (line #498 or thereabouts) is
NOT commented:
extension=mysql.so
the default was for it be be: ;extension=mysql.so // i.e., commented out
I was then able to do a:
mysql_connect("localhost", ...)
successfully; "localhost" is set to 127.0.0.1 in /etc/hosts in the usual way
Note that you do need to stop and retart the httpd service after making any
changes to php.ini, since the PHP module in Apache appears to read that .ini
file one time at start-up.
Just finished going through the exact same path as Tim Remple.
It is not a bug, I simply had not loaded the php-mysql package
on RH 8.0, package which allows php applications to access MySQL
database.
1.Once you get the package, simply do a
$rpm -i /path/to/the/php-mysql.rpm
2.enable the extension=mysql.so line in the /etc/php.ini file
(which is commented out by default)
3.Restart the httpd service with a
$service httpd reload
Should be good to go now.
Marking this NOTABUG; installation of php-mysql should mean that the extension=mysql.so line is uncommented in /etc/php.ini but that was never 100% reliable. That problem is fixed properly in the Phoebe beta. Can not find php-mysql 4.2.2 rpm package to solve problem with 8.0 install. Any advice where to find this package? As given above: 1. find and "rpm -i" the package "php-mysql-4.2.2-8.05.i386.rpm" from the third CD, or just run "up2date php-mysql" if the system is registered with the Red Hat Network. 2. check that the line "extension=mysql.so" is uncommented in /etc/php.ini 3. restart the web server "service httpd restart" |