FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PHP-Server at localhost





x-stream
can someone give me an instructon how to set up a virtual Server with PHP @ localhost? Iīm learning PHP and want to try everything I learn. But I canīt wait for my frihost account beacuse it takes a few days to handle my request...
eepman
You could install apache www.apache.org and php5 and just keep it blocked from the internet. Then you could access it at localhost whenever you want.
steveadams617
xampp is probably the easiest php/mysql/apache windows install program:

http://www.apachefriends.org/en/xampp-windows.html
dandelion
steveadams617 wrote:
xampp is probably the easiest php/mysql/apache windows install program:

http://www.apachefriends.org/en/xampp-windows.html

Probably you will find the XAMPP itsels a bit overloaded with components, so feel free to try its lite version - XAMPP Lite.

And please note you need - I think so - the MySQL server installed on your localhost as well. Both XAMPP and XAMPP Lite include it though.
x-stream
Ok, I have installed this.But where do I have to put my PHP files to see the result in my browser? I have tried:
making new folder ("new") in the XAMPP directory and trying to look at the page with typing localhost/new/index.php (my php file is called like this!) into my browser
- but It didnīt work! Does XAMPP set up an extra directory for my files?
steveadams617
Look for a folder called htdocs on your hard drive.
x-stream
Ok, i have put the files there, but if I open my browser on localhost, there is the configuration screen of xampp again! I want my file index.php to open when i type this adress! Is that possible? Sad
mwm
x-stream wrote:
Ok, i have put the files there, but if I open my browser on localhost, there is the configuration screen of xampp again! I want my file index.php to open when i type this adress! Is that possible? Sad


Take a look at htdocs. You'll probably see an index.htm or index.html. Rename that one or delete it. Place your index.php in this space. I am not familiar with xampp, but be sure the httpd.conf file reflect .php as a possible directory index. Most apache installs are config'd to use index.html or .htm as the directory index. XAMPP may be different.

You can check you on your php install by creating a PHPINFO page. Just create a page and call it whatever.php. In the file put the code below:

Code:

<?php

phpinfo();
phpinfo(INFO_MODULES);

?>


The aboe should detail your PHP config and show all defaults for you.

Hope this helps.

-mwm
x-stream
Thank you, It works!
But now, Iīve got another problem... I Programmed a Feedback-Form, which sends an Email to me if itīs okay... now i donīt get this email! Have I Programmed wrong or does xampp not support sending mails?
(-> Does FRIHost Support sending mails?)
mwm
x-stream wrote:
Thank you, It works!
But now, Iīve got another problem... I Programmed a Feedback-Form, which sends an Email to me if itīs okay... now i donīt get this email! Have I Programmed wrong or does xampp not support sending mails?
(-> Does FRIHost Support sending mails?)


Always remember log files are your friends. Check your logs often when things dont seem to going well. I am not sure what platform you working with but I assume it is a *nix, although it would be Win32.

On *nix check the maillog first. Typically this is /var/log/maillog. Use this command to check out the last 30 lines of the maillog immediately after attempting the form action:
Code:

tail -30 /var/log/maillog


Look for problems... They will be quite evident.

Beyond checking the log, does the form do what is expected after submission?

-mwm
x-stream
Yes, I programmed a check, if one input isnīt filled, it returns a message to the user. So I tried it out, I left one input empty, and then, there was the message! So the Form is working fine...

And I canīt find a log file which is like the discription you gave....
(grr, still waiting for someone to handle my request... Mad )
DoctorBeaver
I'm having problems with this too. When I open my browser and try to access the index.php file in \htdocs, all I see is the coding. I can't find a httpd.conf file anywhere.
Diebels
The very easiest way to do it, is like this...

Joomla Stand Alone Server

Q: What is JSAS?
A:JSAS is a Windows application that installs Joomla, Apache, Php, and Mysql and phpMyAdmin.

Q: What is it for?
A: As a local development server environment, or simple to check out mambo quickly and easily without having to have a web host or configure all the server applications. - a couple clicks and Mambo is up and running on your PC.

Q: Where can I download JSAS?
A: http://developer.joomla.org/sf/frs/do/viewRelease/projects.joomlasolutions/frs.jsas.jsas_1_0_3

http://jsas.joomlasolutions.com

Q: What else is cool about JSAS?
A:
- multiple Joomla installations with new 'myJSAS' feature
- Now features a config tool so you can choose the virtual drive letter
- remote online installer
- 'try a new Joomla installation' feature that can be run over and over'
- run JSAS from a USB stick
(just copy the entire folder tree to your USB drive from the place where you installed MSAS)

Q: What are the requirements?
A: Windows 2000 or XP
Nyizsa
DoctorBeaver wrote:
I'm having problems with this too. When I open my browser and try to access the index.php file in \htdocs, all I see is the coding. I can't find a httpd.conf file anywhere.

If you access it as "c:\program files\apache group\apache2\htdocs\index.php" it will not go through the parser, thus the code will be displayed. Try http://localhost/index.php! It should work. If it doesn't, the .php extension is not included in httpd.conf, which is by the way, in "c:\program files\apache group\apache2\conf".
I hope it helped!
DoctorBeaver
I uninstalled it all in case I'd done something wrong & tried again. I got "Apache cannot install as port 433 is blocked". The installation continued anyway but when I checked on the Xampp console, Apache wasn't ticked. Is that why it wouldn't work? If so, how do I resolve the problem?
I've asked on the Xampp forum but only got 1 reply so far & all that said was "disable IIs services". That forum doesn't seem much use as it's 90% German & there doesn't look to be an awful lot of traffic in the English section.
As far as I know I don't have IIs on my PC.; I certainly haven't knowingly downloaded it. Is it bundled with XP Home?
All I want to do is check a PHP MySql application (Mercuryboard or PhpBB - I just want to see which is easier to configure/use) before I load it to the web.
DoctorBeaver
diebels - what actually is Joomla? I've been to the site & it talks about multiple DBs etc; but it doesn't say anywhere I can see what it actually does. I don't want to run a Mambo site - I don't need a CMS. I just want an environment where I can test my PHP MySQL application (PhpBB or Mercuryboard). Can I do that with Joomla?
appsapps
One of the easiest web servers to set up and use, and the one I use on my pc for the purpose of developing is Xerver.

Setting up PHP to work with it is also a snap, if you get the zip version of PHP. Just unzip it to a folder and add that folder to your system path.

Xerver itself can be set up so that only a local connection can be made, and nobody from outside your pc will have access to your server.

Xerver does require java installed. It is free, open source, and very light when run in the non-gui mode. So light in fact that I have run it on an old P1 233mhz with 64mb of ram running WinME, and couldn't even tell it was running. And this was with people being able to access it from the outside. The only way I knew anybody was accessing it while I was using the pc for other purposes was by the slowing down of my internet due to the bandwidth use of the people accessing it. The server itself caused no slowdown on the pc at all. And I worked that pc like a dog, so I would notice if something was even a little bit of a resource hog.

The non-gui mode is all you need if you are going to be the only one accessing it, since you will not need logging of the IP's accessing it.

One small tip: When setting it up, the software sometimes gives you the wrong IP info to enter in your browser to access the configuration wizard. The correct url to enter is http://127.0.0.1:32123/ Ignore any other info it might give you pertaining to that.

Once you have it installed, there is nothing special you will have to do/configure. Just drop your files & folders into the folder you have chosen as your server folder. Then open your browser and type in the location, using your local host as the domain.

If you need any help setting it up and configuring it, or installing php for it, don't hesitate to ask. I will be more than willing to help you. Smile
Arin
Hello guys, a word from me :).

I have installed on my own pc phpdev bundle. It has PHP, MySQL (phpMyAdmin), Apache. It's great, very easy to use.
Quote:
phpdev - What's it all about ?

:) - well its all about getting PHP/MySQL/Apache (PERL)(others?) running on your Win32 machine.

Why not use Linux ??, well because for my day to day work *NIX does just not cut it, gimp etc is fine but I am pampered and need my Photoshop/Fireworks/MS-Word (yes really !)/etc/etc , so I need windows (and as a workstation much prefer it). That said, IIS is dogmeat, so Apache really is the only answer, as is PHP (IMO), MySQL is there because it is so popular and very useful despite the usual criticisms.

So phpdev is a pre configured suite of all the bits and pieces you need to get Apache/PHP/MySQL/other running on your machine. It is not invasive and does not alter any windows settings or touch the registry etc. In its current incarnation PHP runs as an apache module.

http://www.firepages.com.au/
Related topics
HTTP AUTH with PHP and mySQL
does the firhost.net php server have PEAR?
[RESOLVED] RETARDED ERROR!
[PHP] phpbb registration - add to other db
[PHP] Server Load
Is there any local php server program?
help urgent
help - download pop up on php page
access active directory ldap server with php
Link PHP/Mysql with Outlook Express
Absolute paths using $server
Whats the best PHP server?
Running PHP Script without PHP Server?
Apache/Php5/MySql = Complete Fustration
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.