警告:PHP启动:无法加载动态库

时间:2015-06-04 03:23:43

标签: php

我目前正在1und1.de上主持。我的代码在localhost上工作,但在共享主机服务器上传后,我遇到了以下错误:

Warning: Unknown: open(C:\xampp\tmp/sess_bnt91ftgq6s4obn2684fud47p5, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\xampp\tmp) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_bz2.dll' - C:\xampp\php\ext/php_bz2.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_curl.dll' - C:\xampp\php\ext/php_curl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_mbstring.dll' - C:\xampp\php\ext/php_mbstring.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_exif.dll' - C:\xampp\php\ext/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_gd2.dll' - C:\xampp\php\ext/php_gd2.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_gettext.dll' - C:\xampp\php\ext/php_gettext.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_mysql.dll' - C:\xampp\php\ext/php_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_mysqli.dll' - C:\xampp\php\ext/php_mysqli.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_openssl.dll' - C:\xampp\php\ext/php_openssl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_pdo_mysql.dll' - C:\xampp\php\ext/php_pdo_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_pdo_sqlite.dll' - C:\xampp\php\ext/php_pdo_sqlite.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_soap.dll' - C:\xampp\php\ext/php_soap.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_sockets.dll' - C:\xampp\php\ext/php_sockets.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_sqlite3.dll' - C:\xampp\php\ext/php_sqlite3.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_xmlrpc.dll' - C:\xampp\php\ext/php_xmlrpc.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_xsl.dll' - C:\xampp\php\ext/php_xsl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: Cannot open 'C:\xampp\php\extras\browscap.ini' for reading in Unknown on line 0

这些错误意味着什么。这些错误是否与我的托管服务提供商有关?

3 个答案:

答案 0 :(得分:5)

您好像可能已将php.ini配置文件直接从系统复制到托管服务器。不要这样做。配置文件中的数据特定于XAMPP安装;这不适合Web服务器,并且导致这些错误,因为服务器上不存在配置中引用的文件。

答案 1 :(得分:1)

我在本地遇到此错误消息:

<块引用>

警告:无法打开“\xampp\php\extras\browscap.ini”进行读入 第 0 行未知

通过更改 php.ini 文件的这一行:

browscap="\xampp\php\extras\browscap.ini"

为此:

browscap="C:\xampp\php\extras\browscap.ini"

错误消失了。

答案 2 :(得分:0)

有时这里的人不是他们可能的......

无论出于何种原因,您的php.ini配置错误。

需要注意的是,所有这些丢失的文件实际上都是Linux上的Windows文件(* .dll),这些文件可能是* .so文件。我假设您在Linux服务器上托管。

首先找到你的php.ini文件。如果您通过SSH访问命令行,则可以尝试运行:

php --ini

如果不是你做一个简单的脚本,就像这样称它为test.php:

<?php
phpinfo();
?>

上传文件并运行它,例如:

http://www.yoursite.com/test.php

提供的信息包括php.ini的路径

一旦找到它,一个选项就是编辑它并注释掉所有这些扩展名,方法是输入一个&#34 ;;&#34;在线前。

另一种选择是检查* .so文件是否存在。在/ usr / lib / php下查找它们。如果它们存在,请编辑您的php.ini文件,使所有这些扩展名以.so而不是.dll

结尾

最后,如果它们不存在,您可以使用apt-get或yum安装它们。一个例子:

sudo apt-get install php-mbstring