HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   PHP pages not interpreted but downloaded (http://www.howtoforge.com/forums/showthread.php?t=52509)

OyoKooN 1st May 2011 23:04

PHP pages not interpreted but downloaded
 
Hello,

I followed the howto to set up Apache2 with fastcgid and PHP. (http://www.howtoforge.com/how-to-set...buntu-10.04-p2)

I did all the steps but when I go to my website, the browser wants to download the page.

Do you know where is the problem?

Thank you.

falko 2nd May 2011 14:22

Can you post your vhost configuration?
Are there any errors in Apache's error log?

OyoKooN 2nd May 2011 18:24

Hello,

Here is my virtualhost file:
Code:

<VirtualHost 64.207.154.91:80>

  ServerAdmin oyokoon@syrinxoon.net
  ServerName syrinxoon.net
  ServerAlias www.syrinxoon.net
  DocumentRoot /var/www/syrinxoon.net/html/

  <IfModule mod_fcgid.c>
    SuexecUserGroup syrinxoon.net syrinxoon.net
    <Directory /var/www/syrinxoon.net/html/>
      Options +ExecCGI
      AllowOverride All
      AddHandler fcgid-script .php
      FCGIWrapper /var/www/php-fcgi-scripts/syrinxoon.net/php-fcgi-starter .php
      Order allow,deny
      Allow from all
    </Directory>
  </IfModule>

  ErrorLog /var/www/syrinxoon.net/logs/error.log
  CustomLog /var/www/syrinxoon.net/logs/access.log combined
  ServerSignature Off

</VirtualHost>

and the Apache's error log:
Code:

[Sun May 01 18:16:46 2011] [crit] [client 83.195.116.220] (13)Permission denied: /var/www/syrinxoon.net/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Sun May 01 18:16:49 2011] [crit] [client 83.195.116.220] (13)Permission denied: /var/www/syrinxoon.net/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Sun May 01 18:16:50 2011] [crit] [client 83.195.116.220] (13)Permission denied: /var/www/syrinxoon.net/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Sun May 01 18:17:19 2011] [crit] [client 83.195.116.220] (13)Permission denied: /var/www/syrinxoon.net/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Sun May 01 18:17:21 2011] [crit] [client 83.195.116.220] (13)Permission denied: /var/www/syrinxoon.net/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Sun May 01 18:17:34 2011] [crit] [client 207.46.199.38] (13)Permission denied: /var/www/syrinxoon.net/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Sun May 01 18:17:34 2011] [crit] [client 184.73.7.77] (13)Permission denied: /var/www/syrinxoon.net/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Sun May 01 18:17:37 2011] [crit] [client 97.95.72.31] (13)Permission denied: /var/www/syrinxoon.net/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Sun May 01 18:17:37 2011] [crit] [client 97.95.72.31] (13)Permission denied: /var/www/syrinxoon.net/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Sun May 01 18:17:37 2011] [crit] [client 97.95.72.31] (13)Permission denied: /var/www/syrinxoon.net/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Sun May 01 18:17:37 2011] [crit] [client 97.95.72.31] (13)Permission denied: /var/www/syrinxoon.net/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

My website is http://syrinxoon.net.
Something weird, I have a subdomain http://fever.syrinxoon.net which works perfectly.

I don't understand.

Thank you for your help =)

erosbk 2nd May 2011 21:18

I am a newbie in this but... I have a lot of trouble like you have... I found (I don't know if I am correct or not) that if you try to use a PHP script made for PHP_MOD using FastCGI, it will not recognize the script... because a lot of variables in the .php are set for an specified PHP MOD (for example, in roundcube you will find in a .htaccess the block IfModule mod_php5...

Maybe you can add a handler in a .htaccess of your program, forcing the PHP mod that you want to always run "AddHandler whatever .php"

I hope this help you

Regards

edit: it looks like you have a permission problem, so... the application can't read the .htaccess (which has his own directives) and cgi can't process it, so it is offered you to download as a not recognized file.

OyoKooN 3rd May 2011 02:38

Thank you, which chmod must I apply to my .htaccess files?

erosbk 3rd May 2011 15:45

I can't remember right now. You can take note of the actual permission and chmod 444 .htaccess and see what happen.

Maybe you have a problem of ownership too, if that does'nt work you could try chown theuser:thegroup .htaccess


All times are GMT +2. The time now is 14:28.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.