Re: Server don't knows what to do with *.php
| From: | Chris Hewitt | Date: | Sat, 29 Jun 2002 17:23:35 +0000 |
| Subject: | Re: Server don't knows what to do with *.php | ||
| References: | 1 2 3 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-7536@lists.php.net to get a copy of this message | ||
Uwe,
I don't use php from the command line, so I've been looking in the manual! PHP assumes it is talking with a web browser so outputs html. Use "php -q" to stop the header output. I sugggest you look at the manual Appendix H Using PHP from the Command Line.
Hope this helps.
Chris
Uwe Birkenhain wrote:
Hello Chris, thank's for your answer! When I call this program with doubleclick or from the commandline a DOS-Box opens a lot of text is running through and the Box closes again. When I pause the text-flood I can see that is a lot of HTML-Code - probably the sourcecode of the PHP-Info-Website which would normally appear in the browser. BTW: I don't know why all my messages appeared together - I tried to get one on top of the list (but failed somehow - I'm not yet familiar with newsboards). Hope that this one appears in the right position. Greetings, Uwe Chris Hewitt schrieb in Nachricht <3D1DCA27.5080904@manordat.demon.co.uk>...Uwe, I'm not familiar with php on windows, but maybe I can give some pointers. I assume apache is running. The lines you have added in httpd.conf are for when calling php via a url in apache e.g. "http://yourbox.com/foo.php". The lines do not tell windows that extensions of ".php" are associated with any program. To run the cgi version from the command line do "php foo.php". Use a simple file such as phpinfo.php for tests with this content: <? php phpinfo(); ?> Tell us what happens when you do this. HTH Chris