Results 1 to 3 of 3
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-08-2012 #1Just Joined!
- Join Date
- Feb 2012
- Posts
- 2
PHP files not beeing parsed
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
httpd.confCode:<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
I also found a php-cgi.conf in the conf.d directoryCode:..... 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 have looked in the /usr/bin directory and there are php and php-cgi files present.Code:scriptAlias /phppath/ "/usr/bin/" Action php-script /phppath/php-cgi
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)
gogu1.php(Save as dialog appears)Code:<html> <head><title>test</test></head> <body> test<br> <?php echo "working"; ?> </body> </html>
[CODE]
<?php phpinfo(); ?>
[CODE]
Any ideas?
Thanks.
- 02-09-2012 #2
Did you set in your php script the execute permission? (chmod g+x php_file_name)
- 02-09-2012 #3Just Joined!
- Join Date
- Feb 2012
- Posts
- 2
Hello,
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
Thanks for your reply.Code:<?php phpinfo ?>


Reply With Quote
