php-general Digest 28 Jan 2008 02:46:08 -0000 Issue 5260

Topics (messages 268168 through 268182):

Re: php installation problem
        268168 by: Andrés Robinet
        268170 by: Andrés Robinet

Re: determine file-upload's tmp-filename
        268169 by: Andrés Robinet
        268171 by: Michael Fischer

htmlentities() does not remove escape
        268172 by: jekillen
        268174 by: Nathan Nobbe
        268175 by: Robert Cummings
        268177 by: jekillen

Re: Foreach
        268173 by: Nathan Nobbe
        268178 by: Eric Butera
        268179 by: Nathan Nobbe

Re: Posting Summary for Week Ending 18 January,2008:[EMAIL PROTECTED]
        268176 by: Nisse Engström

How to prevent direct access..
        268180 by: Chuck
        268181 by: Nathan Rixham

interface inheritance
        268182 by: Nathan Nobbe

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 ---
> -----Original Message-----
> From: Umar [mailto:[EMAIL PROTECTED]
> Sent: Sunday, January 27, 2008 3:55 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] php installation problem
> 
> 
> 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.
> 

Sounds like you need the iconv libraries??

http://www.gnu.org/software/libiconv/#downloading
http://ar.php.net/iconv

Rob

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308
| TEL 954-607-4207 | FAX 954-337-2695 | 
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE:
bestplace |  Web: bestplace.biz  | Web: seo-diy.com


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.19.11/1244 - Release Date: 1/25/2008
7:44 PM
 

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Andrés Robinet [mailto:[EMAIL PROTECTED]
> Sent: Sunday, January 27, 2008 11:03 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] php installation problem
> 
> > -----Original Message-----
> > From: Umar [mailto:[EMAIL PROTECTED]
> > Sent: Sunday, January 27, 2008 3:55 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] php installation problem
> >
> >
> > 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.
> >
> 
> Sounds like you need the iconv libraries??
> 
> http://www.gnu.org/software/libiconv/#downloading
> http://ar.php.net/iconv
> 
> Rob
> 
> Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
> 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL
> 33308
> | TEL 954-607-4207 | FAX 954-337-2695 |
> Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE:
> bestplace |  Web: bestplace.biz  | Web: seo-diy.com
> 

Sorry for double posting, but I forgot to mention that you may already have
the iconv libraries, but you need the with-iconv=/path/to/lib switch

Rob

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.19.11/1244 - Release Date: 1/25/2008
7:44 PM
 

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Michael Fischer [mailto:[EMAIL PROTECTED]
> Sent: Sunday, January 27, 2008 4:03 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] determine file-upload's tmp-filename
> 
> 
> -------- 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
> 

If all you want is to display a progress bar, you'd better move all of your
logic to the client side. Check this out
http://www.swfupload.org/documentation/demonstration

Regards,

Rob


Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308
| TEL 954-607-4207 | FAX 954-337-2695 | 
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE:
bestplace |  Web: bestplace.biz  | Web: seo-diy.com

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.19.11/1244 - Release Date: 1/25/2008
7:44 PM
 

--- End Message ---
--- Begin Message ---
On Sun, 2008-01-27 at 11:12 -0500, Andrés Robinet wrote:
> > -----Original Message-----
> > From: Michael Fischer [mailto:[EMAIL PROTECTED]
> > Sent: Sunday, January 27, 2008 4:03 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] determine file-upload's tmp-filename
> > 
> > 
> > -------- 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
> > 
> 
> If all you want is to display a progress bar, you'd better move all of your
> logic to the client side. Check this out
> http://www.swfupload.org/documentation/demonstration
> 
> Regards,
> 
> Rob
> 
> 
> Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
> 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308
> | TEL 954-607-4207 | FAX 954-337-2695 | 
> Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE:
> bestplace |  Web: bestplace.biz  | Web: seo-diy.com
> 
> No virus found in this outgoing message.
> Checked by AVG Free Edition. 
> Version: 7.5.516 / Virus Database: 269.19.11/1244 - Release Date: 1/25/2008
> 7:44 PM
>  
> 
You are right, the client side would be the best solution.
BUT - this requires the client to either have flash or java browser
plugin installed. i don't want that.
and i don't know any way in javascript to get the amount of data already
sent - so i thought i'd try on the server-side.

lg, Michi
-- 
Sautergasse 27-29/35
1160 Wien
phone: 0043 650 2526276
email: [EMAIL PROTECTED]
web: http://www.webfischer.at

--- End Message ---
--- Begin Message ---
Hello:
I have a form that has a textarea and I do not want to
disallow the use of single quote as apostrophe, or
for any other normal stylization. So I am using html
entities to change these characters into html entities.
But the function does not remove the escapes added
by the browser when sending the input.
Is there a special function in php for removing the \ escapes
as well?
My plan b would be to look for a similar function in javascript
and convert to html entities before the input is sent to the
server.
I want to screen for damaging code but do not want to
prevent legitimate use of punctuation. If the input in the
text field is then displayed as html (which it will be) I do
not want things like 'It\'s a nice day' showing up in the
html.
Thanks in advance;
Jeff k

--- End Message ---
--- Begin Message ---
On Jan 27, 2008 1:27 PM, jekillen <[EMAIL PROTECTED]> wrote:

> Hello:
> I have a form that has a textarea and I do not want to
> disallow the use of single quote as apostrophe, or
> for any other normal stylization. So I am using html
> entities to change these characters into html entities.
> But the function does not remove the escapes added
> by the browser when sending the input.
> Is there a special function in php for removing the \ escapes
> as well?


stripslashes()

-nathan

--- End Message ---
--- Begin Message ---
On Sun, 2008-01-27 at 10:27 -0800, jekillen wrote:
> Hello:
> I have a form that has a textarea and I do not want to
> disallow the use of single quote as apostrophe, or
> for any other normal stylization. So I am using html
> entities to change these characters into html entities.
> But the function does not remove the escapes added
> by the browser when sending the input.
> Is there a special function in php for removing the \ escapes
> as well?
> My plan b would be to look for a similar function in javascript
> and convert to html entities before the input is sent to the
> server.
> I want to screen for damaging code but do not want to
> prevent legitimate use of punctuation. If the input in the
> text field is then displayed as html (which it will be) I do
> not want things like 'It\'s a nice day' showing up in the
> html.

Browser doesn't escape those quotes. You're PHP configuration has magic
quotes enabled. See strip_slashes() if you must strip them. The
preferable solution is to get rid of the magic quotes dependency but
that's a longer topic and there's plenty on the net for you to read.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---

On Jan 27, 2008, at 10:37 AM, Nathan Nobbe wrote:

On Jan 27, 2008 1:27 PM, jekillen <[EMAIL PROTECTED]> wrote:

I have a form that has a textarea and I do not want to
disallow the use of single quote as apostrophe, or
for any other normal stylization. So I am using html
entities to change these characters into html entities.
 But the function does not remove the escapes added
by the browser when sending the input.
Is there a special function in php for removing the \ escapes
as well?
stripslashes()

-nathan

Thanks, of course. Sometimes the brain just does not kick over
the way it should.
Jeff K


--- End Message ---
--- Begin Message ---
On Jan 23, 2008 8:02 AM, Eric Butera <[EMAIL PROTECTED]> wrote:

> Maybe someday SPL will become part of the PHP manual too. ;)
>

ill admit, the doxygen documentation is a little daunting at first.  at
least
more so than phpDocumentor for example.  but once youve cruised around
the spl docs for a little while, you can see its truly amazing.  marcus has
done a superb job with it!
and, ive made a discovery.  im sure this is novice level, for people who
actually
have a clue what they are doing w/ spl, which unfortunately seems like next
to
no one.   well, im getting to know it; anyway, i digress.
DualIterator is not 'in' php, because well, its not written in c.  marcus
has distributed
several classes and procedural files along with the c code to round out the
spl
extension.  the example code is included in the php source, so in order to
use it
youll have to download the source and unpack it.  you will find the example
code
beneath
ext/spl/examples
in particular, the DualIterator class is in the
dualiterator.inc
file.  and now, for my last trick, an example of the DualIterator, to
illustrate how simple
it is, (and incidentally less error prone than rolling your own, since its
been tested).

<?php
require('dualiterator.inc');

 $leftSideArray = array('one' => 1, 'two' => 2, 'three' => 3, 'four' => 4);
 $rightSideArray = array('one' => 'a', 'two' => 'b', 'three' => 'c', 'four'
=> 'd');

 $di = new DualIterator(new ArrayIterator($leftSideArray), new
ArrayIterator($rightSideArray));

while($di->valid()) {
        var_dump($di->key());
        var_dump($di->current());
        $di->next();
}
?>

to test whether the arrays have the same number of keys and values; in this
example all we
would have to do is:
$di->areEqual();

-nathan

--- End Message ---
--- Begin Message ---
On Jan 27, 2008 1:33 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> On Jan 23, 2008 8:02 AM, Eric Butera <[EMAIL PROTECTED]> wrote:
>
> > Maybe someday SPL will become part of the PHP manual too. ;)
> >
>
> ill admit, the doxygen documentation is a little daunting at first.  at
> least
> more so than phpDocumentor for example.  but once youve cruised around
>  the spl docs for a little while, you can see its truly amazing.  marcus has
> done a superb job with it!
> and, ive made a discovery.  im sure this is novice level, for people who
> actually
> have a clue what they are doing w/ spl, which unfortunately seems like next
> to
>  no one.   well, im getting to know it; anyway, i digress.
> DualIterator is not 'in' php, because well, its not written in c.  marcus
> has distributed
> several classes and procedural files along with the c code to round out the
> spl
>  extension.  the example code is included in the php source, so in order to
> use it
> youll have to download the source and unpack it.  you will find the example
> code
> beneath
> ext/spl/examples
>  in particular, the DualIterator class is in the
> dualiterator.inc
> file.  and now, for my last trick, an example of the DualIterator, to
> illustrate how simple
> it is, (and incidentally less error prone than rolling your own, since its
> been tested).
>
> <?php
> require('dualiterator.inc');
>
>  $leftSideArray = array('one' => 1, 'two' => 2, 'three' => 3, 'four' => 4);
>  $rightSideArray = array('one' => 'a', 'two' => 'b', 'three' => 'c', 'four'
> => 'd');
>
>  $di = new DualIterator(new ArrayIterator($leftSideArray), new
> ArrayIterator($rightSideArray));
>
> while($di->valid()) {
>         var_dump($di->key());
>         var_dump($di->current());
>         $di->next();
>  }
> ?>
>
> to test whether the arrays have the same number of keys and values; in this
> example all we
> would have to do is:
> $di->areEqual();
>
> -nathan
>

I was just pointing out how fragmented PHP5+ is.  Look at the docs on
SPL and the DOM stuff, it's horrible.

--- End Message ---
--- Begin Message ---
On Jan 27, 2008 7:24 PM, Eric Butera <[EMAIL PROTECTED]> wrote:

> I was just pointing out how fragmented PHP5+ is.  Look at the docs on
> SPL and the DOM stuff, it's horrible.
>

i hear you, and i agree, most of the php docs are good, but some of the
oop stuff is kinda weak, like SoapClient, and DateTime for example.  In
this regard i think the SPL docs are pretty kick-ass.  although isolated,
they are in themselves quite robust and complete.
but really, after saying DualIterator would be perfect for this case, i had
to post an example ;)

-nathan

--- End Message ---
--- Begin Message ---
On Mon, 21 Jan 2008 00:14:34 +0000, David Powers wrote:

> A Google check on my email address shows that, with one exception, it 
> has been released into the public domain solely through archives and 
> mirrors of this list. The exception is a private group, whose 
> administrator I have alerted to avoid the leaking of other people's 
> addresses.

   Google also found (for me) an XLS file, containing
your email address and what appears to be your home
address and phone number. The file itself is gone but
Google has an HTML version of it, if you know where to
find it. One more google comes up with a nice picture
of your house in the first result.

   Interesting what you can find these days.


/Nisse

--- End Message ---
--- Begin Message ---
I have a php file that produces an image and is only referred to from
an img tag like so:

<img src="getRandImage.php">

I want to prevent anyone from directly accessing the getRandImage.php
file. The file has to be world readable or the image will not display.
I played around with testing $_SERVER['HTTP_REFERER'] using regular
expressions but the above image tag appears in the default splash page
and there is no http referer set when they first visit the site. (also
ran into some IE quirkiness as well) I played around with putting
getRandImage.php into a subdirectory that is only viewable by the user
the web server is running as and the image also would not appear. I
couldn't figure out a way to embed this into a function that could be
hidden in a non-world readable subdirectory -- which would be my
preferred approach. (Is there a way to call a php function that
returns an image from within an img tag, instead of calling a php
file?)

I can easily check http request type but the img tag is doing a GET
request which is also what request type is used if they try and
directly access the URL.

I'm sure its something simple I am overlooking. Maybe another $_SERVER
variable or something I can work with.

fyi: running php 5.2.5 and apache 2.2.

Thanks for any help..
/CC

--- End Message ---
--- Begin Message ---
Chuck wrote:
I have a php file that produces an image and is only referred to from
an img tag like so:

<img src="getRandImage.php">

I want to prevent anyone from directly accessing the getRandImage.php
file. The file has to be world readable or the image will not display.
I played around with testing $_SERVER['HTTP_REFERER'] using regular
expressions but the above image tag appears in the default splash page
and there is no http referer set when they first visit the site. (also
ran into some IE quirkiness as well) I played around with putting
getRandImage.php into a subdirectory that is only viewable by the user
the web server is running as and the image also would not appear. I
couldn't figure out a way to embed this into a function that could be
hidden in a non-world readable subdirectory -- which would be my
preferred approach. (Is there a way to call a php function that
returns an image from within an img tag, instead of calling a php
file?)

I can easily check http request type but the img tag is doing a GET
request which is also what request type is used if they try and
directly access the URL.

I'm sure its something simple I am overlooking. Maybe another $_SERVER
variable or something I can work with.

fyi: running php 5.2.5 and apache 2.2.

Thanks for any help..
/CC

Pass the session_id in the url..
<img src="getRandImage.php?img=SESSION_ID_HERE" />

then in the php
<?php
if(isset($_GET['img']) && $_GET['img'] == session_id()) {
#code to show image
}
?>

you can ultra harden it by putting a destroy session code in that block aswell, meaning they can only single access the file.

alternatively (and a bit harder on the machine)
have the index.php script create a php on the fly based on session_id or something ie: 3h238bc98da9e0a880237d7c8ef09.php and have that script echo out the image and delete itself once the image has been sent to the buffer (ob_* and flush())

:)

--- End Message ---
--- Begin Message ---
all,

previously, on this list and elsewhere, i have raised the topic of
interface inheritance, lamenting that php is void of the feature.
to my utter amazement i discovered that php does in fact support
interface inheritance, reading through some of Marcus Boergers'
code in SPL..  i noticed RecursiveIterator extends Iterator, which
is an internal interface (part of the zend engine), so i thought to
myself, perhaps only internal interfaces can be extended, but
then a quick test proved my suspicions wrong.  in fact, interfaces
can even extend multiple parent interfaces, just like java (*ducks*).
here is the sample code so you can see for yourself:

<?php
interface Somethingable {
        public function doSomething();
}

interface Crazyfiable {
        public function getCrazy();
}

interface Extendable extends Somethingable, Crazyfiable {
        public function extend();
}

class SuperClass implements Extendable {
        public function doSomething() {
                echo 'i did something ..' . PHP_EOL;
        }

        public function extend() {
                echo 'i extended something..' . PHP_EOL;
        }

        public function getCrazy() {
                echo 'im a crazy bastard now!' . PHP_EOL;
        }
}

/*
 * TEST HERE
 */
 $sc = new SuperClass();
 $sc->doSomething();
 $sc->extend();
 $sc->getCrazy();
?>

and the output:
[EMAIL PROTECTED] /usr/share/php5/splExperiment/tests $ php
testInterfaceInheritence.php
i did something ..
i extended something..
im a crazy bastard now!

i for one am quite excited.  heres to happy adventures in oop-land w/ php!

-nathan

--- End Message ---

Reply via email to