PHP CentOS - Couchbase Connection failure - php

I have a problem connecting to the Couchbase database on the server. I installed Couchbase and it's running fine on the server. I can access it via the console, and also through the web application hosted on my local machine, but when I deploy the site to the server, I get this connection error:
Failed to connect libcouchbase to the server: Connection failure
I assume that the problem is with the libcouchbase module on the server. I use Ubuntu on my local and CentOS 6 on the server and those are the only parameters that make the platforms differ as far as this issue is concerned.
Has anyone ever encountered this issue? Any solutions / guidance?

Related

ORA-12546: TNS:permission denied error connection to remote oracle server

I have two web application and Oracle servers.
Web application server has the following details:
Linux server (LAMP)
oci8
PHP 7.4
Oracle Database server has the following details:
Oracle 19C
I am trying to connect Web Application Server to Oracle Database Remote Server. When I try to connect with remote Oracle server as a result following error shows:
ERROR is ORA-12546: TNS:permission denied.
*Note: While this remote Oracle Database server is connecting successfully from Windows server (WAMP).
Is this the first running of the web application? Can you connect to the database from the system running your web application using sqlplus?
In my case was the firewall. I enabled one rule that forbade the connection with the server. I just disabled the rule and the error was gone.
Had a similar issue. Though i wasn't using LAMP. I had a manually configured apache-php setup. I had to run the command in the Linux server to allow apache to make network connections - apparently, SELinux prevents this by default.
setsebool -P httpd_can_network_connect on
after seeing this: https://stackoverflow.com/a/26349596/9914081 which can be of help too.

Database error:No connection could be made because the target machine actively refused it using EC2 + Linux + XAMPP

I've got an EC2 instance running with a Linux server, and on it I've installed XAMPP.
I have a chrome extension which needs to be able to connect to the DB created through phpMyAdmin, but when trying to connect I get the following error: Database error:No connection could be made because the target machine actively refused it.
How can I allow an external server access to the database?
Did you give this a try? It's unfortunate, but the only way I was able to find a chrome extension to allow CORS was with this extension.
Hope this helps.

SQLSTATE[HY000] [2003] Can't connect to MySQL server

I am just now migrating an application from a standard dedicated server that I have onto AWS EC2.
I have also moved the database (MySQL) onto Amazon RDS.
Now I have an issue that I am pretty sure has to do with either PHP or Apache configuration.
On my dedicated server I can now reach the Amazon RDS database without a problem, but on the EC2-instance, using the exact same code I get this message:
SQLSTATE[HY000] [2003] Can't connect to MySQL server on ....................eu-west-1.rds.amazonaws.com
I can reach the db-server both from Sequel Pro on my laptop, and from PHP on my other server.
I tried to put in the IP-address for the MySQL db on my other server, but same error message, so I am thinking there is some configuration either in Apache or PHP that I need to do?
It is a EC2 instance running Apache and PHP on CentOS.
Suggestions as to what configuration could be blocking this connection?
To anyone else who might have the same problem, run this in SSH, it worked for me:
setsebool -P httpd_can_network_connect=1
Tried successfully
setsebool -P httpd_can_network_connect=1
on RHEL image on EC2 and it was able to connect with AWS-RDS in the same VPC.
For more information see. This is a MUST step on RHEL
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security-Enhanced_Linux/sect-Security-Enhanced_Linux-Booleans-Configuring_Booleans.html

Windows 2012R2 connecting to remote SQL2012 Server issue PHP Apache

I have created a local project that connects to a SQL2012 database. On my local machine I have Windows 7 64Bit enterprise, with MS SQL drivers with no problem at all. I moved the project over to a Windows Server 2012R2 production machine. I got the web server up and PHP working fine.
I checked the phpinfo() file and sql drivers are enabled and sqlsrv is a 'registered stream'
I have try & catch blocks for all my connections to the database. No errors
I have checked the Apache error logs and there is no indication of a problem connecting to the DB.
My project uses SQL authentication, using a Username and Password - not built in Windows Authentication. I tried to change the password to a incorrect one ---> still no error?!!
I even tried to disable Domain, Public, and Private Window Firewalls. Still nothing.
I'm totally stumped, perhaps someone here may have some ideas.
Does anyone know if the SQLSRV30 pack is compatible with Windows 2012R2?
OK I have figured out what the problem was, I needed to install Microsoft® SQL Server® 2012 Native Client located at: http://www.microsoft.com/en-us/download/confirmation.aspx?id=29065#
After that installed everything is working fine.

Connect to MySQL Database on cPanel Server Externally from Heroku?

I am using the Heroku app to host a facebook application since Facebook is changing how they have their applications set up, again. However I need to connect to the MySQL Externally from my cPanel VPS and I am not able to connect correctly. I have tried using the darkprospect.net(host domain), ultimate-battle-online.com (primary domain of user) and 184.154.20.170 as well as those plus the combination of added port 3306 and none have worked. I previously needed to make sure that I added the right domain to the right file but right now it's just not connecting. Right now get this error when using mysql_connect() function:
Lost connection to MySQL server at 'reading initial communication packet', system error: 110
Again, thank you for any ideas that you may have!
EDIT: I found out that it was an issue with the buildpack that is the default for PHP apps, since I develop on a VPS with PHP 5.4.7 I was using parameters that were tuned for it and were not very supportive on their bundle of vanilla PHP and Apache.
I was able to create a new Heroku buildpack that was able to support all of the features that my application was needing. Because I was developing on my VPS in PHP 5.4.7 my configurations were designed for more of the new features and with the Heroku's basic Buildpack only having PHP 5.3.10 there were unseen errors in background logs that were halting the connection process. Additionally CSF Firewall was configured only for UDP income 3306 and I was able to add it to UTP as well and that seemed to resolve the Connection Timed Out error that was the final error after I made a better buildpack for myself.

Categories