
Originally Posted by
mutago
This fix the problem
I loaded all pdo_mysql module in the php.ini at root directory
At php.ini enable output_buffering by setting it to on or value 4096
or programmatically embed it on every first line of the php
<?php ob_start(); ?>
and the last or very bottom of the page
<?php ob_end_flush(); ?>
The settles the whole thing. I can now enjoy PDO
Thanks all. You guys are great. Am still working on other PDO codes and will get back should any thing goes wtong
You guys are great
I'm glad you figured it out.
If your question has been answered, please mark your thread "resolved":
- On your original post (post #1), click [edit], then click [go advanced].
- In the "thread prefix" box, select "Resolved".
- Click [save changes].
Two things that might be helpful for you in the future:
1) The fact that you have to use output buffering means that you have output being sent to the browser before you try to use header(). Using ob is just a monkeypatch (and will still fail if you ever happen to output more than 4096 bytes (your chunk size) before you try to set any headers). The real solution is to re-organize the order in which your script is written, so that all of your output happens after all of your program logic. Writing "PHP First" will also mitigate other problems in the future.
2) If you did not fix your Location header string, you should still do so. Not all browsers will interpret what you have the same way, and some will ignore it because it is not well-formed.

Originally Posted by
http://php.net/header
Note:
HTTP/1.1 requires an absolute URI as argument to » Location: including the scheme, hostname and absolute path ...
Your current example would be correctly written like so:
Code:
Location: http://example.com/absolute/path/to/sucess.php
Bookmarks