none
View PHP Files in Expressions 4

    Question

  • I downloaded PHP 5.5.8 and have been unable to view a PHP file in Expression Web 4. The Microsoft server open and all I get is a blank screen. I have opened the Site from the Site Menu, I setup the PHP.ini file as shown in the PHP.ini production file. I as unable to find a cg-php.exe file in the php download but I did find on online. The PHP.ini and cgi-php.exe are in the same directory as all of the web files. When I download the files to my website and run them they work fine. Can anyone give me some direction on how to make this work?

    Sunday, January 26, 2014 1:38 AM

Answers

  • You need to correctly install PHP on your system, then point EW to where the executable file is located, like this...

    In my case, as you can see, I have entered the location in the Application Options dialog (on the "General" tab), so it can be used by all sites that use PHP, instead of having to re-enter the location for each site. I have also opted to have the server launch for all pages in the site. That is because, if I first preview an HTML page, then click a link which opens a PHP page, the server would otherwise not have launched, and the PHP page would not display properly.

    So, you need to locate the PHP executable for your installation, then enter it either for your Application Options (on the "General" tab) or in Site Settings. We can't help you locate that file—that's on your file system and we can't see it; only you can.  ;-)

    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.

    • Marked as answer by jeff15217 Sunday, January 26, 2014 9:52 PM
    Sunday, January 26, 2014 4:33 AM

All replies

  • You need to correctly install PHP on your system, then point EW to where the executable file is located, like this...

    In my case, as you can see, I have entered the location in the Application Options dialog (on the "General" tab), so it can be used by all sites that use PHP, instead of having to re-enter the location for each site. I have also opted to have the server launch for all pages in the site. That is because, if I first preview an HTML page, then click a link which opens a PHP page, the server would otherwise not have launched, and the PHP page would not display properly.

    So, you need to locate the PHP executable for your installation, then enter it either for your Application Options (on the "General" tab) or in Site Settings. We can't help you locate that file—that's on your file system and we can't see it; only you can.  ;-)

    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.

    • Marked as answer by jeff15217 Sunday, January 26, 2014 9:52 PM
    Sunday, January 26, 2014 4:33 AM
  • Scott,

    That is the way I have it setup. I tried both ways just PHP and All as you suggested, but no luck.

    Thanks

    Jeff

    Sunday, January 26, 2014 9:52 PM
  • Did you correctly install PHP for windows?  That you did not have a php-cgi.exe in your extracted download makes me think you didn't download the correct files.

    You would not typically install it in your website folder, and end up with the  .ini and .exe files there, and using php.ini other than in the installed location would require additional configuration.

    See: http://www.php.net/manual/en/install.windows.manual.php

    If you download the zip file from http://windows.php.net/download/ it definitely contains the php-cgi.exe file.

    Extract the zip file where you want to install PHP, copy the php.ini-production file and rename it php.ini, point EW to the location of the php-cgi.exe, and create a php page that has the following markup:

    <?php
    phpinfo();
    ?>

    Preview the page.  The first time you do EW will want to modify the php.ini file.  Say yes.  (If the php.ini file is located in a directory that EW can't write to, close EW and run it as an administrator, and try again.)

    When you preview the above page, you'll see a detailed display of the properties of your PHP installation.


    • Edited by KathyW2 Monday, January 27, 2014 1:03 AM
    Sunday, January 26, 2014 11:15 PM
  • Kathy,

    I have downloaded the file three times. The file that I download is PHP (5.5) 5.5.8 "download source code" 22MB, it is the first file on the page. It always unzips the same way no php-cgi.exe, no install or setup, the php.ini production file all lines are commented out. I uncommented the lines that we indicated to be for production but I can't say they were the correct ones.

    Expressions did ask about changing the ini file but i did not see a change in the file after saying yes.

    I started with the ini and php-cgi in the folder that the php files are in but no luck. I also tried every combination of location of the files.

    Friday, January 31, 2014 3:22 PM
  • You are downloading the wrong file.  You don't want source code (unless you are planning to compile it yourself), you want compiled code.  You want the ZIP file link just below the source code link.

    • Edited by KathyW2 Friday, January 31, 2014 7:52 PM
    Friday, January 31, 2014 3:50 PM
  • Kathy,

    I downloaded it and set it up as shown in Expressions but still just a blank screen when I try to preview.

    Thanks

    Jeff

    Friday, January 31, 2014 8:09 PM
  • Easiest way to make sure that PHP is installed correctly is to use the MS Web platform installer. http://www.microsoft.com/web/downloads/platform.aspx Then use the path it installed into where Scott has c:\wamp\... in the screenshot in his post.


    Free Expression Web Tutorials
    For an Expression Web forum without the posting issues try expressionwebforum.com

    Friday, January 31, 2014 9:35 PM
  • Did you follow my instructions? Did you create a page to display the phpinfo?  The steps I wrote are the exact steps I took, and they work as described.
    Friday, January 31, 2014 10:13 PM
  • Kathy,

    I created the page as you suggested and it is in the EW directory. 

    When I try to preview it I get a blank page with a URL of /localhost/36036/phppage.php

    Saturday, February 01, 2014 2:20 AM
  • The only thing that seems to be lacking is EW actually finding the executable. If PHP installed correctly, are you certain that the path specified in your settings really points to where it is installed on your computer? Did you use the Browse... option to locate it, or did you manually type in the path? More information please.

    Jim


    'Tis the business of little minds to shrink; but he whose heart is firm, and whose conscience approves his conduct, will pursue his principles unto death. Thomas Paine

    Saturday, February 01, 2014 5:47 AM
  • "

    I downloaded it and set it up as shown in Expressions but still just a blank screen when I try to preview."

    These may be obvious a questions, but I'd better ask:

    You downloaded the zip file.  Did you extract it into the directory where you are installing PHP?  (That should NOT be your website folder.  You are not going to publish anything from your local PHP installation to your hosted site; it will already be installed there, with the appropriate php.ini and reference to the hosted .exe location.)  Did you delete the .exe and .ini you had moved to your website folder?  Did you update the .exe reference in EW's settings to the location of the newly installed .exe?  In short, did you undo what you had already done, and then install the correct files?



    • Edited by KathyW2 Saturday, February 01, 2014 3:41 PM
    Saturday, February 01, 2014 3:40 PM
  • My Expression Web 4 is now editing and displaying in Design mode whereas it used to get just a blank page despite countless tries with a 5.4xx version, from a .zip that had the .exe file in it.

    To make it go there were some changes; I haven't reversed them all, yet, because if I make one error copying/remembering the settings it'll probably display a blank screen again:

    In the Site top menu, chose Site Settings and the Preview Tab. Opt for Preview using website URL (I had it on the tick-box "Use Microsoft Exp..Server:" before) --- this might be relevant.

    That takes out the options for "Use the PHP executable set in ..." or "Use a PHP ext..." combinations of which can, with other options, make for 64...(?) fails, if one opts to try the other two .exe options plus the .ini options, plus...

    That's all; it works now.

    I also downloaded php-5.5.8 in tar etc; and both unzipped with no useable .exe file. They only included a "tiny.exe" (1KB) --- and explorer was showing hidden/system files. No other .exe in the 92.9Mb 16,520 Files, 372 Folders reported by explorer Properties.

    A search found a zip of 5.5.8 with three choices of .exe; not on the site that had no .exe (or WinZip couldn't find it). The below copy-paste gets the file.

    windows.php.net/downloads/releases/php-5.5.8-Win32-vc11-x86.zip


    • Proposed as answer by DavidBeale Tuesday, February 04, 2014 4:59 AM
    • Edited by DavidBeale Tuesday, February 04, 2014 5:17 AM
    Tuesday, February 04, 2014 4:10 AM
  • Kathy,

    I uninstalled everything, all the php items that I downloaded, cleared all entries for the registry, I even unistalled EW and removed those registry entries then started all over with the same result.

    This is just taking too much time and costing me money, if I download it to my website is works so I will just continue to do it that way.

    Thanks for all your help.

    Jeff

    Tuesday, February 04, 2014 4:00 PM