Forum Moderators: travelin cat
4.Uncomment the following lines:
LoadModule php4_module libexec/httpd/libphp4.so
AddModule mod_php4.c
I'm a newbie with the Terminal :)
Is there an easier way... does someone have the script I can just copy and paste into the terminal or ...?
I need your help.
Thanks, wildfire
In HTML, you 'comment' a line by surrounding it like so:
<!-- commented text here -->
In a Perl script, a 'commented' line would be preceeded by a # character:
# commented line here
In PHP, depending on the section of the script you're commenting, you either preceed a line of text with //:
// commented text here
...or surround a section of code you want to deactivate with /* */:
/* commented data here */
In your case, those lines were 'commented out' because they are not needed in all installations of the server software. So if you do need those lines of code, you 'uncommemnt' them... If you don't need the code, you leave it 'commented' out.
By the way... Welcome to WebmasterWorld! :)
So, I've opened the terminal and after my password, typed:
/*LoadModule php4_module libexec/httpd/libphp4.so
AddModule mod_php4.c*/
-----------
the instructions don't say to press enter ? so I don't, #5 says :
#5.Add the following lines (add these lines above: AddType application/x-tar .tgz):
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
***There is no -- AddType application/x-tar .tgz anywhere on the terminal for me to add these lines.
What am I doing wrong?
Here are all of the instructions. Is this right?
1. Launch Terminal from /Applications/Utilities.
2. Open the Apache configuration file and edit the UNIX shell prompt: sudo pico /etc/httpd/httpd.conf.
3. When prompted for a password, enter the Mac OS X administrator account password.
4. Uncomment the following lines:
LoadModule php4_module libexec/httpd/libphp4.so
AddModule mod_php4.c
5Add the following lines (add these lines above: AddType application/x-tar .tgz):
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Note: All the commands for the pico editor display on the screen and you can start any commands with the Control key. Use the arrow keys to move around. Pico is a text editor, mostly for UNIX users to use at the UNIX command line. The pico text editor resides in /usr/bin/ directory.
6. Add a new index page for PHP (index.php) so that the web server will recognize it as the first page to load:
<IfModule mod_dir.c>
DirectoryIndex index.html index.php index.htm
</IfModule>
7. Save the httpd.conf file by pressing ^X (control + x keys). When the screen asks "Save Modified buffer?", press "Y". When prompted for "File Name to write : httpd.conf", press Return once to accept it. This will return you to the UNIX shell prompt.
It's not important where exactly you add the additional handlers. Just look for the part where other handlers are specified and put your new handler (AddType application/x-httpd-php .php and AddType application/x-httpd-php-source .phps) there.
(btw, in case you didn't know it: ctrl+W lets you search in a text file in pico.)
Don't forget to restart httpd after changing httpd.conf.
Does it work now?
Advantages are :
1) you get out of the terminal. All of the Serverlogistics products are available from the normal Finder as they install in the /Library folder
2) you get newer - and more powerful - versions than what Apple ships
3) there are some really excellent installation instructions