PHP beginner
Posted by: rukshilag (112.135.235.---)
Date: September 03, 2009 05:14PM

i just started trying out php, i created the initial simple helo world code. i have even installed wampserver and started it whilst trying to run it on firefox. there is an error message saying unable to connect to server. what do i do?

Options: ReplyQuote
Re: PHP beginner
Posted by: toumimi (---.68.113-78.rev.gaoland.net)
Date: September 03, 2009 05:31PM

Can you see wamp home page (Server Configuration) ?

Your wamp icon should be white.
If not, try to start Apache service from wamp menu -> Apache -> Service submenu
If it doesn't work, test port 80 from Apache -> Service submenu.
Then consult Apache error log from Apache submenu...

Florian

WampServer Patch (Screenshots)
Topic EN : www.wampserver.com
Topic FR : www.wampserver.com

Options: ReplyQuote
Re: PHP beginner
Posted by: yfastud (Moderator)
Date: September 04, 2009 12:03AM


Options: ReplyQuote
Re: PHP beginner
Posted by: manoj (117.201.96.---)
Date: September 04, 2009 09:35AM

i just started trying out php, i created the initial simple helo world code. i have even installed wampserver and started it whilst trying to run it on firefox. there is an error message saying unable to connect to server. what do i do?

Options: ReplyQuote
Re: PHP beginner
Posted by: manoj (---.opera-mini.net)
Date: September 04, 2009 10:24AM

where save the php file and how to run by firefox?

Options: ReplyQuote
Re: PHP beginner
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: September 04, 2009 06:41PM

You save a files in C:/Wamp/www

You run your files open your web browser and go to [localhost]

Options: ReplyQuote
Re: PHP beginner
Posted by: yfastud (Moderator)
Date: September 05, 2009 01:28AM


Options: ReplyQuote
Re: PHP beginner
Posted by: toegang (---.dsl.telepac.pt)
Date: September 06, 2009 06:17PM

Hi, like rukshilag & manoy I'm a newbie too, and have the same problem.

@ yfastud
You've got a nice explanation at that blog, but it's of no use to us yet. We can't even get to the point of accessing the maps in FF (or IE for that matter).

@ toumimi
- My Wamp icon is white
- I did restart Apache from wamp menu, no result.
- I did a Test Port 80, which resulted in: "Your port 80 is actually used by : Server: Apache/2.2.11 (Win32) PHP/5.3.0 (Apparently looks good, but still no working server))
- The Apache error log yields:
[Sun Sep 06 17:02:14 2009] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Sun Sep 06 17:02:14 2009] [notice] Child 2208: Exit event signaled. Child process is ending.
[Sun Sep 06 17:02:15 2009] [notice] Child 2208: Released the start mutex
[Sun Sep 06 17:02:16 2009] [notice] Child 2208: All worker threads have exited.
[Sun Sep 06 17:02:16 2009] [notice] Child 2208: Child process is exiting
[Sun Sep 06 17:02:16 2009] [notice] Parent: Child process exited successfully.
[Sun Sep 06 17:02:16 2009] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Sun Sep 06 17:02:16 2009] [notice] Server built: Dec 10 2008 00:10:06
[Sun Sep 06 17:02:16 2009] [notice] Parent: Created child process 5568
[Sun Sep 06 17:02:16 2009] [notice] Child 5568: Child process is running
[Sun Sep 06 17:02:16 2009] [notice] Child 5568: Acquired the start mutex.
[Sun Sep 06 17:02:16 2009] [notice] Child 5568: Starting 64 worker threads.
[Sun Sep 06 17:02:16 2009] [notice] Child 5568: Starting thread to listen on port 80.

Yes, the local files are stored at c:\wamp\www\etc.

Still I don't know what to do to make it work
Please let me (us) know
Thanks

Options: ReplyQuote
Re: PHP beginner
Posted by: toumimi (84.6.111.---)
Date: September 06, 2009 08:45PM

If your wamp icon is white then Apache is started, listen port 80, as seen in error_log.
So all that is okay.

So try to connect server with url 'http://127.0.0.1/index.php' instead 'http://localhost/'

Florian

WampServer Patch (Screenshots)
Topic EN : www.wampserver.com
Topic FR : www.wampserver.com

Options: ReplyQuote
Re: PHP beginner
Posted by: toegang (---.dsl.telepac.pt)
Date: September 06, 2009 10:16PM

Thanks Florian,

It did it!
But WHY . . . ??? You'd assume there's stille something wrong out there.
If I type "...localhost..." it results in a 'cannot connect to server' and if I do the same thing with "...127.0.0.1..." I get the connection.
And if I try to open it directly with the "open with" option FF gives text, it doesn't even look like code, only the beginning.

Options: ReplyQuote
Re: PHP beginner
Posted by: yfastud (Moderator)
Date: September 07, 2009 04:26AM

open file hosts in folder C:\WINDOWS\System32\drivers\etc and make sure you have only this line and nothing else

127.0.0.1 localhost

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: PHP beginner
Posted by: toegang (---.dsl.telepac.pt)
Date: September 07, 2009 08:01AM

Thanks yfastud,

That was the trick. Locol host is functioning again, I hope it'll work for the others as well. Now I'll have to take the next step, phpMyAdmin . . . For that I'll follow the other thread, [forum.wampserver.com]

Options: ReplyQuote
Re: PHP beginner
Posted by: joezcell (---.uplink-perl.com)
Date: September 07, 2009 09:58AM

hey toegang, I have the same problem, and you helped me very much ....
but the thing is that I can't change the hosts file, I'm editing it in notepad and it's not letting me...

Cannot create the C:\WINDOWS\System32\drivers\etc\hosts file.
Make sure that the path and file name are correct.


They are correct indeed, it makes no sense. I know u're a beginner too so just tell me how did u do it ..

Thanks.

Options: ReplyQuote
Re: PHP beginner
Posted by: joezcell (---.uplink-perl.com)
Date: September 07, 2009 10:20AM

Figured it out ... thanks

Options: ReplyQuote


Sorry, only registered users may post in this forum.