Lines Matching refs:ftp
57 ZEND_ARG_INFO(0, ftp)
63 ZEND_ARG_INFO(0, ftp)
67 ZEND_ARG_INFO(0, ftp)
71 ZEND_ARG_INFO(0, ftp)
76 ZEND_ARG_INFO(0, ftp)
81 ZEND_ARG_INFO(0, ftp)
86 ZEND_ARG_INFO(0, ftp)
91 ZEND_ARG_INFO(0, ftp)
96 ZEND_ARG_INFO(0, ftp)
102 ZEND_ARG_INFO(0, ftp)
108 ZEND_ARG_INFO(0, ftp)
113 ZEND_ARG_INFO(0, ftp)
119 ZEND_ARG_INFO(0, ftp)
124 ZEND_ARG_INFO(0, ftp)
128 ZEND_ARG_INFO(0, ftp)
136 ZEND_ARG_INFO(0, ftp)
144 ZEND_ARG_INFO(0, ftp)
149 ZEND_ARG_INFO(0, ftp)
157 ZEND_ARG_INFO(0, ftp)
165 ZEND_ARG_INFO(0, ftp)
169 ZEND_ARG_INFO(0, ftp)
177 ZEND_ARG_INFO(0, ftp)
185 ZEND_ARG_INFO(0, ftp)
193 ZEND_ARG_INFO(0, ftp)
200 ZEND_ARG_INFO(0, ftp)
208 ZEND_ARG_INFO(0, ftp)
213 ZEND_ARG_INFO(0, ftp)
218 ZEND_ARG_INFO(0, ftp)
224 ZEND_ARG_INFO(0, ftp)
229 ZEND_ARG_INFO(0, ftp)
234 ZEND_ARG_INFO(0, ftp)
238 ZEND_ARG_INFO(0, ftp)
244 ZEND_ARG_INFO(0, ftp)
298 PHP_MINIT(ftp),
302 PHP_MINFO(ftp),
313 ftpbuf_t *ftp = (ftpbuf_t *)rsrc->ptr; in ZEND_GET_MODULE() local
315 ftp_close(ftp); in ZEND_GET_MODULE()
318 PHP_MINIT_FUNCTION(ftp) in PHP_MINIT_FUNCTION() argument
346 PHP_MINFO_FUNCTION(ftp) in PHP_MINFO_FUNCTION() argument
371 ftpbuf_t *ftp; in PHP_FUNCTION() local
387 if (!(ftp = ftp_open(host, (short)port, timeout_sec))) { in PHP_FUNCTION()
392 ftp->autoseek = FTP_DEFAULT_AUTOSEEK; in PHP_FUNCTION()
393 ftp->usepasvaddress = FTP_DEFAULT_USEPASVADDRESS; in PHP_FUNCTION()
396 ftp->use_ssl = 0; in PHP_FUNCTION()
399 RETURN_RES(zend_register_resource(ftp, le_ftpbuf)); in PHP_FUNCTION()
408 ftpbuf_t *ftp; in PHP_FUNCTION() local
424 if (!(ftp = ftp_open(host, (short)port, timeout_sec))) { in PHP_FUNCTION()
429 ftp->autoseek = FTP_DEFAULT_AUTOSEEK; in PHP_FUNCTION()
430 ftp->usepasvaddress = FTP_DEFAULT_USEPASVADDRESS; in PHP_FUNCTION()
432 ftp->use_ssl = 1; in PHP_FUNCTION()
434 RETURN_RES(zend_register_resource(ftp, le_ftpbuf)); in PHP_FUNCTION()
444 ftpbuf_t *ftp; in PHP_FUNCTION() local
452 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
457 if (!ftp_login(ftp, user, user_len, pass, pass_len)) { in PHP_FUNCTION()
458 if (*ftp->inbuf) { in PHP_FUNCTION()
459 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
473 ftpbuf_t *ftp; in PHP_FUNCTION() local
480 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
484 if (!(pwd = ftp_pwd(ftp))) { in PHP_FUNCTION()
485 if (*ftp->inbuf) { in PHP_FUNCTION()
486 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
500 ftpbuf_t *ftp; in PHP_FUNCTION() local
506 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
510 if (!ftp_cdup(ftp)) { in PHP_FUNCTION()
511 if (*ftp->inbuf) { in PHP_FUNCTION()
512 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
526 ftpbuf_t *ftp; in PHP_FUNCTION() local
534 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
539 if (!ftp_chdir(ftp, dir, dir_len)) { in PHP_FUNCTION()
540 if (*ftp->inbuf) { in PHP_FUNCTION()
541 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
555 ftpbuf_t *ftp; in PHP_FUNCTION() local
563 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
568 if (!ftp_exec(ftp, cmd, cmd_len)) { in PHP_FUNCTION()
569 if (*ftp->inbuf) { in PHP_FUNCTION()
570 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
584 ftpbuf_t *ftp; in PHP_FUNCTION() local
592 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
597 ftp_raw(ftp, cmd, cmd_len, return_value); in PHP_FUNCTION()
606 ftpbuf_t *ftp; in PHP_FUNCTION() local
615 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
620 if (NULL == (tmp = ftp_mkdir(ftp, dir, dir_len))) { in PHP_FUNCTION()
621 if (*ftp->inbuf) { in PHP_FUNCTION()
622 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
636 ftpbuf_t *ftp; in PHP_FUNCTION() local
644 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
649 if (!ftp_rmdir(ftp, dir, dir_len)) { in PHP_FUNCTION()
650 if (*ftp->inbuf) { in PHP_FUNCTION()
651 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
665 ftpbuf_t *ftp; in PHP_FUNCTION() local
674 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
678 if (!ftp_chmod(ftp, mode, filename, filename_len)) { in PHP_FUNCTION()
679 if (*ftp->inbuf) { in PHP_FUNCTION()
680 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
694 ftpbuf_t *ftp; in PHP_FUNCTION() local
702 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
706 ret = ftp_alloc(ftp, size, zresponse ? &response : NULL); in PHP_FUNCTION()
725 ftpbuf_t *ftp; in PHP_FUNCTION() local
733 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
738 if (NULL == (nlist = ftp_nlist(ftp, dir, dir_len))) { in PHP_FUNCTION()
755 ftpbuf_t *ftp; in PHP_FUNCTION() local
764 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
769 if (NULL == (llist = ftp_list(ftp, dir, dir_len, recursive))) { in PHP_FUNCTION()
786 ftpbuf_t *ftp; in PHP_FUNCTION() local
795 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
800 if (NULL == (llist = ftp_mlsd(ftp, dir, dir_len))) { in PHP_FUNCTION()
823 ftpbuf_t *ftp; in PHP_FUNCTION() local
830 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
834 if (NULL == (syst = ftp_syst(ftp))) { in PHP_FUNCTION()
835 if (*ftp->inbuf) { in PHP_FUNCTION()
836 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
850 ftpbuf_t *ftp; in PHP_FUNCTION() local
861 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
868 if (!ftp->autoseek && resumepos == PHP_FTP_AUTORESUME) { in PHP_FUNCTION()
872 if (ftp->autoseek && resumepos) { in PHP_FUNCTION()
882 if (!ftp_get(ftp, stream, file, file_len, xtype, resumepos)) { in PHP_FUNCTION()
883 if (*ftp->inbuf) { in PHP_FUNCTION()
884 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
898 ftpbuf_t *ftp; in PHP_FUNCTION() local
909 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
916 if (!ftp->autoseek && resumepos == PHP_FTP_AUTORESUME) { in PHP_FUNCTION()
920 if (ftp->autoseek && resumepos) { in PHP_FUNCTION()
931 ftp->direction = 0; /* recv */ in PHP_FUNCTION()
932 ftp->closestream = 0; /* do not close */ in PHP_FUNCTION()
934 if ((ret = ftp_nb_get(ftp, stream, file, file_len, xtype, resumepos)) == PHP_FTP_FAILED) { in PHP_FUNCTION()
935 if (*ftp->inbuf) { in PHP_FUNCTION()
936 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
950 ftpbuf_t *ftp; in PHP_FUNCTION() local
957 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
961 if (!ftp_pasv(ftp, pasv ? 1 : 0)) { in PHP_FUNCTION()
974 ftpbuf_t *ftp; in PHP_FUNCTION() local
985 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
991 if (!ftp->autoseek && resumepos == PHP_FTP_AUTORESUME) { in PHP_FUNCTION()
999 if (ftp->autoseek && resumepos) { in PHP_FUNCTION()
1022 if (!ftp_get(ftp, outstream, remote, remote_len, xtype, resumepos)) { in PHP_FUNCTION()
1025 if (*ftp->inbuf) { in PHP_FUNCTION()
1026 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
1041 ftpbuf_t *ftp; in PHP_FUNCTION() local
1053 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
1059 if (!ftp->autoseek && resumepos == PHP_FTP_AUTORESUME) { in PHP_FUNCTION()
1065 if (ftp->autoseek && resumepos) { in PHP_FUNCTION()
1089 ftp->direction = 0; /* recv */ in PHP_FUNCTION()
1090 ftp->closestream = 1; /* do close */ in PHP_FUNCTION()
1092 if ((ret = ftp_nb_get(ftp, outstream, remote, remote_len, xtype, resumepos)) == PHP_FTP_FAILED) { in PHP_FUNCTION()
1094 ftp->stream = NULL; in PHP_FUNCTION()
1096 if (*ftp->inbuf) { in PHP_FUNCTION()
1097 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
1104 ftp->stream = NULL; in PHP_FUNCTION()
1116 ftpbuf_t *ftp; in PHP_FUNCTION() local
1123 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
1127 if (!ftp->nb) { in PHP_FUNCTION()
1132 if (ftp->direction) { in PHP_FUNCTION()
1133 ret=ftp_nb_continue_write(ftp); in PHP_FUNCTION()
1135 ret=ftp_nb_continue_read(ftp); in PHP_FUNCTION()
1138 if (ret != PHP_FTP_MOREDATA && ftp->closestream) { in PHP_FUNCTION()
1139 php_stream_close(ftp->stream); in PHP_FUNCTION()
1140 ftp->stream = NULL; in PHP_FUNCTION()
1144 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
1156 ftpbuf_t *ftp; in PHP_FUNCTION() local
1167 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
1174 if (!ftp->autoseek && startpos == PHP_FTP_AUTORESUME) { in PHP_FUNCTION()
1178 if (ftp->autoseek && startpos) { in PHP_FUNCTION()
1181 startpos = ftp_size(ftp, remote, remote_len); in PHP_FUNCTION()
1191 if (!ftp_put(ftp, remote, remote_len, stream, xtype, startpos)) { in PHP_FUNCTION()
1192 if (*ftp->inbuf) { in PHP_FUNCTION()
1193 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
1207 ftpbuf_t *ftp; in PHP_FUNCTION() local
1219 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
1226 if (!ftp->autoseek && startpos == PHP_FTP_AUTORESUME) { in PHP_FUNCTION()
1230 if (ftp->autoseek && startpos) { in PHP_FUNCTION()
1233 startpos = ftp_size(ftp, remote, remote_len); in PHP_FUNCTION()
1244 ftp->direction = 1; /* send */ in PHP_FUNCTION()
1245 ftp->closestream = 0; /* do not close */ in PHP_FUNCTION()
1247 if (((ret = ftp_nb_put(ftp, remote, remote_len, stream, xtype, startpos)) == PHP_FTP_FAILED)) { in PHP_FUNCTION()
1248 if (*ftp->inbuf) { in PHP_FUNCTION()
1249 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
1264 ftpbuf_t *ftp; in PHP_FUNCTION() local
1275 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
1285 if (!ftp->autoseek && startpos == PHP_FTP_AUTORESUME) { in PHP_FUNCTION()
1289 if (ftp->autoseek && startpos) { in PHP_FUNCTION()
1292 startpos = ftp_size(ftp, remote, remote_len); in PHP_FUNCTION()
1302 if (!ftp_put(ftp, remote, remote_len, instream, xtype, startpos)) { in PHP_FUNCTION()
1304 if (*ftp->inbuf) { in PHP_FUNCTION()
1305 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
1320 ftpbuf_t *ftp; in PHP_FUNCTION() local
1331 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
1340 if (!ftp_append(ftp, remote, remote_len, instream, xtype)) { in PHP_FUNCTION()
1342 if (*ftp->inbuf) { in PHP_FUNCTION()
1343 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
1358 ftpbuf_t *ftp; in PHP_FUNCTION() local
1369 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
1379 if (!ftp->autoseek && startpos == PHP_FTP_AUTORESUME) { in PHP_FUNCTION()
1383 if (ftp->autoseek && startpos) { in PHP_FUNCTION()
1386 startpos = ftp_size(ftp, remote, remote_len); in PHP_FUNCTION()
1397 ftp->direction = 1; /* send */ in PHP_FUNCTION()
1398 ftp->closestream = 1; /* do close */ in PHP_FUNCTION()
1400 ret = ftp_nb_put(ftp, remote, remote_len, instream, xtype, startpos); in PHP_FUNCTION()
1404 ftp->stream = NULL; in PHP_FUNCTION()
1408 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
1420 ftpbuf_t *ftp; in PHP_FUNCTION() local
1428 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
1433 RETURN_LONG(ftp_size(ftp, file, file_len)); in PHP_FUNCTION()
1442 ftpbuf_t *ftp; in PHP_FUNCTION() local
1450 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
1455 RETURN_LONG(ftp_mdtm(ftp, file, file_len)); in PHP_FUNCTION()
1464 ftpbuf_t *ftp; in PHP_FUNCTION() local
1472 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
1477 if (!ftp_rename(ftp, src, src_len, dest, dest_len)) { in PHP_FUNCTION()
1478 if (*ftp->inbuf) { in PHP_FUNCTION()
1479 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
1493 ftpbuf_t *ftp; in PHP_FUNCTION() local
1501 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
1506 if (!ftp_delete(ftp, file, file_len)) { in PHP_FUNCTION()
1507 if (*ftp->inbuf) { in PHP_FUNCTION()
1508 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
1522 ftpbuf_t *ftp; in PHP_FUNCTION() local
1530 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
1535 if (!ftp_site(ftp, cmd, cmd_len)) { in PHP_FUNCTION()
1536 if (*ftp->inbuf) { in PHP_FUNCTION()
1537 php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf); in PHP_FUNCTION()
1551 ftpbuf_t *ftp; in PHP_FUNCTION() local
1557 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
1561 ftp_quit(ftp); in PHP_FUNCTION()
1573 ftpbuf_t *ftp; in PHP_FUNCTION() local
1579 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
1594 ftp->timeout_sec = Z_LVAL_P(z_value); in PHP_FUNCTION()
1603 ftp->autoseek = Z_TYPE_P(z_value) == IS_TRUE ? 1 : 0; in PHP_FUNCTION()
1612 ftp->usepasvaddress = Z_TYPE_P(z_value) == IS_TRUE ? 1 : 0; in PHP_FUNCTION()
1629 ftpbuf_t *ftp; in PHP_FUNCTION() local
1635 if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) { in PHP_FUNCTION()
1641 RETURN_LONG(ftp->timeout_sec); in PHP_FUNCTION()
1644 RETURN_BOOL(ftp->autoseek); in PHP_FUNCTION()
1647 RETURN_BOOL(ftp->usepasvaddress); in PHP_FUNCTION()