Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can !
Moderator: General Moderators
vietboy505
Forum Commoner
Posts: 53 Joined: Wed Feb 22, 2006 9:30 am
Post
by vietboy505 » Mon Feb 27, 2006 9:10 am
I did the exact from this link to show how to install PHP in IIS.
http://www.webthang.co.uk/tuts/tuts_ser ... hp_iis.asp
Then I create a folder where I will work on the web.
I test out the PHP, and it works for
http://localhost/webportal/test.php where
test.php is
And when I try
http://localhost/webportal/index.php The page cannot be found even though my code for
index.php is:
Code: Select all
<html>
<head>
<link href="images/style.css" rel="stylesheet" type="text/css" />
<LINK REL="SHORTCUT ICON" HREF="images/favicon.ico">
</head>
<div id=menu style="float:left">
<?php include('nav_link.php') ?>
</div>
<div id="header">
<?php include('logo.php') ?>
</div>
<div id="footer">
<?php include('copyright.php') ?>
</div>
</html>
Any one know why this is not working?
Path to execute pHP is C:\PHP\php-cgi.exe
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Mon Feb 27, 2006 10:13 am
Save your current index.php as index_old.php. Save your current test.php as index.php and run it. See what happens. Also, check to see if your browser is throwing any errors. Sometimes a page not found error (expecially in Internet Explorer) looks like a 500 Internal Server error page.
vietboy505
Forum Commoner
Posts: 53 Joined: Wed Feb 22, 2006 9:30 am
Post
by vietboy505 » Mon Feb 27, 2006 11:00 am
works fine after renaming test.php to index.php
Code: Select all
phpinfo()
System Windows NT 5.1 build 2600
Build Date Jan 11 2006 16:35:21
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"
Server API CGI/FastCGI
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINNT\php.ini
PHP API 20041225
PHP Extension 20050922
Zend Extension 220051025
Debug Build no
Thread Safety enabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, http, ftp, compress.zlib
Registered Stream Socket Transports tcp, udp
Registered Stream Filters convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, zlib.*
I don't why it doesn't work for my original index.php
Burrito
Spockulator
Posts: 4715 Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah
Post
by Burrito » Mon Feb 27, 2006 11:20 am
hard to say without seeing your included files.
Start small, then build up to see what's causing the problem.
vietboy505
Forum Commoner
Posts: 53 Joined: Wed Feb 22, 2006 9:30 am
Post
by vietboy505 » Mon Feb 27, 2006 12:01 pm
Code: Select all
index.php
<html>
<head>
<link href="images/style.css" rel="stylesheet" type="text/css" />
<LINK REL="SHORTCUT ICON" HREF="images/favicon.ico">
</head>
<div id=menu style="float:left">
<?php include('nav_link.php') ?>
</div>
<div id="header">
<?php include('logo.php') ?>
</div>
<div id="footer">
<?php include('copyright.php') ?>
</div>
</html>
nav_link.php
<a href=http://url>link 1</a><br>
<a href=http://url>link 2</a><br>
<a href=http://url>link 3</a><br>
<a href=http://url>link 4</a> <br>
logo.php
<a href="http://www.google.com" target="_blank">
<img src="images/logo.gif" border="0"></a>
copyright.php
<?php
if (date("Y") == "2006") {
echo "©2006 COMP";
} else {
echo "©2006-" . date("Y") . "COMP";
}
?>
Full code above...
Burrito
Spockulator
Posts: 4715 Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah
Post
by Burrito » Mon Feb 27, 2006 12:05 pm
I've had a similar issue before. I think I resolved the issue, by copying all of the text of the file into notepad, then saving it again. I think it's a funked windows permissions issue.
you might need to do that with all of your included files as well.
vietboy505
Forum Commoner
Posts: 53 Joined: Wed Feb 22, 2006 9:30 am
Post
by vietboy505 » Mon Feb 27, 2006 12:10 pm
Burrito,
You're right.
I moved it all to different folder, and use notepad to open again and save as.
And it works..
I wonder why it doesn't work from the beginning with Textpad editor.
Thanks!