[PHP] session_start

2003-02-23 Thread Mr Percival
Hi,

According to the PHP manual session_start always returns true.

Ther are times (like when there is a disk full error on the server) that the 
sesison_start will fail because its unable to write the session tmp file.

So shouldnt session_start be able to return false if the file write fails?

Or does it return false but the manual doesnt say so?
-- 
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] session_start

2003-02-24 Thread Mr Percival
So how do I check if the session write failed?

I thought perhaps

if(session_id() == ""){
echo "error";
}
but if all session_start does is basically assign a session ID then 
session_id will never be empty even when the write fails.

Thanks! :)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] session_start

2003-02-26 Thread Mr Percival

> [snip]
> >Not to be nosey or anything but "usually" session data will always be saved
> >or not. How come one would want to check to see if is was or not.
> [snip] 

Maybe I am on the wrong track but the other day I got a "disk full" error when I was 
sending some mail... at the same time while my website was working, it wasnt saving 
session data, so users were getting sent back to the login page instead of going on to 
use the site.

What I was hoping to do was to be able to give a error message if the server was 
having this problem, but in order to do that I was needing a way of knowing if it was 
because the session_start failed or users who didnt have cookies turned on.

I probably just need to get a new host since these disk full errors happen regularly. 
:(

Mr P.

-- 
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ob_start problem

2003-03-21 Thread Mr Percival
Hi,

I have a page that has an include at the top of the page and an include at the bottom 
of the page.

in the top include file I have added the command:

ob_start("ob_gzhandler");
in the bottom include I have added:

 ob_end_flush();  <-- i thought this was supposed to be run to clean up at the end of 
the page.

Most of the time everything is fine, but on occasions it will give an "warning" error:

Warning: ob_gzhandler() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used 
twice in /blahblah/includes/bottom.inc on line 25 

line 25 is the line
ob_end_flush();

I dont understand why it only comes up sometimes and what I am doing for that to 
happen, can anyone help me?

Thanks! :))

-- 
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ob_start problem

2003-03-21 Thread Mr Percival
That is what I thought, but it isnt.. after doing some testing it seems to only do it 
the first time the page is loaded in the session, if i hit refresh then the problem 
doesnt occur.
is it possible that it has anything to  do with the session_start and session_name 
that is used at the top of the page before the ob_start is called?


> *guess* you're including the footer twice, or are calling ob_end_flush()
> more than once.
> 
> not anywhere near sure though!!
> 
> Justin
> 
>  21/03/03 11:33 PM, Mr Percival ([EMAIL PROTECTED]) wrote:
> 
> > Hi,
> > 
> > I have a page that has an include at the top of the page and an include at the
> > bottom of the page.
> > 
> > in the top include file I have added the command:
> > 
> > ob_start("ob_gzhandler");
> > in the bottom include I have added:
> > 
> > ob_end_flush();  <-- i thought this was supposed to be run to clean up at the
> > end of the page.
> > 
> > Most of the time everything is fine, but on occasions it will give an
> > "warning" error:
> > 
> > Warning: ob_gzhandler() [ref.outcontrol]: output handler 'ob_gzhandler' cannot
> > be used twice in /blahblah/includes/bottom.inc on line 25
> > 
> > line 25 is the line
> > ob_end_flush();
> > 
> > I dont understand why it only comes up sometimes and what I am doing for that
> > to happen, can anyone help me?
> > 
> > Thanks! :))
> 

-- 
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Help inserting compressed data into a mysql database

2003-06-16 Thread Mr Percival
Hi,

I am trying to insert compressed data into a database.

Inserting it in seems to work file:

$data = addslashes(gzdeflate($data, 9));


For the most part it works on reteiving the data but sometimes the data is unreadable.


$data = @gzinflate($data);

What is the best way to be able to store any charater in the database so that I can 
guarantee the data is going to be good? 

Thanks! :))
-- 
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] gzinflate and gzdeflate

2002-01-16 Thread Mr Percival

Hi,

Im having problems with the gzinflate and gzdeflate commands...

I am trying to deflate a string of email addresses... If I only have one 
email address it will deflate and then inflate...

If I add another email address to the string then when i try to inflate 
the string I get a buffer error even tho it deflates ok (or so it seems to).

What am i doing wrong?

Im using PHP 4.1.0 on debian.

Thanks :)

Mr P.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]