lundi 2 mai 2016

apache2 php5 combibation not working on OS X El capitan

I am a noob in reference to apache. I am trying to set it on El Capitan. 1. I have enabled "LoadModule php5_module" and placed the helloWorld.php in my document root. (/Library/Webroot/Documents) (I don't need user based document root.)
2. If I run the php from the terminal then it works.
3. But it does not work when I run through the browser. It complains that I need to enable ExecCGI.
4. If I enable ExecCGI for my documentRoot then I get the error about malformed header.
5.My understanding was, I don't need to treat php scripts as CGI, if I enable php5_module and that's why I don't need ExecCGI. (I do have some other cgi directory which has some python scripts and they work fine.)

I also have following lines in my httpd.conf
<IfModule php5_module> AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps AddHandler php5-script .php </IfModule>

Could some one suggest where I must be doing something wrong.

Thanks




Aucun commentaire:

Enregistrer un commentaire