Ok guys, I have a problem. I am a total noob coming to php so was was going to set it up. I was following this tutorial:

http://www.youtube.com/watch?v=cSN34q47BXY&feature=related

I got XAMPP all set up. But one problem, my computer can save .php files. How do I get this to work? I am using Windows Vista. Help Please! Thank you everyone.

Dani AI

Generated

As discovered, this kind of problem is almost always about file association, where the file is saved, or how you open it — not Windows being unable to save a .php file. Quick, practical checklist for a working XAMPP + PHP workflow on Vista:

Place PHP files in XAMPP’s document root (usually C:\xampp\htdocs\) and start Apache from the XAMPP Control Panel. Create your PHP files with a plain-text editor (Notepad++, Sublime, VS Code). When saving from Windows Notepad use “Save as type = All Files” and name the file something.php (avoid something.php.txt). Use UTF-8 without BOM to prevent “headers already sent” issues.

Create a simple test file and open it through the server, not by double-clicking:

<?php
phpinfo();
?>

Then in a browser go to http://localhost/yourfolder/yourfile.php. If you see PHP source or nothing special, you’re loading the file via file:// (double-click) or Apache isn’t running.

Common pitfalls and fixes: Windows Explorer hides extensions so file.php.txt can look like file.php — enable “show file name extensions” in Folder Options. Don’t associate .php files permanently with a browser if you want to edit them; set the default to your editor (right-click → Open with → Choose default program). On Vista be mindful of UAC/permissions — avoid saving projects under C:\Program Files\ or run your editor as Administrator. If Apache won’t start, check for port conflicts (Skype, IIS) in the XAMPP logs.

For reference see the XAMPP docs and the PHP Windows install notes: XAMPP official site and PHP manual — Windows installation. If this fixed your issue, follow ’s suggestion and mark the thread solved.

Recommended Answers

All 4 Replies

I hope you mean "can't save .php files"! And I hope you're lying, because you can save a file with any file type you want :\

I just found out the problem. It was opening with another program so i went into the properties and changed it to run on firefox. Thanks anyway sorry i wrote this.

No hard feelings. You should mark this as solved, however. It makes a difference.

Ok thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.