PHP 7.0 and oci8

If none of the more specific forums is the right place to ask

PHP 7.0 and oci8

Postby gperes » 2017-05-22 14:05

I have installed Stretch with apache2 and PHP 7, and tried to load oci8 but till now it doesn't work. I've tried to install via pecl and compiling but neither have worked. There is no selinux enabled. And the variables are working.
root@XXX:/var/log# ldd /usr/lib/php/20151012/oci8.so
linux-vdso.so.1 (0x00007ffea16d4000)
libclntsh.so.12.1 => /usr/lib/oracle/12.2/client64/lib/libclntsh.so.12.1 (0x00007f1d4d665000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1d4d2c0000)
libmql1.so => /usr/lib/oracle/12.2/client64/lib/libmql1.so (0x00007f1d4d049000)
libipc1.so => /usr/lib/oracle/12.2/client64/lib/libipc1.so (0x00007f1d4cc16000)
libnnz12.so => /usr/lib/oracle/12.2/client64/lib/libnnz12.so (0x00007f1d4c4cd000)
libons.so => /usr/lib/oracle/12.2/client64/lib/libons.so (0x00007f1d4c27d000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1d4c079000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1d4bd75000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1d4bb58000)
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f1d4b940000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1d4b738000)
libaio.so.1 => /lib/x86_64-linux-gnu/libaio.so.1 (0x00007f1d4b534000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f1d4b31d000)
/lib64/ld-linux-x86-64.so.2 (0x00005566f6585000)
libclntshcore.so.12.1 => /usr/lib/oracle/12.2/client64/lib/libclntshcore.so.12.1 (0x00007f1d4ad4f000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1d4ab38000)

It is being called by php.ini file "extension=oci8". And are no error logs on apache.

Here are some articles that I have researched:

https://github.com/yiisoft/yii2/issues/10975
https://github.com/remicollet/remirepo/issues/36
https://community.oracle.com/thread/3878777
https://forums.phpfreaks.com/topic/2764 ... installed/
https://webmasters.stackexchange.com/qu ... apache-php
https://wiki.debian.org/SELinux/Setup
http://www.revsys.com/writings/quicktip ... linux.html
http://www.crypt.gen.nz/selinux/disable_selinux.html
https://www.cyberciti.biz/faq/howto-turn-off-selinux/

Apache error logs:

[Mon May 22 11:43:58.127150 2017] [mpm_prefork:notice] [pid 23971] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon May 22 11:43:58.127233 2017] [core:notice] [pid 23971] AH00094: Command line: '/usr/sbin/apache2'

Thanks in advance for any help.
gperes
 
Posts: 14
Joined: 2017-05-22 13:51

Re: PHP 7.0 and oci8

Postby arochester » 2017-05-22 15:18

Not included in the articles you have listed - https://secure.php.net/manual/en/oci8.installation.php
"Something to be aware of: Debian is a core or source distribution. This means there are many Debian-based distributions. THEY ARE NOT DEBIAN."
arochester
 
Posts: 1112
Joined: 2010-12-07 19:55

Re: PHP 7.0 and oci8

Postby gperes » 2017-05-22 15:25

Yes I didn't post this one, but I've also tried these steps.
gperes
 
Posts: 14
Joined: 2017-05-22 13:51

Re: PHP 7.0 and oci8

Postby gperes » 2017-05-22 18:52

My friend found the answer, for some reason that I don't know when we put "extension=/full/path/20151012/oci.so" it become up. Beside all that I did with the articles, I had to do this extra step to work.
gperes
 
Posts: 14
Joined: 2017-05-22 13:51

Re: PHP 7.0 and oci8

Postby weltonwms » 2017-11-30 21:42

I'm also trying on the days and I can not. I followed all the tutorials and nothing. I just got it on Ubuntu. In Debian I have also been doing compiling apache and php, including the oracle instant client in compiling php, without using pecl.
weltonwms
 
Posts: 8
Joined: 2017-11-30 21:32

Re: PHP 7.0 and oci8

Postby gperes » 2017-12-01 11:05

I have put the step by step on my website, the only problem is that I have posted in Brazilian Portuguese. But with automatic translator you can get. On next year I will put every article in english also. Please visit http://seg2u.com.br/ on "Tutoriais Linux", link.
gperes
 
Posts: 14
Joined: 2017-05-22 13:51

Re: PHP 7.0 and oci8

Postby weltonwms » 2017-12-01 15:18

Thanks to gperes in Edmund's Post, but it does not work. Did you get to test this on Debian 9 Stretch?
There are some errors in the post, but even I fixing does not work.
Example of error: 1) php7 does not work with oci8 2.0.10.
2) The package name php7.0-adodb does not exist, but there is a lib with a similar name.
3) LD_LIBRARY_PATH = "/ usr / lib / oracle / 12.2 / client64 / lib". Were not you using oracle 10? Was this edition of the environment variables?
4) Incorrect syntax in Apache configuration.
Even if I corrected those details I could not.
weltonwms
 
Posts: 8
Joined: 2017-11-30 21:32

Re: PHP 7.0 and oci8

Postby gperes » 2017-12-01 15:24

Yes, we did it in Debian 9, Oracle 10 we've used because of our applications. Try these steps in a fresh install of Debian 9. If doesn't work we can try see every step that you've made to see what could gone wrong.
gperes
 
Posts: 14
Joined: 2017-05-22 13:51

Re: PHP 7.0 and oci8

Postby gperes » 2017-12-01 15:25

I always use main, contrib and non-free repositories.
gperes
 
Posts: 14
Joined: 2017-05-22 13:51

Re: PHP 7.0 and oci8

Postby weltonwms » 2017-12-01 16:40

gperes wrote:Yes, we did it in Debian 9, Oracle 10 we've used because of our applications. Try these steps in a fresh install of Debian 9. If doesn't work we can try see every step that you've made to see what could gone wrong.

I am using debin9.2 stretch inside the virtualbox.
I am using source.list with main contrib non-free, as follows: https://wiki.debian.org/SourcesList.
I downloaded oci8 2.1.2 on the site: https://pecl.php.net/package/oci8.
I downloaded oracle instant client 10.2.0.5 at http://www.oracle.com/technetwork/topic ... 92277.html
I enabled the apache mod_header to perform the settings in the post.
I have already been able to install this on UBUNTU16. I can not do it on DEBIAN STRETH. I do not know Why, I make the settings and it does not work.
No error appears. But when I check in php file "<? Php phpinfo ()?> I do not see the OCI8 as enabled. I see several modules except the OCI8.
Can you help-me? I speak portuguese too. my email is weltonwms@gmail.com
weltonwms
 
Posts: 8
Joined: 2017-11-30 21:32

Re: PHP 7.0 and oci8

Postby gperes » 2017-12-01 16:44

Você colocou a linha de chamada do oci8 no arquivo do php.ini?
Did you put the line calling oci8 on php.ini file?
gperes
 
Posts: 14
Joined: 2017-05-22 13:51

Re: PHP 7.0 and oci8

Postby gperes » 2017-12-01 16:55

the installed on my server is:

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.1 (stretch)
Release: 9.1
Codename: stretch

But i don't think that would give any problem. Yesterday i have used the step by step with the latest debian also with vmware player.
gperes
 
Posts: 14
Joined: 2017-05-22 13:51

Re: PHP 7.0 and oci8

Postby gperes » 2017-12-01 16:57

/etc/php/7.0/apache2/conf.d# cat 20-oci8.ini
extension=/usr/lib/php/20151012/oci8.so

lrwxrwxrwx 1 root root 36 May 24 2017 20-oci8.ini -> /etc/php/7.0/mods-available/oci8.ini

OCI8 Support enabled
OCI8 DTrace Support disabled
OCI8 Version 2.1.4
Revision $Id: 03698b2e9b50593039b7ca292b2e3cf9eaf064b9 $
Oracle Run-time Client Library Version 10.2.0.5.0
Oracle Compile-time Instant Client Version 10.2
Directive Local Value Master Value
oci8.default_prefetch 100 100
oci8.events Off Off
oci8.max_persistent -1 -1
oci8.old_oci_close_semantics Off Off
oci8.persistent_timeout -1 -1
oci8.ping_interval 60 60
oci8.privileged_connect Off Off
oci8.statement_cache_size 20 20
Statistics
Active Persistent Connections 0
Active Connections 0



PHP Version 7.0.19-1

System Linux HOSTNAME 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64
Build Date May 11 2017 14:04:47
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php/7.0/apache2
Loaded Configuration File /etc/php/7.0/apache2/php.ini
Scan this dir for additional .ini files /etc/php/7.0/apache2/conf.d
Additional .ini files parsed /etc/php/7.0/apache2/conf.d/10-opcache.ini, /etc/php/7.0/apache2/conf.d/10-pdo.ini, /etc/php/7.0/apache2/conf.d/15-xml.ini, /etc/php/7.0/apache2/conf.d/20-calendar.ini, /etc/php/7.0/apache2/conf.d/20-ctype.ini, /etc/php/7.0/apache2/conf.d/20-dom.ini, /etc/php/7.0/apache2/conf.d/20-exif.ini, /etc/php/7.0/apache2/conf.d/20-fileinfo.ini, /etc/php/7.0/apache2/conf.d/20-ftp.ini, /etc/php/7.0/apache2/conf.d/20-gettext.ini, /etc/php/7.0/apache2/conf.d/20-iconv.ini, /etc/php/7.0/apache2/conf.d/20-json.ini, /etc/php/7.0/apache2/conf.d/20-mcrypt.ini, /etc/php/7.0/apache2/conf.d/20-oci8.ini, /etc/php/7.0/apache2/conf.d/20-phar.ini, /etc/php/7.0/apache2/conf.d/20-posix.ini, /etc/php/7.0/apache2/conf.d/20-readline.ini, /etc/php/7.0/apache2/conf.d/20-shmop.ini, /etc/php/7.0/apache2/conf.d/20-simplexml.ini, /etc/php/7.0/apache2/conf.d/20-sockets.ini, /etc/php/7.0/apache2/conf.d/20-sysvmsg.ini, /etc/php/7.0/apache2/conf.d/20-sysvsem.ini, /etc/php/7.0/apache2/conf.d/20-sysvshm.ini, /etc/php/7.0/apache2/conf.d/20-tokenizer.ini, /etc/php/7.0/apache2/conf.d/20-wddx.ini, /etc/php/7.0/apache2/conf.d/20-xmlreader.ini, /etc/php/7.0/apache2/conf.d/20-xmlrpc.ini, /etc/php/7.0/apache2/conf.d/20-xmlwriter.ini, /etc/php/7.0/apache2/conf.d/20-xsl.ini
PHP API 20151012
PHP Extension 20151012
Last edited by gperes on 2017-12-01 17:05, edited 1 time in total.
gperes
 
Posts: 14
Joined: 2017-05-22 13:51

Re: PHP 7.0 and oci8

Postby weltonwms » 2017-12-01 17:05

gperes wrote:Você colocou a linha de chamada do oci8 no arquivo do php.ini?
Did you put the line calling oci8 on php.ini file?


//final do arquivo /etc/php/7.0/apache2/php.ini
; End:
extension=/usr/lib/php/20151012/oci8.so


//criei esse arquivo também que não existia em /etc/php/7.0/apache2/conf.d/20-oci8.ini
extension=/usr/lib/php/20151012/oci8.so

Reinicio o apache e nada. Quando aciono : php -m, também não aparece o OCI
Restart Apache and nothing. When I call: php -m, the OCI does not appear either
Last edited by weltonwms on 2017-12-01 17:49, edited 1 time in total.
weltonwms
 
Posts: 8
Joined: 2017-11-30 21:32

Re: PHP 7.0 and oci8

Postby gperes » 2017-12-01 17:07

no php -m ele só aparece os pré-compilados, este que você compilou somente aparece no phpinfo.

Using php -m you will only see the precompiled packets. To see this extension use the phpinfo file.
Last edited by gperes on 2017-12-01 17:45, edited 1 time in total.
gperes
 
Posts: 14
Joined: 2017-05-22 13:51

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable