Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2003
    Posts
    1

    Unanswered: Script shows Nothing.

    Hi, I recently installed Apache + PHP + MySQL on my XP. I tested all of them and they all worked but now for some reason those scripts show nothing.

    Also, when I view the source from the browser it shows all the php code. That shouldnt happen right?

    I have no clue wats wrong with it.

  2. #2
    Join Date
    Feb 2002
    Posts
    43
    Check to make sure your PHP installation is setup to parse the file extensions you are using for your PHP files. For eample if you have script.php3 then php may not recognize files ending in php3. If after checking that it still does not work please provide more detailed information as to what is going on.

  3. #3
    Join Date
    Oct 2003
    Location
    Chicago, IL
    Posts
    34
    It sounds like you haven't added PHP file type to your Apache Servers configuration file. Here is what you need:


    1- Go to the "/config" directory of your Apache folder.
    2- Open the file "httpd.cof" with notepad.
    3- Insert the following lines at the end of the file:

    Code:
    LoadModule php4_module modules/php4apache2.dll
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php3
    Note: This is assuming that you are running Apache 2.x.x and PHP 4.x.x. Also, if you are not going to be running ".php3" extension files, you don't need the last line.
    DigiOz Multimedia
    http://www.digioz.com

  4. #4
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: Script shows Nothing.

    Originally posted by saneelnand
    Hi, I recently installed Apache + PHP + MySQL on my XP. I tested all of them and they all worked but now for some reason those scripts show nothing.

    Also, when I view the source from the browser it shows all the php code. That shouldnt happen right?

    I have no clue wats wrong with it.
    allow to show the error messages in php.ini

  5. #5
    Join Date
    Dec 2003
    Posts
    31

    Re: Script shows Nothing.

    Originally posted by ika
    allow to show the error messages in php.ini
    PHP isn't even working so that wouldn't even help.

  6. #6
    Join Date
    Dec 2003
    Posts
    1

    Re: Script shows Nothing.

    Originally posted by WhSox21
    PHP isn't even working so that wouldn't even help.
    I'm pretty new to apache and php, but your problem most likely lies with what digioz said. If you did all that, check to make sure that:

    A.) Apache is actually running. When I installed apache and tried to configure it for PHP, there was a file you had to copy from the php files into the apache files (or was that mysql???) and I didn't copy all the files over. I didn't realize apache failed to start running because it couldn't find a file. It was telling me one file was missing, when in actuality it was missing another file.

    B.) You are retrieving the file through the server i.e.: "http://localhost/afile.php" and not "C:\Programs\apache\httpdocs\afile.php" doing the latter will not get apache to parse the script and you'll just get the code.

    Sorry if you know all that, but when I just started using apache and php I made similar mistakes.

Posting Permissions

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