WFB Error when PayPal Cart payment...

User 538123 Photo


Registered User
7 posts

Had form working fine in test. Then added PayPal cart payment. When submit form for payment get following: SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (111)

Only place 127.0.0.1 was found in code is in
Page Line Matched Text
forms/cartapp_v1/phphosted/database_mysql.cls.php [1/1] 1 parent::__construct( 'mysql:host=127.0.0.1;dbname=' . $cfg->database, $cfg->username, $cfg->password,...

Why this happening?

Fred the Elder
User 103173 Photo


VP of Software Development
0 posts

Go into your Settings > Confirm Options Fred and make sure the correct information is there. It sounds like you used that IP for the server. You may want to try changing that to localhost and see if that helps.
Learn the essentials with these quick tips for Responsive Site Designer, Responsive Email Designer, Foundation Framer, and the new Bootstrap Builder. You'll be making awesome, code-free responsive websites and newsletters like a boss.
User 538123 Photo


Registered User
7 posts

Scott,

I am on GoDaddy using MySql DB server. 'Localhost' not location.
Location is: testXXXX.db.XXXXXXX.hostedresource.com.

To be clear, the form worked perfectly without the PayPal payment option. I would fill out and it would send emails to user and administrator.

I added the Payment option from settings and I keep getting this error:
SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (111)

I deleted the entire website install, changed the table name, upload clean, and ran again. Same response.

My WFB version 2.1 Build 4504. Had to go down a build because of other problems.

This is not logical.

Fred
User 538123 Photo


Registered User
7 posts

Answer my own problem.

In PHPhosted folder, database_mysql.cls.php file on line 49 the mysql:host=127.0.0.1 was the problem (on GoDaddy Shared Hosted Server).

I replaced with the location provided by GoDaddy and form posted just fine:
mysql:host=XXXXX.db.977XXXX.hostedresource.com

Fred the Elder

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.