Bug 40559 - Apache/PHP installed without MySQL support
Apache/PHP installed without MySQL support
Product: Red Hat Linux
Classification: Retired
Component: php (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Copeland
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-05-14 11:46 EDT by Malcolm
Modified: 2007-04-18 12:33 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-12-07 19:00:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Malcolm 2001-05-14 11:46:36 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i686)

Description of problem:
Apache / PHP  4.0 is installed without MySQL support. ie the spec file
%config has--without_mysql option

How reproducible:

Steps to Reproduce:
1. install Red Hat 7.1, including Apache and MySQL
2. install php-based pages in html directories	
3. use broswer to access pages, failure on first call to mysql (usually
something like mysl_pconnect() )

Actual Results:  cannot find command mysql_pconnect()

Expected Results:  PHP page with Mysql should have run ok

Additional info:

to fix it.....

rpm -e   php-4.0.4pl1-9

Then get the source rpm and INSTALL it, NOT --rebuild

                rpm -Uvh  php-4.0.4pl1-9
                Then edit the spec file
                In the %build section  change --without-mysql to

                Once this modification is made then build the binary rpm as
                rpm -bb ......

                Then install the rpm
                rpm -ivh .....

       	restart Apache
Comment 1 David Lawrence 2001-05-14 11:57:42 EDT
Did you install the php-mysql-4.0.4pl1-9.i386.rpm package? This should have
given you the mysql support for PHP without compiling it directly into PHP.
Comment 2 Andrew Howell 2001-05-15 07:36:37 EDT
I have the same problem and I have install the php-mysql package. I guess
explicitly stating --without-mysql
is disabling mysql support.

Just try calling phpinfo() and you'll see there is no mysql support
Comment 3 Andrew Howell 2001-05-15 08:31:30 EDT
I rebuilt the package with --with-mysql=shared instead of --without-mysql and
everything is fine now.
Comment 4 Andrew Howell 2001-06-01 07:19:49 EDT
What's happening with this bug? Will a fixed package be uploaded soon?
Comment 5 Ron Groen 2001-06-14 16:15:31 EDT
standard RH 7.1 installation with apache, php and mysql.
/etc/php.ini changed:
extension=mysql.so (; removed)

restart httpd:
/var/log/httpd/error_log reports:
PHP Warning:  Unable to load dynamic library '/usr/lib/php4/mysql.so' -
 /usr/lib/php4/mysql.so: cannot open shared object file: No such file or 
directory in Unknown on line 0

reason :/usr/lib/php4/mysql.so missing

File is not in the packages mentioned above.

How do I get mysql to run with PHP?
Comment 6 Ron Groen 2001-06-25 16:05:47 EDT
My problem is solved. I forgot to install the php-mysql package which contains 
mysql.so. PHP info still reports --without-mysql, but everything is working.

Note You need to log in before you can comment on or make changes to this bug.