To: RebelTex
when I click on it, it asks me what program to use to open it
That happens for a couple of reasons. One reason is that even if Apache and PHP are properly configured, you still have to "open" the file from within the document directory of Apache (and through a browser - http://localhost/FaHUpload.php). Otherwise, it's just the OS trying to open a text file. The OS has no way of parsing that file.
Secondly, if you're trying to access the PHP script, and it's in the correct location for your web server (i.e., the document directory that is specified in httpd.conf), Apache still has to know about PHP extensions, and know that they're associated with the PHP installation on your computer. That way, instead of Apache filtering the text like it would with a regular HTML file, it sends it to the PHP preprocessor first. Then, any resulting HTML (probably none in this case) is sent to the browser that made the request. Here's an example of a change you might have to make to your Apache config file:
Find the httpd.conf file (maybe in /usr/local/apache/conf), and look for a line that is similar to:
AddType application/x-httpd-php .php
After it's set up, you'll need to copy the FaHUpload.php file to the proper document folder. Then, try accessing it through a web browser like I indicated a few paragraphs back. I'm pretty sure you can run PHP scripts without a browser, but I'm not sure how exactly - yet.
209 posted on
03/30/2006 1:07:04 PM PST by
andyk
(Go Matt Kenseth!)
To: andyk
Thanks for the info on PHP.
Actually, I don't want to run Apache or other web server. I just want to run a CGI script with PHP.
What is the filename for the PHP interpreter?
Is there a separate PHP interpreter for each of these: Apache, CGI, CLI?
How can I tell if the default configuration of Mepis has installed PHP as a CGI?
(I've discovered that PHP is already installed for Apache.)
What is the path to the PHP interpreter for CGI?
I know these are techy questions and you might not know the answers, so I'm going to ask these same questions on the Mepis forum. Hopefully, they will be able to answer them.
240 posted on
04/02/2006 10:32:41 AM PDT by
RebelTex
(Help cure diseases: http://www.freerepublic.com/focus/f-news/1548372/posts)
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson