Indy
07-15-2002, 11:50 PM
I'm working with including the global.php file for writting a stand alone program that uses the vB security system. On my machine at home, (W2K Pro), I have the latest and greatest PHP, mySQL, Apache and Perl installed. System works great and I can easily develop code without the hassles of uploading and testing online. However, I have run into one little problem that I can't figure out.
Here is the code that works on the real time server:
<?php
require("global.php");
if ($bbuserinfo['userid']==0) {
echo"You need to log in!";
}
else {
$username=$bbuserinfo['username'];
echo "USERNAME: $username";
}
?>
The error I receive when running this program on my local machine is:
Warning: Cannot add header information - headers already sent by (output started at C:\My Webs\vbulletin\test.php:2) in C:\My Webs\vbulletin\admin\functions.php on line 1579
USERNAME: admin
I'm assuming that something may not be setup correctly in PHP, Apache or something else. I appreciate any feedback you can give. I program, but I have only installed PHP, mySQL, etc. on my local machine about 2 months ago and I'm not that all familiar with tweaking it. Everything else that I have written locally works great. My test vB works great locally as well.
Thanks all!
ps: Love the :banana:
Here is the code that works on the real time server:
<?php
require("global.php");
if ($bbuserinfo['userid']==0) {
echo"You need to log in!";
}
else {
$username=$bbuserinfo['username'];
echo "USERNAME: $username";
}
?>
The error I receive when running this program on my local machine is:
Warning: Cannot add header information - headers already sent by (output started at C:\My Webs\vbulletin\test.php:2) in C:\My Webs\vbulletin\admin\functions.php on line 1579
USERNAME: admin
I'm assuming that something may not be setup correctly in PHP, Apache or something else. I appreciate any feedback you can give. I program, but I have only installed PHP, mySQL, etc. on my local machine about 2 months ago and I'm not that all familiar with tweaking it. Everything else that I have written locally works great. My test vB works great locally as well.
Thanks all!
ps: Love the :banana: