Diary of a Web Developer, Writer & Geek.
How to Integrate postgreSQL Database to XAMPP in Windows
Over the weekend, I decided to learn postgreSQL Database. For me to be able to achieve it, I need to as a matter of fact install and get it running on my local machine.
Since I’m using XAMPP already as my LAMP stack, it will be easier to just integrate postgreSQL into it rather than compiling it with PHP from scratch.
In this article, I will show us how I was able to install and integrate postgreSQL to XAMPP as well as pgAdmin and phpPgadmin in Windows.
- Download the postgreSQL installer from EnterpriseDB.
- Run the installer and follow the on-screen instruction.
Note: pgAdmin also get installed alongside.
- Assuming XAMPP is located in C:\xampp; using the pgSQL installer, install postgreSQL in say C:\xampp\pgsql\9.1 folder.
- You will be prompted to set a password for postgres root user.
- 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.
- Open php.ini file located in C:\xampp\php.
- Uncomment the following lines in php.ini
postgreSQL Database Administration tool
When we were installing postgreSQL, pgAdmin – a graphical pgSQL database administration tool was installed alongside.
There is also phpPgAdmin (web base Postgres database management tool) which is to postgreSQL what phpMyAdmin is to MySQL / MariaDB.
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.
- Click on File > Add Server…
- 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.
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.
How to Create a Database for WordPress
This is part two of a 3-part guide to installing WordPress manually. If you want to install a web server on your local machine, view part one. If your web server is ready (on your machine or your hosting provider), it’s time to create a new database.
Go to the /phpmyadmin directory in your home directory. If you are using XAMPP this means http://localhost/phpmyadmin. Otherwise type your home-directory address followed by /phpmyadmin.
Create a new database
On the left-side menu (under the phpMyAdmin logo), click ‘new‘ to create a new database.
Click ‘new’ under databases.
When the below window appears, choose a name for your database (we’ll use ‘wpdb’) and click ‘create‘.
Choose a database name and click create
You will immediately get a notification saying that the database ‘wpdb’ (or whatever name you chose) has been created, and it will appear in the list of databases under the ‘create’ button.
Your new database has been created.
Create a new user
Click on the new database you just created.
This is your new database.
Now you need to create a user who will have access to this database and be able to create, read, update and delete (CRUD) its records. In the options panel on the top of your database, choose ‘Privileges‘ and click ‘Add user‘ under ‘new‘:
Create new user under the Privileges panel in your new database.
Now fill the fields as indicated below. Choose a username (we chose ‘wpdbuser’), and use ‘localhost’ as the host. (This step is especially important, as using ‘%’ on localhost can give error during WordPress installation process.)To create a strong password you can simply click on generate, but remember to save the password you generated to a text file or in your personal records. You will need to supply this username and password to WordPress during installation. However, that doesn’t mean you should use an easy password! Simply remember to save it somewhere only you have access to it.
Choose localhost for XAMPP and remember to record your username and password somewhere safe!
Scroll down and you will see that the ‘database for users’ option is checked to ‘Grant all privileges on database “wpdb”‘. This is what you want, so just scroll to the bottom of the page and click ‘Go‘ on the right corner.
Click ‘go’ to create the user.
On clicking go you should see the following notification:
CREATE USER ‘wpdbuser’@’%’ IDENTIFIED BY ‘***’;GRANT USAGE ON *.* TO ‘wpdbuser’@’%’ IDENTIFIED BY ‘***’ WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;GRANT ALL PRIVILEGES ON `wpdb`.* TO ‘wpdbuser’@’%’;
This means that you have successfully created a MySQL database and a user who has all privileges on the database. You are now ready to install WordPress 4.0+ on the server.
Swadesh Programming Blog
Today i was searching for “how to configure php to connect with oracle “. I tried different search words and searched the whole internet. Finally i was successful.
I use the package XAMM for windows to run PHP and MySql.
Check whether you have oracle client already installed
- In your XAMPP Start Page, go to phpinfo, look for string oci8. If string found it indicate that connection to oracle is available and simply execute Step-3. Otherwise to activate connection do the following steps:
- Open the currently used php.ini file by looking at the phpinfo, from the XAMPP folder.
- Find string ;extension=php_oci8.dll. Remove the semicolon (;) from the begining of the string to activate the oracle extension.
- Save the php.ini file.
- Download the “Instant Client Package – Basic” for Windows from the OTN Instant Client page. Unzip it to “C:\xampp\php\ext” folder
- Edit the PATH environment setting and add C:\xampp\php\ext before any other Oracle directories. For example, on Windows XP, follow Start -> Control Panel -> System -> Advanced -> Environment Variables and edit PATH in the System variables list.
- Set desired Oracle globalization language environment variables such as NLS_LANG. If nothing is set, a default local environment will be assumed. See An Overview on Globalizing Oracle PHP Applications for more details.
- Unset Oracle variables such as ORACLE_HOME and ORACLE_SID, which are unnecessary with Instant Client (if they are set previously).
- Restart XAMPP (or Start if its not already started).
- To make sure that connection to oracle database has successfully activated, go to phpinfo. Find string: oci8. If found, then XAMPP can now communicate with Oracle Database.
Now connect to your desired database and execute your query
For further help you can always refer the PHP manual.
XAMPP Tutorial: How to Use XAMPP to Run Your Own Web Server
XAMPP stands for Cross-Platform (X), Apache (A), MySQL (M), PHP (P) and Perl (P). It is a simple, lightweight Apache distribution that makes it extremely easy for developers to create a local web server for testing purposes. Everything you need to set up a web server – server application (Apache), database (MySQL), and scripting language (PHP) – is included in a simple extractable file. XAMPP is also cross-platform, which means it works equally well on Linux, Mac and Windows. Since most actual web server deployments use the same components as XAMPP, it makes transitioning from a local test server to a live server is extremely easy as well. Web development using XAMPP is especially beginner friendly, as this popular PHP and MySQL for beginners course will teach you.
What’s Included in XAMPP?
XAMPP has four primary components. These are:
1. Apache: Apache is the actual web server application that processes and delivers web content to a computer. Apache is the most popular web server online, powering nearly 54% of all websites.
2. MySQL: Every web application, howsoever simple or complicated, requires a database for storing collected data. MySQL, which is open source, is the world’s most popular database management system. It powers everything from hobbyist websites to professional platforms like WordPress. You can learn how to master PHP with this free MySQL database for beginners course.
3. PHP: PHP stands for Hypertext Preprocessor. It is a server-side scripting language that powers some of the most popular websites in the world, including WordPress and Facebook. It is open source, relatively easy to learn, and works perfectly with MySQL, making it a popular choice for web developers.
4. Perl: Perl is a high-level, dynamic programming language used extensively in network programming, system admin, etc. Although less popular for web development purposes, Perl has a lot of niche applications.
Different versions of XAMPP may have additional components such as phpMyAdmin, OpenSSL, etc. to create full-fledged web servers.
How to Install XAMPP?
[Note: For the purpose of this XAMPP tutorial, we’ll assume that you’re using a Windows PC, although these instructions work equally well for Mac computers. Linux users, however, should refer to the official XAMPP Linux installation guide.]
Head over to XAMPP for Windows homepage on ApacheFriends.org. Here, you will find multiple versions of XAMPP.
In this tutorial, we will install XAMPP Windows 1.8.2 which includes:
Search This Blog
HOW TO INSTALL WORDPRESS USING XAMPP
- Get link
- Other Apps
STEP 1:-Download wordpress on wordpress.org site
STEP 2:-Extract WordPress .zip file
STEP 3:-Open the extracted wordpress-4.6.1 folder
STEP 4:-Cut wordpress folder
STEP 5:-PASTE IN XAMPP —>htdocs folder
I have show you folder with redmark, Inside folder paste your wordpress folder
STEP 6:-After paste folder
STEP 7:-Start xampp
i have shown in below image
STEP 8:-CLICK ON APACHE –>Admin
Automaticaly browser open
NOTE:-If you have change the port number then browser is giving you error (Unable to connect)then write acoording i have display in below image with red mark
HOW TO CHANGE PORT NUMBER IF NOT CONNECT if your port number is 8080 then write localhost:8080/
STEP 9:-Then Dashboard open
STEP 10:-Write according i have display in below image
Note:- if you had changed folder name like mysite you need to write localhost:8080/mysite
if you have not change port number or folder name then you need write localhost/wordpress
you can select your language
here press CONTUNUE
STEP 12:- ACORDING CLICK ON let’s go!
acording i have displayed in below you can see image
Note:- i have created database using xampp —>MySQl (and my database name is [test] which i have written below you can put your database name which you make)
Database Name:test( HOW TO MAKE DATABASE USING XAMPP
Password: MUST NEED BLANK
CLICK ON SUBMIT
STEP 13:- CLick on RUN IN INSTALL
Fill Information click on INSTALL WORDPRESS
STEP 13:- CLICK ON LOGIN
STEP 14:- Give username :admin (you can give what you had filled at install time)
STEP 15:- Give password rvremo (you can give what you had filled at install time)
AND MAKE WEBSITE
AFTER CLOSE IT
AND YOU WANT TO OPEN AGAIN
STEP 16:-Start XAMPP–>in address bar write (localhost:8080/wordpress/wp-admin)
if you have changed the port number and if you do not change port number (localhost/wordpress/wp-admin)