Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP: FileTransfer mit FTP funzt nur bei sehr kleinen Dateien

Empfohlene Antworten

Veröffentlicht

Hei,

ich hab hier ein Problem. Ich habe mir ein bisserl php-code geschrieben, der lokale-Dateien auf einen FTP-verschieben soll. Mit einer 5KB datei funzt alles 100%, aber wenn die dateien größer sind (z.B. 25KB), dann erhalte ich den Fehler:

Warning: ftp_put(): error opening in /www/upload.php line 11

Was kann da der Fehler sein? Am FTP-Server kanns nicht liegen, weil der hat keine bschränkungen.

Danke schonmal im vorraus.

Peace,

Kannst du vielleicht mal den Quellcode posten?

Original geschrieben von UTGMK

Kannst du vielleicht mal den Quellcode posten?

Kann ich, aber der hat wohl null und nix damit zu tun. Denn bei kleinen Dateien klappts ja.


$da_ftp = ftp_connect($da_server);

if(ftp_login($da_ftp, $da_name, $da_password)) {

        echo(ftp_pwd($da_ftp));

        ftp_chdir($da_ftp, "export");

        echo("<br>");

        echo(ftp_pwd($da_ftp));

        ftp_put($da_ftp, $_POST['da_teiname'], $HTTP_POST_FILES['inhalt']['tmp_name'], FTP_BINARY);

} else {

 echo("<h1>KEINE FTPVERBINDUNG, SUCKA</h1>");       

}

Nowas nebenbei.... deine Signatur stimmt nur zur Hälfte...also Simpsons sind cool, das stimmt :)

Pacem,

Hm, ich nehme mal an dass der Code oben passt wenn er mit kleinen Dateien funktioniert.

Schau mal in die php.ini, ob da zufaellig fuer upload_max_filesize nen wert eingetragen ist, der zu klein ist, so dass das groessere file verworfen wird, weils zu gross ist.

Das waer noch ne Vermutung, die ich haette.

Michael

Original geschrieben von Impulz

Hm, ich nehme mal an dass der Code oben passt wenn er mit kleinen Dateien funktioniert.

Schau mal in die php.ini, ob da zufaellig fuer upload_max_filesize nen wert eingetragen ist, der zu klein ist, so dass das groessere file verworfen wird, weils zu gross ist.

Das waer noch ne Vermutung, die ich haette.

Michael

Hatte ich auch vermutet, aber das steht auf 2M.... also das dürfte passen.

Pacem,

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.