apache2 activating php5

Yvon Thoraval yt.dev at free.fr
Tue Apr 24 02:48:28 PDT 2007


Le 24 avr. 07 à 11:13, Ryan Schmidt a écrit :

>
> Sounds like you're almost there. Let me see what I have in my  
> apache2 httpd.conf, which is working fine with php5.
>
>
> Near the other LoadModule directives at the top, you'll need this:
>
> LoadModule php5_module modules/libphp5.so

obviously i've it.

>
>
> You'll want to make sure your DirectoryIndex directive looks  
> something like this:
>
> <IfModule dir_module>
>     DirectoryIndex index.php index.html
> </IfModule>
>

here i've :
# Modifie le 24-04-07  => modified today
#####################
<IfModule dir_module>
     DirectoryIndex index.html index.xhtml index.php index.rhtml
</IfModule>

>
> And of course what you already put in the IfModule section:
>
> AddType application/x-httpd-php .php
> AddType application/x-httpd-php-source .phps
>

here :
<IfModule mime_module>
     TypesConfig conf/mime.types
     AddType application/x-compress .Z
     AddType application/x-gzip .gz .tgz
     # Modifie le 24-04-07  => modified today
     AddType application/x-httpd-php .php
     AddType application/x-httpd-php-source .phps
</IfModule>

>
> Those are the only applicable occurrences of "php" in my httpd.conf  
> so hopefully that would do it for you too.
>

i think so too ;-)

the only file i've left from previous Apache 1.3 install is  
a .htaccess in my root directory (/Users/yt/Sites/) :

$  ls -al /Users/yt/Sites/.*
-rw-r--r--   1 yt  yt  15364 Apr  9 11:01 /Users/yt/Sites/.DS_Store
-rw-r--r--   1 yt  yt    288 Apr 19 09:40 /Users/yt/Sites/.htaccess
-rw-r--r--   1 yt  yt      0 Apr 23 22:27 /Users/yt/Sites/.htgroups
-rw-r--r--   1 yt  yt      0 Apr 23 22:27 /Users/yt/Sites/.htusers
-rwxr-xr-x   1 yt  yt      0 Feb 23 09:05 /Users/yt/Sites/.localized

$  cat /Users/yt/Sites/.htaccess
AddType text/html .xhtml
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml
RewriteCond %{HTTP_ACCEPT}&nbsp;!application/xhtml\+xml\s*;\s*q=0
RewriteCond %{REQUEST_URI} \.xhtml$
RewriteCond %{THE_REQUEST} HTTP/1\.1
RewriteRule .* - [T=application/xhtml+xml]

$  cat /Users/yt/Sites/.htgroups
$  cat /Users/yt/Sites/.htusers
$

obviously i've changed the root path accordingly into httpd.conf :

# Modifie le 24-04-07
#####################
#DocumentRoot "/opt/local/apache2/htdocs"
DocumentRoot "/Users/yt/Sites"

# Modifie le 24-04-07
#####################
<Directory "/Users/yt/Sites">
     Options Indexes FollowSymLinks
     AllowOverride None
     Order allow,deny
     Allow from all
</Directory>


# Modifie le 24-04-07
#####################
# was : "/opt/local/apache2/cgi-bin"
<Directory "/Users/yt/Sites/cgi-bin">
     AllowOverride None
     Options None
     Order allow,deny
     Allow from all
</Directory>

this sounds "strange" to me )))

also i've added a symlink to the Apache 2 manual :

$ ls -al /Users/yt/Sites/manual
lrwxr-xr-x   1 yt  yt  25 Apr 24 09:53 /Users/yt/Sites/manual -> /opt/ 
local/apache2/manual

BUT when pointing a browser to that directory (saying : http:// 
www.une-bevue.fr/manual) i get :

URI: index.html.de Content-Language: de Content-type: text/html;  
charset=ISO-8859-1
[...]
  text/html; charset=ISO-8859-1

instead of the french version of Apache 2 manual (what i had before  
for v 1.3)

anyway, thanks for your help !


Yvon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20070424/992a2a8e/attachment.html


More information about the macports-users mailing list