[SOLVED] Re: apache2 activating php5

Ryan Schmidt ryandesign at macports.org
Thu Apr 26 02:31:38 PDT 2007


On Apr 25, 2007, at 18:18, Thoraval Yvon wrote:

> On Wed, 25 Apr 2007 21:51:47 +0100
> Mark Hattam wrote:
>
>> In your httpd.conf file have you got the Server Root set correctly?
>>
>> ServerRoot "/opt/local/apache2"
>>
>> If putting the full (absolute) path fixes php5
>> module, then it probably means that Apache isn't
>> find any of its other modules either ...
>
>
> Y're right, i do have :
>
> ServerRoot "/opt/local/apache2"
>
> but my :
>
> LoadModule php5_module /opt/local/apache2/modules/libphp5.so
>
> might be only some sort of workaround where i've corrected only the  
> symptom not the true cause of the prob.

I cannot explain why you would have to use the absolute path.  
According to the documentation in httpd.conf, that should not be  
necessary:

# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for  
Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/opt/local/apache2" will be interpreted by the
# server as "/opt/local/apache2/logs/foo.log".

"LoadModule php5_module modules/libphp5.so" should be sufficient. It  
works fine for me.

Are you *sure* ServerRoot is set correctly? Perhaps you have defined  
it twice? Perhaps not even in the main httpd.conf but in some other  
conf file that's being included?


> i say that because i did a symlink for the manual :
>
> ~/Sites%> ls -al manual
> lrwxr-xr-x   1 yt  yt  25 Apr 24 09:53 manual -> /opt/local/apache2/ 
> manual
>
> my DocumentRoot being set to /Users/yt/Sites
>
> and when i point a browser to the url :
>
> http://www.une-bevue.fr/manual
>
> instead of having the manual page, in french in my case, i get :
>
> URI: index.html.de Content-Language: de Content-type: text/html;  
> charset=ISO-8859-1
> <snip />
> URI: index.html.pt-br Content-Language: pt-br Content-type: text/ 
> html; charset=ISO-8859-1
>
> which means another module isn't working (all modules, afaik, are  
> in  /opt/local/apache2/modules)
>
> then, i'm lost about this question absolute PATH versus php5  
> working ...

You do not need to create a symlink called "manual" in your document  
root to get manual support. You should remove your "manual" symlink  
and instead uncomment (remove the "#" before) this one line in  
httpd.conf:

#Include conf/extra/httpd-manual.conf

This does require the modules mod_alias, mod_setenvif and  
mod_negotiation.





More information about the macports-users mailing list