View previous topic :: View next topic |
Author |
Message |
cortinez n00b

Joined: 10 Feb 2004 Posts: 5 Location: San Antonio,Tx
|
Posted: Sun May 02, 2004 10:24 am Post subject: help with php and gallery |
|
|
Howdy,
I just emerged apache2.0.49 and php/mod_php along with gallery... how would i know that i have php working correctly. I started apache and i get the default test page working. When trying to get gallery working i get the script showing up. Any help would greatly be appreciated. |
|
Back to top |
|
 |
isotropic n00b

Joined: 13 Mar 2004 Posts: 15
|
Posted: Sun May 02, 2004 12:40 pm Post subject: |
|
|
To test whether php is working with apache I would refer you to the Desktop Configuration guide located here:
http://www.gentoo.org/doc/en/desktop.xml
You need to look under the first part of section 8. It shows you how to setup apache for php. You should have little problem if you follow this guide. It is fairly straightforward.
Essentially you will need to configure /etc/conf.d/apache2 by adding the following line to it:
APACHE2_OPTS="-D SSL -D PHP4"
Then to test if php is working you create a test php file as follows
# nano -w /var/www/localhost/htdocs/test.php
<?php phpinfo(); ?>
You would then point your browser at http://localhost/test.php to see if you get something like the following:
Code: |
phpinfo() (p1 of 26)
PHP Logo
PHP Version 4.0.6
System Linux my.server.edu 2.4.10 #1 Tue Oct 9 16:33:50 Local
time zone must be set--see zic manuali686 i686 unknown
Build Date Oct 16 2001
|
If you see something like the above then Apache is successfully processing PHP code.
Lastly, there is a warning you should heed:
Code: |
Warning: If you look at the full output of the above, you'll find out that the test.php script gives out a lot of information about your system. You should probably get rid of it once you know that php is working. (Or you can do what I do, and just mv test.php test.phps. Apache will display test.phps as a PHP source file instead of executing the script.)
|
Good luck! |
|
Back to top |
|
 |
|