#36745 [NEW]: No error message when load data local file isn't found

2006-03-15 Thread dweingart at pobox dot com
From: dweingart at pobox dot com
Operating system: Windows XP
PHP version:  5.1.2
PHP Bug Type: MySQLi related
Bug description:  No error message when load data local file isn't found

Description:

When issuing a LOAD DATA LOCAL INFILE statement, if the file is missing,
mysqli_error() returns the empty string. The same query issued from the
command line client returns the following message:

ERROR:
File '/path/to/nonexistent/file.txt' not found (Errcode: 2)

mysqli_errno returns 2000 (CR_UNKNOWN_ERROR)

Reproduce code:
---
options(MYSQLI_OPT_LOCAL_INFILE, 1);
$connect = $mysqli->real_connect('xxx.xxx.xxx.xxx', '',
'x', 'mydb');
$query = "
LOAD DATA LOCAL INFILE '/path/to/nonexistent/file.txt' 
INTO TABLE mytable
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '\"'
LINES TERMINATED BY '\r\n'
";
$result = $mysqli->query($query);
var_dump($result, $mysqli->errno, $mysqli->error);

// $result: false
// $mysqli->errno: 2000 (unknown error)
// $mysqli->error: "" (empty string)
?>

Expected result:

I expect to see an error message similar to the one returned by the
command-line client, or at least a message that gives a clearer idea of
what might have gone wrong.

Actual result:
--
Error message is the empty string

-- 
Edit bug report at http://bugs.php.net/?id=36745&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36745&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36745&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36745&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36745&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=36745&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=36745&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=36745&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=36745&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=36745&r=support
Expected behavior:http://bugs.php.net/fix.php?id=36745&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=36745&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=36745&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36745&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36745&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36745&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=36745&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=36745&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36745&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=36745&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=36745&r=mysqlcfg


#29036 [Com]: imap with ssl not working on windows

2005-08-25 Thread dweingart at pobox dot com
 ID:   29036
 Comment by:   dweingart at pobox dot com
 Reported By:  josef dot spangler at rz dot uni-regensburg dot de
 Status:   No Feedback
 Bug Type: IMAP related
 Operating System: Windows
 PHP Version:  4.3.6
 New Comment:

[EMAIL PROTECTED] wrote:

> It won't help much since we don't build the c-client library 
> on windows with SSL support.

Does this mean that the imap_* functions on the Windows platforms won't
work over SSL at all? Even with the openssl extension enabled?

If so, that's probably a documentation bug, since the IMAP section of
the manual should probably mention that the SSL-enabled examples won't
work on Windows.


Previous Comments:


[2004-07-26 01:00:04] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



[2004-07-08 11:33:00] [EMAIL PROTECTED]

It won't help much since we don't build the c-client library on windows
with SSL support.. And the .dsp file should be edited too, did you to
that? (give a diff for that if you did :)




[2004-07-06 21:18:07] josef dot spangler at rz dot uni-regensburg dot
de

Description:

The php_imap extension is unable to connect over ssl to an imap server.
The reason is because the ssl engine is not initialized: 
In php_imap.c Line 435 the function 
  ssl_onceonlyinit ();
is not called on windows systems. 

The following fix will correct this:
*** php_imap.c.org  Thu Jan 15 01:36:08 2004
--- php_imap.c  Thu May 06 13:28:30 2004
***
*** 427,438 
  #ifndef PHP_WIN32
auth_link(&auth_log);   /* link in the log authenticator */
auth_link(&auth_md5);   /* link in the cram-md5 authenticator */

  #if HAVE_IMAP_KRB && defined(HAVE_IMAP_AUTH_GSS)
auth_link(&auth_gss);   /* link in the gss authenticator */
  #endif
  
  #ifdef HAVE_IMAP_SSL
ssl_onceonlyinit ();
- #endif
  #endif

--- 427,438 
  #ifndef PHP_WIN32
auth_link(&auth_log);   /* link in the log authenticator */
auth_link(&auth_md5);   /* link in the cram-md5 authenticator */

  #if HAVE_IMAP_KRB && defined(HAVE_IMAP_AUTH_GSS)
auth_link(&auth_gss);   /* link in the gss authenticator */
  #endif
+ #endif
  
  #ifdef HAVE_IMAP_SSL
ssl_onceonlyinit ();
  #endif







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