thiagoluis / install-pdo-oci

Installation pdo_oci in php5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation

The instructions in file install-pdo-oci.sh, install pdo_oci extension in distribution Debian and derivatives. Set the absolute path in the file and run as admin.

sudo ./install-pdo-oci.sh

Requirements

Testing with nginx

Set your distribution below, as this http://nginx.org/en/linux_packages.html:

wget http://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key
echo "#nginx" | sudo tee --append /etc/apt/sources.list
echo "deb http://nginx.org/packages/<distribution name>/ <distribution codename> nginx" | sudo tee --append /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/<distribution name>/ <distribution codename> nginx" | sudo tee --append /etc/apt/sources.list
sudo apt-get update
sudo apt-get install nginx

Configure your /etc/nginx/conf.d/default.conf to execute extensions .php. Basically like this:

server {
    listen       80;
    server_name  localhost;

    location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }


    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    location ~ \.php$ {
        root /usr/share/nginx/html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_param  SCRIPT_FILENAME  $document_root/$fastcgi_script_name;
        include        fastcgi_params;
    }
}

Configure php5-fpm, set the address that accepts requests.

Replace in file /etc/php5/fpm/pool.d/www.conf, value of listen. From listen = /var/run/php5-fpm.sock to listen = 127.0.0.1:9000 with your text editor or execute:

sudo sed -i 's/\/var\/run\/php5-fpm.sock/127.0.0.1:9000/' /etc/php5/fpm/pool.d/www.conf

Restart

sudo service php5-fpm restart
sudo service nginx restart

Create in /usr/share/nginx/html your phpinfo.php:

<?php phpinfo(); ?>

Finished

Execute http://localhost/phpinfo.php and check section PDO, you must see:

PDO drivers         oci

About

Installation pdo_oci in php5


Languages

Language:Shell 100.0%