Home  >  Article  >  Backend Development  >  php curl error code list (collection)

php curl error code list (collection)

WBOY
WBOYOriginal
2016-07-25 08:58:361183browse
This article collects some curl error codes with detailed instructions. Friends in need can refer to them.

curl error code list

CURLE_UNSUPPORTED_PROTOCOL (1) – The URL you passed to libcurl uses a protocol that libcurl does not support. It may be that a compile-time option you are not using is causing this (perhaps the protocol string is spelled incorrectly, or the protocol libcurl code is not specified).

CURLE_FAILED_INIT (2) – Very early initialization code failed. Could be an internal error or problem.

CURLE_URL_MALFORMAT (3) – URL format is incorrect.

CURLE_COULDNT_RESOLVE_PROXY (5) – Unable to resolve proxy server. The specified proxy server host cannot be resolved.

CURLE_COULDNT_RESOLVE_HOST (6) – Unable to resolve host. The specified remote host cannot be resolved.

CURLE_COULDNT_CONNECT (7) – Unable to connect() to host or proxy server.

CURLE_FTP_WEIRD_SERVER_REPLY (8) – libcurl needs to receive a specific reply after connecting to an FTP server. This error code indicates that an unusual or incorrect reply was received. The specified remote server may not be the correct FTP server.

CURLE_REMOTE_ACCESS_DENIED (9) – We cannot access the resource specified in the URL. For FTP, this happens if you try to change to a remote directory.

CURLE_FTP_WEIRD_PASS_REPLY (11) – libcurl needs to receive the correct reply after sending the FTP password to the server. This error code indicates that an unexpected code was returned.

CURLE_FTP_WEIRD_PASV_REPLY (13) – libcurl was unable to receive useful results from the server side in response to PASV or EPSV commands. There is a problem with the server.

CURLE_FTP_WEIRD_227_FORMAT (14) – The FTP server returns line 227 in response to the PASV command. This code is returned if libcurl cannot parse the line.

CURLE_FTP_CANT_GET_HOST (15) – An internal error occurred while looking for a host to use for a new connection. CURLE_FTP_COULDNT_SET_TYPE (17) – An error occurred while trying to set the transfer mode to binary or ascii.

CURLE_PARTIAL_FILE (18) – File transfer size is smaller or larger than expected. This error occurs when the server first reports an expected transfer size and then transfers data that does not match the previously specified size.

CURLE_FTP_COULDNT_RETR_FILE (19) – The ‘RETR’ command received an abnormal reply, or the completed transfer size was zero bytes.

CURLE_QUOTE_ERROR (21) – When sending custom “QUOTE” commands to a remote server, one of the commands returns an error code of 400 or a larger number (for FTP), or otherwise indicates that the command cannot complete successfully.

CURLE_HTTP_RETURNED_ERROR (22) – This code is returned if CURLOPT_FAILONERROR is set to TRUE and the HTTP server returns an error code >= 400. (This error code was previously known as CURLE_HTTP_NOT_FOUND.)

CURLE_WRITE_ERROR (23) – An error occurred while writing the received data to the local file, or an error was returned to libcurl by the write callback.

CURLE_UPLOAD_FAILED (25) – Failed to start upload. For FTP, the server usually refuses to execute the STOR command. The error buffer usually provides the server's explanation of the problem. (This error code was previously known as CURLE_FTP_COULDNT_STOR_FILE.)

CURLE_READ_ERROR (26) – A problem was encountered while reading the local file, or an error was returned by the read callback.

CURLE_OUT_OF_MEMORY (27) – Memory allocation request failed. This error is serious. If this error occurs, it indicates that a very serious problem has occurred.

CURLE_OPERATION_TIMEDOUT (28) – Operation timed out. The timeout specified based on the situation has been reached. Please note: As of Urchin 6.6.0.2, the timeout can be changed yourself. To specify a remote log download timeout, open the urchin.conf file and uncomment the following line: #DownloadTimeout: 30

CURLE_FTP_PORT_FAILED (30) – FTP PORT command returned an error. This problem is most likely to occur when proper address usage is not specified for libcurl. See CURLOPT_FTPPORT.

CURLE_FTP_COULDNT_USE_REST (31) – FTP REST command returned an error. If the server is healthy, this should not happen.

CURLE_RANGE_ERROR (33) – The server does not support or accept the range request.

CURLE_HTTP_POST_ERROR (34) – This problem is relatively rare and is mainly caused by internal chaos.

CURLE_SSL_CONNECT_ERROR (35) – This error can occur when using SSL/TLS simultaneously. You can access the error buffer to see the information, which describes the issue in more detail. Certificates (file format, path, permissions), passwords, and other factors may be causing the issue.

CURLE_FTP_BAD_DOWNLOAD_RESUME (36) – Attempt to resume an FTP connection that exceeds the file size limit.

CURLE_FILE_COULDNT_READ_FILE (37) – Unable to open the file under the FILE:// path. The reason is most likely that the file path does not recognize the existing file. It is recommended that you check the access permissions of the file.

CURLE_LDAP_CANNOT_BIND (38) – LDAP cannot bind. LDAP bind operation failed.

CURLE_LDAP_SEARCH_FAILED (39) – LDAP search failed.

CURLE_FUNCTION_NOT_FOUND (41) – Function not found. Required zlib function not found.

CURLE_ABORTED_BY_CALLBACK (42) – Aborted by callback. The callback returned "abort" to libcurl.

CURLE_BAD_FUNCTION_ARGUMENT (43) – Internal error. A function was called with incorrect parameters.

CURLE_INTERFACE_FAILED (45) – Interface error. The specified external interface cannot be used. Use CURLOPT_INTERFACE to set which interface to use to handle the source IP address of external connections. (This error code was previously known as CURLE_HTTP_PORT_FAILED.) CURLE_TOO_MANY_REDIRECTS (47) – Too many redirects. While redirecting, libcurl reached the page click limit. Please use CURLOPT_MAXREDIRS to set a limit.

CURLE_UNKNOWN_TELNET_OPTION (48) – Options set with CURLOPT_TELNETOPTIONS are not recognized. See related documentation.

CURLE_TELNET_OPTION_SYNTAX (49) – The telnet options string is not in the correct format.

CURLE_PEER_FAILED_VERIFICATION (51) – The remote server’s SSL certificate or SSH md5 fingerprint is incorrect.

CURLE_GOT_NOTHING (52) – The server did not return any data. In the corresponding case, failure to return any data is an error.

CURLE_SSL_ENGINE_NOTFOUND (53) – The specified encryption engine could not be found.

CURLE_SSL_ENGINE_SETFAILED (54) – The selected SSL encryption engine cannot be set as the default option.

CURLE_SEND_ERROR (55) – Unable to send network data.

CURLE_RECV_ERROR (56) – Failed to receive network data.

CURLE_SSL_CERTPROBLEM (58) – There is a problem with the local client certificate

CURLE_SSL_CIPHER (59) – The specified key cannot be used

CURLE_SSL_CACERT (60) – Unable to verify peer certificate using known CA certificate

CURLE_BAD_CONTENT_ENCODING (61) – Transfer encoding not recognized

CURLE_LDAP_INVALID_URL (62) – Invalid LDAP URL

CURLE_FILESIZE_EXCEEDED (63) – File size limit exceeded

CURLE_USE_SSL_FAILED (64) – The requested FTP SSL level failed

CURLE_SEND_FAIL_REWIND (65) – When performing a send operation, curl had to roll around the data for retransmission, but the rollback operation failed

CURLE_SSL_ENGINE_INITFAILED (66) – SSL engine initialization failed

CURLE_LOGIN_DENIED (67) – The remote server rejected curl login (new in 7.13.1)

CURLE_TFTP_NOTFOUND (68) – File not found on TFTP server

CURLE_TFTP_PERM (69) – Encountering permission issues on the TFTP server

CURLE_REMOTE_DISK_FULL (70) – The server is out of disk space

CURLE_TFTP_ILLEGAL (71) – Illegal TFTP operation

CURLE_TFTP_UNKNOWNID (72) – TFTP transport ID unknown

CURLE_REMOTE_FILE_EXISTS (73) – The file already exists and cannot be overwritten

CURLE_TFTP_NOSUCHUSER (74) – A functioning TFTP server will not return this error

CURLE_CONV_FAILED (75) – Character conversion failed

CURLE_CONV_REQD (76) – caller must register conversion callback

CURLE_SSL_CACERT_BADFILE (77) – Problem reading SSL CA certificate (possible path error or access permissions issue)

CURLE_REMOTE_FILE_NOT_FOUND (78) – The resource referenced in the URL does not exist

CURLE_SSH (79) – An unrecognized error occurred in the SSH session

CURLE_SSL_SHUTDOWN_FAILED (80) – Unable to terminate SSL connection Curl is still used a lot in PHP. If you have time, you can learn how to enable curl extension in PHP and have a basic understanding of curl in PHP.



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn