For Programmers: Free Programming Magazines  


Home > Archive > PHP Installation > November 2004 > Newbie help needed with IIS errors.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Newbie help needed with IIS errors.
Gautam Sathe

2004-11-19, 8:55 pm

Hi

I am new to PHP... Was just playing with the code to see what I can do and I
ran into a weird problem.

I have this code in a .php file:

<?php
if ($dataSuffix == "pass1") {
$notes = array(0 => array("message" => "Quantitative Studies (3 hrs)",
"display" => 1, "url" =>
"DCTS_RequirementsDetails.php?req=QS&status=Unselected", "target" =>
"_self"),

array("message" => "Integrative Studies (3 hrs)", "display" => 1, "url" =>
"DCTS_RequirementsDetails.php?req=IS&status=Unselected", "target" =>
"_self"));
} else if ($dataSuffix == "pass2") {
$notes = array(0 => array("message" => "Integrative Studies (3 hrs)",
"display" => 1, "url" =>
"DCTS_RequirementsDetails.php?req=IS&status=Unselected", "target" =>
"_self"));
} else if ($dataSuffix == "pass3") {
$notes = array(0 => array("message" => "Integrative Studies (3 hrs)",
"display" => 1, "url" =>
"DCTS_RequirementsDetails.php?req=IS&status=Unselected", "target" =>
"_self"));
} else if ($dataSuffix == "pass4") {
$notes = array(0 => array("message" => "None", "display" => 0, "url" =>
"", "target" => ""));
} else if ($dataSuffix == "pass5") {
$notes = array(0 => array("message" => "None", "display" => 0, "url" =>
"", "target" => ""));
} else if ($dataSuffix == "pass6") {
$notes = array(0 => array("message" => "None", "display" => 0, "url" =>
"", "target" => ""));
} else if ($dataSuffix == "pass11") {
$notes = array(0 => array("message" => "None", "display" => 0, "url" =>
"", "target" => ""));
} else if ($dataSuffix == "pass12") {
$notes = array(0 => array("message" => "None", "display" => 0, "url" =>
"", "target" => ""));
}
?>
<div class="PERT_Sidebar">
<h3>Reminders</h3>
<h5>You need to select electives for the following
requirements:</h5>
<ol>
<?php
foreach ($notes as $note) {
?>
<li><?php if ($note[display] != 0) { ?><a href="<?php echo
$note[url]?>" target="<?php echo $note[target] ?>"><?php } ?><?php echo
$note[message] ?><?php if ($note[url] != "") { ?></a><?php } ?></li>
<?php
}
?>
</ol>
</div>

That's to fake up a DB for now so the code loops through it and makes the
<li></li> blocks... Figured I'd get to know a bit of php before I added
mySql to the mix.

Now this works fine when I run it locally on my desktop with Apache2/PHP5...
But when I copy it to my laptop, It gives a very strange error message...

--
Notice: Use of undefined constant display - assumed 'display' in
C:\Inetpub\wwwroot\dcts\includes\sidebar
_notes.php on line 28

Notice: Use of undefined constant message - assumed 'message' in
C:\Inetpub\wwwroot\includes\sidebar_note
s.php on line 28
None
Notice: Use of undefined constant url - assumed 'url' in
C:\Inetpub\wwwroot\includes\sidebar_note
s.php on line 28
--

Why would this throw up such an error message? It seems very strange to
me... Changing file permissions seems to affect this... When I grant all
permissions to everyone I get this error... Otherwise I get a 404.

I installed PHP5 from the installer for windows and got this to work as a
CGI under IIS on my laptop... Could that be causing any problems?

TIA for your answers...
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com