Drupal 7 configuration error with Postgresql in Mac OS 10.6.5 - drupal

I am trying to configure Drupal 7 with Postgres. At the database setup step, I get the following error.
Warning: PDO::_construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in DatabaseConnection->_construct() (line 300 of /Users/shamod/Sites/drupal/7/includes/database/database.inc).
In order for Drupal to work, and to continue with the installation process, you must resolve all issues reported below. For more help with configuring your database server, see the installation handbook. If you are unsure what any of this means you should probably contact your hosting provider.
Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [2002] No such file or directory.
Is the database server running?
Does the database exist, and have you entered the correct database name?
Have you entered the correct username and password?
Have you entered the correct database hostname?
NOTE: I am trying to connect to Postgresql but it fails on var/mysql/mysql.sock error. I have setup the database connection string in settings.php for Postgresql. It still does not work.
Any idea?

Evidently you are trying to connect to a MySQL database instance, so you should review your database driver and connection configuration.

Just came up against this error myself when trying to use the web installer - might come down to a similar issue.
On the install page I wasn't given an option to use Postgres driver so I assumed I needed to use the "Mysql (or other)" option. However, looks like the Drupal install script checks which database drivers are compiled into PHP and only offers you what is available - my system didn't have php-pgsql installed by default.
So I needed to install the postgresql drivers to PHP first, reload apache then try the install again.
On CentOS-5:
sudo yum install php-pgsql
sudo service httpd restart
Then reload the install page and all worked fine.

Related

How to became superuser on AWS EC2 WordPress Site

I want to install SSL on AWS EC2 WordPress Site,
I have tried this:
bitnami#ip-172-24-0-191:/opt/bitnami/apache2/htdocs$ sudo /opt/bitnami/bncert-tool
An updated version is available. Would you like to download it? You would need to run it manually later. [Y/n]: Y
The tool will exit now. To run the updated version run the following command:
/opt/bitnami/bncert-tool
bitnami#ip-172-24-0-191:/opt/bitnami/apache2/htdocs$ /opt/bitnami/bncert-tool
but I have this error:
Error: There has been an error.
This installer requires root privileges. Please become superuser before
executing the installer
Press [Enter] to continue:
All you have to log in with AWS root user first.
Installing SSL depends on your web panel like cpanel, cyberpanel, directadmin etc.
If you have bought a SSL then install it via panel first.
If you want to install SSL via SSH access, Be sure your SSH port is open and the credentials are correct.
Your error is showing because of not root user access.
Thanks.

How do I create a database on MariaDB server?

My hosting provider shows Server version: 10.1.44-MariaDB-cll-lve - MariaDB Server on cPanel.
I'm about to do some dev work locally.
I installed MariaDB on my Windows 10. It went under C:\Program Files\MariaDB 10.4 and I see that it installed itself as a service called MariaDB. Service is running.
I'm asking my question after trying a whole whack of things because I had done this many times using MySQL before this MariaDB thing.
How do I create a database off an sql dump file?
Since nothing that I'm trying is working and this is a brand new Maria DB installation , I would rather not talk about how I did this before. Instead, having this MariaDB installation now, what do I do to import this sql file?
OK, so this is what we need to do:
Assuming that your database is called MyDB.
Start command prompt as admin.
cd C:\Program Files\MariaDB 10.4\bin> // /bin where your MariaDB installation went.
mysql -u root
create database MyDB;
exit;
mysql -uroot MyDB < C:/where-you-have-the-file/dump-file.sql
mysql -u root
use MyDB
show tables;
Hopefully, you see your schema.

Wordpress Database Connection Error - PHP7 using MAMP

I have a localhost development environment using MAMP Pro, with a Wordpress website working successfully using PHP 5.6.8. Changing the host to PHP 7.0.13 (and changing nothing else) results in the error:
Warning: mysqli_real_connect(): (HY000/2002): No such file or
directory in [edited path]/wp-includes/wp-db.php on line 1538
Error establishing a database connection
This either means that the username and password information in your
wp-config.php file is incorrect or we can’t contact the database
server at localhost:3306. This could mean your host’s database server
is down.
Screenshot of Complete Error
wp-config.php definitely has correct username, password, hostname and the database is running. Solutions to similar issues/warnings suggest the MySQL socket path in php.ini file could be wrong, but I have compared that file across the two php versions and they are the same.
I am using the latest versions of MAMP Pro (4.1) and Wordpress (4.7.4), as well as OS X (10.12.4). Also, the website works fine again when changing the host back to PHP 5.6.8.
No idea what else to do/check. Any thoughts are much appreciated.
Wordpress 4.6 later version is not supported in Php 7.0 So please Reinstall Php 5.6 and check .so working
After updating to PHP7 you need to check the path to the mysql.sock.
Open the php.ini file and correct the path
mysql.default_socket = /Applications/MAMP/bin/IDONTKNOW...../mysql.sock

unable to install composer for symfony

I am using a computer provided by my work org and I do not have any access to change firewall since I am just a user.
I am trying to install Composer to start on a symfony 2 project. When I try Composer exe file to install, I see this message - The "https://getcomposer.org/versions" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
failed to open stream: Cannot connect to HTTPS server through proxy
I Googled it but the solutions all given are related to firewall and can be solved by an Admin only.
It seems that you have network issues: Cannot connect to HTTPS server through proxy. You probably might want to work this out but since you have no access to network settings then it will be easier just to use Manual Download option from https://getcomposer.org/download/ . Just download composer.phar file from this url

MariaDB on Windows - what is this error when trying to start the database engine?

I am asking this question as an offshoot myself and another SO had from this other MariaDB question:
MariaDB on Windows - getting started help?
When I install MariaDB (v5.2.4), open the command window, navigate to the folder where the files are installed, and type in the following to start the database:
net start mysql
I get the following error:
the service name is invalid
I didn't do anything complex, just ran the installation and tried to get started.
Any ideas?
The error basically tells that installer did not create the service (it currently does not create services), thus you'll need to do it yourself.
start elevated command line
switch to directory of your MariaDB installation (C:\Program Files\MariaDB 5.2.4, something like that)
bin\mysqld --install
and only then
net start mysql
Assuming that there is nothing that runs on port 3306, this will stat.
Alas, the server you will create this way would not be optimized at all.
It is better to create a configuration file my.ini (take a look at MySQL docs and .ini files in the installation directory for examples), and put with performance -related stuff here (innodb bufferpool size etc). With config file, you'll need a different command line to register service (step 3 above):
bin\mysqld --install MySQL --defaults-file=path\to\my.ini
Installer for 5.2.4 is basic indeed. It is being reworked though, new one is going to be better usable.
I installed MariaDB that comes with XAMPP on Windows 10. You will see only mysql in the XAMPP Control Panel. However, if you click Shell on the control panel you can access MariaDB monitor and MariaDB.
Here are some notes:
http://hodentekhelp.blogspot.com/2015/11/how-do-you-access-mariadb-in-xampp.html

Resources