php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12036 Error compiling if there is blank line before <?php
Submitted: 2001-07-11 03:36 UTC Modified: 2002-01-11 05:59 UTC
From: a at a dot com Assigned:
Status: Not a bug Package: *Compile Issues
PHP Version: 4.0.4 OS: Red Hat Linux 7
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: a at a dot com
New email:
PHP Version: OS:

 

 [2001-07-11 03:36 UTC] a at a dot com
Hi,
Do you know that if we have a blank line in top of code (before <?php) php can't process that code ?

OK.. this's the code sample:
1. First lets write a code like this
-----------------------
<?php
print "bla..bla...";
?>
-----------------------
and of course it will running well

2. Lets add one blank line in the first line
-----------------------

<?php
print "bla..bla...";
?>
-----------------------
And this one will running well too

3. Lets add session feature
-----------------------

<?php
session_start();
print "bla..bla..";
?>
-----------------------
Ops.. we got an error here... !!!

I'm not sure my php version, maybe php4.0.1... i don't know... so i'm sorry if this problem has been fixed in recent version

Best Regards
Jimmi A. Kembaren

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-11 03:55 UTC] zak@php.net
The output of *any* content to the browser causes the headers to be sent. After the headers have been sent, functions that send headers (like session_start() or header()) will fail.
 [2002-01-10 21:09 UTC] a at a dot com
---
 [2002-01-11 05:59 UTC] hholzgra@php.net
some simple rules when writing error reports:

> php can't process that code ?
always include the error message!

> I'm not sure my php version, maybe php4.0.1
you know about http://php.net/phpinfo ?



 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 05:01:30 2024 UTC