开启php的文件上传扩展,linux中如何通过php.ini添加扩展?

在编译安装的时候,我只通过了以下命令来安装,然后我想像windows中那样修改 php.ini 就开启了扩展

./configure \

--enable-fpm \

--with-fpm-user=www-data \

--with-fpm-group=www-data \

--enable-soap \

--enable-mysqlnd \

--with-mysqli=mysqlnd \

--with-pdo-mysql=mysqlnd

$ make && make install

拷贝下载的php-7.2.6文件中的扩展文件

cp -r /opt/downloads/php-7.2.6/ext /usr/local/lib/

然后去修改完 php.ini 文件,开启了以下扩展

extension_dir = "/usr/local/lib/etc"

extension=bz2

extension=curl

;extension=fileinfo

extension=gd2

extension=gettext

;extension=gmp

;extension=intl

;extension=imap

;extension=interbase

;extension=ldap

extension=mbstring

;extension=exif ; Must be after mbstring as it depends on it

extension=mysqli

;extension=oci8_12c ; Use with Oracle Database 12c Instant Client

extension=odbc

extension=openssl

extension=pdo_firebird

extension=pdo_mysql

extension=pdo_oci

extension=pdo_odbc;

extension=pdo_pgsql;

extension=pdo_sqlite

extension=pgsql

;extension=shmop

运行报错 php-fpm -t

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'bz2' (tried: /usr/local/lib/ext/bz2 (/usr/local/lib/ext/bz2: cannot read file data: Is a directory), /usr/local/lib/ext/bz2.so (/usr/local/lib/ext/bz2.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'bz2' (tried: /usr/local/lib/ext/bz2 (/usr/local/lib/ext/bz2: cannot read file data: Is a directory), /usr/local/lib/ext/bz2.so (/usr/local/lib/ext/bz2.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/local/lib/ext/curl (/usr/local/lib/ext/curl: cannot read file data: Is a directory), /usr/local/lib/ext/curl.so (/usr/local/lib/ext/curl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/local/lib/ext/curl (/usr/local/lib/ext/curl: cannot read file data: Is a directory), /usr/local/lib/ext/curl.so (/usr/local/lib/ext/curl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'gd2' (tried: /usr/local/lib/ext/gd2 (/usr/local/lib/ext/gd2: cannot open shared object file: No such file or directory), /usr/local/lib/ext/gd2.so (/usr/local/lib/ext/gd2.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'gd2' (tried: /usr/local/lib/ext/gd2 (/usr/local/lib/ext/gd2: cannot open shared object file: No such file or directory), /usr/local/lib/ext/gd2.so (/usr/local/lib/ext/gd2.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'gettext' (tried: /usr/local/lib/ext/gettext (/usr/local/lib/ext/gettext: cannot read file data: Is a directory), /usr/local/lib/ext/gettext.so (/usr/local/lib/ext/gettext.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'gettext' (tried: /usr/local/lib/ext/gettext (/usr/local/lib/ext/gettext: cannot read file data: Is a directory), /usr/local/lib/ext/gettext.so (/usr/local/lib/ext/gettext.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'mbstring' (tried: /usr/local/lib/ext/mbstring (/usr/local/lib/ext/mbstring: cannot read file data: Is a directory), /usr/local/lib/ext/mbstring.so (/usr/local/lib/ext/mbstring.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'mbstring' (tried: /usr/local/lib/ext/mbstring (/usr/local/lib/ext/mbstring: cannot read file data: Is a directory), /usr/local/lib/ext/mbstring.so (/usr/local/lib/ext/mbstring.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/local/lib/ext/mysqli (/usr/local/lib/ext/mysqli: cannot read file data: Is a directory), /usr/local/lib/ext/mysqli.so (/usr/local/lib/ext/mysqli.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/local/lib/ext/mysqli (/usr/local/lib/ext/mysqli: cannot read file data: Is a directory), /usr/local/lib/ext/mysqli.so (/usr/local/lib/ext/mysqli.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'odbc' (tried: /usr/local/lib/ext/odbc (/usr/local/lib/ext/odbc: cannot read file data: Is a directory), /usr/local/lib/ext/odbc.so (/usr/local/lib/ext/odbc.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'odbc' (tried: /usr/local/lib/ext/odbc (/usr/local/lib/ext/odbc: cannot read file data: Is a directory), /usr/local/lib/ext/odbc.so (/usr/local/lib/ext/odbc.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: /usr/local/lib/ext/openssl (/usr/local/lib/ext/openssl: cannot read file data: Is a directory), /usr/local/lib/ext/openssl.so (/usr/local/lib/ext/openssl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: /usr/local/lib/ext/openssl (/usr/local/lib/ext/openssl: cannot read file data: Is a directory), /usr/local/lib/ext/openssl.so (/usr/local/lib/ext/openssl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_firebird' (tried: /usr/local/lib/ext/pdo_firebird (/usr/local/lib/ext/pdo_firebird: cannot read file data: Is a directory), /usr/local/lib/ext/pdo_firebird.so (/usr/local/lib/ext/pdo_firebird.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'pdo_firebird' (tried: /usr/local/lib/ext/pdo_firebird (/usr/local/lib/ext/pdo_firebird: cannot read file data: Is a directory), /usr/local/lib/ext/pdo_firebird.so (/usr/local/lib/ext/pdo_firebird.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/local/lib/ext/pdo_mysql (/usr/local/lib/ext/pdo_mysql: cannot read file data: Is a directory), /usr/local/lib/ext/pdo_mysql.so (/usr/local/lib/ext/pdo_mysql.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/local/lib/ext/pdo_mysql (/usr/local/lib/ext/pdo_mysql: cannot read file data: Is a directory), /usr/local/lib/ext/pdo_mysql.so (/usr/local/lib/ext/pdo_mysql.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_oci' (tried: /usr/local/lib/ext/pdo_oci (/usr/local/lib/ext/pdo_oci: cannot read file data: Is a directory), /usr/local/lib/ext/pdo_oci.so (/usr/local/lib/ext/pdo_oci.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'pdo_oci' (tried: /usr/local/lib/ext/pdo_oci (/usr/local/lib/ext/pdo_oci: cannot read file data: Is a directory), /usr/local/lib/ext/pdo_oci.so (/usr/local/lib/ext/pdo_oci.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_odbc' (tried: /usr/local/lib/ext/pdo_odbc (/usr/local/lib/ext/pdo_odbc: cannot read file data: Is a directory), /usr/local/lib/ext/pdo_odbc.so (/usr/local/lib/ext/pdo_odbc.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'pdo_odbc' (tried: /usr/local/lib/ext/pdo_odbc (/usr/local/lib/ext/pdo_odbc: cannot read file data: Is a directory), /usr/local/lib/ext/pdo_odbc.so (/usr/local/lib/ext/pdo_odbc.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/local/lib/ext/pdo_pgsql (/usr/local/lib/ext/pdo_pgsql: cannot read file data: Is a directory), /usr/local/lib/ext/pdo_pgsql.so (/usr/local/lib/ext/pdo_pgsql.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/local/lib/ext/pdo_pgsql (/usr/local/lib/ext/pdo_pgsql: cannot read file data: Is a directory), /usr/local/lib/ext/pdo_pgsql.so (/usr/local/lib/ext/pdo_pgsql.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: /usr/local/lib/ext/pdo_sqlite (/usr/local/lib/ext/pdo_sqlite: cannot read file data: Is a directory), /usr/local/lib/ext/pdo_sqlite.so (/usr/local/lib/ext/pdo_sqlite.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: /usr/local/lib/ext/pdo_sqlite (/usr/local/lib/ext/pdo_sqlite: cannot read file data: Is a directory), /usr/local/lib/ext/pdo_sqlite.so (/usr/local/lib/ext/pdo_sqlite.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'pgsql' (tried: /usr/local/lib/ext/pgsql (/usr/local/lib/ext/pgsql: cannot read file data: Is a directory), /usr/local/lib/ext/pgsql.so (/usr/local/lib/ext/pgsql.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'pgsql' (tried: /usr/local/lib/ext/pgsql (/usr/local/lib/ext/pgsql: cannot read file data: Is a directory), /usr/local/lib/ext/pgsql.so (/usr/local/lib/ext/pgsql.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'soap' (tried: /usr/local/lib/ext/soap (/usr/local/lib/ext/soap: cannot read file data: Is a directory), /usr/local/lib/ext/soap.so (/usr/local/lib/ext/soap.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'soap' (tried: /usr/local/lib/ext/soap (/usr/local/lib/ext/soap: cannot read file data: Is a directory), /usr/local/lib/ext/soap.so (/usr/local/lib/ext/soap.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'sockets' (tried: /usr/local/lib/ext/sockets (/usr/local/lib/ext/sockets: cannot read file data: Is a directory), /usr/local/lib/ext/sockets.so (/usr/local/lib/ext/sockets.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'sockets' (tried: /usr/local/lib/ext/sockets (/usr/local/lib/ext/sockets: cannot read file data: Is a directory), /usr/local/lib/ext/sockets.so (/usr/local/lib/ext/sockets.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'sqlite3' (tried: /usr/local/lib/ext/sqlite3 (/usr/local/lib/ext/sqlite3: cannot read file data: Is a directory), /usr/local/lib/ext/sqlite3.so (/usr/local/lib/ext/sqlite3.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'sqlite3' (tried: /usr/local/lib/ext/sqlite3 (/usr/local/lib/ext/sqlite3: cannot read file data: Is a directory), /usr/local/lib/ext/sqlite3.so (/usr/local/lib/ext/sqlite3.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'xmlrpc' (tried: /usr/local/lib/ext/xmlrpc (/usr/local/lib/ext/xmlrpc: cannot read file data: Is a directory), /usr/local/lib/ext/xmlrpc.so (/usr/local/lib/ext/xmlrpc.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'xmlrpc' (tried: /usr/local/lib/ext/xmlrpc (/usr/local/lib/ext/xmlrpc: cannot read file data: Is a directory), /usr/local/lib/ext/xmlrpc.so (/usr/local/lib/ext/xmlrpc.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

[25-May-2018 08:24:59] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/303396.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

[C#.NET 拾遗补漏]16:几个常见的TAP异步操作

在本系列上一篇文章 [15:异步编程基础] 中,我们讲到,现代应用程序广泛使用的是基于任务的异步编程模式(TAP),历史的 EAP 和 AMP 模式已经过时不推荐使用。今天继续总结一下 TAP 的异步操作,比如…

荐书 | 10本书给你计算机大师思维

《黑客与画家》作者:保罗格雷厄姆 / 译者:阮一峰美国互联网界如日中天的教父、哈佛大学离经叛道的博士保罗格雷厄姆著作!一本书,你不曾想到的视角,彻底颠覆你对世界的认识!美国亚马逊、纽约时报超级畅销书&…

如何解决U盘无法停止通用卷设备

当我们使用完U盘,在电脑上安全删除时,电脑却提示:无法停止‘通用卷设备。这是什么问题呢?这时候不要硬拔哦,因为硬拔可能会损坏我们U盘的资料文件或者电脑的USB接口。正确的解决方法: 第一种: 往…

php按时间分组的sql语句,(SQL语句)按指定时间段分组统计

---------------------------------------Author : liangCK 梁爱兰--Comment: 小梁 爱 兰儿--Date : 2010-01-02 16:47:10---------------------------------------> 生成测试数据: #tbCREATETABLE#tb(列名1varchar(12),时间datetime)INSERTINTO#tbSELECT03174190188,2009…

NET问答: 说说你对 LookupTKey, TElement 的看法 ?

咨询区 dan-gph&#xff1a;MSND 上对 Lookup 做了如下的解释。Lookup<TKey, TElement> 类似于 Dictionary<TKey,TValue>, 不同点在于 Dictionary<TKey, TValue> 中的key对应的是单个value&#xff0c;而 Lookup<TKey, TElement> 中的 key 对应的是一个…

最多金的编程语言Top10:Python第3,R第10,你猜第1是谁?

导读&#xff1a;如果你还在纠结选哪门编程语言来开启你的码农生涯&#xff0c;这将是你的最佳指南。本文绝非标题党&#xff0c;而是基于大量数据和为期两周的深入探究&#xff0c;在18年初&#xff0c;对IT行业的现状、趋势以及预测进行客观观察&#xff0c;让大家对编程语言…

[转贴]制作windows 2003自动安装盘-集成补丁/Raid及硬件驱动

从事网游行业的工作人员&#xff0c;如果一款游戏上线&#xff0c;必须上大量服务器。用品牌机引导盘装系统&#xff0c;再打个补丁&#xff0c;速度真让人不敢恭维。为了提高效率&#xff0c;就尝试制作一张集成系统补丁/RAID及硬件驱动自动安windows 2003系统盘。下面以品牌机…

4月 .NET 线上 Meetup,快来报名

点击蓝字关注我们.NET 6 preview 2 在3月11日已经发布&#xff0c;.NET 6 将是 .NET Core 3.1 之后的第一个 LTS 版本&#xff0c;也是微软开启全平台统一一个 .NET 计划以来的第一个 LTS 版本&#xff0c;意义不可谓不大&#xff0c;那么 .NET 5/6 又会带来哪些新特性呢&#…

NP完全性理论与近似算法

一、图灵机根据有限状态控制器的当前状态及每个读写头读到的带符号&#xff0c;图灵机的一个计算步可实现下面3个操作之一或全部。改变有限状态控制器中的状态。清除当前读写头下的方格中原有带符号并写上新的带符号。独立地将任何一个或所有读写头&#xff0c;向左移动一个方格…

php文件上传实验总结,53 PHP文件处理(六)文件上传--总结---细说php

前台表单设计,表单view.html,提交给upload.php一.表单view.htmlphp配置文件和上传文件有关选项&#xff0c;注意几点:php.inifile_uploadsonupload_max_filesize2M 此值最大不超过服务器内存upload_tmp_dirc:/uploads 到时要拷贝出来post_max_size25M 要大于upload_max_fil…

CentOS 5.6 快速搭建LAMP

在虚拟机下安装了个CentOS&#xff0c;5.6版本的。利用NAT模式与宿主pc共享上网&#xff01; 当然可以采用编译源码的方式搭建lamp。这里只是介绍快速搭建php开发框架的方法。其实也没什么&#xff0c;主要是是是使用linux的yum来在线安装。如果上不了网请查找编译lamp的文…

阿里25k 百度25k,招WPF!

.NET5打通7大开发方向&#xff0c;CLR超高性能&#xff0c;.NET6支持Blazor嵌入WPF&#xff0c;还有MAUI跨平台UI解决方案&#xff0c;都是.NET的利好&#xff0c;也是WPF的利好。牛年跳槽季&#xff0c;.NET在客户端方向一骑绝尘&#xff0c;阿里影视、百度地图&#xff0c;以…

php转译html,使用php转义输出HTML到JavaScript

最近在做天地图是GIS集成要输出HTML到JavaScript里面涉及到代码转义什么的比较麻烦所以写个PHP的function分享一下&#xff1a;function jsformat($str){$str trim($str);$str str_replace(\\s\\s, \\s, $str);$str str_replace(chr(10), , $str);$str str_replace(chr(13)…

掌握神经网络模型的快捷方式

TensorFlow是Google基于DistBelief进行研发的第二代人工智能学习系统&#xff0c;其命名来源于本身的运行原理。Tensor&#xff08;张量&#xff09;意味着N维数组&#xff0c;Flow&#xff08;流&#xff09;意味着基于数据流图的计算&#xff0c;TensorFlow实际上就是张量从流…

Visual Entity 手册(十一)代码生成设置

NHibernate 代码生成设置&#xff08;仅选取比较难理解的选项&#xff09; 一、DataContext 设置选项 1、Auto-Implemented Properties 设为 True 时&#xff0c;生成自动属性&#xff0c;如下&#xff1a; public partial class Category{public virtual int CategoryID { get…

.Net项目模板(Project Template)

你有没有这样的感觉&#xff0c;开启一个新项目时&#xff0c;总是做一堆体力活——项目的结构层次&#xff0c;常用日志库&#xff0c;OpenAPI库&#xff0c;ORM库&#xff0c;的引入&#xff0c;权限认证方式选择添加&#xff0c;配置文件重新归置存放等等。公共框架的部分总…

php导出数据库的指定表数据,MYSQL教程mysql数据库导出指定表数据的方法

《MYSQL教程mysql数据库导出指定表数据的方法》要点&#xff1a;本文介绍了MYSQL教程mysql数据库导出指定表数据的方法&#xff0c;希望对您有用。如果有疑问&#xff0c;可以联系我们。导读&#xff1a;linux下导出mysql中指定表数据 &#xff1a;MYSQLdump -uroot -p databas…

谈通过测试与失败测试

在软件测试技术中&#xff0c;现有的测试方法、测试技术中均未提及到通过测试与失败测试。 而在实际项目测试过程中&#xff0c;很多项目组却再应用该方法。虽然该方法被采用&#xff0c;但是很多人对通过测试与失败测试理解并不透侧&#xff0c;在实际使用过程中并未按统一的标…

100个微信小程序的源码公开分享

现在微信小程序越来越火&#xff0c;小编一直有意识地收集微信小程序源码&#xff0c;至今已经拥有100个小程序的源码&#xff0c;有gank、LOL战绩查询、百度小说、豆瓣电影、手势解锁等。现在&#xff0c;小编准备将这些资料免费分享给大家&#xff01;gankLOL战绩查询百度小说…

NET问答:什么场景下应该选择 struct 而不是 class ?

咨询区 Esteban Araya&#xff1a;MSDN 上说当你需要一个轻量级对象时应该选择 struct&#xff0c;说的含含糊糊&#xff0c;真的不知道有哪些场景下优先选择 struct 而不是 class。可能有些人已经忘了。struct 可以有方法。struct 不能被继承。我非常明白 struct 和 class 在技…