I have no idea's what these errors mean

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
thefreebielife
Forum Contributor
Posts: 126
Joined: Thu Apr 26, 2007 2:59 pm

I have no idea's what these errors mean

Post by thefreebielife »

PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /hermes/web10/b257/pow.thefreebielife/affiliate/psignup.php:3) in /hermes/web10/b257/pow.thefreebielife/affiliate/psignup.php on line 3
PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /hermes/web10/b257/pow.thefreebielife/affiliate/psignup.php:3) in /hermes/web10/b257/pow.thefreebielife/affiliate/psignup.php on line 3
I don't know what these mean, also I don't know which part of my code to post.

Code: Select all

<? session_start(); ?>
<? require("config.php"); require("functions.php"); ?>
Also weird is that not all of my page displays.

Any help would be appreciated, also, let me know if theres any other code i should post.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

That error means that there is output before your call to session_start(), and the output is occurring on line 3. session_start(), just like header(), must be called before any output is sent to the browser in order to be valid.

And don't use short tags (<?), use <?php. Short tags will be deprecated come PHP 6.
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

is this also

Post by yacahuma »

is this going to be deprecated to

Code: Select all

<?=$var1?>
If it is that will be a big mistake. What I like about php (so far ) is that the language helps the programmer. Having
to type more than the above is stupid and a waste of time. I really hope they dont start to change the language so much that it
becomes a 2nd java. Java has to be one of the most ridiculous languages ever created.


I just dont understand why short tags should be deprecated.
:evil:
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Yes, they are deprecated too.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: is this also

Post by Chris Corbyn »

yacahuma wrote:I just dont understand why short tags should be deprecated.
:evil:
Because it can be turned on or off and it just causes confusion and inconsistency. If you wrote all your code with <? and ?> tags then moved to a server who chose to set short_open_tag to "off" who do you start cursing? The server admin, or PHP?

If it's all about typing 3 fewer characters, perhaps we should all turn register_globals on and trawl through our code replacing $_POST["foo"] with the far easier to type $foo.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

PHP is not moving in the direction of Java at all. I also don't agree that Java is ridiculous either... It is the best language for learning OOP because you don't have a choice, but that's a separate matter.

PHP 6 will be getting rid of a lot of unnecessary things. The language is a lot bigger than it used to be and it's now catering to the community that made the language what it is today, as opposed to the average novice programmer that's just looking for a quick way to make a website. Of course, the changes are meant to benefit them as well, as it will force them to apply proper programming techniques and stop using shortcuts. The open-source community has to account for all of these unnecessary settings, and they shouldn't have to.

Short tags are unnecessary and will be gone. At first, they were just going to be discouraged, but now I believe they will be completely removed.

Register globals is both unnecessary and insecure, and will be gone.

Magic quotes is totally unnecessary and invasive, and will be gone.

Safe mode will be gone.

References with the ampersand operator will be gone.


They're cleaning up. :-D
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

I dont agree

Post by yacahuma »

If something makes may life easier and do not harm , I dont think is unnecesary. short tags are just that, SHORT. What I hate about java/jsp is how verbose it is. I really hope php dont move in that direction where I have to type so much to do something so simple.

JSP is a joke. It was a complete afterthought. It is so bad that now Sun recognize that JSP is not that good and they want to create a new language. When you get a jsp error you better start praying because the error will be on a file that you actually did not write(the servlet). I worked in so many companies that use java J2EE servers, just to make extremely simple sites that can be done in a couple of hours in PHP.
BUT NOOOOO. Java is the standard. Mindless supervisors that where brain washed into the Java crap.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

hmmm ok.
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

superdezign wrote:PHP is not moving in the direction of Java at all. I also don't agree that Java is ridiculous either... It is the best language for learning OOP because you don't have a choice, but that's a separate matter.

PHP 6 will be getting rid of a lot of unnecessary things. The language is a lot bigger than it used to be and it's now catering to the community that made the language what it is today, as opposed to the average novice programmer that's just looking for a quick way to make a website. Of course, the changes are meant to benefit them as well, as it will force them to apply proper programming techniques and stop using shortcuts. The open-source community has to account for all of these unnecessary settings, and they shouldn't have to.

Short tags are unnecessary and will be gone. At first, they were just going to be discouraged, but now I believe they will be completely removed.

Register globals is both unnecessary and insecure, and will be gone.

Magic quotes is totally unnecessary and invasive, and will be gone.

Safe mode will be gone.

References with the ampersand operator will be gone.


They're cleaning up. :-D
I agree with "The open-source community has to account for all of these unnecessary settings, and they shouldn't have to." I'm lazy and would like to type less, but when you experienced in computers and programming you type fast... so typing 60+ words a minute and having to type the extra "php" is nothing. I'm glad PHP is cleaning up, because to me its confusing having unnecessary things because its more to confuse you when your trying to find out how to do something new.
Post Reply