php5-gd needs to update php.ini

Bug #104863 reported by John Gelm
2
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
Invalid
Undecided
Daniel Hahler

Bug Description

Binary package hint: php5-gd

When I installed php5-gd I was not able to create images until I added
"extension=gd.so" to /etc/php5/apache2/php.ini.

Shouldn't this be done during the install?

John

Revision history for this message
Ondřej Surý (ondrej) wrote :

I don't know which version you are talking about.

But current versions create /etc/php5/conf.d/gd.ini which gets included into configuration and older packages got postinst hook to insert those lines into php.ini.

However this could be some sort of configuration on your site, which is very hard to tell, since we don't know details.

Changed in php5:
assignee: nobody → ondrej
status: Unconfirmed → Needs Info
Revision history for this message
John Gelm (jgelm) wrote : Re: [Bug 104863] Re: php5-gd needs to update php.ini

Ondřej Surý wrote:
> I don't know which version you are talking about.
>
Yes, I see. It was 7.04 desktop beta with all updates current at the
time of my report(2007-04-09). I need a LAMP desktop.

I had added Apache, MySQL and PHP packages. Perhaps I ran the updates
in the wrong order, or the desktop was not intended to be used as a
server.

John

Revision history for this message
Ondřej Surý (ondrej) wrote :

Hmm, strange. That shouldn't happen, but who knows what version of php5 was in beta...

Could you do:

dpkg -L php5-gd

on affected system and add output here?

Revision history for this message
Ondřej Surý (ondrej) wrote :

Ah, and output of

dpkg -l *php5*

as well.

Revision history for this message
John Gelm (jgelm) wrote :

Ondřej Surý wrote:
> Hmm, strange. That shouldn't happen, but who knows what version of php5
> was in beta...
>
> Could you do:
>
> dpkg -L php5-gd
>
> on affected system and add output here?
>
>
dpkg -L php5-gd
/.
/usr
/usr/lib
/usr/lib/php5
/usr/lib/php5/20060613+lfs
/usr/lib/php5/20060613+lfs/gd.so
/usr/share
/usr/share/doc
/etc
/etc/php5
/etc/php5/conf.d
/etc/php5/conf.d/gd.ini
/usr/share/doc/php5-gd

Revision history for this message
John Gelm (jgelm) wrote :

Ondřej Surý wrote:
> Ah, and output of
>
> dpkg -l *php5*
>
> as well.
>
>
dpkg -l *php5*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name Version Description
+++-=========================-=========================-==================================================================
ii libapache2-mod-php5 5.2.1-0ubuntu1.1 server-side,
HTML-embedded scripting language (apache 2 module)
ii php5 5.2.1-0ubuntu1.1 server-side,
HTML-embedded scripting language (meta-package)
un php5-cgi <none> (no description
available)
ii php5-cli 5.2.1-0ubuntu1.1 command-line
interpreter for the php5 scripting language
ii php5-common 5.2.1-0ubuntu1.1 Common files for
packages built from the php5 source
ii php5-gd 5.2.1-0ubuntu1.1 GD module for php5
ii php5-imagick 0.9.11+1-4.1ubuntu1 ImageMagick
module for php5
ii php5-mysql 5.2.1-0ubuntu1.1 MySQL module for
php5
un php5-mysqli <none> (no description
available)

Revision history for this message
Ondřej Surý (ondrej) wrote :

Did you restarted apache2 after installing php5-gd?

This could be just error of php not loading new configuration until restarted.

Revision history for this message
John Gelm (jgelm) wrote :

Ondřej Surý:

My LAMP/desktop is working fine. I have been able to create images
since the date of my report(2007-04-09), but only because I made a
manual change to the php.ini file as I stated in my report.

When I STFW, I found that, after installing php?-gd, people have been
manually fixing php.ini for years! Ubuntu's own website advises this:
http://doc.ubuntu.com/ubuntu/serverguide/C/mediawiki.html

Your review indicates that the config file(s) should be updated
correctly. No manual fixing should be required.

HTH;

John

Revision history for this message
Ondřej Surý (ondrej) wrote :

Does your output of:

dpkg -l libapache2-mod-php5 includes /etc/php5/apache2/conf.d line?

Does that symlink exists?

$ ls -l /etc/php5/apache2/conf.d
lrwxrwxrwx 1 root root 9 2007-05-22 17:55 /etc/php5/apache2/conf.d -> ../conf.d

And it's part of the libapache2-mod-php5 package.

If it doesn't exists, could you try creating it manually?

Does it help? (It should print something about including module twice)

If it doesn't help, could you do:

strings /usr/lib/apache2/modules/libphp5.so | grep conf.d

and send output here?

Thanks,
Ondrej

Revision history for this message
John Gelm (jgelm) wrote :

Ondřej Surý wrote:
> Does your output of:
>
> dpkg -l libapache2-mod-php5 includes /etc/php5/apache2/conf.d line?
>

 dpkg -l libapache2-mod-php5
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name Version Description
+++-=========================-=========================-==================================================================
ii libapache2-mod-php5 5.2.1-0ubuntu1.1 server-side,
HTML-embedded scripting language (apache 2 module)

> Does that symlink exists?
>
> $ ls -l /etc/php5/apache2/conf.d
> lrwxrwxrwx 1 root root 9 2007-05-22 17:55 /etc/php5/apache2/conf.d -> ../conf.d
>
 ls -l /etc/php5/apache2/conf.d
lrwxrwxrwx 1 root root 9 2007-03-31 22:14 /etc/php5/apache2/conf.d ->
../conf.d

> And it's part of the libapache2-mod-php5 package.
>
> If it doesn't exists, could you try creating it manually?
>
> Does it help? (It should print something about including module twice)
>
> If it doesn't help, could you do:
>
> strings /usr/lib/apache2/modules/libphp5.so | grep conf.d
>
$ strings /usr/lib/apache2/modules/libphp5.so | grep conf.d
/etc/php5/apache2/conf.d

> and send output here?
>
> Thanks,
> Ondrej
>
>
HTH;
John

Revision history for this message
John Gelm (jgelm) wrote :

Ondřej Surý ;

Good news!

I just rebooted after editing php.ini to comment out the extension=gd.so
line that I had added on 2007-04-09. I happy to report that the
creation of images continues to work just fine.

John

Revision history for this message
Daniel Hahler (blueyed) wrote :

John, thank you for having reported back.
I'm closing the bug as invalid, because it seems like something strange was going on and the php5-gd package should add its configuration snippet correctly, just like you've experienced in the end.

Also it seems like the serverguide at http://doc.ubuntu.com/ubuntu/serverguide/C/mediawiki.html has been fixed in this regard.

Changed in php5:
assignee: ondrej → blueyed
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.