Jump to content

WAMP


CNT

Recommended Posts

Is this the right place to post questions about localhost web server? To be able to run a website from my own computer, before the web host.I am trying to run a PHP page and was told to need to install a WAMP web server (to run on localhost). I am using Win7 (64-bit) laptop. I tried to run "Client XDebug" but it doesn't run the website? What does "Start listening" do? I am asking how to run WAMP? Do I need to config IIS?I have used VS2008 (and the included SQL Server 2008). I create a website and used a little PHP, it all worked. But with the new menu navigation experiment, it doesn't work (want to do a one page with all navigation coding and use only one line in every page to call nav_menu.php or should it be called nav_menu.inc ?). This means I have to have every page end with ".php" instead of ".html". This is new for me (I only know HTML and CSS so far).Chuck

Link to comment
Share on other sites

Don't use WAMP and IIS at the same time, there's no reason to. If you already have IIS running, just use that. You just need to download the PHP zip file, extract it, and follow the instructions to get PHP set up and IIS configured to run it:http://www.php.net/manual/en/install.general.phphttp://www.php.net/manual/en/install.windows.phphttp://www.php.net/manual/en/install.windows.iis7.phpIIS7 has pretty good support for PHP, and if you're already using IIS for other things it makes sense to also use it to run PHP.

Link to comment
Share on other sites

IIS7 has pretty good support for PHP, and if you're already using IIS for other things it makes sense to also use it to run PHP.
As I have tried using VS2008, it won't run? I have another website I create, including PHP, (used VS2008 as my editor) and run it, it works. But this new website, it is not working? Others have looked at the codes and said it's all fine (should be working).The other thread concerning this is -> linkChuck
Link to comment
Share on other sites

If the PHP code isn't running you need to find the errors. Depending how PHP is set up, it might be sending errors to the system event log, or it might be displaying errors on the page. You can change the settings to tell it how to treat errors. It would probably be a good idea to create a phpinfo page so that you can see all of the settings PHP is using, including what it is doing with errors.

<?phpphpinfo();?>

Link to comment
Share on other sites

If the PHP code isn't running you need to find the errors. Depending how PHP is set up, it might be sending errors to the system event log, or it might be displaying errors on the page. You can change the settings to tell it how to treat errors. It would probably be a good idea to create a phpinfo page so that you can see all of the settings PHP is using, including what it is doing with errors.
<?phpphpinfo();?>

Could you create a dumby page and make (cause) the php to write onto a specific page (prefer root dir). Should it be called "error.php" or what? I have included the code above and nothing is showing anything. I am wondering if it's possible with by installing the WAMP, did it cause changes in the IIS configurations? I have Windows 7 and Visual Studio 2008 (which is ASP.NET Development Server). I just want to see ANY php to work (a simple "Hello world! The PHP is working!" is all I want to know if it's working). I am just spending hours and nothing is doing anything (I am just wasting my time not knowing what to do).I tried the following and it is not working.
<?php echo '<p>Hello World</p>'; ?>

Chuck

Link to comment
Share on other sites

did you look up where errors where being logged from the output of phpinfo()?
I just studied HTML and CSS (through classrooms). Now I am trying to learn PHP. In fact, web server and localhost... I want to understand 'em. I tried seeing how those work, but unless I actuclly successfully run 'em on my own, I should then understand lot other things? All I know that IIS exist, that's it... not what it actually does. I have seen CPanel (web server configurations), but I still don't know what to do there.Back to "Where is Jack"... I checked C:\inetpub\wwwroot\ and I don't see anthing concerning php error text file. There's only two files in there (iisstart.htm and welcome.pnp). I put "hello.php" to see if this will make the pnp work, but doesn't. Forgive me, I wish I could actually attempt to run a host server then I could see how things work by playing with the configurations.I talked to some people that do web development for living... man, they say they just copy off others code and say "this is my design". I don't want to do that (yet). I want to KNOW how to do this, then if I was to copy codes, I would respectfully state where it was from...Lets start over (again)... I did create a website and I was able to run it on my localhost through VS2008. Then I run the website off a paid web server. That one was all HTML and CSS.Now, PHP? Could someone verfiy that VS2008 CAN OR CAN NOT run PHP? That would be step one, huh?Chuck
Link to comment
Share on other sites

#Software: Microsoft Internet Information Services 7.5#Version: 1.0#Date: 2011-05-21 17:52:29#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken2011-05-21 17:52:29 127.0.0.1 GET /hello.php - 80 - 127.0.0.1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 404 0 2 58182011-05-21 17:56:42 127.0.0.1 GET /hello.php - 80 - 127.0.0.1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 404 3 50 02011-05-21 17:57:39 127.0.0.1 GET /hello.php - 80 - 127.0.0.1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 404 3 50 02011-05-21 17:57:43 127.0.0.1 GET /hello.php - 80 - 127.0.0.1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 404 3 50 0
Is that it? I found it in C:\inetpub\logs\Logfiles\W3SVC1\u_ex110521.log
Link to comment
Share on other sites

I think I am going to have to reinstall Win7 Pro. So, would anyone suggest me on in what order to install such for to get PHP working?First, install Win7 Pro, then run all updates (including Win7 SP1).Then MS Office, run all updates.Then install VS2008, run all updates.Then install SQL Server, run all updates.Then .... PHP ???which PHP?(same thing?)http://www.php.net/downloads.phphttp://us3.php.net/get/php-5.3.6.tar.bz2/from/a/mirrorhttp://php.iis.net/What about this?http://www.microsoft.com/downloads/en/deta...;displaylang=enI didn't understand this.http://learn.iis.net/page.aspx/704/install...tions-on-iis-7/The links in this forum is broken.http://www.codeguru.com/forum/showthread.php?t=339872As I attempted to install the php installer(s), it pops question(s) about where the php file to open. I appreciate if you going to guide me to configuration php or any configurating IIS, please tell me in step by step (as close as click-for-click). Also, once all is installed, a good guideline for me would be what to check for, to know where the defaults are and/or what need to change (such as typing "IIS" in the Start, Search, thus brings the IIS Manager Control Panel, where would the "server name" be? I tried looking for "server name" to mouse right-click "Propriety", I couldn't find any?).Chuck

Link to comment
Share on other sites

Could someone verfiy that VS2008 CAN OR CAN NOT run PHP?
No, it cannot. Visual Studio is not a web server, it's a development environment. PHP runs on a web server.Let me say this again: if you have both WAMP and IIS running, that is a problem. If they are both using the default settings then they are conflicting with each other and only one of them will be running. Do not use them both. If you're running IIS, then stick to IIS and follow the instructions I linked to in order to get PHP set up on IIS. If the phpinfo page I showed does not show anything, that means that PHP is not even running at all. If it were running that page would show a big listing with all of the settings and options that PHP is using. This is where you download PHP for Windows:http://windows.php.net/download/Look at the notes on the side to tell you which version of PHP 5.3 to download. Download the zip file, not the installer, and go through the manual installation steps I linked to in post 2.
Link to comment
Share on other sites

One more thing before I do the PHP installation (I am still looking into clean install of Win7)... when I test the website (with HTML/CSS), I use the Debug (" > " icon) within VS2008. It brings up the default browser and runs the website (include clicking the nav menu). Then I "X" it out, it Stop Deugging and returns to VS2008 editing mode. How would I suppose to do this with PHP? Same thing or I would need to open Windows Explorer, double-click on "index.php" and it would pop the browser and run it?Per reading the manual PHP installation instructions, is it suggested to install the php in C:\php\ ??For Win7 64-bit (and IIS 7.5 is the latest, after Windows Update), am I to use "VC9 x86 Non Thread Safe" (the "x86" is 32-bit?)?Thanks.Chuck

Link to comment
Share on other sites

You need to open the browser first and type the URL to the page. This is part of the reason why you need a web server, you have to access PHP scripts through the web server with a URL starting with HTTP if you want the PHP code to get executed. Double-clicking on a file or opening a local file in the browser will not execute PHP code, only the web server executes it. PHP is a server-side language, the server executes the code. There are other PHP IDEs that have integrated debugging tools, Visual Studio is not designed for PHP. Yes, use the VC9 non-thread safe version.

Link to comment
Share on other sites

No, it will start with http://localhost/, which is the name for the server you're running on, and then the path to the file. The file needs to be in the web server's document root somewhere. IIS has a section where you specify the document root. It's probably c:\inetpub\wwwroot. If you save a file inside wwwroot called phpinfo.php, then you access it at http://localhost/phpinfo.php.

Link to comment
Share on other sites

In "Changing the php.ini file" section of http://www.php.net/manual/en/install.windows.manual.php, it quotes:

After the php package content has been extracted, copy the php.ini-production into php.ini in the same folder.
I am stuck here... I extracted the php-5.3.6-nts-Win32-VC9-x86.zip into C:\PHP\. Then I see C:\PHP\php.ini-production , but no php.ini anywhere. I assumed that I was supposed to RENAME the "php.ini-production" to "php.ini". Thus I did...Now in reading the same section ("Changing the php.ini file"), it says to change "extension_dir" to "extension_dir=C:\PHP". I use Find to locate the "extension_dir" (which appears in 4 times). So, which one to change? All of 'em?Next is to change the "extension" to "extension=xxxxx.dll" (I am assuming the "xxxxx" was something I was supposed to change, but to what? numbers?). The word "extension" appears 64 times. A lot seems to be in comments area (?) and a lot also have files typed. See below for a small sample of the file:;extension=php_soap.dll;extension=php_sockets.dll;extension=php_sqlite.dll;extension=php_sqlite3.dll;extension=php_sybase_ct.dll;extension=php_tidy.dll;extension=php_xmlrpc.dll;extension=php_xsl.dll;extension=php_zip.dllI wish the instructions were in "English" or rephrase.Chuck
Link to comment
Share on other sites

I am stuck here... I extracted the php-5.3.6-nts-Win32-VC9-x86.zip into C:\PHP\. Then I see C:\PHP\php.ini-production , but no php.ini anywhere. I assumed that I was supposed to RENAME the "php.ini-production" to "php.ini". Thus I did...
yes it should be renamed as you had already assumed. There should be anothe php.ini-dev for development purpose which would be more appropiate to use i think. both are the php.ini file but the difference is that each of them has different settings for devlopment purpose and production purpose.
Now in reading the same section ("Changing the php.ini file"), it says to change "extension_dir" to "extension_dir=C:\PHP". I use Find to locate the "extension_dir" (which appears in 4 times). So, which one to change? All of 'em?
There should be one option there which can be set. there may other search tag macthed but there will only one option of it. extension_dir points to the directory where your all extension libary will resides.http://php.net/php/manual/ini.core.html#ini.extension-dir
Next is to change the "extension" to "extension=xxxxx.dll" (I am assuming the "xxxxx" was something I was supposed to change, but to what? numbers?). The word "extension" appears 64 times. A lot seems to be in comments area (?) and a lot also have files typed. See below for a small sample of the file:
it will point the dll libary which is resided into the extension folder. ';' in the front of it means comment. you have to uncomment it where you like to add any specific extension. only the extension which is resided in extension dir can be uncommented to be get loaded.
Link to comment
Share on other sites

...and after making every kind of change on the php.ini you need to restart the server to see the effect of change.

Link to comment
Share on other sites

';' in the front of it means comment. you have to uncomment it where you like to add any specific extension. only the extension which is resided in extension dir can be uncommented to be get loaded.
So, I am supposed to look and see which files listed exist in the C:\PHP\ directory. If it's there, then I uncomment it? Is that what it is? A puzzle? I just want to run a php website, so what am I supposed to know "like to add any specific extension"?I am only bring this up because the instructions says those changes are required (makes me wonder if it was required, then why aren't those enabled before dpownload).Chuck
Link to comment
Share on other sites

Forgive me, this thread is sort of leading OT (non-related to WAMP). Also, the more I look at the php.ini, it only get more confusing (such as which I should uncomment). Lastly, someone asked me to install Google Chrome because it is a web server. Is that correct? I am just asking, since I do NOT want to install Chrome.Chuck

Link to comment
Share on other sites

as it says it is an extension,so your php core can run without them. the purpose of each dll is diffrent. I dont know how you are going to used it anyway. i told you to follow the extension dir cause the standard installation pack comes with standard libary .so that you dont be puzlled,i said to uncomment the extension which is there. eg. if you are going to use mysql function you need to uncomment its libary and have to make sure it is tere in extension.

Link to comment
Share on other sites

Forgive me, this thread is sort of leading OT (non-related to WAMP). Also, the more I look at the php.ini, it only get more confusing (such as which I should uncomment). Lastly, someone asked me to install Google Chrome because it is a web server. Is that correct? I am just asking, since I do NOT want to install Chrome.Chuck
Chrome is a browser not a web server...Anyway do not change any settings in the php.ini file unless told so to do. These settings configure PHP and the security related to it as well. As an example there is a setting that will allow PHP access to your entire machine from a PHP command line instead of only the web root.What tutorial are you following?
Link to comment
Share on other sites

It's not required to enable any extensions. In fact, it is best to start with none enabled and make sure PHP runs first. Once it's running you can start enabling various extensions if you want to use them. If you want to connect to Microsoft SQL Server, for example, then you need to enable the mssql extension. If you're enabling extensions, enable them one at a time and test the phpinfo page again to make sure PHP still works. If you enable 10 extensions at once then test and it doesn't work, you won't know which one is the problem. When you enable an extension, you should be able to see a section for that extension with its options listed in phpinfo. If you enable an extension and don't see it listed on the phpinfo page then that's a problem (you might need to restart the server).The php.ini file might be pretty large and complex, but the vast majority of it is just comments explaining what the various options do. It also contains options for the various extensions which you don't even need to look at if those extensions aren't enabled. Doing it manually like this will give you a good idea about how PHP works with the server and what it can do. If you want to figure out what a certain extension does, like "mbstring" for example, go to php.net and type the extension name in the search box. You won't need to enable more than a few extensions, most of them are special-purpose extensions for specific situations (if you're not going to be using a PostgreSQL database, you don't need the pgsql extension for example).

Link to comment
Share on other sites

HTTP Error 500.19 - Internal Server ErrorThe requested page cannot be accessed because the related configuration data for the page is invalid.Detailed Error InformationModuleIIS Web CoreNotificationUnknownHandlerNot yet determinedError Code0x800700b7Config ErrorThere is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section definedConfig File\\?\C:\inetpub\wwwroot\web.configRequested URLhttp://localhost:80/index.htmPhysical PathLogon MethodNot yet determinedLogon UserNot yet determinedConfig Source   13: 			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">   14: 				<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>   15: 				<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

I did a little "Hello World!" php test, it worked. Then I tried a bigger one (link), it didn't work. That's not all, I even test my "working" HTML/CSS, it showed the above error. Now my VS is dimmed my Debug. Maybe it's because I am tired from the day's volunteer work. I know I said I will stop doing this for the weekend, but I just had to see the php to work!Chuck

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...