我想mysqli extension在安装了 PHP 5 的 Centos 服务器上启用。在网上搜索后,看到很多人在讨论取消注释中的mysqli相关行,但php.ini在我的php.ini文件中找不到与mysqli相关的任何内容。
以下内容不返回任何内容: php -m | grep mysqli
我怎样才能解决这个问题?
我正在尝试更新我的 apache2(Apache/2.4.29 (Debian 8))服务器以支持,http2
但在使用以下代码启用 http2 后,由于mpm_prefork不支持而无法正常工作http2
<IfModule http2_module>
ProtocolsHonorOrder On
Protocols h2 h2c http/1.1
</IfModule>
Run Code Online (Sandbox Code Playgroud)
由于mpm_preforkapache (2.4.29) 不适用于http2,我尝试使用 mpm_event/mpm_worker
但它不起作用,所以我启用mpm_prefork
sudo a2dismod mpm_event
sudo a2dismod mpm_worker
sudo a2enmod mpm_prefork
Run Code Online (Sandbox Code Playgroud)
由于我仍在运行,php5
我应该怎么做才能在 Debian8 上获得 http2 支持?我是否必须将 php5 更新为 php7?是否有任何解决方法可以将 mpm_worker/mpm_event 与具有 http2 支持的 php5 一起使用?
阿帕奇错误日志
[http2:warn] [pid 11992] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用以下说明在 Windows 7 Home Premium 上安装 PHP:
使用 FastCGI 在 IIS 7 上托管 PHP 应用程序
在页面向下的 1/3 处,我必须这样做:
Server Manager -> Roles -> Add Role Services
Run Code Online (Sandbox Code Playgroud)
只是找不到角色或角色服务。有任何想法吗?
PHP 给了我一个 500 错误,我想知道是不是因为我没有做过这个角色服务。
我正在尝试使用 sqlite 在我的 Fedora 服务器上运行 php。在 phpinfo 中可以看到 ./configure 设置了选项 --without-sqlite3。从我阅读的内容来看,这些意味着我可能必须使用 sqlite 重新编译或重新安装 php。我想知道如何使用 sqlite 安装或配置 php。(可能是 yum 命令?)谢谢
我正在尝试安装 Google Data PHP 库,但安装检查器告诉我未安装 DOM。经过一番谷歌搜索后,似乎我需要安装 php-xml,但已经安装了。然后我决定重新安装 php-xml,但是在卸载它之后,它似乎已经从标准仓库中完全消失了。
我的 PHP 显然配置了以下内容
'./configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/usr/share/file/magic.mime' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' …Run Code Online (Sandbox Code Playgroud) 我在配置服务器和其他东西方面的经验很少,所以我完全迷失了。
我试图在 nginx 安装中添加 php 支持,但是当把它放在 nginx.conf 中时。
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
Run Code Online (Sandbox Code Playgroud)
并且我尝试重新启动,出现此错误消息
[emerg]: unknown directive "fastcgi_pass" in /opt/nginx/conf/nginx.conf:67
Run Code Online (Sandbox Code Playgroud)
有什么线索吗?
提前致谢
PD:
nginx -V 输出nginx版本:nginx/0.7.67 build by gcc 4.1.2 20080704 (Red Hat 4.1.2-48) --prefix=/opt/nginx --without-http_fastcgi_module --without-http_memcached_module --without- mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_flv_module --add-module=../nginx_mod_h264_streaming-2.2.7 --without-http-cache
我在 php 下有一个名为 test.php 的 php 文件,设置为每小时每 5 分钟运行一次。当我手动运行文件时(通过转到 Web 浏览器并运行路径),它工作正常。但是当 cron 作业尝试运行它时,我收到错误消息
我的 cron 工作是
#### Delete Records
5 * * * * /var/www/html/phpsysinfo/cronUpdateLeadBucketOnEnergycAlliance.php
Run Code Online (Sandbox Code Playgroud)
我的 phpfile 是(路径:/var/www/html/phpsysinfo/phpfile)
<?php
require("dbconnect.php");
$sql = mysql_query("DELETE FROM list where status <> 'LEAD'") or die(mysql_error());
?>
Run Code Online (Sandbox Code Playgroud)
我得到的错误是:
/var/www/html/phpsysinfo/phpFile.php: line 1: ?php: No such file or directory
/var/www/html/phpsysinfo/phpFile.php: line 2: syntax error near unexpected token `"dbconnect.php"'
/var/www/html/phpsysinfo/phpFile.php: line 2: `require("dbconnect.php");
Run Code Online (Sandbox Code Playgroud)
谢谢
我正在编译 PHP 5.3.6,我用作参考的 compile configure 命令使用 --with-layout=GNU 选项。我做了一些研究,但似乎找不到详细的答案。有人可以向我详细解释这个选项以及为什么要使用它吗?谢谢!
在负载下,我的 PHP5-fpm(在 32 位 ubuntu 10.10 上)会产生如下所示的段错误:
kernel: [4881937.884863] php5-fpm[2638]: segfault at 4204eb41 ip 0832d235 sp bfcea5e0 error 4 in php5-fpm[8048000+70d000]
Run Code Online (Sandbox Code Playgroud)
如何使这些段错误产生核心转储,以便我可以检查调用堆栈以找出段错误的来源?
核心转储一旦产生会去哪里?
在 CentOS 5 上通过 安装 APC 后pecl install apc,从 CLI 调用 PHP 时 APC 不会加载(从 apache 调用时,它加载没有任何问题)。
我得到的错误是:
root@server [~]# php
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/apc.so' - /usr/lib64/php/modules/apc.so: undefined symbol: pcre_exec in Unknown on line 0
Run Code Online (Sandbox Code Playgroud)
我在网上搜索了解决方案,发现很多人都遇到过这个问题。但是,我无法找到适合我的解决方案。