Testing PHP locally

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric Capps

    #1

    Testing PHP locally

    I'm writing a web app that uses a PHP script to request information from
    the server. I'd like to test it locally on my machine, but despite
    having PHP installed, I can't seem to get it to process the .php file
    automatically when it is read. Is there a way to turn automatic
    processing of a file/directory on/off?
  • IchBin

    #2
    Re: Testing PHP locally

    Eric Capps wrote:
    I'm writing a web app that uses a PHP script to request information from
    the server. I'd like to test it locally on my machine, but despite
    having PHP installed, I can't seem to get it to process the .php file
    automatically when it is read. Is there a way to turn automatic
    processing of a file/directory on/off?
    I am new at this so get your grain of salt out. Not sure if this is what
    you mean. If using Apache there is an option tells apache to
    automatically load a file when pointed to a directory.. I added
    index.php to the list of files. Ex:

    #
    # DirectoryIndex: sets the file that Apache will serve if a directory
    # is requested.
    #
    # The index.html.var file (a type-map) is used to deliver content-
    # negotiated documents. The MultiViews Option can be used for the
    # same purpose, but it is much slower.
    #
    DirectoryIndex index.html index.html.var index.php

    Thanks in Advance...
    IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
    _______________ _______________ _______________ _______________ ______________

    'If there is one, Knowledge is the "Fountain of Youth"'
    -William E. Taylor, Regular Guy (1952-)

    Comment

    • Jerry Stuckle

      #3
      Re: Testing PHP locally

      Eric Capps wrote:
      I'm writing a web app that uses a PHP script to request information from
      the server. I'd like to test it locally on my machine, but despite
      having PHP installed, I can't seem to get it to process the .php file
      automatically when it is read. Is there a way to turn automatic
      processing of a file/directory on/off?
      You also need a local webserver installed - either IIS or Apache will work.

      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      • pressminebutton

        #4
        Re: Testing PHP locally

        Eric Capps wrote:
        I'm writing a web app that uses a PHP script to request information from
        the server. I'd like to test it locally on my machine, but despite
        having PHP installed, I can't seem to get it to process the .php file
        automatically when it is read. Is there a way to turn automatic
        processing of a file/directory on/off?
        if you dont have a server installed i suggest wamp >>
        http://www.wampserver.com/en/. which is short for
        windows/apache/mysql/php. its simple to install and works like a charm
        for local web development.

        Comment

        • Jim Carlock

          #5
          Re: Testing PHP locally

          "Eric Capps" <no@thanks.comw rote:
          I'm writing a web app that uses a PHP script to request
          information from the server. I'd like to test it locally on
          my machine, but despite having PHP installed, I can't
          seem to get it to process the .php file automatically when
          it is read. Is there a way to turn automatic processing of
          a file/directory on/off?
          The best way to go involves installing a webserver.

          However, you can do simple tests and such on a Windows
          system, if they don't use "include", "require" and in general
          are really simple. You'd do this by putting the php.exe in the
          path inside a command prompt, but this means that you'd
          lose the ability to use a web-browser.

          There's another more complicated way to get things more
          permanent by editing the HKCR\.php key or possibly the
          HKCR\phpfile key.

          Not sure which direction you're heading or which OS you
          work on.

          --
          Jim Carlock
          Post replies to the group.


          Comment

          • dawnerd

            #6
            Re: Testing PHP locally


            Eric Capps wrote:
            I'm writing a web app that uses a PHP script to request information from
            the server. I'd like to test it locally on my machine, but despite
            having PHP installed, I can't seem to get it to process the .php file
            automatically when it is read. Is there a way to turn automatic
            processing of a file/directory on/off?
            You can easily install a server bundle. I would recommend one called
            apache2triad. I use it and it only takes a few minutes to install.

            Comment

            Working...