ID:               33080
 User updated by:  marc at durdin dot net
 Reported By:      marc at durdin dot net
-Status:           Feedback
+Status:           Open
 Bug Type:         Strings related
 Operating System: Windows Server 2003
 PHP Version:      5.0.4
 New Comment:

Managed to get a script that will do it every time (seems that it
raises a E_WARNING). Again, doesn't generate the warning on 5.0.2, does
on 5.0.4.

<?php 
  set_error_handler("err_handler");
  unpack("H*hex", 'abc');

  function err_handler($errno, $errstr, $errfile, $errline, $vars)
  {
    echo $errno . ": " . $errstr;
  }
?>


Previous Comments:
------------------------------------------------------------------------

[2005-05-20 16:27:57] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.



------------------------------------------------------------------------

[2005-05-20 15:07:06] marc at durdin dot net

Description:
------------
Bug 31465 has been marked as fixed in 5.0.4 - however, I just upgraded
to 5.0.4 and started experiencing it on my system - using it to upload
files as follows:

I am using the stock precompiled download from php.net.

Basic PHP information:

PHP Version => 5.0.4

System => Windows NT 5.2 build 3790
Build Date => Mar 31 2005 02:44:34
Configure Command => cscript /nologo configure.js 
"--enable-snapshot-build" "--with-gd=shared"
Server API => Command Line Interface
Virtual Directory Support => enabled
Configuration File (php.ini) Path => [obscured]
PHP API => 20031224
PHP Extension => 20041030
Zend Extension => 220040412
Debug Build => no
Thread Safety => enabled
IPv6 Support => enabled
Registered PHP Streams => php, file, http, ftp, compress.zlib
Registered Stream Socket Transports => tcp, udp

Marc Durdin

Reproduce code:
---------------
      $datastring = file_get_contents($Filename);
      $data = unpack("H*hex", $datastring);
      $FileID = mssql_db_call_to_store_file($OriginalFileName,
'0x'.$data['hex']);


Expected result:
----------------
(no output expected)

Actual result:
--------------
Warning: unpack() function.unpack: Type H: outside of string



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=33080&edit=1

Reply via email to