LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-07-2003, 12:20 PM   #1
jm1389
LQ Newbie
 
Registered: Jul 2003
Posts: 3

Rep: Reputation: 0
Question PHP 4.2.2 and Apache 2.0.4


I have a Red Hat 9 box that I have recently setup. I am having a problem with PHP scripts. I recently setup IP Table Logger and everything is setup correctly and working with the exception of the the web part. I have PHP 4.2.2 Installed and at a command prompt where my php executable is I can type in "php -i" and I receive the html information page . However all of the PHP scripts for the iptable logger do not work. I already had to change the cgi.force.redirect in th php.ini file and that got me to an error that said "Premature end of script headers". Now the funny thing is that if I had the following line to the beginning of the script it will work for the text part of the html page, but not the graphics or pics.
#!/usr/bin/php

I have added
LoadModule php4_module modules/libphp4.so
&
DirectoryIndex index.php
&
application/x-httpd-php php
to my httpd.conf to no avail

Even with this added I can specify a path and it still doesn't detect the index.php file that I have. It just tels me that permission is denied for that directoy. However, I have apache running as the user apache and I made apache the owner of all files in /var/www/
Any insight or ideas would be greatly appreciated.
 
Old 08-31-2003, 05:29 AM   #2
bandit
LQ Newbie
 
Registered: Jul 2003
Location: Western Australia
Distribution: debian, ubuntu, mint, etc...
Posts: 14

Rep: Reputation: 0
Sorry, no answer from me, as I am having a very similar problem: Currently unable to open any local PHP files running on apache.... (html files are served just fine)
If you (or anyone else) finds a solution to this, please le me know too: post reply here.

Thanks in advance
 
Old 08-31-2003, 11:43 AM   #3
jm1389
LQ Newbie
 
Registered: Jul 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Wink PHP 4.2.2 and Apache 2.0.4

It has something to do with the permissions I think. All I did to get around the problem was move my PHP served pages into the /usr/share/web folder that I created and all php is now served fine. I never really had the time to research it as I needed the site up and running ASAP. Have fun !
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2, PHP 5, SuSE 9.2 - cannot run php files dickohead Linux - Networking 6 06-28-2006 10:25 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-17-2004 11:10 PM
slackware, apache and PHP from .tgz - problems with PHP szymon Slackware 2 09-06-2004 04:57 PM
reinstalled apache, php, still no php support SuSE 8.2 hindenbergbaby Linux - Software 1 10-14-2003 01:42 PM
php-nuke with apache php mysql c0c0deuz Linux - Software 0 03-30-2003 06:23 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration