[thelist] PHP error / strings

Bill Haenel bill at ncpr.org
Mon Jul 30 11:47:09 CDT 2001


Until about two days ago, I was using PHP with Apache. Now I'm using it on
IIS (haven't done this before, so very likely that I'm missing something).

I have a config.php file that holds values for use in different places
around the site. I include this file as necessary. Not all of the variables
in that file are used on every page where I use config.php of course.


One of the variables in config.php contained some HTML, for example:

$example1 = ("<textarea name='blahblah' cols='30' rows='5'
wrap='VIRTUAL'>$blahblah</textarea>");


Or as another example, an "if" statement looked like this:

if ($example2) {
	echo "burp";
}


This used to work. I include config.php, and the script uses what it needs
and the rest just sits there. When I called for the contents of $example1,
I'd get it. And when there was a value for $example2 it would be used as
expected.

Since my reinstall of PHP with IIS, the script uses what it needs and the
rest produces an error. In the above examples, I'd get "Undefined variable:
blahblah in..." or "Undefined variable: example2 in...", even though I was
not trying to use the contents of $example1 or $example2.

What changed? I have no idea. Seems like maybe a PHP configuration issue,
and it is a fresh new install of PHP, so it is certainly possible that it's
set up wrong. But I have no idea what part of php.ini would cover this
issue.

Thanks in advance for your help.

BH





More information about the thelist mailing list