***XAMPP:报错 Unable to load dynamic library的解决方法

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
云数据库 RDS MySQL Serverless,价值2615元额度,1个月
简介: A PHP Error was encountered Severity: Core Warning Message: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/php_pdo_mysql.

 

A PHP Error was encountered

Severity: Core Warning

Message: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/php_pdo_mysql.dll' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/php_pdo_mysql.dll: cannot open shared object file: No such file or directory

Filename: Unknown

Line Number: 0

Backtrace:

情况是这样的:

我在linux上安装的是xampp套件,在etc目录下有一个php.ini

注意这个ini文件其实是在win平台上起作用的,如果里面的扩展,比如;extension=php_pdo_mysql.dll,当你把分号去掉之后,linux环境下是会报错的

但是在linux环境下,即使你不把分号去掉,这个扩展其实是已经打开的,也就是说上面的这种方式是只针对WIN平台有效的。下面是其他网友的解答

 

 我亲自试过,也纠结这个问题,不过后来发现,php.ini的 扩展设置似乎是针对win,linux下即便我不开启extension=php_curl.dll;extension=php_mysql.dll这个选项也一样使用功能。
linux下xampp如果开启了这些东西,php服务会出现问题,

 PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/php_mysql.dll' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/php_mysql.dll: invalid ELF header in Unknown on line 0


提示找不到你所开启的dll文件,实质上这些dll文件在win下xampp中是存在的。所以贸然推测linux完美集成不许要额外开启选项。

解决方法:

在linux目录下的etc目录将这些开启的XXX.dll加注释关闭掉

如何联系我:【万里虎】www.bravetiger.cn 【QQ】3396726884 (咨询问题100元起,帮助解决问题500元起) 【博客】http://www.cnblogs.com/kenshinobiy/
相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
12月前
[metasploit]msf启动:msf failed to load and returned this error 'cannot load such file -- bundler/setup'
[metasploit]msf启动:msf failed to load and returned this error 'cannot load such file -- bundler/setup'
codeblocks中出现#error This file requires compiler and library support for the错误时的解决方案
codeblocks中出现#error This file requires compiler and library support for the错误时的解决方案
466 0
codeblocks中出现#error This file requires compiler and library support for the错误时的解决方案
|
Java
编译OpenJDK:invalid configuration Files: machine Files not recognized
编译OpenJDK:invalid configuration Files: machine Files not recognized
84 0
错误解决:当前目录下有so,提示 error while loading shared libraries
错误解决:当前目录下有so,提示 error while loading shared libraries
76 0
如何解决:./real.exe: error while loading shared libraries: libhdf5hl_fortran.so.100: cannot open shared
如何解决:./real.exe: error while loading shared libraries: libhdf5hl_fortran.so.100: cannot open shared
如何解决:./real.exe: error while loading shared libraries: libhdf5hl_fortran.so.100: cannot open shared
|
Linux
Linux操作系统下proj4库编译与安装及ERROR 6: Unable to load PROJ.4 library (libproj.so)问题解决
Linux操作系统下proj4库编译与安装及ERROR 6: Unable to load PROJ.4 library (libproj.so)问题解决
734 0
(Anaconda)ImportError: DLL load failed while importing win32file: 找不到指定的模块。
(Anaconda)ImportError: DLL load failed while importing win32file: 找不到指定的模块。
(Anaconda)ImportError: DLL load failed while importing win32file: 找不到指定的模块。
|
数据可视化 异构计算
TensorBoard报错:Could not load dynamic library ‘cudart64_110.dll‘; dlerror: cudart64_110.dll not found
TensorBoard报错:Could not load dynamic library ‘cudart64_110.dll‘; dlerror: cudart64_110.dll not found
738 0
TensorBoard报错:Could not load dynamic library ‘cudart64_110.dll‘; dlerror: cudart64_110.dll not found