installation on Windows 7 fails

Forum for you who has PHP installation issues

Moderators: macek, egami, gesf

hyess
New php-forum User
New php-forum User
Posts: 1
Joined: Sat May 18, 2013 8:10 am

installation on Windows 7 fails

Postby hyess » Sun May 19, 2013 10:05 am

Hello everybody!!

Could you please help me? I'm trying to run php on IIS in Windows 7 and when I try to install it following every step closely from php.net, it gives me an error:

HTTP Error 500.0 - Internal Server Error
An unknown FastCGI error occurred
Module: FastCgiModule
Notification: ExecuteRequestHandler
Handler: PHP_via_FastCGI
Error Code: 0x8007010b
Requested URL: http://localhost:80/index.php
Physical Path: C:\inetpub\wwwroot\index.php
Logon Method: Anonymous
Logon User: Anonymous

I have no clue what I did wrong or what is wrong. Here's how I tried to install it:

enabled IIS and CGI

control panel > programs > Turn Windows features on or off > enabled Internet Information Service > World Wide Web Services > Application Development Features > enabled CGI (all other checkmarks in the Application Development Features are OFF)


http://localhost/ works with HTML now

downloaded and installed Microsoft 2008 C++ Runtime (x64) and did a Windows Update, updating it

downloaded PHP 5.4.15 VC9 x86 Non Thread Safe. unzipped it onto desktop to folder "php"

inside the folder "php", renamed the file "php.ini-production" into "php.ini"

edited the php.ini file:

changed this
; extension_dir = "ext"
to this
extension_dir = "ext"

changed this
;extension=php_fileinfo.dll
to this
extension=php_fileinfo.dll

also enabled these
extension=php_gd2.dll
extension=php_imap.dll
extension=php_mysql.dll
extension=php_mysqli.dll

left this line untouched
log_errors = On

changed this
;error_log = php_errors.log
to this
error_log = php_errors.log
and created a file "php_errors.log" in the "php" folder

changed this
;cgi.force_redirect = 1
to this
cgi.force_redirect = 0

changed this
;cgi.fix_pathinfo=1
to this
cgi.fix_pathinfo=1

changed this
;fastcgi.impersonate = 1
to this
fastcgi.impersonate = 1

changed this
;fastcgi.logging = 0
to this
fastcgi.logging = 0


followed these instructions:
1. In the Windows Start Menu choose "Run:", type "inetmgr" and click "Ok";
2. In the IIS Manager user interface select the server node in the "Connections" tree view;
3. In the "Features View" page open the "Handler Mappings" feature;
4. In the "Actions" pane click "Add Module Mapping...";
5. In the "Add Module Mapping" dialog enter the following:
Request path: *.php
Module: FastCgiModule
Executable: C:\Users\Yanka\Desktop\php\php-cgi.exe
Name: PHP_via_FastCGI
6. Click "Request Restrictions" button and then configure the mapping to invoke handler only if request is mapped to a file or a folder;
7. Click OK on all the dialogs to save the configuration.

in command line application, entered these 3 lines, pressing the "Enter" key after each line:
%windir%\system32\inetsrv\appcmd.exe set config ^
-section:system.webServer/defaultDocument /+"files.[value='index.php']" ^
/commit:apphost

after entering these lines, the command line application said something, beginning with "Applied configuration changes..."


Thank you!!

johnj
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: installation on Windows 7 fails

Postby johnj » Wed May 22, 2013 10:07 pm

Why don't you use apache instead of IIS?


Return to “PHP Installation”

Who is online

Users browsing this forum: No registered users and 1 guest