WAMP, IIS and PHP
Posted by: Timbo9799 (---.neo.res.rr.com)
Date: May 31, 2009 07:02AM

I successfully installed WampServer on a Windows machine running Business Server 2003. The server is also configured with IIS. I discovered the workaround for port 80 and Apache in this forum by getting Apache to listen on port 8080. No problem, and all Wamp services are up and running. I can get to PHPMyAdmin fine by navigating as follows: http:// localhost:8080/phpmyadmin . My problem is that the PHP scripts will not execute. The Apace server is not recognizing the PHP file extension, or something. And no...there are no hidden TXT file extensions attached to my scripts. For example, when I plug this into the browser, I get a 404 not found: http:// localhost:8080/myscript.php where myscript.php is a ligitimate PHP script residing in the wamp/www folder. It runs just fine on my desktop box which has Wamp installed for my development purposes. All I can think of is that IIS is somehow not allowing Apache to parse and execute the PHP scripts. I'm about to go and install PHP into IIS and forget Apache. Any ideas or suggestions would be appreciated! Please note: there are no spaces in the URLs I supplied in the examples above. I just added the space so it would display in this post.

Re: WAMP, IIS and PHP
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: May 31, 2009 08:50AM

if the wamp icon is white... and the file does exist... in the www folder... AND h ttp://localhost brings up the wamp menu page

then there is a hidden ext on ur file.. there is no other reason...

ul need to open my computer >tool>folder options>view(tab)> untick (hide file extentions for known file types)>apply >ok

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

Re: WAMP, IIS and PHP
Posted by: Timbo9799 (---.neo.res.rr.com)
Date: May 31, 2009 04:40PM

Thank you for the prompt reply. The Wamp icon is white. Apache is listening at port 8080, and MySql is listening at port 3306. As stated earlier, there are no hidden file extensions in any of my PHP scripts. All folders on the server are set to display file extensions. One thing I have noticed is that 'PHP Script' is not listed as a known file extension in the folder options dropdown. That may be something I need to look into. As for the Wamp main menu, I do not get that when I browse to h ttp://localhost:8080/ as I have replaced the index.php with my own index.php which is my home page for the website. That (of course) is not being recognized and executed by the Apache server, as is the case with all of my scripts. I really hesitate to go with installing PHP into IIS and bypassing Apache, because I'm positive that IIS will interpret my PHP script commands differently and I will have to battle through getting them to conform to those standards. Geez, other that investigating why 'PHP Script' is not a known file extension type I'm stuck!

Re: WAMP, IIS and PHP
Posted by: yfastud (Moderator)
Date: May 31, 2009 04:49PM

easiest way is create a folder named info saved in wamp/www folder, then save file index.php w/ this simple content
<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>
then access as http:/ / localhost:8080/info and if not seeing the whole info for your server, you need to check permission you setup in all firewalls/antivirus

Have fun,

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

Re: WAMP, IIS and PHP
Posted by: Timbo9799 (---.neo.res.rr.com)
Date: May 31, 2009 07:16PM

I did as you suggested, and sure enough that test index.php script worked. I may be barking up the wrong tree, as they say. My applications all call a script to connect to MySQL, and I went in and modfied the $hostname variable in that script to point to port 8080.

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_DGRconnect_acquisition = "localhost:8080";
$database_DGRconnect_acquisition = "dgr_acquisition_disposition";
$username_DGRconnect_acquisition = "root";
$password_DGRconnect_acquisition = "";
$DGRconnect_acquisition = mysql_pconnect($hostname_DGRconnect_acquisition, $username_DGRconnect_acquisition, $password_DGRconnect_acquisition) or trigger_error(mysql_error(),E_USER_ERROR);
?>

Now, the server appears to be executing the application, but times out with a fatal error in the attempt to make the MySQL connection:

Warning: mysql_pconnect() [function.mysql-pconnect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 2 in C:\wamp\www\Connections\DGRconnect_acquisition.php on line 9

Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\Connections\DGRconnect_acquisition.php on line 9


Note that I have set the connection password to null in both my connection script, and in the Wamp my.ini file. I know this is not secure, but is only temporary. Works fine on my testing box.

In short, it looks like I need to re-visit the MySQL setup to get the scripts to connect and execute. I'll report back!

Re: WAMP, IIS and PHP
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: May 31, 2009 07:26PM

no no php has a max execution time of 30 seconds.. if the script takes longer it will stop


open the php.ini

leftclick wamp icon >php>php.ini


find
max_execution= 30
and change to

0




then restart wamp

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

Re: WAMP, IIS and PHP
Posted by: Timbo9799 (---.neo.res.rr.com)
Date: June 01, 2009 06:39AM

Well, I have my PHP scripts executing now! The bad news is, I can't tell you exactly why. The change to the execution time in the php.ini file made no difference. I got the same result, whether it was set at 0 or at 30. As I tried to indicate, this was definitely a MySQL connection timeout. I can tell you that I had some pieces-parts missing in my wamp/www folder, which didn't help. I have Spry/Ajax scripting in some of my forms, and had forgotton to move the Spry library over, so that was definitely not helping matters. In any event, my system (for the most part) seems to be working now. Go figure! I thank you both for your help with this. It's really cool to know that I can come here and get prompt responses to my Wamp-related questions or issues.

Re: WAMP, IIS and PHP
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: June 01, 2009 08:14AM

Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp

this is php , not mysql

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

Re: WAMP, IIS and PHP
Posted by: Timbo9799 (---.neo.res.rr.com)
Date: June 01, 2009 07:28PM

Right, but I believe the timeout was due to a failed MySQL connection. The log showed repeated failed attempts to connect to the database, which I was able to remedy.

By the way, I discovered that PHP version 5.2.9-2 handles variables a little differently than 5.2.6 which was what I was on. You must initialize a variable before using it or PHP doesn't recognize it. Interesting.

Re: WAMP, IIS and PHP
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: June 01, 2009 07:49PM

thats not 5.2.9

its jsut a setting in the php.ini for warnings

you can turn it off

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

Sorry, only registered users may post in this forum.