| 
	
 | 
 Posted by Koncept on 11/29/06 18:28 
In article 
<doraymeRidThis-52DAD9.09330629112006@news-vip.optusnet.com.au>, 
dorayme <doraymeRidThis@optusnet.com.au> wrote: 
 
> Now that I have includes PHP includes on some of my websites,  
> need to think about gettint PHP installed or active on my Tiger  
> installation. Anyone done this? (Apache server is built into X  
> and easy to turn on... but I am wondering where to begin re the  
> php bit). Sort of looking for any shortcuts from people's  
> experience please. 
 
 
First... Stop apache 
 
bash$ sudo apachectl stop 
 
The config file for apache is located at /etc/http/http.conf 
 
In order to enable PHP, you are going to have to enable the php 
module.. Search for a line that looks like ( around line 240 ): 
 
#LoadModule php4_module libexec/httpd/libphp4.so 
 
and remove the hash "#" to uncomment the line. 
 
Next, uncomment the line in the next section to add the module support. 
 
#AddModule mod_php4.c 
 
Last, near the bottom of the file, look for a block that looks like 
this, and uncomment it. If the block does not exists, copy and paste 
this into some free space: 
 
<IfModule mod_php4.c> 
    # If php is turned on, we respect .php and .phps files. 
    AddType application/x-httpd-php .php 
    AddType application/x-httpd-php-source .phps 
 
    # Since most users will want index.php to work we 
    # also automatically enable index.php 
    <IfModule mod_dir.c> 
        DirectoryIndex index.html index.php 
    </IfModule> 
</IfModule> 
 
Save the file and restart apache 
 
bash$ sudo apachectl start 
bash$ cat <<EOF > /Library/WebServer/Documents/index.php 
<?php phpinfo(); ?> 
EOF 
bash$ open http://127.0.0.1/index.php 
 
You should have PHP support now. You can also enable includes from the 
http.conf file. Search the text for "includes" and you will see the 
sections you need to work with. 
 
Good luck! 
 
--  
Koncept <<  
"The snake that cannot shed its skin perishes. So do the spirits who are 
prevented from changing their opinions; they cease to be a spirit."  -Nietzsche
 
  
Navigation:
[Reply to this message] 
 |