Installing php 5

I have sầu a fresh installation on CentOS 7 with httpd and following remi"s wizard I installed php 5.4 as single version (I know it"s old, but part of my requirements !!).My problem is that httpd cannot run php scripts (simple like phpinfo) just as described in this question: PHPhường not working with Apađậy on Centos 7Apart from that problem, things that I find very very strange are:

there is no php module in httpd:

httpd -M | grep php shows nothing!! There should be php5_module, or not ??

there is no php.conf tệp tin in httpd:

pc ~>>$ ls -l /etc/httpd/conf.d/total 16-rw-r--r--. 1 root root 2926 Atruyền thông quảng cáo 2 16:13 autoindex.conf-rw-r--r--. 1 root root 366 Aquảng cáo 2 16:14 README-rw-r--r--. 1 root root 1252 Nov 27 17:58 userdir.conf-rw-r--r--. 1 root root 824 Nov 27 17:58 welcome.confbut the same time, php is installed as described (remi-wizard):pc ~>$ rpm -qa "php*" | sortphp-cli-5.4.45-18.el7.remi.x86_64php-common-5.4.45-18.el7.remày.x86_64Similar question I found here và the provided solution is installation of mod_php. Sounds right... but here comes my other question:when attempting yum install mod_php the system prompts me for php installation (though I have sầu it installed) !!

subởi vì yum install mod_php...--> Running transaction check---> Package php.x86_64 0:5.4.45-18.el7.remi will be installed--> Finished Dependency Resolution(it"s the same with)

subởi vì yum install php...--> Running transaction check---> Package php.x86_64 0:5.4.45-18.el7.remi will be installed--> Finished Dependency ResolutionAm I doing something wrong here or missing something ??


You have sầu php-cli và php-common packages installed. That means you"ve sầu installed only cli version. Cli (console) version is the one you run with php command from shell. Those packages don"t provide apache module that"s why you don"t see it.

Bạn đang xem: Installing php 5

While suvì chưng yum install php (or outdated mod_php, which is now an alias only) offers you to lớn install php package, which does includes shared apabít module và config.

So your assumption "(though I have sầu it installed) " is not quite correct. Just vì chưng suvày yum install php & accept all packages it wants khổng lồ install và you"ll be fine.

Xem thêm: Print & Play Boardgames - Sites To Download Games (Pnp)


Thanks for contributing an answer lớn Server Fault!

Please be sure lớn answer the question. Provide details & mô tả your research!

But avoid

Asking for help, clarification, or responding to other answers.Making statements based on opinion; bachồng them up with references or personal experience.

To learn more, see our tips on writing great answers.

Post Your Answer Disthẻ

By clicking “Post Your Answer”, you agree to lớn our terms of service, privacy policy và cookie policy

Not the answer you're looking for? Browse other questions tagged php centos7 httpd mod-php or ask your own question.


site design / hình ảnh sản phẩm © 2021 Stachồng Exchange Inc; user contributions licensed under cc by-sa. rev2021.3.23.38875