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

    PHP files not beeing parsed

    I'm trying to create an utility tool with php but when I try to access the files(from the browser) I get the Save As... dialog.

    I've checked the configuration files and everything seems ok; the httpd -M shows that the php5 module(shared) is loaded, httpd -t says that the syntax is ok.(Also Plesk is working)

    I'm running a CentOS, httpd(Apache 2.2.3) as a service and the config files are:

    <IfModule prefork.c>
       LoadModule php5_module modules/
    <IfModule worker.c>
       LoadModule php5_module modules/
    AddHandler php5-script .php
    AddType text/html .php
    DirectoryIndex index.php
       Include conf.d/*.conf
      <VirtualHost XXX.XXX.XXX.XXX:80>
        ServerName //not allowed to post URLS//:80
        ServerAlias  //not allowed to post URLS//
        UseCanonicalName Off
        ServerAdmin "not allowed to post URLS"
        DocumentRoot /var/www/vhosts/
        ErrorLog /var/www/vhosts/
      AddType application/x-httpd-php .php
      AddType application/x-httpd-php-source .phps
    I also found a php-cgi.conf in the conf.d directory

    scriptAlias /phppath/ "/usr/bin/"
    Action php-script /phppath/php-cgi
    I have looked in the /usr/bin directory and there are php and php-cgi files present.

    I also found two php.ini files:

    I've looked for the error logs but there's nothing in there to suggest that there is a problem.

    What I tried to run is the following:
    gogu.php (Save as dialog appears)
             echo "working";
    gogu1.php(Save as dialog appears)
    <?php phpinfo(); ?>

    Any ideas?


  2. #2
    Linux Newbie arespi's Avatar
    Join Date
    May 2011
    Monterrey , Mexico
    Did you set in your php script the execute permission? (chmod g+x php_file_name)

  3. #3
    Yes I have set all the rights but still no luck.
    I've installed the php53 and now I'm not getting the Save as dialog but the files are not being processed. Instead of getting the result of the phpinfo() I see in the browser
    <?php phpinfo ?>
    Thanks for your reply.

  4. $spacer_open

Posting Permissions

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