apache+php 遇到php5ts.dll错误
这两天安装apache+php时遇到php5ts.dll错误问题。经过几天折腾,终于找到原因。
一、平台
操作系统:windows 2003;
Apache:2.2.17.0,使用httpd-2.2.17-win32-x86-openssl-0.9.8o.msi安装包;
PHP:5.3.5.0,采用apache模块方式,使用php-5.3.5-Win32-VC6-x86.msi安装包。
二、安装过程
将apache安装在D盘,安装后httpd.exe成功启动。安装php,选择apache模块方式,安装在D盘完成。PHP安装后,打开apache的httpd.conf文件,在文件尾部修正配置为:
PHPIniDir "d:/program files/php/"
LoadModule php5_module "d:/program files/php/php5apache2_2.dll"
三、错误
启动httpd时,出现错误。查看日志。apache的error.log中记录为:
[warn] pid file D:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
Windows的事件查看器/应用程序中显示为:
Application Error中事件详细信息:错误应用程序httpd.exe,版本2.2.17.0,错误模块php5ts.dll,版本t5.3.5.0,错误地址0x000e890c。
上网查了一翻,涉及php5ts.dll错误的处理,一类是因为PHP只能使用自身版本的dll,如果出现因为系统路径变量的原因,导致其他版本的dll先行引用,则出现错误。针对此类错误,或是删除其他版本dll;或修改系统PATH变量,将PHP的放在前面;或将PHP的dll放到系统的System32目录下。不过,我的路径没有问题,PATH变量中PHP的安装目录还在System32前,也没有其他版本的php5ts.dll。前前后后试了多个安装版本,都无法解决问题。
四、最后解决
最后再次查看php.ini文件,发现一个配置:
error_log="C:\Windows\Temp\php-errors.log"。
于是打开C:\Windows\Temp\php-errors.log:
[14-Mar-2011 10:22:15] PHP Warning: PHP Startup: Unable to load dynamic library 'D:\Program Files\PHP\ext\php_oci8.dll' - 找不到指定的模块。
in Unknown on line 0
[14-Mar-2011 10:22:15] PHP Warning: PHP Startup: Unable to load dynamic library 'D:\Program Files\PHP\ext\php_oci8_11g.dll' - 找不到指定的模块。
in Unknown on line 0
[14-Mar-2011 10:22:15] PHP Warning: PHP Startup: Unable to load dynamic library 'D:\Program Files\PHP\ext\php_pdo_oci.dll' - 找不到指定的模块。
in Unknown on line 0
[14-Mar-2011 10:22:15] PHP Warning: PHP Startup: Unable to load dynamic library 'D:\Program Files\PHP\ext\php_sybase_ct.dll' - 找不到指定的模块。
in Unknown on line 0
接下来,再次回到php.ini中,将上面4个模块注释掉:
[PHP_OCI8]
;extension=php_oci8.dll
[PHP_OCI8_11G]
;extension=php_oci8_11g.dll
[PHP_PDO_OCI]
;extension=php_pdo_oci.dll
[PHP_SYBASE_CT]
;extension=php_sybase_ct.dll
重新启动apache,成功。
五、小结
我安装PHP时,选择了完全安装。估计是完全安装也没有安装相关的dll模块,而php.ini中又引用这几个模块,从而导致httpd.exe启动时,引用php出错,而出错信息显示成php5ts.dll。因此,建议遇到php5ts.dll错误时,不妨查看一下php的error_log。

Long URLs, often cluttered with keywords and tracking parameters, can deter visitors. A URL shortening script offers a solution, creating concise links ideal for social media and other platforms. These scripts are valuable for individual websites a

Following its high-profile acquisition by Facebook in 2012, Instagram adopted two sets of APIs for third-party use. These are the Instagram Graph API and the Instagram Basic Display API.As a developer building an app that requires information from a

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

This is the second and final part of the series on building a React application with a Laravel back-end. In the first part of the series, we created a RESTful API using Laravel for a basic product-listing application. In this tutorial, we will be dev

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

The 2025 PHP Landscape Survey investigates current PHP development trends. It explores framework usage, deployment methods, and challenges, aiming to provide insights for developers and businesses. The survey anticipates growth in modern PHP versio


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Chinese version
Chinese version, very easy to use

Notepad++7.3.1
Easy-to-use and free code editor

Dreamweaver Mac version
Visual web development tools
