This topic is locked

Connection Refused

4/17/2023 9:46:52 AM
PHPRunner General questions
C
CWDATA author

I am building a project for a client and have uploaded to the Hosting supplied by my client. I initially had a charicter error which was solved by changing the PHP Version on the server.
I am now however facing a second issue "Fatal error: Connection refused in /home/sites/25a/5/52280b5aa1/public_html/connections/Connection.php on line 611"
The logic I am using is that I have built many projects and never seen this error. Secondly the only difference between this project and others that I have done is that the client has provided the hosting. (I usually provide hosting for my clients)
As this is the only difference I am drawn to looking at the problem something to do with the hosting set up. Does anyone have experience of this problem in the past and if so where can I go looking?
Many thanks for reading.

Admin 4/17/2023

This error means that PHP code is not able to connect to the database. One of of the database connection parameters is incorrect ( server address or username or password ).

C
CWDATA author 4/17/2023

Those were my thoughts as well but PPHRunner is connecting to Database and I can interact with the tables no problem. I presume these same settings are being applied when the project is built and uploaded.

C
CWDATA author 4/18/2023

Please note that the credentials I am using are proven to work on both PHPRunner connecting to Database and MYSQL Workbench. It is only failing on the server.

Admin 4/19/2023

It is possible that your web hosting company requires to use different MySQL server addresses while connecting locally and remotely. For instance, you need to use server.com while connecting remotely and localhost while connecting locally ( from the web server ). You can check that with your web hosting company.

C
CWDATA author 4/19/2023

I have just literally heard back from client and was exactly the issue.
Although now whilst my Login page loads, it will not respond when I put Username and Password in. It works fine on Localhost and Demo account but again in live it is not responding.

C
CWDATA author 4/20/2023

I solved this problem after doing a complete new fresh upload of all files.