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 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Configuration error?

    I'm not sure if this is the right forum to post this in or not ...

    I'm just starting to learn php. I'm using wamp server as a localhost, offline on my machine only, v2.2.11 with php 5.3.0. I have set php.ini for error_reporting = E_ALL.
    The following code generates a blank screen where I would expect an error as nofile.php does not exist.

    Code:
    <?php
    	require("nofile.php");
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    
    <body>
    
    </body>
    </html>
    In fact, I can get no php code to run at all. In viewing the page source in firefox 3.6.12 I see the php code in italic. I have tried uninstalling wamp, deleting directories and reinstalling. Same with firefox and deleted all personal settings as well. I have spoken to everyone I know about this but nobody has a clue.

    Last year I worked with php a little and had no problems so I'm thinking this must be a setting someplace because it is universal that php code is ignored. Could it be that apache isn't configured properly so it isn't returning php to the browser? Can someone point me in the right direction with this?

    thanks,
    Ken

  • #2
    Regular Coder
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    254
    Thanks
    1
    Thanked 63 Times in 63 Posts
    Make sure your file has a file extension of .php and not .htm / .html

  • #3
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I'm sorry .. I should have mentioned that. Yes .. all my files have the php extension.

  • #4
    Regular Coder
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    254
    Thanks
    1
    Thanked 63 Times in 63 Posts
    After u install wamp and go to "http://localhost/" what do you see?

  • #5
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    It's probably easier to give a screen shot ...
    Attached Thumbnails Attached Thumbnails Configuration error?-wamp.jpg  

  • #6
    Regular Coder
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    254
    Thanks
    1
    Thanked 63 Times in 63 Posts
    Seems fine. Create a "test.php" in your www folder (assuming you didn't change that in apache config) and add this line to it
    Code:
    <?php phpinfo(); ?>
    then check if there's anything at http://localhost/test.php
    Last edited by shadowmaniac; 11-03-2010 at 08:27 PM.

  • Users who have thanked shadowmaniac for this post:

    SparrowHawk7 (11-03-2010)

  • #7
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you Shadow ... I figured it out. When I opened the file with Firefox I got the blank screen .. but clicking on the link you offered opened the file correctly. That sparked my mind to realize it was a mistake in setting up the site in Dreamweaver so the files weren't being opened through apache.

    Thanks so much!
    Ken


  •  

    Posting Permissions

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