php-general Digest 21 Mar 2012 14:27:13 -0000 Issue 7737

Topics (messages 317152 through 317159):

Re: Bug zlib.output_compression not normal work in IIS7.5
        317152 by: Simon Schick

Pear Auth problem
        317153 by: Karl-Arne Gjersøyen
        317159 by: Govinda

How can I convert these to hex or strings?
        317154 by: David OBrien
        317155 by: Jim Giner
        317156 by: David OBrien
        317157 by: Jim Giner

Re: php upload does not work proper, ["tmp_name"] and other are missing in 
$_FILES
        317158 by: Meike Stone

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
2012/3/19 小鱼虾 <i...@xiaoyu.org>
>
> How I do fix it ?
>
>
> https://bugs.php.net/bug.php?id=61434
>

Hi,

I got a rough overview of the conversation in the bug-tracker ...

You were always talking about a tool you used to test the
gzip-compression ... but why not test it natively?
Using Firefox (with the extension Firebug) or Safari / Chrome for
example you can easily view the respond-header from the server and get
more info out of that.
Just press F12, click on the network-tab, select your request and
search in the response-header for "Content-Encoding: ..."

I would write my own small php-test-script where you just output some
text. Then you're sure that not other code is doing something strange.

Another possible problem: Is the extension zlib enabled at all? The
documentation says that it's disabled by default ...
http://www.php.net/manual/en/zlib.installation.php

Bye
Simon

--- End Message ---
--- Begin Message ---
Hello.
I am trying to use pear Auth packet but am doing something wrong.
I am currently looking at the simple example in the documentation, but
something is wrong in my source code, because if I write a username
and a password in the fields and hit the submit button, I receive a
blank pages without any informatio at all..

Here is my source code:
-----------------------------------

<?php

require_once('Auth.php');
if(!isset($_POST['submit'])){
function loginFunction($username = null, $status = null, &$auth = null){
?>

<form action="index.php" method="post">
        <fieldset>      
    <legend>Login:</legend>
        <p>
    <label for="username">Username:</label><br>
        <input id="username" name="username" type="text">
    </p>
    <p>
    <label for="password">Password:</label><br>
        <input id="password" name="password" type="password">
    </p>
    <p>
    <input id="submit" name="submit" type="submit" value="Login">
    </p>
    </fieldset>
</form>

<?php   
        }

        $options = array(
        'dsn' => "mysql://username:password@localhost/database",
        );
        $a = new Auth("DB", $options, "loginFunction");
        $a->start();
        
        if($a->checkAuth()){
                header("Location: http://www.karl-arne.name/";);
                }
}       
?>

The example is located at:
http://pear.php.net/manual/en/package.authentication.auth.intro.php

Thanks for your time.
Karl

--- End Message ---
--- Begin Message ---
> Hello.
> I am trying to use pear Auth packet but am doing something wrong.
> I am currently looking at the simple example in the documentation, but
> something is wrong in my source code, because if I write a username
> and a password in the fields and hit the submit button, I receive a
> blank pages without any informatio at all..
> 
> Here is my source code:
> -----------------------------------
> 
> <?php
> 
> require_once('Auth.php');
> if(!isset($_POST['submit'])){
> function loginFunction($username = null, $status = null, &$auth = null){
> ?>
> 
> <form action="index.php" method="post">
>       <fieldset>      
>    <legend>Login:</legend>
>       <p>
>    <label for="username">Username:</label><br>
>       <input id="username" name="username" type="text">
>    </p>
>    <p>
>    <label for="password">Password:</label><br>
>       <input id="password" name="password" type="password">
>    </p>
>    <p>
>    <input id="submit" name="submit" type="submit" value="Login">
>    </p>
>    </fieldset>
> </form>
> 
> <?php 
>       }
> 
>       $options = array(
>       'dsn' => "mysql://username:password@localhost/database",
>       );
>       $a = new Auth("DB", $options, "loginFunction");
>       $a->start();
>       
>       if($a->checkAuth()){
>               header("Location: http://www.karl-arne.name/";);
>               }
> }     
> ?>
> 
> The example is located at:
> http://pear.php.net/manual/en/package.authentication.auth.intro.php

Karl,

You'll want to turn on error reporting so you can start to get a peak into what 
is happening..  Do you know how to do that?  (... so that you get more info. 
than just a blank page).

-Govinda


--- End Message ---
--- Begin Message ---
I'm running snmp against a huge list of printers and certain HP models
return

Model:
stdClass Object
(
    [type] => 4
    [value] => ☺§HP LaserJet P3010 Series
)

Serial:
stdClass Object
(
    [type] => 4
    [value] => ☺§VNBCC1917W
)

MacAddress:
stdClass Object
(
    [type] => 4
    [value] => ⌠╬F>╒'
)

I just strip the weird ones off the model and serial entries but I've been
pulling my hair out trying to convert the macaddress one to a hex string or
just a string
Can some one educate me or point me in the right direction?

David OBrien

--- End Message ---
--- Begin Message ---
Did you do a search of the php manual?  I did one on "hex" and found 
function bin2hex.  Not sure how you mac address is actually built, but I 
would try converting it char by char and see what the function returns.
Or maybe just pass the whole string to it.
Just a guess. 



--- End Message ---
--- Begin Message ---
Damn I'm an idiot... sorry :\

On Wed, Mar 21, 2012 at 9:34 AM, Jim Giner <jim.gi...@albanyhandball.com>wrote:

> Did you do a search of the php manual?  I did one on "hex" and found
> function bin2hex.  Not sure how you mac address is actually built, but I
> would try converting it char by char and see what the function returns.
> Or maybe just pass the whole string to it.
> Just a guess.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Not until you find out if it actually works.  Then, maybe....
"David OBrien" <dgobr...@gmail.com> wrote in message 
news:CAF=yd_3rbr-gkonpjdbtogssiufwzeqteanqneproh6hhyu...@mail.gmail.com...
> Damn I'm an idiot... sorry :\
>



--- End Message ---
--- Begin Message ---
2012/3/20 Meike Stone <meike.st...@googlemail.com>:
>>
>> First of all, check your apache log files for any hints. There's
>> probably a warning/error in there that explains why.
>
> I switched to "LogLevel debug" but in error_log is nothing found,
> the access_log showes only:
> 192.168.1.89 - - [20/Mar/2012:16:43:53 +0100] "POST /i3.php HTTP/1.1"
> 200 539 "http://172.16.1.170/i3.php"; "Mozilla/5.0 (Windows NT 5.1;
> WOW64; rv:11.0) Gecko/20100101 Firefox/11.0"
>
>> If not, check your php.ini settings, there are a few settings that can
>> affect uploads (see [1]).
>>
>> [1] http://nl3.php.net/manual/en/ini.core.php#ini.sect.file-uploads
>
> Yes, I know this settings and checked this and disabled suhosin too.
> Nothing helped.
> I did this before "stracing" ...
>
>
> Thanks Meike

I investigated a little bit more and found, that if I only swapped the
Apache php module (moved away the original
/usr/lib64/apache2/mod_php5.so and placed one from 5.2.14)
from php 5.2.14, all works, same configuration! So it should not a
problem of the configuration.

But what is the reason, that the module not work properly?
Which next step can I do?

Thanks Meike

--- End Message ---

Reply via email to