Solved .php extension just won't appear in the 'New' context menu

denno

New member
Local time
11:41 AM
Messages
8
I have been playing with the registry, customising my 'New' content menu that appears when I right click in windows explorer. I added the .php file extension to this list, which worked when I first did it a little while ago. I have recently noticed that it is no longer in this list, and no matter how many times I delete the entry and re-add it to the registry, it just won't appear in menu.

This is the current registry entry for .php:
Code:
[HKEY_CLASSES_ROOT\.php]

[HKEY_CLASSES_ROOT\.php\ShellNew]
"NullFile"=""
And I've also got this for phpfile:
Code:
[HKEY_CLASSES_ROOT\phpfile]
@="PHP Script"

[HKEY_CLASSES_ROOT\phpfile\Shell]

[HKEY_CLASSES_ROOT\phpfile\Shell\Edit with Adobe Dreamweaver CS5]
"LegacyDisable"=""

[HKEY_CLASSES_ROOT\phpfile\Shell\Edit with Adobe Dreamweaver CS5\Command]
@="\"C:\\Program Files (x86)\\Adobe\\Adobe Dreamweaver CS5\\Dreamweaver.exe\",\"%1\""

[HKEY_CLASSES_ROOT\phpfile\ShellNew]
"NullFile"=""

Is anyone able to spot what I've done to make the option not appear in the New context menu like it once was?

Any help will be greatly appreciated.
Denno
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64bitCore i54gb DDR3
Computer Manufacturer/Model Number
Toshiba Satellite A600
OS
Windows 7 Home Premium 64bit
CPU
Core i5
Memory
4gb DDR3
Monitor(s) Displays
Samsung SyncMaster BX2450

My Computer My Computer

At a glance

Windows 8.1 Pro x64Intel Core i3 (3.0 GHZ)4 GB GDDR3Sapphire ATI Radeon 7790 HD 1 GB GDDR5
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 8.1 Pro x64
CPU
Intel Core i3 (3.0 GHZ)
Motherboard
Asus P7H55-M LX
Memory
4 GB GDDR3
Graphics Card(s)
Sapphire ATI Radeon 7790 HD 1 GB GDDR5
Sound Card
Builtin AMD Hight Defination Audio Controller
Monitor(s) Displays
ASUS MS228H 21.5" Wide LED Monitor
Screen Resolution
1920x1080
Hard Drives
1 TB SATA Seagate
PSU
500W
Case
Orange
Cooling
None
Keyboard
A4TECH
Mouse
Who Cares?
Internet Speed
1 MB Shared Wateen Wireless
Antivirus
Kaspersky Internet Security
Browser
Mozilla Firefox
Thankyou for the reply, but if you look at my original post, you will see that I have already done what you are linking to.
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64bitCore i54gb DDR3
Computer Manufacturer/Model Number
Toshiba Satellite A600
OS
Windows 7 Home Premium 64bit
CPU
Core i5
Memory
4gb DDR3
Monitor(s) Displays
Samsung SyncMaster BX2450
man I just tried here on win7 ultimate x64 many times and it works just fine, did you take the ownership of that key ?
 

My Computer My Computer

At a glance

Windows 8.1 Pro x64Intel Core i3 (3.0 GHZ)4 GB GDDR3Sapphire ATI Radeon 7790 HD 1 GB GDDR5
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 8.1 Pro x64
CPU
Intel Core i3 (3.0 GHZ)
Motherboard
Asus P7H55-M LX
Memory
4 GB GDDR3
Graphics Card(s)
Sapphire ATI Radeon 7790 HD 1 GB GDDR5
Sound Card
Builtin AMD Hight Defination Audio Controller
Monitor(s) Displays
ASUS MS228H 21.5" Wide LED Monitor
Screen Resolution
1920x1080
Hard Drives
1 TB SATA Seagate
PSU
500W
Case
Orange
Cooling
None
Keyboard
A4TECH
Mouse
Who Cares?
Internet Speed
1 MB Shared Wateen Wireless
Antivirus
Kaspersky Internet Security
Browser
Mozilla Firefox
I also mentioned in my original post that I have already done it previously, and it worked, however for unknown reasons, it doesn't work anymore..

How would I take ownership of the key?
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64bitCore i54gb DDR3
Computer Manufacturer/Model Number
Toshiba Satellite A600
OS
Windows 7 Home Premium 64bit
CPU
Core i5
Memory
4gb DDR3
Monitor(s) Displays
Samsung SyncMaster BX2450

My Computer My Computer

At a glance

Windows 8.1 Pro x64Intel Core i3 (3.0 GHZ)4 GB GDDR3Sapphire ATI Radeon 7790 HD 1 GB GDDR5
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 8.1 Pro x64
CPU
Intel Core i3 (3.0 GHZ)
Motherboard
Asus P7H55-M LX
Memory
4 GB GDDR3
Graphics Card(s)
Sapphire ATI Radeon 7790 HD 1 GB GDDR5
Sound Card
Builtin AMD Hight Defination Audio Controller
Monitor(s) Displays
ASUS MS228H 21.5" Wide LED Monitor
Screen Resolution
1920x1080
Hard Drives
1 TB SATA Seagate
PSU
500W
Case
Orange
Cooling
None
Keyboard
A4TECH
Mouse
Who Cares?
Internet Speed
1 MB Shared Wateen Wireless
Antivirus
Kaspersky Internet Security
Browser
Mozilla Firefox
I went through that, but it didn't seem to change anything? When I was clicking on permissions, it told me that the permissions for .php were ordered incorrectly, so I clicked reorder, but that didn't seem to help.. Would I have to restart the computer for the effects to take place?
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64bitCore i54gb DDR3
Computer Manufacturer/Model Number
Toshiba Satellite A600
OS
Windows 7 Home Premium 64bit
CPU
Core i5
Memory
4gb DDR3
Monitor(s) Displays
Samsung SyncMaster BX2450
no,
can you delete the key ? if so then you have permissions.
 

My Computer My Computer

At a glance

Windows 8.1 Pro x64Intel Core i3 (3.0 GHZ)4 GB GDDR3Sapphire ATI Radeon 7790 HD 1 GB GDDR5
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 8.1 Pro x64
CPU
Intel Core i3 (3.0 GHZ)
Motherboard
Asus P7H55-M LX
Memory
4 GB GDDR3
Graphics Card(s)
Sapphire ATI Radeon 7790 HD 1 GB GDDR5
Sound Card
Builtin AMD Hight Defination Audio Controller
Monitor(s) Displays
ASUS MS228H 21.5" Wide LED Monitor
Screen Resolution
1920x1080
Hard Drives
1 TB SATA Seagate
PSU
500W
Case
Orange
Cooling
None
Keyboard
A4TECH
Mouse
Who Cares?
Internet Speed
1 MB Shared Wateen Wireless
Antivirus
Kaspersky Internet Security
Browser
Mozilla Firefox
Yeah I was able to delete the key before, and have re-added it.. I'm guessing there isn't much else that can be done?
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64bitCore i54gb DDR3
Computer Manufacturer/Model Number
Toshiba Satellite A600
OS
Windows 7 Home Premium 64bit
CPU
Core i5
Memory
4gb DDR3
Monitor(s) Displays
Samsung SyncMaster BX2450

My Computer My Computer

At a glance

Windows 8.1 Pro x64Intel Core i3 (3.0 GHZ)4 GB GDDR3Sapphire ATI Radeon 7790 HD 1 GB GDDR5
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 8.1 Pro x64
CPU
Intel Core i3 (3.0 GHZ)
Motherboard
Asus P7H55-M LX
Memory
4 GB GDDR3
Graphics Card(s)
Sapphire ATI Radeon 7790 HD 1 GB GDDR5
Sound Card
Builtin AMD Hight Defination Audio Controller
Monitor(s) Displays
ASUS MS228H 21.5" Wide LED Monitor
Screen Resolution
1920x1080
Hard Drives
1 TB SATA Seagate
PSU
500W
Case
Orange
Cooling
None
Keyboard
A4TECH
Mouse
Who Cares?
Internet Speed
1 MB Shared Wateen Wireless
Antivirus
Kaspersky Internet Security
Browser
Mozilla Firefox

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Thanks for the reply Brink.. I actually don't want php files to open in dreamweaver, I want them to open in notepadd++, as they do now.. Could I just change the default program back to Notepad after, or would it rely on Dreamweaver being the default?
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64bitCore i54gb DDR3
Computer Manufacturer/Model Number
Toshiba Satellite A600
OS
Windows 7 Home Premium 64bit
CPU
Core i5
Memory
4gb DDR3
Monitor(s) Displays
Samsung SyncMaster BX2450
You could set the default program to be anything you like for .php files to open with. I was just using Dreamweaver as an example from what you had in your first post. That's all. :)

Does the PHP option show up in the "New" context menu now?
 

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone

My Computer My Computer

At a glance

Microsoft Windows 7 Home Premium 64-bit Servi...Intel(R) Core(TM) i3 CPU M 330 @ 2.13GHz8 GB DDR3Intel(R) HD Graphics
Computer type
Laptop
Computer Manufacturer/Model Number
Hewlett-Packard/G62-107SA Notebook
OS
Microsoft Windows 7 Home Premium 64-bit Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 330 @ 2.13GHz
Motherboard
Hewlett-Packard 1425
Memory
8 GB DDR3
Graphics Card(s)
Intel(R) HD Graphics
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
Builtin
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
250 GB SATA Hard Disk Drive 7200 rpm
2TB Seagate GoFlex USB 2 Drive
1TB Iomega Prestige USB 2 Drive
1.5TB Iomega Prestige USB 2 Drive (Samsung)
2TB WD MyBook Live NAS.
Mouse
Logitech Anywhere MX
Internet Speed
152 Mbs download 10 Mbs upload
Antivirus
Norton 360
Browser
Chrome
Brink, I could kiss you!! It's working :).
I went through the tutorial, but it wasn't showing in the context menu when I completed that. So I went into default programs as you said, the default was already Notepad++, but I changed it to Dreamweaver, waited for it to apply, then the option was there!! I have now changed the default program back to Notepad++ and it's still there.

Thank you very much for your help everyone!

ADDITION:
Just in case anyone happens to come across this thread, I would like to also add that I have just created a template file called template.php, placed that in {your_user_name}\AppData\Roaming\Microsoft\Templates, and added a new string value to the ShellNew key in the registry for the .php file-type. The new string value is called FileName, and it's data value is the full path to the template file (C:\Users\{your_user_name}\AppData\Roaming\Microsoft\Templates\template.php).

The neat thing about this is that inside the .php file, I've added the opening php tag, a few new lines, and then the closing php tag. This will now appear in every single new PHP file that I create, anywhere on my computer! :). Who could have though the New context menu could be so cool! lol.
 
Last edited by a moderator:

My Computer My Computer

At a glance

Windows 7 Home Premium 64bitCore i54gb DDR3
Computer Manufacturer/Model Number
Toshiba Satellite A600
OS
Windows 7 Home Premium 64bit
CPU
Core i5
Memory
4gb DDR3
Monitor(s) Displays
Samsung SyncMaster BX2450
You're most welcome Denno. I'm glad that we were able to help. :)

Just to help clarify why the context menu may not have displayed at first, did you log off and log on after going though that tutorial to apply the context menu before going into default programs?
 

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
I did not log off and log on Brink, so that could very well be why the change didn't occur until the Default Program was changed :).

Thanks
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64bitCore i54gb DDR3
Computer Manufacturer/Model Number
Toshiba Satellite A600
OS
Windows 7 Home Premium 64bit
CPU
Core i5
Memory
4gb DDR3
Monitor(s) Displays
Samsung SyncMaster BX2450
Ah, ok. That could be then. Thank you for posting back with this. :)
 

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Back
Top