locked
ASP Development Server not run PHP RRS feed

  • Question

  • I was using the Development Server to run PHP pages for some time with no problems.

    Then it stopped working. Clicking on F12 would cause the Browser (I tried Chrome and IE) to simply show the code of the PHP file.

    I downloaded the newest version of PHP (5.5) to no avail.

    Here are my settings:

    Tools=>Application Options=>Configure Editors=>( php versions are included in the list.)

    Site=>Site Settings=>Preview=>Preview using site URL=>Use Microsoft ASP Development Server (checked)=>For only ASP.NET Web Pages(selected)

    Result when F12 is clicked: code for the page appears. Server Icon in Task Bar does not appear.

    ********************************************

    However, if I change the setting to:

    Site=>Site Settings=>Preview=>Preview using site URL=>Use Microsoft ASP Development Server (checked)=>For All Web Pages(selected)

    Result: Server runs. Icon in Task Bar appears. The html part of the web page is served, but the PHP content is ignored.

    The PHP installation folder is in c:\PHP

    My question: How to I get PHP to be served?

    Wednesday, September 11, 2013 2:31 AM

Answers

  • "dated 2006."

    Gack!  That's the first version of EW.  No wonder your dialogs don't look familiar and don't have the PHP setup.

    No need to be using that.  Download EW4: the latest (and last) version is absolutely free.  http://www.microsoft.com/en-us/download/details.aspx?id=36179  It installs beside, not over, earlier versions, so you can have them both if you want to try EW4 for a while before committing to it.  Note that the site menu is all under "Site", not spread between File and Site, in EW4.

    • Marked as answer by timbla Wednesday, September 11, 2013 9:23 PM
    Wednesday, September 11, 2013 4:57 PM
  • WOW!

    I did as you suggested and downloaded/installed the latest version!  Works like a charm.

    Thanks. You were very very helpful, and I'm very happy now.

    Case Closed!

    timbla

    • Marked as answer by timbla Wednesday, September 11, 2013 9:22 PM
    Wednesday, September 11, 2013 9:22 PM

All replies

  • You don't mention this setting anywhere in your post, so it sounds as if you haven't told EW where to find your php-cgi executable.

    In your "Site Settings|Preview" dialog, you can either manually enter the path to the php-cgi.exe file, or you can enter it once in "Tools|Application Options" and reference it in all sites, as I show above (yellow arrow). You don't really even need to use a custom URL unless you want to. As long as the dev server knows where the php-cgi.exe file is, it will happily process PHP in any file loaded into EW when "Preview in Browser" is clicked.

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.

    • Edited by paladyn Wednesday, September 11, 2013 3:38 AM
    Wednesday, September 11, 2013 3:37 AM
  • Thanks, Scott, what you said makes sense.

    However, my Preview Dialog box doesn't look like yours.

    My Prevue dialog doesn't have any content about PHP.

    I have PHP installed in C:\PHP. This is the default. I know that the server is running because it shows its emblem in the Task Bar, and html pages are served up OK.

    There is nothing below the Radio Button except:' Preview using custom URL for this Web site'

    The Development server runs, it just doesn't recognize PHP, even though my test file is a .php file

    I am using Expression Web version 12.0 ..... dated 2006.

    So, what next?

    Could it have something to to with the .htaccess file?

    Also, because I am a newbie to this Blog, perhaps you could help me on this:

    I tried to include a jpg of my Preview dialog for you, but the Blog refused to accept it; saying my account had to be Validated before I could upload pix. I was already signed in through Microsoft Account (password required) , but it seems that something else is needed. However the Dialog box rejecting my jpg didn't say HOW to get validation. Not User-friendly. Could you help me with what is going on here?

    Again, Thanks!

    timbla

    Wednesday, September 11, 2013 4:46 PM
  • "dated 2006."

    Gack!  That's the first version of EW.  No wonder your dialogs don't look familiar and don't have the PHP setup.

    No need to be using that.  Download EW4: the latest (and last) version is absolutely free.  http://www.microsoft.com/en-us/download/details.aspx?id=36179  It installs beside, not over, earlier versions, so you can have them both if you want to try EW4 for a while before committing to it.  Note that the site menu is all under "Site", not spread between File and Site, in EW4.

    • Marked as answer by timbla Wednesday, September 11, 2013 9:23 PM
    Wednesday, September 11, 2013 4:57 PM
  • WOW!

    I did as you suggested and downloaded/installed the latest version!  Works like a charm.

    Thanks. You were very very helpful, and I'm very happy now.

    Case Closed!

    timbla

    • Marked as answer by timbla Wednesday, September 11, 2013 9:22 PM
    Wednesday, September 11, 2013 9:22 PM