לאתר זה תהיה פונקציונליות מוגבלת בזמן שאנו מתחזקים אותו לשיפור החוויה שלך. אם מאמר מסויים לא פותר את הבעיה שלך וברצונך לשאול שאלה, קהילת התמיכה שלנו מחכה לעזור לך ב־Twitter תחת ‎@FirefoxSupport וב־Reddit תחת ‎/r/firefox.

חיפוש בתמיכה

יש להימנע מהונאות תמיכה. לעולם לא נבקש ממך להתקשר או לשלוח הודעת טקסט למספר טלפון או לשתף מידע אישי. נא לדווח על כל פעילות חשודה באמצעות באפשרות ״דיווח על שימוש לרעה״.

מידע נוסף

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

  • 2 תגובות
  • 1 has this problem
  • 1 view
  • תגובה אחרונה מאת 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?

פתרון נבחר

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

Read this answer in context 👍 0

כל התגובות (2)

more options

פתרון נבחר

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.