Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Unable to load phpcodes

    I have spent almost 6 hours to get my php successfully installed. I know you understand that, a lot of manual steps and tuning need to be done. I'm quite new in this field.

    After 6 hours of hard work, but the php sample page still unable to load. My web browser treated my php sample code as a normal text file.

    Can anyone can help me on this? Thank You.

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Are you viewing the pages by going to http://localhost/yourpage.php or are you double-clicking the file to open it? Also, is PHP installed on your server properly?

    I've heard WAMP being mentioned alot on here, try giving that a try.

  • #3
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm viewing the page by going to http://localhost/mypage.php. When I run phpinfo() everything looks fine, no error found.

    I did install WAMP as well in my system, I believe it is just another IIS.

  • #4
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    8
    Thanks
    0
    Thanked 1 Time in 1 Post
    Here are the most often reasons:
    1. In the httpd.conf you don't have: AddType application/x-httpd-php .php
    2. You have short_open_tag directive in php.ini set to 0 but you use it in your scripts (<? instead of <?php

    Check the stated above first. There are more breakpoints, but you need to start somewhere...

  • #5
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    1. I believe "httpd.conf" could be for Apache right? I'm using IIS for my server. Any idea any configuration need to set for IIS?
    2. short_open_tag = Off

  • #6
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Did you follow the instructions here on how to set it up? http://uk.php.net/manual/en/install.windows.iis.php

    I've never set up IIS with php before, so can't give that much help on it

  • #7
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I did every steps provided in php.net, but the php scripts seems does not execute but displayed as regular HTML documents.

    What am I missing?

  • #8
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Not sure tbh. You mentioned that the phpinfo page worked, but your scripts aren't? Only thinking it's your scripts maybe, as otherwise the phpinfo wouldn't have worked. Just grasping at straws really.

    Can you post an example of code you're using?


  •  

    Posting Permissions

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