php5-curl install should restart apache not reload it
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php5 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Maverick |
Won't Fix
|
Low
|
Unassigned |
Bug Description
Binary package hint: php5
Installing php5-curl, the post-install script does an Apache2 "reload" which refreshes the configuration, but does not cause the new libs to be loaded into memory. The result is any PHP page using curl will crash until Apache2 is "restarted".
Install:
aptitude install php5-curl
The following NEW packages will be installed:
php5-curl
0 packages upgraded, 1 newly installed, 0 to remove and 69 not upgraded.
Need to get 26.9kB of archives. After unpacking 127kB will be used.
Get:1 http://
Fetched 26.9kB in 0s (48.3kB/s)
Selecting previously deselected package php5-curl.
(Reading database ... 566689 files and directories currently installed.)
Unpacking php5-curl (from .../php5-
Processing triggers for libapache2-mod-php5 ...
* Reloading web server config apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
...done.
Setting up php5-curl (5.3.3-1ubuntu9.3) ...
Error Received:
[Fri Apr 15 14:08:40 2011] [error] [client 67.70.64.123] PHP Fatal error: Call to undefined function curl_init() in /opt/mozbx/
Workaround:
sudo /etc/init.d/apache2 restart
* Restarting web server apache2
The problem is then resolved.
Hi ironstorm, thanks for taking the time to file this bug report and help us make Ubuntu better!
I've just done some tests with this, and I cannot confirm the issue on natty..
I created a PHP file in the webroot of apache:
<?php
$ch = curl_init();
Then hit it without curl installed.. and I got a 500 error as I would expect.
I then installed php5-curl, and refreshed the page. As soon as the libapache2-mod-php5 trigger reloaded apache, the page started returning a 200.
This is in apache's error log:
[Sat Apr 16 08:23:00 2011] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function curl_init() in /var/www/curl.php on line 3
[Sat Apr 16 08:23:00 2011] [notice] Graceful restart requested, doing restart
[Sat Apr 16 08:23:01 2011] [notice] Apache/2.2.17 (Ubuntu) PHP/5.3.5-1ubuntu6 with Suhosin-Patch mod_wsgi/3.3 Python/2.7.1+ configured -- resuming normal operations
It does seem to happen on maverick, but I can't seem to find the exact changelog item that has made this a reality.
As such, I'm going to mark this as Fix Released, and open a task against Maverick that is Confirmed, importance Low.