I recently compiled php 4.2.3 on my debian system under apache 2.0. I
then uploaded a site that was developed on another machine running
apache 1.3 and php 4.2.1. While testing the site i noticed something
seemed wrong. Upon further investigation i found that the is_null
function, which was working perfectly on the other system, seemed to be
malfunctioning.
for example:
if (is_null($somevar)){
execute code A
}
code A would execute regardless of whether $somevar had a null value or
not
if i do the following:
echo is_null($somevar)
nothing was echoed to the screen, again regardless of the value of
$somevar
if i did the following however with $somevar set to null:
if($somevar == null){
execute code A
if(is_null($somevar)){
execute code b
}
}
code A will execute but code B will not.
the value of somevar is assigned by an html form sent using the POST
method as this example illustrates:
$somevar = $_POST['$formvar'];
the purpose of the code is to check if a field was left blank.
This code worked fine on the original server but failed to work when
copied to the new server
my configuration is as follows:
./configure' '--prefix=/usr/local/apache2/php'
'--with-apxs2=/usr/local/apache2/bin/apxs'
'--with-config-file-path=/etc' '--with-mysql'
any insights?