php-general Digest 14 Dec 2006 16:41:24 -0000 Issue 4514

Topics (messages 245820 through 245829):

Re: php redirection..
        245820 by: Budi Setiawan
        245823 by: Casey Chu
        245826 by: bruce
        245827 by: Youri LACAN-BARTLEY
        245829 by: Brad Fuller

Re: Active Directory password change utility in PHP
        245821 by: Saqib Ali

Re: problem with ob_start() and header() in osCommerce cart
        245822 by: Youri LACAN-BARTLEY
        245828 by: afan.afan.net

Re: Error Display
        245824 by: Nisse Engström

learning classes not sure how to do this correctly
        245825 by: macha.kingdomsend.com

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
basically:

cat.php
 -echo " test content<br>"
 -echo " more test content<br>"

//redirect user
 echo"
  <script>
    location.href='foo.php';
  </script>
 ";



Hi , im a new too..

but you can try with this to delay your script running for some seconds :
echo " test content<br>"
echo " more test content<br>"

// you can add :
sleep(2);
// this will cause your script delayed for 2 seconds

//redirect user
echo"
<script>
location.href='foo.php';
</script>
";




// hhaha..
// im just trying to help...
//

--- End Message ---
--- Begin Message ---
It's usually OK if it's 8 seconds or more, but that would take too long.

See here for info:
http://www.netmechanic.com/news/vol4/promo_no15.htm

On 12/13/06, Budi Setiawan <[EMAIL PROTECTED]> wrote:
> basically:
>
> cat.php
>  -echo " test content<br>"
>  -echo " more test content<br>"
>
> //redirect user
>  echo"
>   <script>
>     location.href='foo.php';
>   </script>
>  ";
>


Hi , im a new too..

but you can try with this to delay your script running for some seconds :
echo " test content<br>"
echo " more test content<br>"

// you can add :
sleep(2);
// this will cause your script delayed for 2 seconds

//redirect user
echo"
<script>
location.href='foo.php';
</script>
";




// hhaha..
// im just trying to help...
//

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



--- End Message ---
--- Begin Message ---
bud...

if you try to use the 'sleep' function, you'll discover it doesn't
effectively wait... ie, it's not waiting a specified period of time, prior
to invoking the jscript location.href.

remember, sleep is server side, jscript is client side. i haven't thoroughly
tested this, but i imagine that this acts in a similar manner to the
'header' function as well...



-----Original Message-----
From: Budi Setiawan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 13, 2006 9:33 PM
To: [EMAIL PROTECTED]
Cc: [email protected]
Subject: Re: [PHP] php redirection..


> basically:
>
> cat.php
>  -echo " test content<br>"
>  -echo " more test content<br>"
>
> //redirect user
>  echo"
>   <script>
>     location.href='foo.php';
>   </script>
>  ";
>


Hi , im a new too..

but you can try with this to delay your script running for some seconds :
echo " test content<br>"
echo " more test content<br>"

// you can add :
sleep(2);
// this will cause your script delayed for 2 seconds

//redirect user
echo"
<script>
location.href='foo.php';
</script>
";




// hhaha..
// im just trying to help...
//

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

--- End Message ---
--- Begin Message ---
Budi Setiawan wrote:
>> basically:
>>
>> cat.php
>>  -echo " test content<br>"
>>  -echo " more test content<br>"
>>
>> //redirect user
>>  echo"
>>   <script>
>>     location.href='foo.php';
>>   </script>
>>  ";
>>
> 
> 
> Hi , im a new too..
> 
> but you can try with this to delay your script running for some seconds :
> echo " test content<br>"
> echo " more test content<br>"
> 
> // you can add :
> sleep(2);
> // this will cause your script delayed for 2 seconds
> 
> //redirect user
> echo"
> <script>
> location.href='foo.php';
> </script>
> ";
> 

This would work providing you don't use output buffering, otherwise the
user won't see any data whatsoever that has been sent prior to the
sleep() call.

> 
> // hhaha..
> // im just trying to help...
> //
> 

--- End Message ---
--- Begin Message ---
Better to do this on the client side with JS

<html>
<head>
<title>Redirect Test</title>
<script language="JavaScript">
function redirect() {
        location.href='http://www.google.com/';
}
</script>
</head>
<body onLoad="setTimeout('redirect()', 3000);">
<p>You will be redirected in 3 seconds...</p>
</body>
</html>


> -----Original Message-----
> From: Youri LACAN-BARTLEY [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 14, 2006 10:44 AM
> To: PHP General List
> Subject: Re: [PHP] php redirection..
> 
> Budi Setiawan wrote:
> >> basically:
> >>
> >> cat.php
> >>  -echo " test content<br>"
> >>  -echo " more test content<br>"
> >>
> >> //redirect user
> >>  echo"
> >>   <script>
> >>     location.href='foo.php';
> >>   </script>
> >>  ";
> >>
> >
> >
> > Hi , im a new too..
> >
> > but you can try with this to delay your script running for some seconds
> :
> > echo " test content<br>"
> > echo " more test content<br>"
> >
> > // you can add :
> > sleep(2);
> > // this will cause your script delayed for 2 seconds
> >
> > //redirect user
> > echo"
> > <script>
> > location.href='foo.php';
> > </script>
> > ";
> >
> 
> This would work providing you don't use output buffering, otherwise the
> user won't see any data whatsoever that has been sent prior to the
> sleep() call.
> 
> >
> > // hhaha..
> > // im just trying to help...
> > //
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
Another reader on the usenet suggested the followng MS link, which
seems pretty helpful:
http://support.microsoft.com/kb/269190

saqib
http://www.full-disk-encryption.net


On 12/13/06, Saqib Ali <[EMAIL PROTECTED]> wrote:
Another reader on the usenet suggested the followng MS link, which
seems pretty helpful:
http://support.microsoft.com/kb/269190

saqib
http://www.full-disk-encryption.net

On 12/8/06, Mike Smith <[EMAIL PROTECTED]> wrote:
> How about adLDAP (http://adldap.sourceforge.net/). I haven't used 2.0,
> but it reportedly lets you add/change users.
>
> Mike
>


--
Saqib Ali, CISSP, ISSAP
http://www.full-disk-encryption.net



--
Saqib Ali, CISSP, ISSAP
http://www.full-disk-encryption.net

--- End Message ---
--- Begin Message ---

[EMAIL PROTECTED] wrote:
>> [EMAIL PROTECTED] wrote:
>>> Hi,
>>> even it's problem with osCommerce cart I think it's still php question:
>>>
>>> there is a code in application_top.php file (this file is includeed in
>>> login.php page, all the way on the top of the login.php file wich means
>>> is
>>> "the first one")
>>>
>>> // Check if the browser supports gzip encoding, HTTP_ACCEPT_ENCODING
>>> if (strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip'))
>>> {
>>> // Start output buffering, and register compress_output() (see
>>> // below)
>>>   ob_start("compress_output");
>>>
>>> // Tell the browser the content is compressed with gzip
>>>   header("Content-Encoding: gzip");
>>> }
>>>
>>> and I'm getting login.php as blank page.
>>> But, when I hide ob_start() and header() lines I will get login page but
>>> with Warning says "The Encryption key file is missing."?!?!?
>>>
>>> Any idea?
>> I think asking in a/the OSCommerce forum will get you quicker result
>> (don't forget to tell them what OS,php version, OSC version, etc you are
>> running)
>>
>> bloomin' weird error about the 'Encryption key' though... assuming it's a
>> php error... chances are it's specific to OSC.
>>
>> ps - don't know anything about OSC myself, sorry
>>
> I alerady posted on osCommerce forum but soemtimes I have to wait for 2
> days to get an answer :)
> Could it be something in php.ini has to be changed? Or Apache?
> I use php 5.2 and Apache 2.2

Hi there,

you might want to take a look at your php.ini and make sure you have
gzip support enabled.

Or maybe check something along the lines of "zlib.output_compression =
On" or maybe "zlib.output_handler". There might be something dodgy in
those areas although I really can't be sure since I'm not at all
familier with osCommerce;

Good luck !

> 
> Thanks
> 
> -afan
> 
> 
>>> -afan
>>>
>>
> 

--- End Message ---
--- Begin Message ---
>
>
> [EMAIL PROTECTED] wrote:
>>> [EMAIL PROTECTED] wrote:
>>>> Hi,
>>>> even it's problem with osCommerce cart I think it's still php
>>>> question:
>>>>
>>>> there is a code in application_top.php file (this file is includeed in
>>>> login.php page, all the way on the top of the login.php file wich
>>>> means
>>>> is
>>>> "the first one")
>>>>
>>>> // Check if the browser supports gzip encoding, HTTP_ACCEPT_ENCODING
>>>> if (strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip'))
>>>> {
>>>> // Start output buffering, and register compress_output() (see
>>>> // below)
>>>>   ob_start("compress_output");
>>>>
>>>> // Tell the browser the content is compressed with gzip
>>>>   header("Content-Encoding: gzip");
>>>> }
>>>>
>>>> and I'm getting login.php as blank page.
>>>> But, when I hide ob_start() and header() lines I will get login page
>>>> but
>>>> with Warning says "The Encryption key file is missing."?!?!?
>>>>
>>>> Any idea?
>>> I think asking in a/the OSCommerce forum will get you quicker result
>>> (don't forget to tell them what OS,php version, OSC version, etc you
>>> are
>>> running)
>>>
>>> bloomin' weird error about the 'Encryption key' though... assuming it's
>>> a
>>> php error... chances are it's specific to OSC.
>>>
>>> ps - don't know anything about OSC myself, sorry
>>>
>> I alerady posted on osCommerce forum but soemtimes I have to wait for 2
>> days to get an answer :)
>> Could it be something in php.ini has to be changed? Or Apache?
>> I use php 5.2 and Apache 2.2
>
> Hi there,
>
> you might want to take a look at your php.ini and make sure you have
> gzip support enabled.
>
> Or maybe check something along the lines of "zlib.output_compression =
> On" or maybe "zlib.output_handler". There might be something dodgy in
> those areas although I really can't be sure since I'm not at all
> familier with osCommerce;
>
> Good luck !

according phpinfo(); gzip iz eneabled
:(

-afan

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

--- End Message ---
--- Begin Message ---
On Sat, 9 Dec 2006 21:07:26 -0500, "Craige Leeder" wrote:

> I have been working with PHP5 since it's release, and until a few
> months ago, have never experienced the problem I am about to describe
> to you. I am not sure weather it has been discovered previously or
> not, nor do I know exactly how to replicate it, but I would like to
> know if you have encountered the problem as well. The problem is this:
> 
> I have noticed that there appears to be (fatal) errors that do not
> show when they occur in an included file. The script simply halts
> execution, and returns headers to the browser. I do not have a list of
> the errors that do not display, but I do not believe it applies to all
> fatal errors.

   I've had that happen a few times when there was
a missing or extraenous brace, parenthesis or quote.
I don't remember the exact details and I have no
idea how to reproduce it. I do wish I had kept the
faulty files as this is the sort of thing that can
easily waste hours of debugging.


--nfe

--- End Message ---
--- Begin Message ---
just starting to get used to classes, trying to figure out what i am
doing wrong, i know its going to be something stupid on my part,
probably really shouldn't be using a if statement or something heh

just doing a basic email verification to make sure its looks like email
addy

so i take the post to a var

PHP Code:
$email_address = $_POST['email_address'];


run it through this function in my class

PHP Code:
function check_email($address){
        if (ereg('[EMAIL PROTECTED]',
$address))
            return true;
        else
            return false;
    }


and then if true i want it to continue on with the script or error out
and quit back to the other page and display the error. so i have tried
something like this and stuff similar but get a error
Fatal error: Call to a member function on a non-object in

PHP Code:
if (!$keclass->check_email($email_address)) {
    $keclass->seterr(555);
    include('test.php');
    exit();
}

$keclass->seterr(000);
include('test.php');
exit();


the seterr is just a simple thing that takes the number and puts in a
session var for latter display...

--- End Message ---

Reply via email to