Hi I have some php webpages that where working OK.
Now this error has suddenly appeared:
Notice: Undefined index. REQUEST_URI in menu.php on line 4
Here are the first 6 lines from menu.php:
<div style="float: left; width: 150px; margin-left: 0; padding-left: 0;">
<ul style="margin-left: 0; padding-left: 0; color: white;">
<li class="accordionButton style="color: red;"<?php
if (basename($_SERVER["REQUEST_URI"]) == "index.php")
{ echo " active_link"; } ?>">
<a class="rfpMenuBtn" style="color: grey;font-size: 11pt;" href="index.php">Home</a></li>
Also when I click on a link from the above menu.php the php include files for the link are not parsed only the html in the actual file that I link to appears nothing from the php include files.
I've recently tried to do some cleaning up on my pc in the process I ran "Free Windows Registry Repair 2.5" and SpeedUpMyPC 2011. I don't know if one of these caused the problem.
My OS is Windows XP I've installed xampp with php for windows. I'm using HTML-Kit to write php pages.
Another change I've noticed is that before the clean up, to preview pages in HTML-Kit I would first have to run: iisreset -stop , then start Apache from xampp control panel. Now the preview works with and without running iisreset and starting Apache.
Some-one from another forum suggested I run print_r($_SERVER) this is the output I received:
Array ( [ALLUSERSPROFILE] => C:\Documents and Settings\All Users.WINDOWS [APPDATA] => C:\Documents and Settings\davidm.DAVID\Application Data [CLASSPATH] => .;C:\Program Files\QuickTime\QTSystem\QTJava.zip [CommonProgramFiles] => C:\Program Files\Common Files [COMPUTERNAME] => DAVID [ComSpec] => C:\WINDOWS\system32\cmd.exe [FP_NO_HOST_CHECK] => NO [HOMEDRIVE] => C: [HOMEPATH] => \Documents and Settings\davidm.DAVID [iNCLUDE] => d:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\ [LIB] => d:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\ [LOGONSERVER] => \\DAVID [NUMBER_OF_PROCESSORS] => 2 [OS] => Windows_NT [Path] => C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\:\Program Files\Samsung\Samsung PC Studio 3 [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH [PROCESSOR_ARCHITECTURE] => x86 [PROCESSOR_IDENTIFIER] => x86 Family 6 Model 23 Stepping 6, GenuineIntel [PROCESSOR_LEVEL] => 6 [PROCESSOR_REVISION] => 1706 [ProgramFiles] => C:\Program Files [QTJAVA] => C:\Program Files\QuickTime\QTSystem\QTJava.zip [sESSIONNAME] => Console [systemDrive] => C: [systemRoot] => C:\WINDOWS [TEMP] => C:\DOCUME~1\DAVIDM~1.DAV\LOCALS~1\Temp [TMP] => C:\DOCUME~1\DAVIDM~1.DAV\LOCALS~1\Temp [uSERDOMAIN] => DAVID [uSERNAME] => davidm [uSERPROFILE] => C:\Documents and Settings\davidm.DAVID [VS71COMNTOOLS] => d:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\ [VS90COMNTOOLS] => d:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\ [windir] => C:\WINDOWS [__COMPAT_LAYER] => EnableNXShowUI [php_SELF] => [REQUEST_TIME] => 1315219257 ) PHP Notice: Undefined index: REQUEST_URI in menu.php on line 14 PHP Notice: Undefined index: REQUEST_URI in menu.php on line 19 PHP Notice: Undefined index: REQUEST_URI in menu.php on line 24 PHP Notice: Undefined index: REQUEST_URI in menu.php on line 29 PHP Notice: Undefined index: REQUEST_URI in menu.php on line 34 PHP Notice: Undefined index: REQUEST_URI in menu.php on line 39 PHP Notice: Undefined index: REQUEST_URI in menu.php on line 45 PHP Notice: Undefined index: REQUEST_URI in menu.php on line 50 PHP Notice: Undefined index: REQUEST_URI in menu.php on line 55 PHP Notice: Undefined index: REQUEST_URI in menu.php on line 60 PHP Notice: Undefined index: REQUEST_URI in menu.php on line 65 PHP Notice: Undefined index: REQUEST_URI in menu.php on line 70 PHP Notice: Undefined index: REQUEST_URI in menu.php on line 75 PHP Notice: Undefined index: REQUEST_URI in menu.php on line 81
This is all Chinese to me and I'm English.
I'm a complete php novice.
Any help greatly appreciated.
Thanks
David