# VS2K5 & PHP. [Solved]

This topic is 5164 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Does anyone know of a decent way to get PHP working with VS2k5? There is a registry tweak you can perform for 2k2/2k3 that causes VS to treat it like it's a c/C++ source, but I can't seem to find an equivilent tweak for Whidbey. And, yes, I know i could just use a seperate text editor. But I don't want to. Thanks. Edit: I figured it out: HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\8.0\Languages\File Extensions. Add a key for the file extension in question, and then just duplicate the GUID of the file type you'd like to be used. It's possible to create a complete extension for any language this way, at least with regards to syntax highlighting, but I just used the one for C++. Worked like a charm. [Edited by - Etnu on October 23, 2004 7:09:08 PM]

##### Share on other sites
I've tried this many times without any luck.

Don't persue it.

##### Share on other sites
Well, I don't have VS2K5, but have you tried placing the following key in your registry?
--------------------
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Languages\File Extensions\.php]
@="{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}"
---------------------
The reason I recommend that specific key is that for VS2K3 the key was:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\Languages\File Extensions\.php]
@="{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}"
----
and for VS2K2 the key was:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0\Languages\File Extensions\.php]
@="{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}"
------------------------------
You'll notice the keys for 02 and 03 are both the same with the exception of the \7.1\ instead of \7.0\, so I was thinking that you might just need the \8.0\. Of course, if you've tried this then I guess I'm wrong.

The place I found this information from also had a link to a 'usertype.dat' file that included keywords for PHP, which one had to place in to your Visual Studio IDE directory (Default install should be C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE).
This was the contents of the 'usertype.dat' file
(placed in source blocks to take up less space)
include require include_once require_once define empty null array foreach in as eval unsetboolean break case class default do echo else elseif exit for function if php php3 phpinfo print return switch while var global true false newabstractinterfacestaticinstanceofimplementsextendsprivatepublicprotected

----------------------------------------------------------
I was just wondering, is this the same way that other people have enabled PHP syntax highlighting in VS.NET. I was just wondering of there was a different way to do it.

##### Share on other sites
Yes, that's the proper registry tweak, the problem is that they seem to have made significant changes to the registry layout. I've been poking around in there for a few hours trying to figure it out. Ah well.

##### Share on other sites
Etnu you changed the title of the thread to [Solved], so I am guessing you got it working?

What did you do?

1. 1
2. 2
3. 3
4. 4
Rutin
13
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633701
• Total Posts
3013435
×

## Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!