Advertisement

apache and mime types... (again)

Started by March 02, 2003 12:56 PM
0 comments, last by Tsu 21 years, 6 months ago
I posted this here yesterday, and i deleted it because i thought it was working. Now, it''s doing the same thing again, so i''ll post again... I''m trying to get Apache to work with PHP (and eventually MySQL), and i''m following this tutorial to do it. I''ve followed it word for word, and it''s not working as well as it''s supposed to. I''ve managed to compile and ''install'' working versions of Apache and PHP (and mysql), and individually, they work fine. Apache doesn''t know what PHP is, and i don''t know why. I''ve added "AddType application/x-httpd-php php" to my httpd.conf, like the tutorial said, and whenever i try to access anything with a .php extension, it asks me where i''d like to save it (which is obviously not what i want) (yes, i restarted the server before testing it). BUT, as i just found out, theres a little twist to the problem... thats only when i''m logged in as ''root''. When i log in as a regular user and try, it displays the page just like it were a regular HTML file, though the PHP code does absolutely nothing (it displays "<?PHP phpinfo(); ?>" on the page). While i would like to know why PHP doesn''t work at all, i''d like to get it to actually load the page first. I think it''s a MIME problem, but i''m pretty new to this, and don''t know for sure. Yes, i''ve read the manuals for both apache and PHP, and yes, i''ve googled and found nothing particularily helpful. Maybe i missed something? (And apologies to Null and Void, i checked my email and found out you had replied to my last thread... but i had already deleted it.. oops)
quote: Original post by Tsu
I posted this here yesterday, and i deleted it because i thought it was working. Now, it''s doing the same thing again, so i''ll post again...

I''m trying to get Apache to work with PHP (and eventually MySQL), and i''m following this tutorial to do it. I''ve followed it word for word, and it''s not working as well as it''s supposed to.

I''ve managed to compile and ''install'' working versions of Apache and PHP (and mysql), and individually, they work fine. Apache doesn''t know what PHP is, and i don''t know why. I''ve added "AddType application/x-httpd-php php" to my httpd.conf, like the tutorial said, and whenever i try to access anything with a .php extension, it asks me where i''d like to save it (which is obviously not what i want) (yes, i restarted the server before testing it). BUT, as i just found out, theres a little twist to the problem... thats only when i''m logged in as ''root''. When i log in as a regular user and try, it displays the page just like it were a regular HTML file, though the PHP code does absolutely nothing (it displays "" on the page).


Just use the PHP installation document to solve your problem. It always worked for me. If it doesn''t, you''re doing something wrong. The tutorial you''re referring to hasn''t been updated since 99 and Apache has gone through some extensive changes since. Especially if you''re using Apache 2.0.x.



[Cyberdrek | the last true sorcerer | Spirit Mage - mutedfaith.com][ Administrator TheLinuxForum.tk]
[Cyberdrek | ]

This topic is closed to new replies.

Advertisement