Showing posts with label php oracle. Show all posts
Showing posts with label php oracle. Show all posts

Monday, March 19, 2018

oci_connect ORA-24408: could not generate unique server group name

The 11g instant client requires a /etc/hosts file entry for your hostname pointing to 127.0.0.1. The normal "localhost" entry is not sufficient on it's own.
Assuming your host name is foomachine, there are two places you'll need to check:
In /etc/hosts, make sure you have any entry like - add it if it's not there:
127.0.0.1   foomachine
And also make sure the /etc/sysconfig/network file also has HOSTNAME=foomachine

Saturday, January 31, 2015

CentOS 6.6 üzerinde httpd + oracle destekli php5 kurulum notları

Platform: CentOS 6.6 x86_64

Amacımız oracle database ile konuşan php kodlarımıza uygun web sunucu yapılandırmasını gerçekleştirmek.
Sistem kurulumu minimal olacak şekilde gerçekleştirildi.

httpd ve diğer bağımlı paketlerin yüklenmesi:
[root@web2 php5]# yum install httpd openssl098e aspell curl curl-devel wget libjpeg libpng libX11 libXpm libfreetype freetype

ve çalışırken lazım olabilecek diğer bazı paketlerin yüklenmesi:
[root@web2 php5]# yum install vim bind-utils  rsync

oss.oracle altında projelendirilen php epel6 uyumlu rpm paketlerinin indirilmesi:
https://oss.oracle.com/projects/php/
https://oss.oracle.com/projects/php/dist/documentation/installation.html


İndirdiğim dosyalar:

[root@web2 php5]# ls -1
oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
php55-5.5.10-1.el6.x86_64.rpm
php55-bcmath-5.5.10-1.el6.x86_64.rpm
php55-cli-5.5.10-1.el6.x86_64.rpm
php55-common-5.5.10-1.el6.x86_64.rpm
php55-dba-5.5.10-1.el6.x86_64.rpm
php55-devel-5.5.10-1.el6.x86_64.rpm
php55-embedded-5.5.10-1.el6.x86_64.rpm
php55-enchant-5.5.10-1.el6.x86_64.rpm
php55-fpm-5.5.10-1.el6.x86_64.rpm
php55-gd-5.5.10-1.el6.x86_64.rpm
php55-imap-5.5.10-1.el6.x86_64.rpm
php55-intl-5.5.10-1.el6.x86_64.rpm
php55-ldap-5.5.10-1.el6.x86_64.rpm
php55-mbstring-5.5.10-1.el6.x86_64.rpm
php55-mysql-5.5.10-1.el6.x86_64.rpm
php55-oci8-12cR1-5.5.10-2.el6.x86_64.rpm
php55-opcache-5.5.10-1.el6.x86_64.rpm
php55-pdo-5.5.10-1.el6.x86_64.rpm
php55-pgsql-5.5.10-1.el6.x86_64.rpm
php55-process-5.5.10-1.el6.x86_64.rpm
php55-pspell-5.5.10-1.el6.x86_64.rpm
php55-recode-5.5.10-1.el6.x86_64.rpm
php55-snmp-5.5.10-1.el6.x86_64.rpm
php55-soap-5.5.10-1.el6.x86_64.rpm
php55-tidy-5.5.10-1.el6.x86_64.rpm
php55-xml-5.5.10-1.el6.x86_64.rpm
php55-xmlrpc-5.5.10-1.el6.x86_64.rpm



php paketlerinin yüklenmesi:

[root@web2 php5]# rpm -ivh php55-common-5.5.10-1.el6.x86_64.rpm php55-cli-5.5.10-1.el6.x86_64.rpm php55-5.5.10-1.el6.x86_64.rpm
Preparing...                ########################################### [100%]
   1:php55-common           ########################################### [ 33%]
   2:php55-cli              ########################################### [ 67%]
   3:php55                  ########################################### [100%]





Oracle desteği için bağımlı oracle instant client paketinin yüklenmesi:
(http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html adresinden indirildi.)

[root@web2 php5]# rpm -ivh oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:oracle-instantclient12.########################################### [100%]




php oci8 modülünün yüklenmesi:

[root@web2 php5]# rpm -ivh php55-oci8-12cR1-5.5.10-2.el6.x86_64.rpm
Preparing...                ########################################### [100%]
   1:php55-oci8-12cR1       ########################################### [100%]



ve webci arkadaşlarımızın ihtiyaç duyabilecekleri gd ve diğer bazı modüllerin yüklenmesi:


[root@web2 php5]# rpm -ivh php55-gd-5.5.10-1.el6.x86_64.rpm  php55-mbstring-5.5.10-1.el6.x86_64.rpm php55-xmlrpc-5.5.10-1.el6.x86_64.rpm
Preparing...                ########################################### [100%]
   1:php55-gd               ########################################### [100%]
   2:php55-xmlrpc           ########################################### [ 50%]
   3:php55-mbstring         ########################################### [100%]



kurulum sonrası httpd başlatmadan önce /etc/php.ini dosyasında short_open_tag = On olarak ayarladım. ( <? tag i ile yazılan php kodlarının sorunsuz çalışması için.)

[root@web2 php5]# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for web2
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
                                                           [  OK  ]

Son olarak istediğimiz şekilde modüllerin aktif olduğunu teyid etmek için phpinfo(); fonksiyonunu çağırdığımız bir php dosyası yaratıp browser'dan çağırıyoruz. Ve aktif modüllere göz atıyoruz.

[root@web2 php5]# echo '<?php phpinfo(); ?>' > /var/www/html/phpinfo.php

Visit: http://<server_ip_address>/phpinfo.php