[SOLVED] 500 Error when saving Paypal Payment Gateway

8 years 10 months ago #141439 by krileon

I am only running CB 1.2.2 and upgrading to CB.1.2.3 would be difficult in a quick time frame as I have a number of core hacks (I know I shouldn't but the client was very specific about some things). But CB Subs 1.0.3 was released for CB 1.2.2 and so I presume it is expected to work. Or are there known problems?

Please upgrade to CB 1.2.3. Unfortunately you knowingly and admittedly have core hacks present we can no longer help you; your install is compromised. CBSubs will work on CB 1.2.2, but you've core hacks so there's no telling what will happen. CB 1.2.3 reduces memory usage roughly by 50% so likely will solve your problem. All 500 errors will report to your error log am unsure as to why your hosts logs are not reporting the error.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
8 years 10 months ago #141723 by ecoweb
Whilst I do not fully accept your reason for saying you will not provide further support in this problem (especially for CB Subs an ecrypted and paid for plug in) because of small small core code changes (to overcome some restrictive or missing functionality) within Community Builder, I do unterstand the difficulty in providing such support.

Therefore I have set-up a new sandbox site (at www.sri-connect.com/sandbox ) that has an un-hacked version of Community Builder and have tried setting up the Paypal Payment Gateway, the problem persists. I have tried it multiple times using multiple pem files downloaded paypal and certificate.keys generated with openssl, all failed. Even switching from saying encrypted form to plain text form fails. Whenever there is a valid reference to a pem file in any of the certificate/key fields I get a 500 Internal Server error. I can only assume that something in the saving/loading of the enryption certificate/key fields is causing the error.

The full server and site configuration details are:

Server: VPS server with 2GB ram and 128GB storage with a Intel Xeon CPU X5550 @ 2.67GHz (hosted by eukhost.com)
OS: CENTOS 5.5
MYSQL Version: 5.1.48
PHP Version: 5.2.9
Web Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5
Joomla! Version: Joomla! 1.5.15 Stable
Community Builder v.1.2.3 (installed v.1.2.2 and tested but problem persisted then upgrade to v.1.2.3)
CB Subs: 1.0.3

You have persistantly said that you consider this a memory problem but as you can see below I should have more than sufficient memory.

The steps I have taken to try and resolve this include:


Check on Access to pem directory

Location of pem files /home/sricon/securessl (I have tried moving the files into the site but the problem persists

open_basedir in Apache httpd.conf includes /home/sricon

No open_basedir set in php.ini

securessl has file permissions 755 and the pem file 644 have chmod directory and pem file to 777 but still problem.


Check on Memory

Rmemlimit in httpd.conf: 411988992 (392M)
php_memory_limit: 128M (have tried 256M but the problem persists)

php_info shows the memory is allocated and I have run a memory testing script which shows that it is available


Check on openssl and cURL

Version of OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 (tried upgrade to OpenSSL 0.9.8o but problem persists)
openssl is showing in green in the Paypal Payment Gateway.

Check on error reporting

Have confirmed with hosting company that error reporting should be fine so not sure why error log entries for the 500 errors are not being created

php.ini error_reporting: E_ALL & ~E_NOTICE

php.ini error_log: sricphp_error_log

php.ini log_errors_max_len: 1024 (have tried tihis at 2048 but no error log entries added)

Have tried with php.ini display_errors on and it still doesn't work but rather than the 500 Internal Server Error a blank page is just shown.

Have tried turning System Reporting to Maximum in Joomla configuration but again just a blank page is shown.

Despite repeated testing and raising of the 500 error I have only once had an error_log message corresponding to a 500 error (perhaps this will help). The message was:

[07-Sep-2010 17:02:29] PHP Fatal error: Call to undefined function openssl_pkey_get_private() in /home/sricon/public_html/sandbox/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/cbpaidsubscriptions.gui.php on line 0

This occured when the following 500 entry was shown in the raw apache logs:

82.13.89.130 - ecoadmin [07/Sep/2010:17:02:28 +0100] "GET /sandbox/administrator/index2.php?option=com_comprofiler&task=editPlugin&cid=500&action=editrow&table=gatewaysbrowser&tid=1&cbprevstate=b3B0aW9uPWNvbV9jb21wcm9maWxlciZ0YXNrPWVkaXRQbHVnaW4mcGx1Z2luaWQ9NTAwJmFjdGlvbj1zaG93dGFibGUmdGFibGU9Z2F0ZXdheXM= HTTP/1.1" 500 - " www.sri-connect.com/sandbox/administrator/index2.php?option=com_comprofiler&task=editPlugin&cid=500&action=editrow&table=gatewaysbrowser&tid=1&cbprevstate=b3B0aW9uPWNvbV9jb21wcm9maWxlciZ0YXNrPWVkaXRQbHVnaW4mcGx1Z2luaWQ9NTAwJmFjdGlvbj1zaG93dGFibGUmdGFibGU9Z2F0ZXdheXM= " "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; OfficeLiveConnector.1.5; OfficeLivePatch.1.3)"

As you can see I am not just leaving it to someone else to solve this problem but I am running out of things to try. Any help or suggestions for how to resolve this problem will be gratefully received.

I have searched extensively in the forum and found no solution but I did note that in several places it is suggested that the encrypted form is not needed (although I would prefer to have it). So have tried with a plain text form and nothing in the encryption fields. This does allow the Paypal Payment Gateway to be saved but when I test making a payment on Paypal Sandbox there is a "communication error" between CB Subs and IPN on Paypal Sandbox. This is very frustrating but as it is a different problem I will raise it in a separate post.

Don't think I'm just being negative about CB Subs. The access control and integration parts have been excellent in allowing me to meet some very demanding client requirements for who can see and edit what on the site. The site has 35 CB Subs plans, 50+ CB tabs, 250+ CB fields and multiple components and modules all sucessfully configured and controlled via CB Subs. I perhaps should have tried testing payment gateways earlier but the client was unsure which he wanted to use and I thought that would be the easy and more standard part!
8 years 10 months ago #141746 by krileon

I did note that in several places it is suggested that the encrypted form is not needed (although I would prefer to have it). So have tried with a plain text form and nothing in the encryption fields. This does allow the Paypal Payment Gateway to be saved but when I test making a payment on Paypal Sandbox there is a "communication error" between CB Subs and IPN on Paypal Sandbox.

This would indicate a problem with your encryption (it's not needed anyway, that's adding extra un-necessary overhead). Something with your encrypt is causing it to fail. Again, we have no way of knowing what is really happening without a sufficient error log entry.

The IPN issue is likely due to security as you seam to be high on security (not a bad thing!), but you may have locked down too tight and Paypal can't reach your server. Please check that port 80 and 443 are open. Please also ensure your IPN URL is set correctly as example.com does NOT equal www.example.com . The IPN domain must match the domain you're purchasing from. Example of correct IPN URL www.example.com/ .


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
8 years 7 months ago #147514 by ecoweb
Well after a bit of luck this problem has been solved, although I can't give an exact cause for the problem!

As part of some other work I had asked my hosting company to rebuild Apache on my VPS server. After the rebuild the site wouldn't come up at all. Eventually the hosting company identified that some of the RPM's used in the rebuild, and some in the previous build, were corrupted. After refreshing the RPMs database and rebuilding Apache my site was back on line and miraculously I was able to set up encryption on a Paypal CB subs Payment Gateway).

So as we thought it was something at my server that was not working with CB Subs. Unfortunately because the hosting company didn't identify individual RPMs and their corruption I am no wiser as to what exactly didn't work.

Hopefully enhancements in CB SUbs 1.1 and later releases will improve the error reporting. With encrypted software, as with compiled software, it is vital that error messages and/or error logs provide sufficent information to actually diagnose problems rather than employ guess work and just trying turning things on or off.

Thank you for your support.
8 years 7 months ago #147589 by krileon
Glad your issue was resolved! I still recommend upgrading your CB release as with release of CB 1.3 many plugins including CBSubs will be requiring it.

Hopefully enhancements in CB SUbs 1.1 and later releases will improve the error reporting. With encrypted software, as with compiled software, it is vital that error messages and/or error logs provide sufficent information to actually diagnose problems rather than employ guess work and just trying turning things on or off.

There's no way for CBSubs to detect and report errors in your hosting environment.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Moderators: beatnantkrileon
Time to create page: 0.401 seconds
Facebook Twitter Google LinkedIn