Installed PHP, and it works on command line, but Firefox won't execute "test.php" Is there a setting I missed?
How do I tell Firefox that, or where, PHP exists, and to execute script? I installed PHP 5.3 as per msVista (basic) instructions on php.org to C:\Program Files\PHP\ and it works if I open cmd on the command line : C:\Program Files\PHP>php -a Interactive mode enabled ^Z and scripts in tags work properly.
However opening a page or file such as test.php containing valid script with Firefox 23.0.1 fails to interpret the script and just displays the uninterpreted source code as if it were text. I found that because C:\Program Files\PHP\ contains a space in the pathname the path needs to be enclosed within quotes "C:\Program Files\PHP\" [smacks forhead: shoulda installed to C:\PHP\ ] to be recognized. Is that the problem, and where do I make the change?
Vybrané riešenie
Did your PHP installation package include a webserver (e.g., WAMP)? Generally speaking, the webserver will set up and take over port 80 and you can access your "site" using:
http://localhost/
Sometimes you may prefer to set up on a different port, for example, 8080, and then you would use:
http://localhost:8080/
As far as I know, there's no way to have Firefox stand in for a webserver and process .php files through the PHP interpreter itself. Of course, there might be an add-on for that...
Čítať túto odpoveď v kontexte 👍 0Všetky odpovede (2)
Vybrané riešenie
Did your PHP installation package include a webserver (e.g., WAMP)? Generally speaking, the webserver will set up and take over port 80 and you can access your "site" using:
http://localhost/
Sometimes you may prefer to set up on a different port, for example, 8080, and then you would use:
http://localhost:8080/
As far as I know, there's no way to have Firefox stand in for a webserver and process .php files through the PHP interpreter itself. Of course, there might be an add-on for that...
Missing WAMP ("Windows, Apache, MySQL, and PHP") WebServer. Sorry, not a Firefox issue. My mistake. Thanks for the solution.