Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Problems with PHP & Apache Server

    Hello to everyone,

    I am having a problem to make PHP to work in a Web server with Apache and mysql

    I have intalled the Centos distro with apache, php and mysql installed with these commands

    yum install httpd httpd-devel
    yum install mysql mysql-server mysql-devel
    yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
    I tested the apache with http:/localhost and it works fine but I also created a document called test.php in /var/www/html with this code
    just in case i know it is http:/ / but i can't post urls here, but i actually write it right in my browser

    and when i go to the browser and write http:/localhost/test.php or http:/ip of the centos pc/test.php it just shows a blank page with no info of php.

    to create the test.php file I made right click on html folder and selected Create Document and selected Empty File and then I changed the new file to test.php and the icon changed with an icon of a screwdriver and a .php little box, I donīt know if maybe that was wrong, but i want to make a web server but canīt make php to work right

    Anny suggestions, sorry for the lenghty thread

    thanks for your help in advance

  2. #2
    Since you are not getting a page can not be displayed error, it is finding the file just fine.

    The problem is most likely with PHP. You should check your apache error log to see if there is anything there that could help you figure it out.

  3. #3
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    North Carolina
    the other thing to check is if you can load any file, html, htm, jpg......

    generally if apache is working normally but the php part, it will display your phpinfo stuff as text and not actually process it as a php file. thats not what is happening to you though.

  4. $spacer_open
  5. #4
    Thanks a lot for your responses....the configuration was fine, there was another issue that was blocking the php files

Posting Permissions

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