PostgreSQL in XAMPP. Problems with the Windows version of XAMPP, questions, comments, and anything related. 2 posts. Page 1 of 1. PostgreSQL in XAMPP. By sparkle » 28. August 2006 14:51. Is there anyone that did PostgreSQL in XAMPP on Windows? I really need a quick install to see if my pg abstraction class. Percona Distribution for PostgreSQL is a single source which provides an enterprise-grade, open source installation of PostgreSQL Core Distribution, plus critical additional enterprise components. PostgreSQL Core Distribution is an ACID-compliant relational database management system, supporting.
How to Integrate postgreSQL Database to XAMPP in Windows
1. Download the postgreSQL installer from EnterpriseDB.
2. Run the installer and follow the on-screen instruction.
Note: pgAdmin also get installed alongside.
3. Assuming XAMPP is located in C:xampp; using the pgSQL installer, install postgreSQL in say C:xampppgsql9.1 folder.
In my case, I installed it on my usb drive. So the link:
4. You will be prompted to set a password for postgresroot user. Keep it you’ll need later
5. By now, pgSQL has been installed.
Getting postgreSQL to talk with PHP
We need to perform the following rituals to get PHP talking / communicating with pgSQL.
1. Open php.ini file located in C:xamppphp.
2. Uncomment the following lines in php.ini
extension=php_pdo_pgsql.dll (line 1014, remove “;” in front)
extension=php_pgsql.dll (line 1017, remove “;” in front)
3. Add the below code snippet to httpd.conf
In my case, the httpd.conf file is at: F:softsxamppapacheconf
I pasted the following at the ligne 178:
LoadFile ” softsxamppphplibpq.dll”
I noticed that this link is already in the xampp-http.conf file, located at : F:softsxamppapacheconfextra
(was it really necessary to paste the LoadFile line?)
postgreSQL Database Administration tool
When we were installing postgreSQL, pgAdmin – a graphical pgSQL database administration tool was installed alongside. (see: pgAdmin III folder)
There is also phpPgAdmin (web base Postgres database management tool) which is to postgreSQL what phpMyAdmin is to MySQL / MariaDB.
I downloaded phpPgAdmin from the link provided. See configuration later below.
If you are like me that is intimidated by the command line, you will find these tools useful.
To get started with pgAdmin in creating and managing postgres database; firstly create a server, connect to it and create the database for that project of yours.
Let’s start with creating the server.
(Note that shortcuts of installed files are in windows start menu)
It can also be executed here: F:softsxamppPostgreSQL9.5binpgAdmin3.exe
1. Click on File > Add Server…
2. Fill the form as shown in the image below.
Take note: in the username and password field, insert postgres as the username and in the password field, the password you entered while installing postgreSQL.
In my case, I really got problems to create a server.
“could not connect to Server: Connection refused”, so I tried many things that didn’t succeed. What I did that succeded (I think): I stoped Appache and mySQL and closed Xampp. I restarted Xampp and connected Appache and MySQL.
I right clicked on the PostgresSQL 9.5 server that was already created and clicked refresh, and everything started.
You can now go ahead to create a Database.
To create the database, under the server we created, right-click on the Database menu and click the New Database… link.
I will be integrating phpPgAdmin to XAMPP to just have a MySQL-like XAMPP experience.
1. Head over to the Github repository and clone the repo to C:xamppphppgadmin.
Alternatively, download the repo. as a Zip, and extract the content to C:xamppphppgadmin.
In my case: F:softsxamppphppgadmin
2. In C:xamppphppgadminconf, rename the config.inc.php-dist file to config.inc.php
In my case: F:softsxamppphppgadminconf
I made a copy of config.inc.php-dist and named it: config.inc.php
3. Edit the config.inc.php and replace all instances of the following with the values below.
$conf[‘servers’][‘host’] = ‘localhost’;
Xampp Postgresql Php
$conf[‘servers’][‘pg_dump_path’] = ‘C:xampppgsql9.1pg_dump.exe’;
In my case: ‘softxamppPostgreSQL9.5pg_dump.exe’;
Xampp Postgresql Free
$conf[‘servers’][‘pg_dumpall_path’] = ‘C:xampppgsql9.1pg_dumpall.exe’;
In my case: ‘softxamppPostgreSQL9.5pg_dumpall.exe’
$conf[‘extra_login_security’] = false;
4. Edit XAMPP’s httpd-xampp.conf and add the below code.
Alias /phppgadmin “C:/xampp/phppgadmin/”
Require all granted
The file is located at: F:softsxamppapacheconfextra
I made a space and pasted the following command after the line 115:
Alias /phppgadmin “/softs/xampp/phppgadmin/”
Require all granted
5. Restart Apache
6. You should now be able to use phpPgAdmin when you visit http://localhost/phppgadmin.
FINE! It worked
I got some problems starting.
To start service, you need to have your Appache server started.
Execute the pgAdmin3.exe located here in my case: F:softsxamppPostgreSQL9.5binpgAdmin3.exe
Click on the server and click on right mouse button.
Choose “Start server”
The server will refresh.
Click again on server, click right mouse button, choose “connect”
The server will connect.
Xampp Postgresql Command
To create a database, as phppgadmin is installed,
Open your browser
Click on the server.
It will ask for username and password
Password : xampxxxxXX
When logged in, click on the server. you’ll see the databases.
Under databases, you’ll see “create database”. Click on it and you’ll se the windows for database creation
Xampp Postgresql Linux
Xampp Postgresql Download
Name: Enter the name of the database
Template: choose template 1 (that is the default if there is no precision)
You can leave the other things as they are (empty) if no special requirement precised
Hit create. The database will be created.