PHPIniDir在Windows 7下损坏了? [英] PHPIniDir broken under windows 7?
问题描述
我有一台运行Windows XP的服务器,该服务器使用带有PHP和MySQL的Apache2.我最近升级到了Windows 7,一直无法正常工作. Apache可以正常工作,PHP可以工作,但是我似乎无法使其与php.ini
文件一起工作.
I had a server running on a Windows XP machine using Apache2 with PHP and MySQL. I've recently upgraded to Windows 7 and have been having trouble getting it to work. Apache works fine and PHP works, but I can't seem to get it to work with a php.ini
file.
当我将PHPIniDir
设置为包含php.ini
文件的目录时,Apache服务无法启动.
When I set PHPIniDir
to a directory with a php.ini
file, the Apache service does NOT start.
当我将PHPIniDir
设置为没有php.ini
文件的目录时,Apache服务便会启动.
When I set PHPIniDir
to a directory with NO php.ini
file, the Apache service does start.
当我遗漏PHPIniDir
时,Apache服务无法启动.
When I leave out PHPIniDir
, the Apache service does not start.
有人找到解决此问题的方法吗?谢谢!
Has anyone found a fix for this problem? Thanks!
PHPIniDir "C:\Windows"
#works(无php.ini
文件)
PHPIniDir "C:\Windows"
#works (no php.ini
file)
PHPIniDir "C:\Program Files (x86)\php\"
#不起作用(包含php.ini
文件)
PHPIniDir "C:\Program Files (x86)\php\"
#does not work (contains php.ini
file)
在任何给定时间,我最多只能启用一个.
I enable at most one at any given time.
推荐答案
我遇到了同样的问题.我修好了它.使用记事本或任何文本编辑器打开php.ini文件.禁用php.ini文件中的所有扩展名.用一个注释注释扩展,并找出导致问题的扩展.
I had the same problem. I fixed it. Open php.ini file with a notepad or any text editor. Disable all of the extension in php.ini file. Comment extensions by one by, and find out which extension causes the problem.
这篇关于PHPIniDir在Windows 7下损坏了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!