View previous topic :: View next topic |
Author |
Message |
J_T_Biggs n00b
Joined: 02 Jan 2003 Posts: 7 Location: United States
|
Posted: Mon Jun 02, 2003 8:56 am Post subject: php problems |
|
|
I have apache, php, mysql, and mod_php all emerge and installed correctly. I am also pretty sure everything is configured to work together (as I have configured Apache before to a certain extent). The problem is, when I go to load a PHP file in my browser, it only displays the contents of the file.
i.e. <?php phpinfo(); ?> (not the php information)
how do I solve this solution, I know this may have been posted before but I looked for a solution on the forums and none worked for me. Im used php4.3.1 and apache (not apache2) |
|
Back to top |
|
|
slartibartfasz Veteran
Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Mon Jun 02, 2003 9:06 am Post subject: |
|
|
did u make sure that the mime type is properly configured? also double check if apache was started with php support -> see /etc/conf.d/apache2... _________________ To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be. |
|
Back to top |
|
|
J_T_Biggs n00b
Joined: 02 Jan 2003 Posts: 7 Location: United States
|
Posted: Mon Jun 02, 2003 10:11 am Post subject: |
|
|
ah, the mime types, thanks that is definatly the problem. |
|
Back to top |
|
|
slartibartfasz Veteran
Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Tue Jun 03, 2003 6:47 am Post subject: |
|
|
no problem - u'r welcome _________________ To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be. |
|
Back to top |
|
|
st_judas n00b
Joined: 05 Jun 2003 Posts: 1
|
Posted: Thu Jun 05, 2003 5:09 pm Post subject: ok, so they weren't too helpful, eh? |
|
|
I had the same problem with php 4.x.x and apache 1.x.x. The Gentoo Virtual Mailhosting Guide http://www.gentoo.org/doc/en/virt-mail-howto.xml
suggests we use the following guide to PHP and Apache install:
- http://www.linuxguruz.org/z.php?id=31
I've found that after adding this bit from the end of that guide, php worked.
<SNIP>
# Make sure you have, Uncomment (remove the #'s), Change or Create
# the following lines in the file /usr/local/apache/conf/httpd.conf
LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
<IfModule mod_dir.c>
DirectoryIndex index.html index.php index.php3 index.phtml
</IfModule>
# And for PHP 4.x, use:
#
AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps
cp /usr/local/php-4.3.0/php.ini-dist /usr/local/apache/conf/php.ini
# Start Apache:
/usr/local/apache/bin/apachectl start
# Create a file in /usr/local/apache/htdocs called index.php
<html>
<head><title>PHP Test Page</title></head>
<body>
<? phpinfo(); ?>
</body>
</html>
# Point your Web Browser at:
http://localhost/index.php
</SNIP>
I am, even as I type this, trying this same config with Apache2.
Good luck. We'll probably both need it.
___________________________________________________________
Funny how some users with "Guru" status like to post useless, arrogant, half-*ssed, RTFM crap. I've read the pertinant manuals. That's why I had the answer. I won't bother to post unless I do, or genuinely think I do. Ignore ppl who tell you RTFM without being able to quote the book, chapter, and verse. (or URL/URI of course) I don't need to be condescending to enjoy helping fellow technophiles. I do it for the free beer!
-Judas
""Knowledge is power."
-Francis Bacon
"The only true knowledge is in knowing that you know nothing."
-Socrates
" Tanta stultia mortalium est. "
-Seneca |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|