惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News | PayPal Newsroom
U
Unit 42
MongoDB | Blog
MongoDB | Blog
IT之家
IT之家
A
About on SuperTechFans
Blog — PlanetScale
Blog — PlanetScale
P
Privacy & Cybersecurity Law Blog
V
V2EX
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Know Your Adversary
Know Your Adversary
L
LINUX DO - 热门话题
GbyAI
GbyAI
T
Threat Research - Cisco Blogs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Palo Alto Networks Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
腾讯CDC
WordPress大学
WordPress大学
K
Kaspersky official blog
The GitHub Blog
The GitHub Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
D
DataBreaches.Net
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
M
MIT News - Artificial intelligence
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
Check Point Blog
阮一峰的网络日志
阮一峰的网络日志
TaoSecurity Blog
TaoSecurity Blog
Latest news
Latest news
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
News and Events Feed by Topic
NISL@THU
NISL@THU
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
PCI Perspectives
PCI Perspectives
T
Threatpost
C
CXSECURITY Database RSS Feed - CXSecurity.com
Scott Helme
Scott Helme
P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
大猫的无限游戏
大猫的无限游戏
Help Net Security
Help Net Security
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
W
WeLiveSecurity
小众软件
小众软件
S
Secure Thoughts
T
The Exploit Database - CXSecurity.com
F
Full Disclosure

博客园 - 尘梦

calude code 2.188 根据cli.map还原 centos6 安装gcc 多版本 自定义编译bulma 神通mysql模式转 mysql ai数学书籍 chromedriver 网络安全渗透测试写法 编译php需要的扩展 python 合并同列数据 组合 新的excel vue table 表格记录选中 linux wktohtmlpdf 结合/tmp路径 无法创建问题 c语言开发 php扩展 sm4 layui table tr a标签倒计时 操作 刷新以后继续倒计时 使用c# 开发 php的com组件 世界级地图数据处理 及 联动效果 php 结合pcntl_fork导出excel数据 使用 python 部署chatglm2b macos 下连接php 人大金仓pdo_kdb问题 php curl 多次发送
macos php 如何链接神通数据库aci
尘梦 · 2024-05-29 · via 博客园 - 尘梦

环境:macos
php版本:7.4
利用:docker

我得先喷一下 刚开始装的x86 官网上下载的居然没有pdo扩展

最后在网上找到了arm64的扩展 简直了...

1。编写dockerfile

FROM bai615/arm64-php:7.4.33-fpm

RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list && \
    sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
   

WORKDIR /home/www-root

EXPOSE 9000


docker build -t macphp

2.启动镜像

docker run -d --name php-fpm -v /本地目录:/home/www-root -p 9007:9000 macphp-1


3、修改本地nginx为docker的目录

需要设置
root /home/www-root/admin;

php配置为
location ~ [^/]\.php(/|$) 
    {
	    fastcgi_pass   127.0.0.1:9007;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include      fastcgi_params;  #按照自己本地设置
	    include   paths.conf;      	 #按照自己本地设置
    }


4。安装神通数据库的链接库 和aci pdo

复制 libaci.so 和 pdo_aci_nts.so 分别到docker的
/usr/local/lib/php/extensions/no-debug-non-zts-20190902

然后ldd 查看一下依赖库 libaci.so
没有什么就安装什么 一般这个是全的
如:
   linux-vdso.so.1 (0x00007ffd41fdf000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2ad3e48000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f2ad3c7b000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2ad3c75000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2ad3c5b000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2ad3a86000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f2ad42b6000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2ad3942000)

把/usr/local/lib/php/extensions/no-debug-non-zts-20190902添加到ld.so.conf里面
如下
/usr/local/lib/php/extensions/no-debug-non-zts-20190902/acis
/usr/local/lib64
/usr/local/lib
/usr/lib
/usr/lib64

至此扩展安装成功

然后进入docker的
/usr/local/etc/php/conf.d
新建一个docker-php-ext-pdo_aci_nts.ini
内容为extension=pdo_aci_nts.so