PHP 5.3 Apache HTTPD Dependency

Support/Development for PHP
Per Hansson
New Forum User
New Forum User
Posts: 4
Joined: Sun Jan 08, 2012 5:59 am
Location: Sweden

PHP 5.3 Apache HTTPD Dependency

Unread post by Per Hansson »

Hi, in your repository there is a dependency for Apache's httpd.
I use nginx on my server and as such don't have any use for Apache...

Would it be possible to remove this dependency requirement?
Here is an example of a server with only PHP v5.3.2 and nginx installed via another repository, trying to upgrade to atomicorps PHP v5.3.8:

Code: Select all

Updating:
 php                                                     x86_64                                            5.3.8-2.el5.art                                             atomic                                                          1.4 M
 php-cli                                                 x86_64                                            5.3.8-2.el5.art                                             atomic                                                          2.6 M
 php-common                                              x86_64                                            5.3.8-2.el5.art                                             atomic                                                          982 k
 php-devel                                               x86_64                                            5.3.8-2.el5.art                                             atomic                                                          625 k
 php-fpm                                                 x86_64                                            5.3.8-2.el5.art                                             atomic                                                          1.3 M
 php-gd                                                  x86_64                                            5.3.8-2.el5.art                                             atomic                                                          208 k
 php-mbstring                                            x86_64                                            5.3.8-2.el5.art                                             atomic                                                          2.3 M
 php-mysql                                               x86_64                                            5.3.8-2.el5.art                                             atomic                                                          160 k
 php-pdo                                                 x86_64                                            5.3.8-2.el5.art                                             atomic                                                          117 k
 php-xml                                                 x86_64                                            5.3.8-2.el5.art                                             atomic                                                          222 k
Installing for dependencies:
 httpd                                                   x86_64                                            2.2.3-53.el5_7.3                                            rhel-x86_64-server-5                                            1.2 M

Transaction Summary
=============================================================================================================================================================================================================================================
Install       1 Package(s)
Upgrade      10 Package(s)

Total download size: 11 M
Is this ok [y/N]: n
And here is another example, this is a server using PHP via atomicorp, trying to delete HTTPD:

Code: Select all

Removing:
 httpd                                                      x86_64                                            2.2.3-53.el5.centos.3                                               installed                                            3.3 M
Removing for dependencies:
 mod_performance                                            x86_64                                            0.3.12-1.el5                                                        installed                                            329 k
 php                                                        x86_64                                            5.3.8-2.el5.art                                                     installed                                            3.6 M
 php-devel                                                  x86_64                                            5.3.8-2.el5.art                                                     installed                                            3.1 M

Transaction Summary
=============================================================================================================================================================================================================================================
Remove        4 Package(s)
Reinstall     0 Package(s)
Downgrade     0 Package(s)

Is this ok [y/N]: n
Regards,
Per Hansson
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: PHP 5.3 Apache HTTPD Dependency

Unread post by scott »

After some checking, no its not possible to remove the httpd dependency requirement in php. Its used to manage the permissions on the sessions directory correctly. Its probably a non-issue in your environment, but for apache users it would require a pretty signifigant change in the way the user & groups are created in httpd.
Per Hansson
New Forum User
New Forum User
Posts: 4
Joined: Sun Jan 08, 2012 5:59 am
Location: Sweden

Re: PHP 5.3 Apache HTTPD Dependency

Unread post by Per Hansson »

Okay thanks, I was using another repos before but they actually ended up dropping support for PHP v5.3.x and going back to PHP v5.2.x
Before that they actually fixed the issue back then, but maybe things have changed and it's impossible now? http://centos.alt.ru/?p=647
So anyway now I'm looking for alternatives...

If I install the PHP packages manually via rpm forcing no dependencies I guess that wont prevent the dependency to come back the next time there is an update for php and I run "yum update"?
What if I manually exclude httpd in my /etc/yum.repos.d files, will that simply make the installation fail next time, since it can't satisfy the dependency?

I'm just looking for some way to do this that makes sure Apache is not installed, because if some inexperienced tech starts up Apache when nginx should be running that might wreak some havoc...

Regards,
Per Hansson
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: PHP 5.3 Apache HTTPD Dependency

Unread post by scott »

Its not possible without a bigger architecture change (which would need to come from redhat, since they're point on this).

excluding httpd itself would definitely cause it to not be installable
Per Hansson
New Forum User
New Forum User
Posts: 4
Joined: Sun Jan 08, 2012 5:59 am
Location: Sweden

Re: PHP 5.3 Apache HTTPD Dependency

Unread post by Per Hansson »

Okay thanks, my "workaround" will be to do a "rpm -e --nodeps httpd" after each upgrade of PHP then :)

Regards,
Per Hansson
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: PHP 5.3 Apache HTTPD Dependency

Unread post by breun »

Why not just leave it installed and run 'chkconfig httpd off' to make sure it doesn't start automatically on boot? If you really can't spare the disk space you could create a dummy RPM package that says it's providing httpd, but I'd watch out, because other software might think there is a real httpd installed and break on the dummy.
Lemonbit Internet Dedicated Server Management
Per Hansson
New Forum User
New Forum User
Posts: 4
Joined: Sun Jan 08, 2012 5:59 am
Location: Sweden

Re: PHP 5.3 Apache HTTPD Dependency

Unread post by Per Hansson »

breun: as I wrote in my second post "because if some inexperienced tech starts up Apache when nginx should be running that might wreak some havoc..."

My server is a managed dedicated server with service monitoring, and I've seen them before just login and do a "service httpd restart" without actually checking anything else before.
Thankfully since we switched to nginx over 2 years ago we haven't had any problems at all with availability! (touch on wood).

Regards,
Per Hansson
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: PHP 5.3 Apache HTTPD Dependency

Unread post by breun »

You could symlink /etc/init.d/httpd to the nginx init.d script? :)
Lemonbit Internet Dedicated Server Management
Post Reply