php-windows Digest 10 Dec 2003 09:22:46 -0000 Issue 2035
Topics (messages 22353 through 22354):
Question about $tbuf in php-4.3.4-installer.exe
22353 by: Chris Bunting
22354 by: Phil Driscoll
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Hello,
I started writing a basic script to list links and made some changes so
that I could use a small template type of file but now, I'm starting again
on the script using XP Pro, php 4.3.4 and so on but now, the tbuf will not
work. I just get a reference to: Undefined variable: tbuf in
c:\inetpub\wwwroot\chris\dbtest\pages.php on line 40
Line 40 is shown directly below:
--
$buffer = $tbuf;
Here is a bigger part of the fuction if it helps...
---
while($row = mysql_fetch_array($sql))
{
// Setup for use with templates.
$variable1=$row["title"];
$buffer = $tbuf;
$fd = fopen("template.inc","r");
while (!feof ($fd)) {$buffer .= fgets($fd, 4096);}
fclose ($fd);
$buffer = ereg_replace( '\$title',$row["title"],$buffer);
$string = eregi_replace('<br[[:space:]]*/?[[:space:]]*>',"\n", $string);
echo $buffer;
}
---
Any help or ideas on this would be appreciated. From searching the web, It
appears that there have been patches released to fix this issue but I have
not found any info on an updated installer including the patch.. Maybe I am
just missing something.
Thanks in advance for your help,
Chris
_________________________________________________________________
Shop online for kids’ toys by age group, price range, and toy category at
MSN Shopping. No waiting for a clerk to help you! http://shopping.msn.com
--- End Message ---
--- Begin Message ---
You haven't shown us any code where $tbuf would be assigned a value.
Is it meant to be passed in via get post or session? If so, the problem will
be that register_globals is switched off in your php.ini file (as it has been
by default for the last few releases of php).
Otherwise, you need to show the code where $tbuf is meant to be set.
Cheers
--
Phil Driscoll
--- End Message ---