Unanswered What about PHP in Expression Web

  • Sunday, June 01, 2008 9:35 PM
     
     

    Hello All,

    Im new in Expression web and I see in Expression web have support to PHP, so i need some information about that, if I need configure some web server, etc...


    Thanks for Help x)


    jlmurgas

All Replies

  • Sunday, June 01, 2008 10:28 PM
     
     

    Yes you will need a server that supports php.
    Normally, Apache / UNIX servers support it.

    Here's some info: http://www.php.net/

    Google is your friend.


    FrontPage MVP
  • Sunday, June 01, 2008 10:49 PM
    Moderator
     
     
     Expression Web installs with the Expression Development Server which the program users to enable you to preview PHP pages locally as you're working on your website. Here's more info from the Help topic "Preview a PHP Page":

    With Expression Development Server, you can preview both ASP.NET pages and PHP pages locally. In order to preview a PHP page that you created in Microsoft Expression Web, you must also have PHP installed and configured on your computer.

    To install PHP
    1. Download the zipped file that contains the PHP files from PHP.NET, and save the file to your computer.

    2. Open the zipped file by double-clicking it, and then click Extract all files.

    3. In the Extract Compressed (Zipped) Folders dialog box, click Browse.

    4. In the Select a destination dialog box, click Computer, and then click OS (C:). Click Make New Folder, and then name the new folder PHP. Click OK.

    5. In the Extract Compressed (Zipped) Folders dialog box, click Extract.

    6. Open the PHP folder. Locate and then make a copy of the "PHP.INI-recommended" file by right-clicking the file and clicking Copy, and then right-clicking inside the folder and clicking Paste.

    7. Rename the file named "PHP-Copy.INI-recommended" to "PHP.INI".

      For more information on installing PHP, see Installation on Windows systems on PHP.NET.

    To install PHP extensions

    • For best results, install only the extensions that you want to use. To install the extensions, remove comment marks from the extensions that you want to use in the PHP.INI file. For more information, see Installation of extensions on Windows on the PHP.NET website.

      Note:

      For example, some commonly used extensions are: SMTP, MySQL, Pop3, Zlib, Zip, PDFLib, and Crack.

    To use Expression Development Server to preview pages

    1. After you have installed PHP, in Microsoft Expression Web, on the Site menu, click Site Settings.

    2. In the Site Settings dialog box, on the Preview tab, select Use Microsoft Expression Development Server, and then select For only PHP and ASP.NET web pages.

    3. By default, Expression Web locates the php-cgi.exe file installed at C:\PHP or C:\Program Files\PHP. If you installed PHP in a different location, or if the text box under Path to PHP executable for previewing PHP pages in this website is empty, under Path to PHP executable for previewing PHP pages in this website, click Browse, locate and select php-cgi.exe, and then click OK.

      Note:

      You can install multiple versions of PHP, and then use the Path to PHP executable for previewing PHP pages in this website to select the version of PHP that you want to use to preview PHP pages. If you want to use this setting for this site only, select Use a PHP executable for this site only.

      To use the current PHP setting as the default setting for all PHP sites other than the sites for which you have defined a custom PHP setting, do one of the following:

      • Select Use the PHP executable set in the Application Options, which will also set your global PHP options in the Application Options dialog box.

      • Click Tools, and then click Applications Options. In the Application Options dialog box, under Path to PHP executable for previewing PHP pages, click Browse, and then locate and select the version of php-cgi.exe that you want to use as the default for your PHP sites.


    http://blogs.msdn.com/anna
  • Wednesday, June 11, 2008 8:21 PM
     
     
    I use php on a regular basis but not on my PC.  I purchased the update to Expression Web when I saw the ability to incorporate php. Previewing a php with the Expression Development server might be okay.  I downloaded and extracted the php files as instructed. They are in a default folder for Expression.  Microsoft sends me off to this link for Installation on Windows Systems which brings into play all kinds of other installations.

    Maybe I'm missing something but this seems like a half baked solution.  Can Expression just use the php files I downloaded or not?  If not then I'll have to use my remote php server with ftp and not have gained anything with this upgrade.

    Thanks,

    Larry
  • Wednesday, June 11, 2008 9:00 PM
    Moderator
     
     
     Hi Larry,

    I'm not following you. When are you sent off to a link for installation on Windows systems and from where? Expression Web can use the php files that you downloaded. You should be able to use the local Expression Development Server w/ your local PHP installation. Try following the instructions closely in the Help top 'Preview a PHP page" in Help.

    Anna
    http://blogs.msdn.com/anna
  • Wednesday, June 11, 2008 10:02 PM
     
     
    Hello Anna,

    A bad cold is not helping matters on this end. Once I abandoned the link for 'Installation of Windows systems' then things went better. The Site Settings dialog box didn't show a path for the php-cgi.exe file it needed and Browse was grayed out. I finally found that for my case, it was expecting to see the path in Tools=> Application Options.

    The next issue is that the php files don't necessarily play well with Vista running with a standard user account.  Expression needed to make changes in the php.ini file and could not do so.  If you run Expression as an administrator then various paths will be set for that user. Not something I wanted to fool with changing.  Putting the php folder in the root directory of C resolves this issue although isn't my preference.  I may move it since php.ini has been changed; assuming Expression doesn't want to write anything else into the Expression folder.

    So in the end, I can preview with the Expression Development Server.

    Thanks for your prompt response,

    Larry
  • Friday, November 23, 2012 10:40 PM
     
     

    This post jogged my brain and solved a different but related problem. I was having trouble using the php preview feature because the php file is often called by an html file and those aren't previewed through the server by default. There is a option button in Site -> Site Settings -> Preview that says all files will be seen through the server but it kept turning itself off. Running as Administrator solved the problem! Thanks.