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 25th August 2011, 15:20
midcarolina midcarolina is offline
Senior Member
 
Join Date: Jul 2011
Posts: 254
Thanks: 1
Thanked 5 Times in 5 Posts
Default 500 Internal Server error on ISPConfig w/ Shopping Cart

Hi,

The site that was on my Host Gator reseller plan is now on my own server. When folks try to check-out (PayPal integrated portal), they receive a 500 internal server error. This only happened when I moved to my server with Fedora 14 x84_64 ISPConfig 3. I contacted the theme designer (WordPress) and this was their quote:

"There is a mod_security rule that is missing that is keeping the cart button from working."

Any help would be great!
Reply With Quote
Sponsored Links
  #2  
Old 25th August 2011, 15:27
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 37,037
Thanks: 841
Thanked 5,659 Times in 4,466 Posts
Default

mod_security is not installed on a ispconfig 3 system by default. So if you installed it manually and the designer told you to install a specific rule, then you should try that. If the designer ahs not send you the rule, ask him to send you the rule.

But I dont think that a 500er error is caused by mod_security. Instead you should take a look into the error.log of the website to see what the reason for the errormessage is.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 25th August 2011, 19:32
midcarolina midcarolina is offline
Senior Member
 
Join Date: Jul 2011
Posts: 254
Thanks: 1
Thanked 5 Times in 5 Posts
Default

Hi Till,

I install mod_security package for Fedora 14 x86_64 first, then did a "dummy" check-out to get a better error log. Here is the outcome after the attempt:

http://hostwithsupport.com/bronze-hosting/
[Thu Aug 25 08:23:22 2011] [error] [client 70.155.163.2] PHP Warning: require(../language/.php): failed to open stream: No such file or directory in /var/www/clients/client1/web1/web/wp-content/themes/mk4/ajCart/cart.php on line 15, referer: http://hostwithsupport.com/bronze-hosting/
[Thu Aug 25 08:23:22 2011] [error] [client 70.155.163.2] PHP Fatal error: require(): Failed opening required '../language/.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/clients/client1/web1/web/wp-content/themes/mk4/ajCart/cart.php on line 15, referer: http://hostwithsupport.com/bronze-hosting/
[Thu Aug 25 08:23:22 2011] [error] [client 70.155.163.2] PHP Warning: Unknown: open(/var/lib/php/session/sess_nf4qqbjgd577hvrn2rqdg03ju0, O_RDWR) failed: Permission denied (13) in Unknown on line 0, referer: http://hostwithsupport.com/bronze-hosting/
[Thu Aug 25 08:23:22 2011] [error] [client 70.155.163.2] PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0, referer: http://hostwithsupport.com/bronze-hosting/
[Thu Aug 25 08:23:22 2011] [error] [client 70.155.163.2] ModSecurity: Warning. Operator GE matched 15 at TXutbound_anomaly_score. [file "/etc/httpd/modsecurity.d/base_rules/modsecurity_crs_60_correlation.conf"] [line "38"] [msg "Outbound Anomaly Score Exceeded (score 15): The application is not available"] [hostname "hostwithsupport.com"] [uri "/wp-content/themes/mk4/ajCart/cart.php"] [unique_id "TlY@un8AAAEAABTVK3IAAAAI"]
[Thu Aug 25 08:23:39 2011] [error] [client 178.203.174.30] PHP Warning: session_start(): open(/var/lib/php/session/sess_7eq8blaus5bfv85f4cqm1o9nn5, O_RDWR) failed: Permission denied (13) in /var/www/clients/client1/web1/web/wp-content/themes/mk4/functions.php on line 10, referer: http://clicks.thespecialsearch.com/x...ahRsEnoabBj4k=
[Thu Aug 25 08:23:39 2011] [error] [client 178.203.174.30] PHP Warning: Unknown: open(/var/lib/php/session/sess_7eq8blaus5bfv85f4cqm1o9nn5, O_RDWR) failed: Permission denied (13) in Unknown on line 0, referer: http://clicks.thespecialsearch.com/x...ahRsEnoabBj4k=
[Thu Aug 25 08:23:39 2011] [error] [client 178.203.174.30] PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0, referer: http://clicks.thespecialsearch.com/x...ahRsEnoabBj4k=

Any instructions on a resolution would be welcome with open arms. The theme designer has no idea!

Thanks in advance
Reply With Quote
  #4  
Old 25th August 2011, 19:44
erosbk erosbk is offline
Senior Member
 
Join Date: Mar 2011
Posts: 337
Thanks: 49
Thanked 36 Times in 30 Posts
Default

Run this from root:

find / -name sess_*

See where sess_ files are being saved for your client/s (location differs between clients), and see if are in the correct path.

In your log, all sess_ files are being searched in /var/lib/php/session

But, I think that ISPConfig sets another path for that (/tmp of each client). Maybe the site has a wrong value for session.save_path (it could be correct when the page was working in another hosting...)

See other answer please, I am not an expert in this... yet :P

Regards

Edit: As I see, your clients are in /var/www/clients/client1/web1/web, if you didn't change default values of ispconfig, path for sessions should be /var/www/clients/client1/web1/web/tmp... the solution should be just modify the value of the variable in the site.. you could see which file has that value with this from root:

find /var/www/clients/client1/web1/web/ -type f -exec grep -i "/var/lib/php/session" {} \; -print

It should show you every file in /var/www/clients/client1/web1/web/ that has in content "/var/lib/php/session", next, you have to edit those files to point session path to correct directory.

Last edited by erosbk; 25th August 2011 at 19:50.
Reply With Quote
  #5  
Old 25th August 2011, 22:24
midcarolina midcarolina is offline
Senior Member
 
Join Date: Jul 2011
Posts: 254
Thanks: 1
Thanked 5 Times in 5 Posts
Default

This was the result of that command line:

[root@webserver ~]# find /var/www/clients/client1/web1/web/ -type f -exec grep -i "/var/lib/php/session" {} \; -print
[root@webserver ~]#

Nothing.
Reply With Quote
  #6  
Old 25th August 2011, 23:52
erosbk erosbk is offline
Senior Member
 
Join Date: Mar 2011
Posts: 337
Thanks: 49
Thanked 36 Times in 30 Posts
Default

[Thu Aug 25 08:23:39 2011] [error] [client 178.203.174.30] PHP Warning: Unknown: open(/var/lib/php/session/sess_7eq8blaus5bfv85f4cqm1o9nn5, O_RDWR) failed: Permission denied (13) in Unknown on line 0, referer: http://clicks.thespecialsearch.com/x...ahRsEnoabBj4k=
[Thu Aug 25 08:23:39 2011] [error] [client 178.203.174.30] PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0, referer: http://clicks.thespecialsearch.com/x...ahRsEnoabBj4k=

This lines are showing that your php site is trying to access in /var/lib/php/session.

Maybe you have a function ini_set changing the path, or it is being readed from a mysql database, or from a script outside of home directory of the user.

Did you search for sess_* files? did it find any to see where are being them saved? do you have only one site running on your host?


edit: you could try to find "session.save_path" this in your scripts, if your php code is changing it in real time, it could be done with ini_set... just replace the string in the previous command to search inside files.
Reply With Quote
  #7  
Old 26th August 2011, 04:14
midcarolina midcarolina is offline
Senior Member
 
Join Date: Jul 2011
Posts: 254
Thanks: 1
Thanked 5 Times in 5 Posts
Default

As you saw in my previous response, the command for sess_* files showed no results. I am sorry, but honestly I did not understand a word of the remainder of what you said. You seemed to have jumped from here to there. No clear step by step instructions were provided. While I appreciate your help greatly, in this instance, I am going to need some step by step instruction that applies specifically to Fedora 14 x86_64 and ISPConfig 3.

Thanks.
Reply With Quote
  #8  
Old 26th August 2011, 05:27
erosbk erosbk is offline
Senior Member
 
Join Date: Mar 2011
Posts: 337
Thanks: 49
Thanked 36 Times in 30 Posts
Default

I will try to be a little more clear, please forgive my poor english.

Your site is using sessions. Session are temporary files created by the site in a directory, and read back by the site to work properly. In this case, your site is using sessions to keep user data (i.e. username, shopping cart items, etc). Every site that works with sessions, needs to know where to save this temporary files, that are named always with the prefix sess_ plus a random string (i.e. sess_7eq8blaus5bfv85f4cqm1o9nn5 in your log file).

By default, every hosting server has a pre-defined directory where to save this files (most of them)... in a default ISPConfig 3 hosting server, this place is the /tmp folder inside the client folder. In your case, sess_ files should be created in: "/var/www/clients/client1/web1/tmp".

You can change this in realtime if you want to save sess_ files in another directory, php allows you to do it with the variable: session.save_path. This is what I think is happening here. In some place, your site is forced to use a different path to save sess_ files, as you could see in the log file, your site is trying to save them in /var/lib/php/session directory. As your site has no rights to access that directory, the file is not being created. When your site try to read it, the file doesn't exist, so, it logs an error in the log file.

With the "find" functions I posted, I was trying to guide you to identify where in your site this path is being changed by your site, without success at this moment. If you can find where this value is being changed, you can modify it to point to the right directory.

Are you using the site as fast-cgi? I hope this help you to solve your problem. Again, sorry for my bad english. I think that this is what is happening to you, I am not an expert.
Reply With Quote
  #9  
Old 28th August 2011, 02:30
Toucan Toucan is offline
Senior Member
 
Join Date: Dec 2009
Posts: 479
Thanks: 78
Thanked 41 Times in 34 Posts
Default

Like the other guys have said - data is saved to a real place on the server. Sometimes reference by a base directory.

This is written often to a config file automatically when I site is created.

You have copied the site from another server with another base directory. Hence this file path has been written wrong for the new server.

As in the previous post, something like:
/var/www/clients/client1/web1/tmp"
is used in ispconfig setup - but this will not be what was written to the config file when originally setup on the original server.

So when the site is copied to the new server the configuration files are possibly wrong.

I'd suggest having a real close look at the site's configuration files. Probably something like configuration.php and look for references to thing like 'base directrory = /whatever/etc...'

Hope this has helped rather than clouding more!
Reply With Quote
  #10  
Old 28th August 2011, 16:02
midcarolina midcarolina is offline
Senior Member
 
Join Date: Jul 2011
Posts: 254
Thanks: 1
Thanked 5 Times in 5 Posts
 
Default

Yes,

This helped the situation some. I changed the file path in the php.ini file. Now I am getting a white screen with no errors. The temp session files are showing up fine in the path that I set, and opening one of these sessions shows the information on what someone is trying to purchase, etc., yet the cart will not direct you to PayPal. Strange. Used to work great.
Reply With Quote
Reply

Bookmarks

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
Not working emails (DNS and postfix problem?) shekiman Installation/Configuration 9 1st March 2011 17:25
Email problem 'Cannot set my user or group id.' (using ISPConfig 3 + OpenSuSE 11.2) urosm Installation/Configuration 5 19th June 2010 23:41
Debian 5 Ajax error + network interface always shutting down ev0css Installation/Configuration 3 5th June 2010 13:58
ISPConfig3 Mail Warn Errors reason8 General 3 25th November 2009 14:58
The Perfect Setup - Debian Etch (Debian 4.0) some trouble daniel80 HOWTO-Related Questions 26 1st February 2008 17:30


All times are GMT +2. The time now is 03:43.


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