Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPIniDir broken under windows 7?

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.

When I set PHPIniDir to a directory with a php.ini file, the Apache service does NOT start.

When I set PHPIniDir to a directory with NO php.ini file, the Apache service does start.

When I leave out PHPIniDir, the Apache service does not start.

Has anyone found a fix for this problem? Thanks!

EDIT :

PHPIniDir "C:\Windows" #works (no php.ini file)

PHPIniDir "C:\Program Files (x86)\php\" #does not work (contains php.ini file)

I enable at most one at any given time.

like image 904
giroy Avatar asked Dec 16 '09 05:12

giroy


2 Answers

delete last slash:

PHPIniDir "C:\Program Files (x86)\php"
like image 192
ar2r Avatar answered Oct 02 '22 12:10

ar2r


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.

like image 45
Murat Avatar answered Oct 02 '22 14:10

Murat