Nein! Hab grad kurz PHP mit Largefile-Support kompiliert auf 32bit Debian. Nachdem ich dein Script korrigiert hatte hat es wunderbar funktioniert.
mfg glitzi
glitzi85 wrote:Nein! Hab grad kurz PHP mit Largefile-Support kompiliert auf 32bit Debian. Nachdem ich dein Script korrigiert hatte hat es wunderbar funktioniert.
mfg glitzi
root@ns1:~# tar xvfz php-5.2.6.tar.gz
root@ns1:~# cd php-5.2.6
root@ns1:~/php-5.2.6# export CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
root@ns1:~/php-5.2.6# ./configure --prefix=/opt/php --with-apxs2=/opt/apache/bin/apxs --with-imap-ssl --with-openssl --with-tidy --with-gettext --with-dom --with-mcrypt --with-iconv --enable-mbstring --enable-mbregex --with-mysql=/opt/mysql --with-config-file-path=/opt/apache/conf/ --enable-ftp --enable-sockets
root@ns1:~/php-5.2.6# make
root@ns1:~/php-5.2.6# /etc/init.d/httpd graceful-stop
root@ns1:~/php-5.2.6# make install
root@ns1:~/php-5.2.6# /etc/init.d/httpd start
$filesize = exec ('stat -c %s '. escapeshellarg (/folder1/datei2.iso);
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"datei2.iso\"");
header("Pragma: public");
header("Content-Length:".$filesize);
header("Content-Transfer-Encoding: binary");
header("Cache-Control: maxage=1");
readfile(/folder1/datei2.iso);
<?php
$filesize = exec('stat -c %s '.escapeshellarg('/folder1/datei2.iso'));
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"datei2.iso\"");
header("Pragma: public");
header("Content-Length:".$filesize);
header("Content-Transfer-Encoding: binary");
header("Cache-Control: maxage=1");
readfile('/folder1/datei2.iso');
?>
glitzi85 wrote:Naja, dass das nicht klappt ist schon klar, sollte ja aber eigentlich schon anhand der PHP-Fehlermeldungen klar sein:
- Code: Select all
<?php
$filesize = exec('stat -c %s '.escapeshellarg('/folder1/datei2.iso'));
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename="datei2.iso"");
header("Pragma: public");
header("Content-Length:".$filesize);
header("Content-Transfer-Encoding: binary");
header("Cache-Control: maxage=1");
readfile('/folder1/datei2.iso');
?>
mfg glitzi
error_reporting(E_ALL);
<br />
<b>Warning</b>: readfile(/folder1/datei2.iso) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: File too large in <b>/opt/lampp/htdocs/xampp/download.php</b> on line <b>69</b><br />
Users browsing this forum: No registered users and 20 guests