Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 22nd April 2009, 20:52
doughold doughold is offline
Junior Member
 
Join Date: Sep 2008
Posts: 19
Thanks: 0
Thanked 2 Times in 2 Posts
Default Magento Commerce with Fast-CGI and suExec

I have been able to sucessfully install the platform and can access the homepage and user front end just fine. However, when I try to log in to the back end I am getting a 500 internal error message. This is from the users log file:

Code:
[Wed Apr 22 14:30:14 2009] [warn] mod_fcgid: read data timeout in 40 seconds
[Wed Apr 22 14:30:14 2009] [error] [client <MY IP>] Premature end of script headers: index.php
This is from the Apache log file:
Code:
[Wed Apr 22 14:28:54 2009] [notice] mod_fcgid: call /var/www/tt.westechsolutions.com/web/index.php with wrapper /var/www/php-fcgi-scripts/web35/.php-fcgi-starter
[Wed Apr 22 14:30:14 2009] [notice] mod_fcgid: process 1556 going graceful shutdown, sending SIGTERM
[Wed Apr 22 14:30:20 2009] [notice] mod_fcgid: process /var/www/tt.westechsolutions.com/web/index.php(1571) exit(communication error), terminated by calling exit(), return code: 0
This is my .htaccess file:
Code:
############################################
## uncomment these lines for CGI mode
## make sure to specify the correct cgi php binary file name
## it might be /cgi-bin/php-cgi

#    Action php5-cgi /cgi-bin/php5-cgi
#    AddHandler php5-cgi .php

############################################
## GoDaddy specific options

#   Options -MultiViews

## you might also need to add this line to php.ini
##     cgi.fix_pathinfo = 1
## if it still doesn't work, rename php.ini to php5.ini

############################################
## this line is specific for 1and1 hosting

    #AddType x-mapp-php5 .php
    #AddHandler x-mapp-php5 .php

############################################
## default index file

    DirectoryIndex index.php

<IfModule mod_php5.c>

############################################
## adjust memory limit

#    php_value memory_limit 64M
    php_value memory_limit 128M
    php_value max_execution_time 18000

############################################
## disable magic quotes for php request vars

    php_flag magic_quotes_gpc off

############################################
## disable automatic session start
## before autoload was initialized

    php_flag session.auto_start off

############################################
## enable resulting html compression

    #php_flag zlib.output_compression on

###########################################
# disable user agent verification to not break multiple image upload

    php_flag suhosin.session.cryptua off

###########################################
# turn off compatibility with PHP4 when dealing with objects

    php_flag zend.ze1_compatibility_mode Off

</IfModule>

<IfModule mod_security.c>
###########################################
# disable POST processing to not break multiple image upload

    SecFilterEngine Off
    SecFilterScanPOST Off
</IfModule>

<IfModule mod_deflate.c>

############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip

    # Insert filter on all content
    ###SetOutputFilter DEFLATE
    # Insert filter on selected content types only
    #AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript

    # Netscape 4.x has some problems...
    #BrowserMatch ^Mozilla/4 gzip-only-text/html

    # Netscape 4.06-4.08 have some more problems
    #BrowserMatch ^Mozilla/4\.0[678] no-gzip

    # MSIE masquerades as Netscape, but it is fine
    #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

    # Don't compress images
    #SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

    # Make sure proxies don't deliver the wrong content
    #Header append Vary User-Agent env=!dont-vary

</IfModule>

<IfModule mod_ssl.c>

############################################
## make HTTPS env vars available for CGI mode

    SSLOptions StdEnvVars

</IfModule>

<IfModule mod_rewrite.c>

############################################
## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

############################################
## you can put here your magento root folder
## path relative to web root

    #RewriteBase /magento/

############################################
## workaround for HTTP authorization
## in CGI environment

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

############################################
## always send 404 on missing files in these folders

    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

############################################
## never rewrite for existing files, directories and links

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

############################################
## rewrite everything else to index.php

    RewriteRule .* index.php [L]

</IfModule>


############################################
## Prevent character encoding issues from server overrides
## If you still have problems, use the second line instead

    AddDefaultCharset Off
    #AddDefaultCharset UTF-8

<IfModule mod_expires.c>

############################################
## Add default Expires header
## http://developer.yahoo.com/performance/rules.html#expires

    ExpiresDefault "access plus 1 year"

</IfModule>

############################################
## By default allow all access

    Order allow,deny
    Allow from all

############################################
## If running in cluster environment, uncomment this
## http://developer.yahoo.com/performance/rules.html#etags

    #FileETag none
It seems very strange to me that the main site works and the admin section doesn't. Although I feel like it might have something to do with the rewrites that the .htaccess file does. I am not very familiar with FCGI/SuEXEC yet so bear with me if I missed something obvious.
Reply With Quote
Sponsored Links
  #2  
Old 23rd April 2009, 10:47
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,006
Thanks: 826
Thanked 5,377 Times in 4,224 Posts
Default

Are there any additional errors in the error.log file which is located in the log directory of this specific website?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 23rd April 2009, 16:09
doughold doughold is offline
Junior Member
 
Join Date: Sep 2008
Posts: 19
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Unfortunately there is nothing else in the log that shows up when the script fails. I've read in a few places that SuExec doesn't work with php directives in the .htaccess file, so I had commented those out but it didn't help.
Reply With Quote
  #4  
Old 24th April 2009, 15:26
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What happens when you completely remove the .htaccess file?

What's in /var/www/php-fcgi-scripts/web35/.php-fcgi-starter?
__________________
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
  #5  
Old 24th April 2009, 16:07
doughold doughold is offline
Junior Member
 
Join Date: Sep 2008
Posts: 19
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I get a 404 error when I got to /admin b/c it was using url rewrites and that directory doesn't exist.

My .php-fcgi-starter is:
Code:
#!/bin/sh
PHPRC="/etc/php5/cgi/"
export PHPRC
PHP_DOCUMENT_ROOT="/var/clients/client10/web35"
export PHP_DOCUMENT_ROOT
PHP_FCGI_CHILDREN=8
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/bin/php-cgi $1
Reply With Quote
  #6  
Old 25th April 2009, 11:50
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What's the output of
Code:
ls -la /var/clients/client10/web35/
?
What's the output of
Code:
ls -l /usr/bin/php-cgi
?

Have you tried to restart Apache?
__________________
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
  #7  
Old 26th April 2009, 00:26
doughold doughold is offline
Junior Member
 
Join Date: Sep 2008
Posts: 19
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Code:
drwxr-xr-x  6 root  root     4096 2009-04-22 14:20 .
drwxr-xr-x  3 root  root     4096 2009-04-15 20:15 ..
drwxr-xr-x  2 web35 client10 4096 2009-04-22 15:19 cgi-bin
lrwxrwxrwx  1 web35 client10   48 2009-04-15 20:15 log -> /var/log/ispconfig/httpd/tt.westechsolutions.com
-rw-r--r--  1 web35 client10  751 2009-04-22 18:19 php.ini
drwxr-xr-x  2 web35 client10 4096 2009-04-15 20:15 ssl
drwxrwxrwx  2 web35 client10 4096 2009-04-15 20:15 tmp
drwxr-xr-x 14 web35 client10 4096 2009-04-24 10:06 web
Code:
root@ispconfig3:~# ls -la /usr/bin/php-cgi 
lrwxrwxrwx 1 root root 25 2008-09-21 09:08 /usr/bin/php-cgi -> /etc/alternatives/php-cgi
Reply With Quote
  #8  
Old 26th April 2009, 13:32
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Have you tried to restart Apache?

If that doesn't help, try this:
Code:
chown web35:client10 /var/clients/client10/web35
__________________
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
  #9  
Old 28th April 2009, 00:45
doughold doughold is offline
Junior Member
 
Join Date: Sep 2008
Posts: 19
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I have restarted apache (and even the whole server) and it didn't help. Additionally, I ran the code you suggested and that didn't help either. I also ran:

Code:
root@ispconfig3:~# chown web35:client10 /var/clients/client10/web35
root@ispconfig3:~# chown -R web35:client10 /var/clients/client10/web35/web
root@ispconfig3:~# chmod -R 755 /var/clients/client10/web35/web
To make sure all files were rwx by the web35 user. This didn't help either.
Reply With Quote
  #10  
Old 28th April 2009, 16:47
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

Hm, I have no idea what's wrong...
__________________
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
Reply

Bookmarks

Tags
fast-cgi, magento, suexec

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
CGI Errors snakegr Installation/Configuration 6 1st July 2006 12:27
CGI issue (SUExec as well maybe) MathieuMa Installation/Configuration 4 11th April 2006 09:59
Ispconfig cgi hosting Mahir General 6 21st November 2005 15:40


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


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