Jump to content

Recommended Posts

Hello,

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:

 

conf.d/php.conf


<IfModule prefork.c>
   LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule worker.c>
   LoadModule php5_module modules/libphp5-zts.so
</IfModule>
AddHandler php5-script .php
AddType text/html .php
DirectoryIndex index.php

httpd.conf


   .....
   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/xxxxx.com/httpdoc
    ErrorLog /var/www/vhosts/xxxxx.com/errors/mainlog
  </VirtualHost>
   .....
  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

 

Code:

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:

/usr/local/psa/admin/conf/php.ini

/etc/php.ini

 

 

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)


   <html>
    <head><title>test</test></head>
    <body>
       test<br>
      <?php
         echo "working";
      ?>
    </body>
  </html>

gogu1.php(Save as dialog appears)

<?php phpinfo(); ?>

 

Any ideas?

 

Thanks.

 

LE.: I have uninstalled the php and did a yum install php. The conf files are configured back(without the php-cgi.conf, which dissapeard). I've changed the php.conf file to include the PHPIniDir which points to /etc. Now I don't get the Save as dialog but when I look at the page source I can see the

<?php phpinfo(); ?>

line.

Link to comment
https://forums.phpfreaks.com/topic/256722-php-files-not-beeing-parsed/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.