PHP codelock errors on a windows server


#1

http://www.ftracing.net

For some reason I am getting codelock errors out the wazoo.

http://www.ftracing.net/cm/test.php to see the php configuration.

I have no idea why it is doing it, If anyone has any idea on how to fix this please reply.

Thank you very much

J2B


#2

There is a variable called codelock That is not defined properly (on line 3).

Perhaps you are looking for a passed value (via post or get).

If you expect no value (at least initially) you could either ignore the errors line by line (same for the other variables of Vf3cd8451 and Vb71a8c5b ) by preceeding them with an @ or you can shut off the error reporting via php.ini error_reporting or you can do what I like. I like to use the teritiary function of ?

[php]

$codelink = !empty ($_POST[‘codelink’]) ? $_POST[‘codelink’] : ‘’ ;
$Vf3cd8451 = !empty ($_POST['Vf3cd8451 ']) ? $_POST['Vf3cd8451 '] : ‘’ ;
$Vb71a8c5b = !empty ($_POST['Vb71a8c5b ']) ? $_POST['Vb71a8c5b '] : ‘’ ;

[/php]

each line of code above would be equivalent to the following:
[php]

if !empty ($_POST[‘codelink’]) {
$codelink = $_POST[‘codelink’]
} else {
$codelink = ‘’
}

[/php]
The same for each subsequent variable. What this does is it looks for the Posted (or you can use GET or whatever) variable If it is passed, then you initialize the variable for the code with the value, if it was not passed you initialize the variable with an empty value. Either way , the variable gets initialized (and thus defined).

Hope this helps.
[/code]