Posted by:
Hogwash
(---.w92-136.abo.wanadoo.fr)
I have just installed and configured WAMP. Reason: I want to be able to try out "php include" stuff on a local server. My test files work flawlessly when uploaded to my actual website (OK, did have to add an item to the .htaccess).
Situation:
WampServer 2.5 (Apache 2.4.8, PHP 5.5,12, MySQL 5.6.17); Windows 7, 32bit.
WAMP icon is green
wampapache service is running
wampmysqld service is running
no, I don't have Skype on my PC
In Apache httpd.config: all references to port 80 have been changed to 8080, and "AddType application/x-httpd-php .html" has been added to <IfModule mime_module> ....... </IfModule>
localhost and localhost/:8008 both correctly show the server configuration.
WAMP --> PHP settings --> "allow url fopen" and "allow url include" are "on" ( = has check mark)
WAMP--> Apache --> Apache Modules --> "include module" is "on"
But: "WAMPSERVER - server Offline"
When trying to execute the "testmysql.php" that is installed by default in the wamp/www directory, I get a screen with the following erros messages: "Warning: mysql_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\Program Files\wamp\www\testmysql.php on line 2"
My "include-test.htm" test file is simply:
WAMPServer forum: Hogwash, fmgd@hot, Tallyho1
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body>
<?php include("external.htm"
; ?>
<?php include("test.txt"
; ?>
</body>
</html>
The "external.htm" and "test.txt" are also in the WAMP "www" directory.
When executing "[
localhost]; with my browser (the one used by/with WAMP), the "include-test.htm" executes without performing the "include". Using "inspect element" in Firefox confirms that the "php include" is being ignored / does not get parsed:
<html>
<head>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type"></meta>
<title></title>
</head>
<body>
<!--?php include("external.htm"
; ?-->
<!--?php include("hell-cam-freq.txt"
; ?-->
</body>
</html>
Would appreciate any and all help!
Thanks,
Fred