Bug 72074 - php-mysql is not enabled when installing it
Summary: php-mysql is not enabled when installing it
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: php   
(Show other bugs)
Version: 7.2
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Phil Copeland
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-08-20 23:32 UTC by Florin Andrei
Modified: 2007-04-18 16:45 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-08-20 23:32:43 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Florin Andrei 2002-08-20 23:32:39 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020606

Description of problem:
After upgrading to php-4.1.2-7.2.3, my web application stopped working (no MySQL
API in PHP).
The solution was to edit by hand /etc/php.ini and add this line:

extension=mysql.so


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


How reproducible:
Always

Steps to Reproduce:
1.upgrade to latest php
2.install php-mysql
3.run a web application that uses mysql
	

Actual Results:  there's no mysql support in php

Expected Results:  mysql stuff should work fine

Additional info:

Workaround: edit /etc/php.ini and add:

extension=mysql.so

Instead, the php-mysql package should add itself automatically.

Comment 1 Phil Copeland 2002-08-31 06:58:37 UTC
From the spec file.


################################################################################
# mysql ########################################################################
#
%files mysql
        %defattr(-,root,root)
        %{_libdir}/php4/mysql.so


%post mysql
        if %{__grep} -q "extension=mysql.so" %{_sysconfdir}/php.ini; then
                %{__perl} -pi -e "s|^;extension=mysql.so|extension=mysql.so|" %{
_sysconfdir}/php.ini
        else
                %{__perl} -pi -e "s|^;extension=php_mysql.dll|;extension=php_mys
ql.dll\nextension=mysql.so|" %{_sysconfdir}/php.ini
        fi

%preun mysql
        if [ $1 = 0 -a -f %{_sysconfdir}/php.ini ] ; then
          %{__perl} -pi -e "s|^extension=mysql.so|;extension=mysql.so|" %{_sysco
nfdir}/php.ini
        fi



the section that concerns actions after installing the file (%post) look for the
line ';extension=mysql.so' in the php.ini file
If it finds it, it will remove the ';' The assumption is that
'extension=mysql.so' exists in the php.ini file. If you did not have it present
in your default /etc/php.ini file then no action is taken. This can occur when
upgrading because it is policy to NOT remove or overwrite a configuration file
with a new one, consequently we cannot guarentee what is or is not in the
previous /etc/php.ini file. Note in the errata that we do ask that you carefully
look over your /etc/php.ini file specifically for this reason.



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