Results 1 to 8 of 8

Thread: PHP file does not execute

  1. #1
    Junior Member
    Join Date
    Jun 2010
    Posts
    4

    Default PHP file does not execute

    Hi, new to this and struggling to test a site under local publish.

    I have included an email form on a page which, when I select it, instead of executing the PHP file asks me instead if I wish to open it or save it.

    I'm running XAMPP for Windows with Apache running on it, and can execute php files stored directly in htdocs - so I know PHP itself is up and working. I've tried going into httpd.conf and amending the directory block just below the definition of the root directory to read

    <Directory />
    Options FollowSymLinks
    AllowOverride All
    Allow from all
    </Directory>

    which I thought would enable php files to execute from any directory - but still no joy.

    Can anyone help??
    Thanks
    Luke

  2. #2
    Senior Member gotFusion's Avatar
    Join Date
    Jan 2010
    Location
    www.gotHosting.biz
    Posts
    4,529

    Default

    Setting up a local web server can be a little tricky. I am sure someone will jump in to help you debug your computer problem.

    Is there a reason you don't just create a test folder on your domain and test it there?

    You can create another remote profile in Fusion and append /test to your directory. Your files will be uploaded to yourDomain.com/test/ and you won't bother your live content while you sort things out. As a side benefit you will KNOW that your pages run on your web hosts hardware and software so no surprises when you do upload to root and take the content live.
    NetObjects Fusion Cloud Linux enabled Web Hosting, support + training starts at $14.95
    NetObjects Fusion web Hosting and support + ASP + PHP + ColdFusion + MySQL + MS SQL
    FREE NetObjects Fusion Support & training comes with all web hosting accounts
    NetObjects Fusion Web Hosting: http://www.gotHosting.biz

  3. #3
    Junior Member
    Join Date
    Jun 2010
    Posts
    4

    Default

    At this point I'm just starting to develop the site and in parallel PHP code for a couple of specialist pages that I will want to add in. I haven't decided on a web host yet. Hence the reason I'm running it locally.

  4. #4
    Twayne
    Guest

    Default Re: PHP file does not execute

    In news:Luke.4igs4b@no-mx.forums.netobjects.com,
    Luke <Luke.4igs4b@no-mx.forums.netobjects.com> typed:
    > Hi, new to this and struggling to test a site under local
    > publish.
    >
    > I have included an email form on a page which, when I
    > select it, instead of executing the PHP file asks me
    > instead if I wish to open it or save it.


    IME that usually indicates a syntax error; probably in the form's Send part.
    If you pose the form's code, I imagine someone will spot the error pretty
    quickly. There's no information here to work with to give you a good answer.

    >
    > I'm running XAMPP for Windows with Apache running on it,
    > and can execute php files stored directly in htdocs - so I
    > know PHP itself is up and working. I've tried going into
    > httpd.conf and amending the directory block just below the
    > definition of the root directory to read


    How are you trying to send files to your server? If your PHP isn't in htdocs
    then PHP won't "see" it unless you give it the full path as opposed to using
    "localhost..." So try just typing the php filename with its full path into
    your browser and see if that doesn't work.
    If you run phpinfo.php I think you'll find a line there that gives you
    the location for "localhost". So if you never want to use htdocs, you could
    change that.
    I fail to understand though why creating more directories under htdocs
    for your code wouldn't be sufficient for your purposes.
    I imagine someone will come in with a better response, but that's what
    htdocs is for. It's sort of like My Documents; the master folder for all
    that type stuff.

    http://www.webmaster-talk.com/php-fo...ost-xampp.html

    http://stackoverflow.com/questions/1...side-of-htdocs

    HTH,

    Twayne`

    >
    > <Directory />
    > Options FollowSymLinks
    > AllowOverride All
    > Allow from all
    > </Directory>
    >
    > which I thought would enable php files to execute from any
    > directory - but still no joy.
    >
    > Can anyone help??
    > Thanks
    > Luke





  5. #5
    Senior Member chuckj's Avatar
    Join Date
    Jan 2010
    Location
    www.beyondfusion.com - Florida
    Posts
    1,302

    Default

    May seem like a silly question... but are you giving your pages a .php file extension?

    And does your httpd.conf include .php as a valid file extension? It should by default given your installed XAAMP, but it doesn't hurt to check.
    Chuck Joslin
    www.BeyondFusion.com
    PHP & MySQL development with Fusion
    Fusion support for AllWebMenus (Likno) Contact me for custom AWM menus for your sites.
    Tutorials and Forums

  6. #6
    Junior Member
    Join Date
    Jun 2010
    Posts
    4

    Default

    Quote Originally Posted by chuckj View Post
    May seem like a silly question... but are you giving your pages a .php file extension?

    And does your httpd.conf include .php as a valid file extension? It should by default given your installed XAAMP, but it doesn't hurt to check.

    It does - and thanks everyone - I think I have sorted it. I had changed my document root directory within httpd.conf to be the local publish directory matching NOF - and made a simple typo in doing so - whilst I could run my own php files in htdocs, the NOF11 generated php file in the local publish directory wasn't actually in my repointed root. What a waste of time that has been!!!

  7. #7
    Senior Member chuckj's Avatar
    Join Date
    Jan 2010
    Location
    www.beyondfusion.com - Florida
    Posts
    1,302

    Default

    Pesky computers... so susceptible to humans and their typos.

    Glad you got it figured out.
    Chuck Joslin
    www.BeyondFusion.com
    PHP & MySQL development with Fusion
    Fusion support for AllWebMenus (Likno) Contact me for custom AWM menus for your sites.
    Tutorials and Forums

  8. #8
    Twayne
    Guest

    Default Re: PHP file does not execute

    In news:chuckj.4ihf4n@no-mx.forums.netobjects.com,
    chuckj <chuckj.4ihf4n@no-mx.forums.netobjects.com> typed:
    > Pesky computers... so susceptible to humans and their typos.
    >
    > Glad you got it figured out.


    Yeah, I got a compewter like that. Instead of doing what I MEANT to do, it
    always does what I TOLD it to do! <g>

    >
    >
    >
    > CHUCK JOSLIN
    > www.BeyondFusion.com
    > PHP & MySQL development with Fusion
    > Official Fusion support for AllWebMenus (Likno Software)
    > Tutorials and Forums





Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •