Vanwege onderhoudswerkzaamheden die uw ervaring zouden moeten verbeteren, heeft deze website beperkte functionaliteit. Als een artikel uw probleem niet verhelpt en u een vraag wilt stellen, kan onze ondersteuningsgemeenschap u helpen in @FirefoxSupport op Twitter en /r/firefox op Reddit.

Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Meer info

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

Installed PHP, and it works on command line, but Firefox won't execute "test.php" Is there a setting I missed?

  • 2 antwoorden
  • 1 heeft dit probleem
  • 1 weergave
  • Laatste antwoord van DisneyWizard

more options

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?

How do I tell Firefox that, or where, PHP exists, and to execute <?php php> 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 <?php php> 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?

Gekozen oplossing

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...

Dit antwoord in context lezen 👍 0

Alle antwoorden (2)

more options

Gekozen oplossing

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...

more options

Missing WAMP ("Windows, Apache, MySQL, and PHP") WebServer. Sorry, not a Firefox issue. My mistake. Thanks for the solution.