Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Through yum, rpm commands I've got php53 and other 53 versions common pdo cli mysql pdo

I can't tell what version of apache I have, or how to integrate this php into apache.

[root@server1 httpd]# yum list installed | grep 'apache'

vzdummy-apache.noarch 1.0-1.swsoft installed

Am I on Apache 1.x or 2.x ? Will I need to update or compile Apache from source, to compile PHP module in it ? or can I use DSO ? Build and Install Apache (with DSO support)

I've found my configuration files, for apache and php and I can do which php ( and it shows /usr/bin/php ) but I'm not sure, any other directories that are used, or where php.ini-recommended is ??

Ah, using

php -r "phpinfo();" | grep Configuration

I see that my php.ini is located at /etc/php.ini

Also reading through the httpd.conf, I'm guessing I'm on 1.2, with this text

# See <URL:http://httpd.apache.org/docs/2.2/> for
// and I see this also - Including the php configuration files
Include conf.d/*.conf

And my php.conf has the AddHandler directives. I would next need to track down the modules that are referenced, to confirm they exist.

I've also reviewed my logs ( access and error ) and can't find anything terribly wrong; It just seems that Apache will ignore any requests for a .php resource.

Suggestions welcome; I must be missing something silly. TIA, for your help.

share|improve this question

migrated from stackoverflow.com Apr 29 '11 at 4:11

This question came from our site for professional and enthusiast programmers.

    
On CentOS 5.2 and I did restart Apache, also. –  Robert Apr 28 '11 at 7:09
add comment

3 Answers 3

on centos rhel and so on, apache normaly is named as httpd check yum list installed | grep 'httpd'

share|improve this answer
add comment

vzdummy-apache.noarch 1.0-1.swsoft installed

Apache package is named httpd. I don't know what this vzdummy is. This is not from any standard repository. I suggest you remove both httpd and php by

yum -y remove httpd
yum -y remove php\*

and after that reinstall from scratch:

yum install httpd
yum install php php-XXX php-YYY

where php-XXX and php-YYY packages for PHP you need.

Execute

updatedb

Then execute

locate *.repo

to see if you have any third-party repositories on your CentOS. You should have the output like this:

/etc/yum.repos.d/CentOS-Base.repo
/etc/yum.repos.d/CentOS-Debuginfo.repo
/etc/yum.repos.d/CentOS-Media.repo
/etc/yum.repos.d/CentOS-Testing.repo
/etc/yum.repos.d/CentOS-Vault.repo

If you have something else, new repositories can clash with standard ones preventing your OS from working correctly. You have to setup priorities for all packages.

share|improve this answer
add comment

Thank you very much. Thru the help of IRC chat ( #bind, #centOS ) I was able to find out that I probably had a fake CentOS version created with openvz

I did use yum update ( rpm ) to update the whole box to CentOS 5.6 and things got working.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.