I'm working on a site using PHP and MySQL and I want to be able to view the files on my computer rather than uploading them first. What do I need to do this? do i have to turn my computer into a server? whats the best software for this?
Well, unfortunately set up on your local pc is a pain in the butt. After installing it, you will wonder why it is that way because it shouldn't be that hard to form a set of instructions, but the geniuses who develop such great software like php and apache don't have a clue how to tell people how to install it. It kind of makes you wonder why that put so much effort in to producing new version after new version, when the first thing they should do before releasing a new version is figure out a set of installation instruction for each platform.
Anyway, there are lots of installation tutorials, and all of the ones I have encountered are horrible, so pick your poison. If on the off chance your pc has windows, and you have room to install on your C: drive, there is a package that you can just unzip and it is all configured and ready to go. See:
But that is half the battle. After you have everything configured you have to learn how to use everything and that can be very frustrating too. Here are some steps to follow once you have everything configured:
1)All of your files have to have a .php extension.
2)All of your files must be saved in a folder known as the "document root" however it's name is not "document root" so you have to figure out what that folder's name is. It is sometimes named "htdocs" and "www"
3)You cannot run a php script by clicking on its icon. You have to open up your browser and type:
and run it. It installes sendmail, php, mysql, apache, phpmyadmin and a few other things. It works out the box. Only thing i had to change in php.ini was the path to sessions files because for some reason it was set with unix /path/to type location and thus didn't work. Oh, i also had to set the path to sendmail inside there and set a stmp server to use. easy.
by default the path to your server will be
c:/nusphere/apache/htdocs/
if you install the installation on the c: drive. and yes to run the scripts you need to do http://localhost/script.php where script.php is in c:/nushpere/apache/htdocs/script.php
not sure why anyone would need sendmail for local testing of scripts though?
anyway - dev4 will have PERL as well -at least thats the plan,
I did a version with Interbase as well - then realised ... who's gonna want it? -back to the drawing board.
You never know. I would like to know more about who is using Interbase for web applications and how they find it. I mean sometimes MySQL really is annoyingly incomplete. Mind you I've never looked into intebase except that I read it was the first RDMS to impliment the BLOB. Sometimes I worry that I only seem to remember the useless things.
I would recommend installing phpTriad from www.phpgeek.com (some people have problems installing it, but just look at the foums you just have to move some dlls)
It installs Apache, PHP, MySQL and phpMyAdmin. If you want to have Perl and Python check out www.activestate.com
Thanks for all the help every one, I've had a look at some of these things but I can't find one that will let me install to a drive other than c: (i need it on d: on my computer), Can some one tell me where to find one?
You can install phpdev3 on D:/ you would just need to follow the instructions here (ignore the JS error!) - sorry I have not finished my links properly yet... anyhow - this shows you what to change- and its pretty simple, to get everything running on D: etc - only problem will be MySQL which really really lives to live on C: - but its worth a try?
If you use phpTriad you can install it to c:\ copy all of the files to d:\ and then change all references of c:\ to d:\. If you are using Win98 or Me you can use the 'containing text' function in search.
Bookmarks