Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 22-11-2007, 05:33 PM
New kid on the block
 
Join Date: Nov 2007
Location: Terengganu
Posts: 8
Rep Power: 0
Redzuan9999 is on a distinguished road
Send a message via MSN to Redzuan9999 Send a message via Yahoo to Redzuan9999
php ob_start function

I've a problem when i redirect my page using header function, because after sending some data to another page, the error will appear
-output header already sent. cant redirect..
(too many input/output data on every page and i cant skip this step)

so i use
PHP Code:
ob_start(); 
and it seem all okey now, but the page loading become very slow.i have flush output buffering at the end of every page but the result is still same. page loading become very slow not like usual.

is this function really have affect on page loading? I have asked this problem at another forum, but some of them told me that the usage of multiple output buffering might become a problem

but I've take a look at php.net,
Quote:

Output buffers are stackable, that is, you may call
PHP Code:
ob_start() 
while another
PHP Code:
ob_start() 
is active. Just make sure that you call
PHP Code:
ob_end_flush() 
the appropriate number of times. If multiple output callback functions are active, output is being filtered sequentially through each of them in nesting order.
so, it's okey to use for many times as long i ended with clean/flush the output. anyone can share something about this ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-12-2007, 07:00 PM
hymns's Avatar
Senior Webmaster
 
Join Date: Nov 2001
Location: Johor
Posts: 768
Rep Power: 98
hymns is on a distinguished road
Send a message via ICQ to hymns Send a message via Yahoo to hymns
could you paste your code here?
__________________
I hate when:

vBulletin Message:
Sorry! The administrator has specified that users can only post one message every 60 seconds
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-12-2007, 10:38 AM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,619
Rep Power: 141
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
yeah.. must see the whole code.. or related file code.
since.. coding not only in 1 page. :P

if i not mistake.. (sorry, i was long time away from php handcoding ) ..

----
Let say index.php.. had ob_start() ,
in that file (index.php) also had include('header.php'); and include('db.php');

sadly.. or accidently.. in either header.php or db.php also had ob_start() .

No wonder crash happen. That's why 'already sent'.
and the another story is = the server configuration matter itself..
__________________
Personal's Blog! - Malaysian Artist!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
wedding and function shooting zzrmetal Advertise Your Services 1 03-09-2007 01:26 AM
Help needed in loadMovie() function! eric Website Design 9 24-05-2004 10:34 AM
print function ardella Website Programming 2 13-05-2004 12:50 AM
stripslashes() function for JSP? lcf Website Programming 3 21-04-2004 10:06 PM
tablet yg ada function 'pressure' adi Website Design 6 15-05-2002 05:52 PM



All times are GMT +8. The time now is 09:31 AM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59