Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 2nd May 2011, 00:04
OyoKooN OyoKooN is offline
Junior Member
 
Join Date: May 2011
Location: France
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
Reply With Quote
Sponsored Links
  #2  
Old 2nd May 2011, 15:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Can you post your vhost configuration?
Are there any errors in Apache's error log?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 2nd May 2011, 19:24
OyoKooN OyoKooN is offline
Junior Member
 
Join Date: May 2011
Location: France
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 =)
Reply With Quote
  #4  
Old 2nd May 2011, 22:18
erosbk erosbk is offline
Senior Member
 
Join Date: Mar 2011
Posts: 337
Thanks: 49
Thanked 36 Times in 30 Posts
Default

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.
Reply With Quote
  #5  
Old 3rd May 2011, 03:38
OyoKooN OyoKooN is offline
Junior Member
 
Join Date: May 2011
Location: France
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you, which chmod must I apply to my .htaccess files?
Reply With Quote
  #6  
Old 3rd May 2011, 16:45
erosbk erosbk is offline
Senior Member
 
Join Date: Mar 2011
Posts: 337
Thanks: 49
Thanked 36 Times in 30 Posts
 
Default

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
Reply With Quote
Reply

Bookmarks

Tags
apache 2, fastcgi, php

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron errors guimnk General 1 5th April 2011 10:20
ISPConfig3 Debian Squeeze Crontab - Log petrichbg Installation/Configuration 5 22nd March 2011 13:25
Problem with services!! banzaiwebstudio.com Installation/Configuration 7 19th May 2010 22:13
Unable to install ISPConfig bdonecker Installation/Configuration 21 26th May 2009 09:20
Apache2 Freezes celtic Server Operation 31 28th May 2007 18:18


All times are GMT +2. The time now is 15:50.


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