Solved

session_register error

Posted on 2008-06-16
2
640 Views
Last Modified: 2008-06-16
Hi Experts

I am new to PHP programming.  I have this code in one of my php files

<?php
ob_start();
session_register("parentid");
session_register("userid");
session_register("userlevel");
session_register("username");
include('database.php');
ob_end_flush();
?>
<html>
<head>
...

When I run this file, I get this error.

Warning: session_register() [function.session-register]: Cannot send session cache limiter - headers already sent (output started at /home/aarrsoft/public_html/wiz/cvwiz.php:1) in /home/aarrsoft/public_html/cwiz/cvwiz.php on line 3

Please help me to resolve it

Thanks
0
Comment
Question by:rajesh_chd
2 Comments
 
LVL 49

Accepted Solution

by:
Roonaan earned 125 total points
ID: 21793255
Is there a space in front of your <?php token or an UTF BOM?
0
 
LVL 2

Author Comment

by:rajesh_chd
ID: 21793278
No there is no space... :)
Yes my editor was saving it as utf8, changed to ANSI.

Resolved

Thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question