davideuler / fastdfs

Automatically exported from code.google.com/p/fastdfs
GNU General Public License v3.0
0 stars 0 forks source link

add string desc for socket error #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
use the php client to upload a file.

the client report error: storage_upload_by_filename fail, result=28

I step into the storage client, tracker client and common php, and finally 
found the function fdfs_recv_header() repport the error. 

Then I google 'socket error 28', It's means device full.

So I suggest add string desc for the socket error. http://corz.org/public/
scripts/docs/php/php.TCP-IP.socket.error.codes.txt

Original issue reported on code.google.com by wwc...@gmail.com on 25 Aug 2009 at 2:14

GoogleCodeExporter commented 9 years ago
The error code is unix error number.
For detail info, you can see the header file in the unix system: 
/usr/include/errno.h
In Linux, the destination file is: /usr/include/asm/errno.h

Original comment by happyfis...@gmail.com on 25 Aug 2009 at 10:27

GoogleCodeExporter commented 9 years ago
for example:
28 means no space left on device, the storage server is full

#define ENOSPC          28      /* No space left on device */

Original comment by happyfis...@gmail.com on 25 Aug 2009 at 10:29

GoogleCodeExporter commented 9 years ago
in php, thereis a function socket_strerror,which can return the string desc 
of a 
error number. 

Original comment by wwc...@gmail.com on 25 Aug 2009 at 12:46

GoogleCodeExporter commented 9 years ago
the error no 28 is not the socket errno, it's unix errno.
so you should see the c header file: /usr/include/errno.h

Original comment by happyfis...@gmail.com on 26 Aug 2009 at 11:00

GoogleCodeExporter commented 9 years ago

Original comment by happyfis...@gmail.com on 24 Nov 2010 at 8:05