Libraries have been installed in: /root/oci8-3.3.0/modules
If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the '-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the 'LD_RUN_PATH' environment variable during linking - use the '-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- Installing shared extensions: /usr/lib/php/20220829/
编辑 php.ini,在 【Dynamic Extensions 】后添加如下内容:
1
extension=oci8.so
1 2
vi /etc/php/8.2/cli/php.ini vi /etc/php/8.2/fpm/php.ini
在 cli 模式下用的好好的,但是部署到服务器后,出现错误 Undefined constant "Yajra\Pdo\OCI_DEFAULT" found ,最后解决方法:
1 2 3
sudo sh -c "echo /opt/oracle/instantclient_21_11 > \ /etc/ld.so.conf.d/oracle-instantclient.conf" sudo ldconfig
<Directory "D:/wamp64/www/test/public/"> Options +Indexes +FollowSymLinks AllowOverride all <IfDefine APACHE24> Require local </IfDefine> <IfDefine !APACHE24> Order Deny,Allow Deny from all Allow from localhost ::1 127.0.0.1 </IfDefine> </Directory>
Setup is unable to find the "ifconfig" program on your machine. Please make sure it is installed. Do you want to specify the location of this program by hand? [yes]
输入 yes ,按 Enter 键确认,或直接 按 Enter 键,则会有如下提示:
1
What is the location of the "ifconfig" program on your machine?
按 Enter 键,会有如下提示:
1
The answer "" is invalid. It must be the complete name of a binary file.