php-general Digest 27 Jan 2008 13:56:02 -0000 Issue 5259
Topics (messages 268162 through 268167):
Re: determine file-upload's tmp-filename
268162 by: Casey
268164 by: Michael Fischer
268165 by: Brady Mitchell
268166 by: Michael Fischer
php installation problem
268163 by: Umar
Hex Strings Appended to Pathnames
268167 by: Mick
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
On Jan 26, 2008 3:57 PM, Michael Fischer <[EMAIL PROTECTED]> wrote:
> hi there,
>
> is there a way to determine the tmp-filename of a file upload while the
> upload is still in progress?
>
> the tmp-file is stored in /tmp and it's name is something like PHPXXXXXXXX.
>
> what i would like to do is:
> i want to upload a file via a html-form and while the upload is in progress
> make repeatedly ajax-requests to a php-script on the server that replies the
> size of the tmp file (the amount of data that was already uploaded). So in
> this script i need to know what the tmp-filename is.
>
> or do you think this is a completely useless approach?
>
> lg, Michi
>
Will this help?
http://tomas.epineer.se/archives/3
--
-Casey
--- End Message ---
--- Begin Message ---
-------- Original-Nachricht --------
> Datum: Sat, 26 Jan 2008 16:09:58 -0800
> Von: Casey <[EMAIL PROTECTED]>
> An: "Michael Fischer" <[EMAIL PROTECTED]>
> CC: [EMAIL PROTECTED]
> Betreff: Re: [PHP] determine file-upload\'s tmp-filename
> On Jan 26, 2008 3:57 PM, Michael Fischer <[EMAIL PROTECTED]> wrote:
> > hi there,
> >
> > is there a way to determine the tmp-filename of a file upload while the
> upload is still in progress?
> >
> > the tmp-file is stored in /tmp and it's name is something like
> PHPXXXXXXXX.
> >
> > what i would like to do is:
> > i want to upload a file via a html-form and while the upload is in
> progress make repeatedly ajax-requests to a php-script on the server that
> replies the size of the tmp file (the amount of data that was already
> uploaded).
> So in this script i need to know what the tmp-filename is.
> >
> > or do you think this is a completely useless approach?
> >
> > lg, Michi
> >
>
>
> Will this help?
> http://tomas.epineer.se/archives/3
>
> --
> -Casey
well, i've found this before and this script uses perl-cgi and not php.
it determines the tmp-filename as such:
$post_data_file = "$tmp_dir/$sessionid"."_postdata";
$monitor_file = "$tmp_dir/$sessionid"."_flength";
$error_file = "$tmp_dir/$sessionid"."_err";
$signal_file = "$tmp_dir/$sessionid"."_signal";
$qstring_file = "$tmp_dir/$sessionid"."_qstring";
i'm looking for something similar in php...
lg, michi
--- End Message ---
--- Begin Message ---
On Jan 26, 2008, at 357PM, Michael Fischer wrote:
hi there,
is there a way to determine the tmp-filename of a file upload while
the upload is still in progress?
I'm not sure when it becomes available, but $_FILES['file_name']
['tmp_name'] is the only place I know of to find the temporary name.
the tmp-file is stored in /tmp and it's name is something like
PHPXXXXXXXX.
what i would like to do is:
i want to upload a file via a html-form and while the upload is in
progress make repeatedly ajax-requests to a php-script on the server
that replies the size of the tmp file (the amount of data that was
already uploaded). So in this script i need to know what the tmp-
filename is.
You could try doing a print_r($_GLOBALS); in that script to find out
if there are any other helpful places to check.
HTH,
Brady
--- End Message ---
--- Begin Message ---
-------- Original-Nachricht --------
> Datum: Sun, 27 Jan 2008 01:21:19 -0800
> Von: Brady Mitchell <[EMAIL PROTECTED]>
> An: Michael Fischer <[EMAIL PROTECTED]>
> CC: [EMAIL PROTECTED]
> Betreff: Re: [PHP] determine file-upload\'s tmp-filename
> On Jan 26, 2008, at 357PM, Michael Fischer wrote:
>
> > hi there,
> >
> > is there a way to determine the tmp-filename of a file upload while
> > the upload is still in progress?
>
> I'm not sure when it becomes available, but $_FILES['file_name']
> ['tmp_name'] is the only place I know of to find the temporary name.
>
> > the tmp-file is stored in /tmp and it's name is something like
> > PHPXXXXXXXX.
> >
> > what i would like to do is:
> > i want to upload a file via a html-form and while the upload is in
> > progress make repeatedly ajax-requests to a php-script on the server
> > that replies the size of the tmp file (the amount of data that was
> > already uploaded). So in this script i need to know what the tmp-
> > filename is.
>
> You could try doing a print_r($_GLOBALS); in that script to find out
> if there are any other helpful places to check.
>
> HTH,
>
> Brady
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
hm, there's nothing to spectacular in $_GLOBALS:
Array
(
[GLOBALS] => Array
*RECURSION*
[_ENV] => Array
(
[TERM] => xterm
[SHELL] => /bin/bash
[DEFAULTLEVEL] => default
[LC_ALL] => [EMAIL PROTECTED]
[USER] => root
[PATH] =>
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/i386-pc-linux-gnu/gcc-bin/3.4.4
[PWD] => /etc/apache2/modules.d
[LANG] => [EMAIL PROTECTED]
[BOOTLEVEL] => boot
[SVCNAME] => apache2
[CONSOLETYPE] => pty
[SHLVL] => 1
[HOME] => /home/albert
[SOFTLEVEL] => default
[_] => /usr/sbin/apache2
)
[HTTP_ENV_VARS] => Array
(
[TERM] => xterm
[SHELL] => /bin/bash
[DEFAULTLEVEL] => default
[LC_ALL] => [EMAIL PROTECTED]
[USER] => root
[PATH] =>
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/i386-pc-linux-gnu/gcc-bin/3.4.4
[PWD] => /etc/apache2/modules.d
[LANG] => [EMAIL PROTECTED]
[BOOTLEVEL] => boot
[SVCNAME] => apache2
[CONSOLETYPE] => pty
[SHLVL] => 1
[HOME] => /home/albert
[SOFTLEVEL] => default
[_] => /usr/sbin/apache2
)
[_POST] => Array
(
)
[HTTP_POST_VARS] => Array
(
)
[_GET] => Array
(
)
[HTTP_GET_VARS] => Array
(
)
[_COOKIE] => Array
(
[PHPSESSID] => a959c533aa718bc94801431ae34f6fa6
)
[HTTP_COOKIE_VARS] => Array
(
[PHPSESSID] => a959c533aa718bc94801431ae34f6fa6
)
[_SERVER] => Array
(
[UNIQUE_ID] => 6jqHi38AAAEAAHn7e14AAAAJ
[HTTP_X_REQUESTED_WITH] => XMLHttpRequest
[HTTP_ACCEPT_LANGUAGE] => de-at,en-us;q=0.5
[HTTP_REFERER] => http://webfischer.at/~albert/upload.php
[HTTP_ACCEPT] => text/javascript, text/html, application/xml,
text/xml, */*
[HTTP_UA_CPU] => x86
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT
5.1; InfoPath.1)
[HTTP_HOST] => webfischer.at
[HTTP_CONNECTION] => Keep-Alive
[HTTP_COOKIE] => PHPSESSID=a959c533aa718bc94801431ae34f6fa6
[PATH] =>
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/i386-pc-linux-gnu/gcc-bin/3.4.4
[SERVER_SIGNATURE] => Apache Server at webfischer.at Port 80
[SERVER_SOFTWARE] => Apache
[SERVER_NAME] => webfischer.at
[SERVER_ADDR] => 192.168.0.2
[SERVER_PORT] => 80
[REMOTE_ADDR] => 193.80.38.250
[DOCUMENT_ROOT] => /var/www/htdocs
[SERVER_ADMIN] => [EMAIL PROTECTED]
[SCRIPT_FILENAME] => /home/albert/public_html/upload2.php
[REMOTE_PORT] => 62795
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => GET
[QUERY_STRING] =>
[REQUEST_URI] => /~albert/upload2.php
[SCRIPT_NAME] => /~albert/upload2.php
[PHP_SELF] => /~albert/upload2.php
[REQUEST_TIME] => 1201426541
[argv] => Array
(
)
[argc] => 0
)
[HTTP_SERVER_VARS] => Array
(
[UNIQUE_ID] => 6jqHi38AAAEAAHn7e14AAAAJ
[HTTP_X_REQUESTED_WITH] => XMLHttpRequest
[HTTP_ACCEPT_LANGUAGE] => de-at,en-us;q=0.5
[HTTP_REFERER] => http://webfischer.at/~albert/upload.php
[HTTP_ACCEPT] => text/javascript, text/html, application/xml,
text/xml, */*
[HTTP_UA_CPU] => x86
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT
5.1; InfoPath.1)
[HTTP_HOST] => webfischer.at
[HTTP_CONNECTION] => Keep-Alive
[HTTP_COOKIE] => PHPSESSID=a959c533aa718bc94801431ae34f6fa6
[PATH] =>
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/i386-pc-linux-gnu/gcc-bin/3.4.4
[SERVER_SIGNATURE] => Apache Server at webfischer.at Port 80
[SERVER_SOFTWARE] => Apache
[SERVER_NAME] => webfischer.at
[SERVER_ADDR] => 192.168.0.2
[SERVER_PORT] => 80
[REMOTE_ADDR] => 193.80.38.250
[DOCUMENT_ROOT] => /var/www/htdocs
[SERVER_ADMIN] => [EMAIL PROTECTED]
[SCRIPT_FILENAME] => /home/albert/public_html/upload2.php
[REMOTE_PORT] => 62795
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => GET
[QUERY_STRING] =>
[REQUEST_URI] => /~albert/upload2.php
[SCRIPT_NAME] => /~albert/upload2.php
[PHP_SELF] => /~albert/upload2.php
[REQUEST_TIME] => 1201426541
[argv] => Array
(
)
[argc] => 0
)
[_FILES] => Array
(
)
[HTTP_POST_FILES] => Array
(
)
[_REQUEST] => Array
(
[PHPSESSID] => a959c533aa718bc94801431ae34f6fa6
)
[HTTP_SESSION_VARS] => Array
(
)
[_SESSION] => Array
(
)
)
wicked...
does anybody know what happens if the form-action is a simple html-file? where
will the tmp-file be stored?
lg, michi
--- End Message ---
--- Begin Message ---
Dear Members!
I have installed php-5.2.5 on slackware 12.0 with these option successfully
./configure --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs
--with-config-file-path=/usr/local/apache/conf --with-pcre-regex
--with-layout=GNU --enable-sysvshm --enable-shmop --enable-sysvmsg
--enable-sysvsem --enable-exif --enable-ftp --enable-safe-mode
--enable-bcmath --disable-debug --enable-sockets --enable-force-cgi-redirect
--with-gettext --with-zlib --with-gd --enable-gd-native-ttf --disable-rpath
--enable-mbregex --with-bz2 --with-mime-magic --enable-calendar
--enable-inline-optimization --enable-magic-quotes --enable-wddx=shared
--with-ncurses=shared --with-xmlrpc --with-regex=system --with-pear
--with-curl --with-gmp --with-png-dir=/usr/local --enable-mbstring
--with-jpeg-dir=/usr/local --with-pic --with-mm=/usr/local
--with-libexpat-dir=/usr/local --with-xsl=/usr/local --with-mcrypt
--with-mhash --with-ldap=/usr/local/ldap
Now I am trying to install php-5.2.5 on another slackware 12.0 with same
options but i got error on make
ext/gd/libgd/.libs/gdkanji.o: In function `do_convert':
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/gd/libgd/gdkanji.c:350:
und
efined reference to `libiconv_open'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/gd/libgd/gdkanji.c:365:
und
efined reference to `libiconv'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/gd/libgd/gdkanji.c:381:
und
efined reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `_php_iconv_strlen':
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:603:
undefine
d reference to `libiconv_open'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:626:
undefine
d reference to `libiconv'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:660:
undefine
d reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `php_iconv_string':
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:441:
undefine
d reference to `libiconv_open'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:453:
undefine
d reference to `libiconv'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:467:
undefine
d reference to `libiconv'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:478:
undefine
d reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `_php_iconv_strpos':
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:851:
undefine
d reference to `libiconv_open'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:879:
undefine
d reference to `libiconv'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:993:
undefine
d reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `_php_iconv_appendl':
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:348:
undefine
d reference to `libiconv'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:385:
undefine
d reference to `libiconv'
ext/iconv/.libs/iconv.o: In function `_php_iconv_substr':
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:723:
undefine
d reference to `libiconv_open'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:747:
undefine
d reference to `libiconv'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:802:
undefine
d reference to `libiconv_close'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:806:
undefine
d reference to `libiconv_close'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:755:
undefine
d reference to `libiconv_open'
ext/iconv/.libs/iconv.o: In function `_php_iconv_mime_decode':
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1354:
undefin
ed reference to `libiconv_open'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1465:
undefin
ed reference to `libiconv_close'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1468:
undefin
ed reference to `libiconv_open'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1823:
undefin
ed reference to `libiconv_close'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1826:
undefin
ed reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_dtor':
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:2465:
undefin
ed reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `_php_iconv_mime_encode':
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1043:
undefin
ed reference to `libiconv_open'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1057:
undefin
ed reference to `libiconv_open'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1316:
undefin
ed reference to `libiconv_close'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1319:
undefin
ed reference to `libiconv_close'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1176:
undefin
ed reference to `libiconv'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1128:
undefin
ed reference to `libiconv'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1160:
undefin
ed reference to `libiconv'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1319:
undefin
ed reference to `libiconv_close'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1228:
undefin
ed reference to `libiconv'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1259:
undefin
ed reference to `libiconv'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:1303:
undefin
ed reference to `libiconv'
ext/iconv/.libs/iconv.o: In function
`php_iconv_stream_filter_append_bucket':
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:2615:
undefin
ed reference to `libiconv'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:2537:
undefin
ed reference to `libiconv'
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_ctor':
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/iconv/iconv.c:2491:
undefin
ed reference to `libiconv_open'
ext/xmlrpc/libxmlrpc/.libs/encodings.o: In function `convert':
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/xmlrpc/libxmlrpc/encodings.
c:73: undefined reference to `libiconv_open'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/xmlrpc/libxmlrpc/encodings.
c:81: undefined reference to `libiconv'
/home/data/pkgs_docs/unix-pkgs/web/php/php-5.2.5/ext/xmlrpc/libxmlrpc/encodings.
c:101: undefined reference to `libiconv_close'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
Now please help what should i do? systems are both slackware 12.0 php
version same php installation paraments same then why this error message
appears.
Kind Regards,
Umar Draz
--
View this message in context:
http://www.nabble.com/php-installation-problem-tp15117164p15117164.html
Sent from the PHP - General mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
Operating System: CentOS 4.6
PHP Version: 4.3.9-3.22.9
Zend Optimizer (free) version: 3.2.6
Hello.
I've got somewhat of a strange problem here involving Squirrelmail.
Basically, what is happening is that one of our customers is logged out
of his Squirrelmail session at random intervals. This can occur when
he goes to read an email or, after composing an email, when he clicks
on the Send button.
The following log entries correspond with those times that the customer
is logged out.
[error] [client X.X.X.X] File does not exist:
/var/www/squirrelmail/src/redirect.php3a5def33
[error] [client X.X.X.X] File does not exist:
/var/www/squirrelmail/src/redirect.php29e09f87
[error] [client X.X.X.X] File does not exist:
/var/www/squirrelmail/src/move_messages.phpf9f96dfb
[error] [client X.X.X.X] File does not exist:
/var/www/squirrelmail/src/redirect.phpdc6cc80a
So what would be the cause of appending those hex strings to those
pathnames?
Cheers,
Mick
--- End Message ---