Windows Changes PHP Files to PDF

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
hosedown
Forum Newbie
Posts: 3
Joined: Thu Jun 26, 2014 11:06 pm

Windows Changes PHP Files to PDF

Post by hosedown »

Every time I save a file with the extension .php Windows 7 changes it to .pdf. Does anyone know how to remedy this? I did do a search for this problem on this site as well as a general Internet search and I found nothing.

Thanks.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Windows Changes PHP Files to PDF

Post by requinix »

Probably because that doesn't really happen. Where are you saving the file from and how are you saving it?
hosedown
Forum Newbie
Posts: 3
Joined: Thu Jun 26, 2014 11:06 pm

Re: Windows Changes PHP Files to PDF

Post by hosedown »

One instance was when downloaded the examples for a PHP text from Apress.com. That was a ZIP and I just clicked on it and it downloaded. Also, anytime I create a notepad doc and save it as title.php and then go to the folder I saved it in, Windows shows it as .pdf
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Windows Changes PHP Files to PDF

Post by requinix »

hosedown wrote:One instance was when downloaded the examples for a PHP text from Apress.com. That was a ZIP and I just clicked on it and it downloaded.
Not sure where the renaming comes into that. The file would have downloaded as *.zip and I'm 99% sure that they didn't accidentally provide PDFs instead of *.php files.
hosedown wrote:Also, anytime I create a notepad doc and save it as title.php and then go to the folder I saved it in, Windows shows it as .pdf
You remembered to change the "Save as type" to the "All files" option, right? Or alternatively made sure to specify the filename using quotes? If you don't then you'll get files named *.php.txt.

Now to clarify, are you saying that the files look like they're PDF files? Like the icon? Or are you saying they are actually named *.pdf? What happens when you try to open one?
hosedown
Forum Newbie
Posts: 3
Joined: Thu Jun 26, 2014 11:06 pm

Re: Windows Changes PHP Files to PDF

Post by hosedown »

When I opened the ZIP file they all looked like PDF files and had the extension .pdf. The files once extracted are the same. I didn't rename anything. When I try to open them, Adobe reader says it can't read them.

For the Notepad docs I did change to All Files and saved them with the extension .php. All I can figure is Windows doesn't know the file type PHP and is going with the alphabetically closest file type it does recognized, which is PDF.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Windows Changes PHP Files to PDF

Post by requinix »

Windows just does not do that. I'd even suggest you may have a virus on your system... except I can't find a mention of such a virus.

Can you post a screenshot?
Post Reply