Bug 141903

Summary: PHP compiled without MySQL support!
Product: [Fedora] Fedora Reporter: -M <callihn>
Component: phpAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-12 14:43:43 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 2004-12-05 01:02:22 UTC
Description of problem:

PHP has been compiled using the --without-mysql flag as can be seen
using phpinfo()

Version-Release number of selected component (if applicable):

5.0.2
  
Actual results:

A worthless rpm for those wanting to use PHP with MySQL, which is
probably 98 percent of those wanting to use PHP.

Expected results:

PHP compiled with MySQL support.

Additional info:

I know we have went over this before and it's not rocket science.

Comment 1 -M 2004-12-05 02:00:26 UTC
Ohh and while I have you attention the --without-gd flag is also
highly undesirable.

So, if we could get that with the --with-mysql and --with-gd flags
instead, I'm sure a lot of people including myself would be much
happier, since many CMSs use MySQL and the GD library. ;)

Comment 2 Joe Orton 2004-12-05 22:37:10 UTC
Do you have php-mysql installed?

Comment 3 -M 2004-12-06 12:49:00 UTC
Yes, of course, however that is not going to help when PHP has been
compiled using the --without-mysql confgiuration option.

"By using the --with-mysql[=DIR]  configuration option you enable PHP
to access MySQL databases.

In PHP 4, the option --with-mysql is enabled by default. To disable
this default behavior, you may use the --without-mysql configure
option. Also in PHP 4, if you enable MySQL without specifying the path
to the MySQL install DIR, PHP will use the bundled MySQL client
libraries. In Windows, there is no DLL, it's simply built into PHP 4.
Users who run other applications that use MySQL (for example,
auth-mysql) should not use the bundled library, but rather specify the
path to MySQL's install directory, like so:
--with-mysql=/path/to/mysql. This will force PHP to use the client
libraries installed by MySQL, thus avoiding any conflicts.

In PHP 5, MySQL is no longer enabled by default, nor is the MySQL
library bundled with PHP. Read this FAQ for details on why."

http://us2.php.net/mysql

There are very few applications out there that can be compiled without
support for something and then have that same support included latter
without recompiling it. PHP is not one of them and this is not the
first time this problem has occured in Redhat. The fix last time is
the same as it is this time, to recompile PHP without using the
--without-mysql configuration option or in the case of PHP5, use the
--with-mysql configuration option.

I can't see any sane reason not to compile PHP with MySQL and gd
support, there are quite a few strange compile options used in this
build which I could address, though since they don't break anything or
cause a lack of useful function (at least from my standpoint) I won't
be addressing those, but giving you an example, the
--with-apxs2=/usr/sbin/apxs flag is also used, though it appears that
the Apache server included was not compiled with apxs.

Comment 4 Joe Orton 2004-12-06 13:50:45 UTC
If you have installed the php-mysql package, then what bug are you
reporting?  If php-mysql is installed and mysql support does not work,
please post the output of:

# rpm -V php php-mysql
# php -m | grep mysql

Please do read *all* of the spec file.  The MySQL extension is built
once, when building the CGI SAPI.  It is built as a shared extension,
mysql.so, and packaged in the php-mysql package.

When building the apache2handler SAPI, --without-mysql is passed to
prevent building the extension again.


Comment 5 -M 2004-12-06 14:09:12 UTC
PHP can not use MySQL, that is the bug I am trying to report.

-sh-2.05b# rpm -V php php-mysql
-sh-2.05b# php -m | grep mysql
mysql
-sh-2.05b# rpm -qa|grep mysql
mysql-4.1.7-4
mysql-server-4.1.7-4
mod_auth_mysql-2.6.1-2
mysqlclient10-3.23.58-4
php-mysql-5.0.2-8


Comment 6 -M 2004-12-06 14:12:57 UTC
-sh-2.05b# rpm -qa|grep php
php-5.0.2-8
php-mbstring-5.0.2-8
php-pear-5.0.2-8
php-mysql-5.0.2-8


Comment 7 Joe Orton 2005-01-12 14:43:43 UTC
-sh-2.05b# php -m | grep mysql
mysql

is demonstration that php is loading the MySQL extension without
problems.  Please attach a secript which demonstrates a bug.  The fact
that the phpinfo() output mentions "--without-mysql" in the configure
line is not a bug.