You are invited to Log in or Register a free Frihost Account!

How to Set up Local Web Server

I want to work with PHP for my new site, as I did with the old one. This one will be a bit more complex, so I want to be able to test it out locally instead of uploading it to a test folder on the server here and testing it that way.

Back in the winter, I managed to get a local server running on my computer, but I don't remember how I did it. All I know is that it was a pain. So how do you set up a local web server so that you can see the effects of PHP without having to upload to the remote server after every change. I've tried with EasyPHP; that didn't work, so I tried installing Apache and PHP5, and that didn't work. Has anyone successfully and easily installed server junk on their machine for web page testing?

Any help would be delicious Smile
if you use windows, id recomend easy php. I used it for a couple of years now. Can you discribe the problems? Maybe it's not to hard to repair.
Hi eday. I recommened you to download and install the xampp package. It will automatically install and configure Apache, Mysql and PHP5... I have been using it from quite a while now and it installs itself in a jiffy...
I strongly recommend the Uniform Server. It works right out of the box without any installation. It's basically a Apache, PHP, Mysql and more package that will also run from a USB stick. So you can carry it with you. I use it a lot and it is very impressive.
I just tried XAMPP and WAMP, and I couldn't get either one to work the way I need. Wamp shows the localhost page, which contains PHP, but when I try to load my webage, whether from the directory it is in, or if I move it to the www directory, it doesn't work.

the problems i had with easyPHP and the Apache/PHP5 and XAMPP and WAMP installs was that whenever i looked at my site on my hard drive, the php components didnt show. Everything but the stuff that is called in through php includes shows.

So why do these programs not display the PHP on my page properly?
Hi again. I hope you arent running any other webserver at the same time, like maybe Microsoft IIS. First make sure no other webserver is running... Try uninstalling all. I will be talking about XAMPP here. After a fresh install of XAMPP, launch the XAMPP control panel application. From there make sure Apache is running... If its running, everything should work fine... Assuming XAMPP was install under "c:\program files", you should place all your html and php documents under the folder C:\Program Files\XAMPP\htdocs. Now lets assume there is a file named xyz.php located under C:\Program Files\XAMPP\htdocs, you'll have to access it by typing http://localhost/xyz.php... If that doesnt work, tell us what error you are getting...
I installed Xampp, made sure Apache was running, put my directory into the htdocs directory, and called up my page. And what happens is the same thing that has happened from the start: the page comes up, but the php in the page does not. It's as though Apache doesn't see or read my .htaccess file. All my pages end in .html, and they open without the php being displayed. If I changed the extension to .php and try to open it in Explorer, the save dialog box comes up asking me to save the document or open it in Dreamweaver.

IIS is not running. Typing in the localhost address brings up Xampp's php page in htdocs/xampp, with all the php displayed. So it seems to be working, just not with my pages, which only contain php include tags. My folder is in C:\Program Files\Internet\Xampp\htdocs\MyFolder. So what's wrong?
Ok thats a peculiar problem... Open up Internet Explorer and type in the address bar... Now you'll be presented with XAMPP's configuration/welcome page... Over there on the left, click on the link titled "Status". See if PHP is activated... I am definite it will say its activated because XAMPP's configuration panel which is written in PHP is running fine...
PHP is activated, HTTPS is acticated, CGI is activated, SSI is activated, and SMTP Service is activated.

Like I said, the PHP in Xampp's page works and everything is as it should be. My pages, on the other hand, don't. The only thing I can think of is the .htaccess file is not being read, since all my pages end in .html and not .php. Which is how I like it. But when I change a file from .html to .php, Explorer won't open them; it prompts me to save the file or open it in dreamweaver.

I tried The Uniform Server, Xampp, Wamp, easyPHP, and whatever else I could ge tmy hands on, and they all did the same thing. Their pages with PHP worked, while mine didn't. As far as I know, my .htaccess is set up right...

# parsing application
AddType application/x-httpd-php .php .html .htm that I can have my pages with .html extensions instead of .php. So what the hell is going on??
Does anyone know what is wrong? Are my files in the wrong place? is the .htaccess file broken? I want to get this issue fixed so I can work on my site locally. Having Xampp parse it's own php code but not mine pee-pees me off!
If you sick to having problem, why don't you try using Jsas [Joomla Stand Alone Server], I can turn it on off wihout problems, the only thing is, you just need to change the joomla page to your web page... that is as easy as deleta and replace it with your page Razz it's support mysql databse too Razz

Why don't you try something else entirely for a minute. Lets assume that the server is set up correctly, as it should be (I installed Wordpress and XAAMP in about 10 minutes and it worked, so PHP can work).

Do this: download Firefox or Opera and try to navigate the site with either of those browsers. If you can, and the PHP code works, then there's a problem with Internet Explorer's settings for the .php file type, and this can be fixed. if it doesn't work, then you can blame the server setup, and that will require more investigation. (I'll cross my fingers for you).
Why not install your own server. I have Apache installed on my PC with MySQL and PHP. and its not really hard to install either. The installation of Apache and MySQL is straight forward and is a matter of a few clicks only while php need its readme file to be read . You will find it easy after installing it one or two times. I have tried out all the software that i need on my web site before installing or upgrading them and its really simple so you might want to install them instead of the premade packages.
Just try out Apache PHPtriad this time..

just install and open IE and type


if a page dispalays with php control information then php is set..

now just transfer your own files with .php extension to

C:/apache/www directory

now open IE and give the address


and voila ! your file is up ......
I'll give Apache PHP Triad when I get home, and Jsas if Triad doesn't work. What I didn't understand is that the pages for each of the programs I installed (Wamp, Xammp, etc) worked perfectly, PHP and all. Mine, on the other hand, would not. I'll see what I come up with tonight.
PHP Triad didn't work either. IT gave me some error when installing about some Symantec program running that isn't even on my computer... S32 EVNT1.DLL, saying that an installable virtual device driver failed dll installation. Garbage.

Wamp and Xammp should work no problem, but they give me the problem i have listed many times above; their php files work, mine don't.
You can try EasyPHP... it is very easy to install and it has all you need... PHP, MySQL, phpMyAdmin... You have to simply copy your files and then paste them to the "www" subdirectory in your EasyPHP directory... Let me think... I will give you a link so you can download it directly Wink

I already tried easyPHP and it gave me the same problem that that all the others gave me, including the easy to install Xammp and Wamp: their php pages work, mine do not.
Have you installed any content management systems like plone or something on your computer? Sometimes they come in installs with their own versions or apache that they install some wierd place on your hard drive. You have more than you instance of apache running when you boot up and the browser doesn't know where to look. Try searching for htdocs and see how many of these folders you have on your drive. Delete all the apache folders and reinstall.

I have no content managers on my system. I always set apache and all that other web server stuff to not start automatically since I don't want it using resources when it is not needed. I always started Apache manually before trying to get my pages to work. i also always told the programs where to install. A search of my machine has not resulted in any files turning up in a weird place. I will re-install Xammp in the next few days and see if I can't get it working.
Well i told you that you should try to install Apache Mysql and php separately and you might have success . Its not that difficult. Installing MySQL and Apache is as easy as installing any software they have simple setups that you can work out yourself and as for php you have to go through the the readme file and read the instructions realted to your type of installation as well as your OS.
That was one of the first things I did and that did not work either. I will give it a try again in the next month and see if it can handle a simple <? include command in a .php page, and then in a .html page (with the .htaccess file set up correctly).
You can use Abyss Web server from its free to use and very unobtrusive. it can have php, mysql, phpmyadmin installed, visit its the support site for abyss, it is really very easy to install and use abyss
Related topics
PHP Toturail
what is your php mysql apache installer package
KF web server
A good windows version for web server...
error: Can't connect to local mysql server through socket
local pop3 server for Windows, anyone?
What's New in Pocket Internet Explorer
Anyone know how to make an email form?
Using Dynamic IP to host a Web Server
Making your XP as Internet Web Server
Windows 2000 advanced as web server?
Making a Web Server
How to install Wordpress on your web server ?
Dreamweaver and Local Testing Server
Reply to topic    Frihost Forum Index -> Computers -> Computer Problems and Support

© 2005-2011 Frihost, forums powered by phpBB.