Installation Problems Plz Help

Forum for you who has PHP installation issues

Moderators: macek, egami, gesf

helpmeplz
New php-forum User
New php-forum User
Posts: 2
Joined: Sun Nov 30, 2003 10:28 pm

Installation Problems Plz Help

Postby helpmeplz » Sun Nov 30, 2003 10:32 pm

I'm trying to create a skin system for my site, and i keep getting this error:
Parse error: parse error, unexpected T_VARIABLE

It says its a problem with line 4.

Here is the script.

<?
session_start();
if (empty($_SESSION)
$_SESSION[‘theme’] = 0;
?>


Anyone got any ideas plz help me!

helpmeplz
New php-forum User
New php-forum User
Posts: 2
Joined: Sun Nov 30, 2003 10:28 pm

Found some problems but new ones exist

Postby helpmeplz » Sun Nov 30, 2003 11:18 pm

I found some of the syntax problems. This script is above the <head> and above the <html> code of course.

This is the new script:

<?
session_start();
if (empty($_SESSION))
$_SESSION['theme'] = '0';
?>



But now I'm getting these errors


Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\****************\index.php:1) in c:\****************\index.php on line 2

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\****************\index.php:1) in c:\****************\index.php on line 2

sigix
php-forum Active User
php-forum Active User
Posts: 364
Joined: Mon Jul 14, 2003 9:39 pm
Location: /Earth/Xion

Postby sigix » Mon Dec 01, 2003 4:57 am

-will you please post the complete code/html of this page
-try putting ob_start() before the session_start();
and then check.

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

session

Postby ruturajv » Mon Dec 01, 2003 11:47 pm

please check that before you write the php code

no html code should be outputted....
NOT EVEN SPACE....


Return to “PHP Installation”

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron