Unable to run php scripts in WampServer
Posted by: nourusoff (---.nwlnnh.dsl.dynamic.tds.net)
Date: October 23, 2011 07:21PM

I have just (10/18/2011) installed WampServer2.2a-x32, using Apache 2.2.21, and PHP Version 5.3.8.

I saw a PATH to my PHP scripts in one of the configuration modules I believe - but cannot find it now! The PATH was C:/..../MyDocuments/PHP.

But when I save a script, test1.php in .../MyDocuments/PHP and type in the address, [localhost] , I get 404 Not Found.

I have not altered anything.

Where do I look to try to correct this?

Options: ReplyQuote
Re: Unable to run php scripts in WampServer
Posted by: stevenmartin99 (---.b-ras1.srl.dublin.eircom.net)
Date: October 23, 2011 07:23PM

why did you move it?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Unable to run php scripts in WampServer
Posted by: nourusoff (---.nwlnnh.dsl.dynamic.tds.net)
Date: October 23, 2011 07:27PM

I found the PATH to my PHP scripts in phpinfo():

C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.6.0_29\bin;C:\Documents and Settings\Nick\My Documents\PHP

This is the correct path.

I'm stymied (a newbie to WAMPServer).

Options: ReplyQuote
Re: Unable to run php scripts in WampServer
Posted by: nourusoff (---.nwlnnh.dsl.dynamic.tds.net)
Date: October 23, 2011 07:30PM

Thanks for replying!
I didn't move anything - I couldn't remember or find where I had found the PATH - now, I have found it - in phpinfo() - it is still there..

Options: ReplyQuote
Re: Unable to run php scripts in WampServer
Posted by: nourusoff (---.nwlnnh.dsl.dynamic.tds.net)
Date: October 23, 2011 07:59PM

I solved the problem - I put my PHP scripts in C:\wamp\www and the scripts run fine.

But how about phpinfo() - it has a PATH to where the PHP scripts were (and still are) originally. I have copied them to C:\wamp\www. Did I give that information to phpinfo() during the installation?

Question: If I put a folder (sub-directory file) into C:\wamp\www , any script name in that subdirectory is not found (i.e., the server doesn't look recursively in a folder). Am I right?

Options: ReplyQuote
Re: Unable to run php scripts in WampServer
Posted by: kimhallberg (---.1022-1-64736c10.cust.bredbandsbolaget.se)
Date: October 24, 2011 03:26PM

Every php projects/scripts or whatever you are programming, should always be in the c:\wamp\www directory, otherwise it won't work at all.

phpinfo() shows information about the current stage of PHP, options, extensions the server and more, but if you have a phpinfo() script in another directory then c:\wamp\www, it can't get the information about wampserver, that's why every project should and I believe MUST be in the c:\wamp\www directory.

About the sub-directory, do you mean like c:\wamp\www\something and then the script? that will work, every folder in the www directory will be shown as links in the localhost, or if the folders name is something, just go to localhost/something/scriptname.php or just something in the script is in a index.php file

Options: ReplyQuote
Re: Unable to run php scripts in WampServer
Posted by: yfastud (Moderator)
Date: October 30, 2011 02:01AM

You should set vh instead; then, you can type 'http://site1' to show the webpage and/or content of folder c:\wamp\www\site1, for example, 'http://site2' to show the webpage and/or content of folder c:\wamp\www\site2, 'http://site3' to show the webpage and/or content of folder c:\wamp\www\site3 ... in additions, you can their shortcuts to wamp menu for quick access; check screenshot winking smiley

[jlbn.com]

No matter within or outside LAN access, you need to setup Access, DNS, and VH; Access for permission to connect to your Wamp PC, DNS to tie Domain(s) to your Wamp PC, and VH to host multiple Domains/Websites/IP's and even you have only 1 Domain/IP, you should use VH to set it up w/ the site you want to show up first on top and localhost on bottom and others in middle if having more than 1 site; w/ VH, other PC's, no matter w/i or outside LAN, can access/see websites/contents on your wamp PC. If dont have real Domain, just skip DNS guide

To setup Access, follow this
[blog.jlbn.net]

To setup VH, follow this
[blog.jlbn.net]

To setup DNS, follow this
[blog.jlbn.net]

Have fun,

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

Options: ReplyQuote
Re: Unable to run php scripts in WampServer
Posted by: nourusoff (77.74.67.---)
Date: October 30, 2011 04:16AM

Many thanks!
I did find my scripts ran when I used the c:wamp\www directory.
My scripts are in a sub-directory (PHP ) of www. I thought that the script name would be found without my specifying the sub-directory PHP of WWW (I thought it would look at all sub-directories of www to find the script name). Evidently not. I will verify.

Options: ReplyQuote
Re: Unable to run php scripts in WampServer
Posted by: nourusoff (77.74.67.---)
Date: October 30, 2011 04:19AM

Many thanks for the detailed reply - a lot of material here for me to digest and apply.
Presently, I am in a frantic-teacher mode in Aktobe, Kazakhstan at the Kazakh-Russina International University.
I will return to WampServer soon enough - again, thank you!

Options: ReplyQuote


Sorry, only registered users may post in this forum.