Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have WAMP (Apache/MySQL/PHP) installed on Windows 7. PHP 5.3 is included. I tried "test.php -> right-click -> open with -> browse -> PHP.exe" but PHP.exe does not get added to the "Open With" list. However, it does work if I use "path\to\php\PHP.exe -f "path\file.php".

What should I do?

share|improve this question
    
Not a programming question, but windows-specific. –  zerkms Oct 18 '11 at 3:00
1  
So what exactly is the question? "How can I add php.exe to the Open With list"? –  rid Oct 18 '11 at 3:04
    
add comment

migrated from stackoverflow.com Oct 18 '11 at 3:06

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 2 down vote accepted

Put PHP in your path, for one.

  1. Right click on "Computer" and select Properties
  2. Select the "Advanced" tab
  3. Click on the "Environment Variables" button
  4. Select Path and click "Edit"
  5. Add this to the path, making sure to add semicolons as separators:

    C:\path\to\php

You should also edit your apache httpd.conf file, to add support for .php files:

# 
LoadModule php5_module "c:/php/php5apache2.dll"
AddHandler application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"

More info can be found here: http://php.net/manual/en/install.windows.apache2.php

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.