[PHP] Re: Please Help - getting a hightlight depending on selected page

2001-08-22 Thread Martin Hughes

Thanks everyone for the help!!!

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sorting IP Address Data

2001-08-22 Thread David Robley

On Thu, 23 Aug 2001 12:58, Chris Aitken wrote:
> Hi all,
>
> Just a quick one,
>
> I am pulling a whole Class C list of IP addresses, and im trying to
> sort them in order, but im getting it displayed
>
> 127.0.0.1
> 127.0.0.10
> 127.0.0.100
> 127.0.0.101
> 127.0.0.102
>
> etc. Is there any other way to sort this thinking they are numbers,
> rather than text ?
>
>
> Thanks
>
>
> Chris

Chris

Poke them in an array, and use asort() or sort()with the sortflag 
parameter set for numeric. I think that should work.

The optional second parameter sort_flags may be used to modify the 
sorting behavior using theese values:
Sorting type flags:
• SORT_REGULAR - compare items normally
• SORT_NUMERIC - compare items numerically
• SORT_STRING - compare items as strings

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   "I'm about to hit the golf ball," Tom forewarned.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: imagemagick and file size

2001-08-22 Thread Ben-Nes Michael

Yep, I know.
I just wrote the function as a general description.

thanks for the tip on strlen, thats what I need.


- Original Message -
From: "Richard Lynch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 2:01 AM
Subject: [PHP] Re: imagemagick and file size


> > function example() {
> >  $convert = "cat $userfile | /usr/X11R6/bin/convert - $type:-";
> >  return `$convert`;
> > }
> >
> > the returned binary value is uploaded to the DB.
> >
> > My main problem is that I don't know how to measure the decreased image
> size
> > while its stored in the variable.
>
> Use http://php.net/strlen on your binary value.  Use
http://php.net/filesize
> on your input file.
>
> Also, you either typed too fast, or you left out the global statement or
> something.  The code as posted won't work, unless backtick operates in
> global space or something really weird...
>
--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Scripts..flatfile

2001-08-22 Thread ReDucTor

Hello everyone,
  What scripts do you know of or have made that store all there information
in a file(flatfile d/b), that use php, and will allow someone to setup a
system for hosting these scripts(if its your script and you want your ads
there, tell me), this is just so i can have a few examples, for stuff, they
don't need to be top of the line...Please

btw. People to send a message to the address it came from and the mailing
list address, use Reply to All, not reply to sender :D

- James "ReDucTor" Mitchell


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] who can give me a article about begining Regular expression?

2001-08-22 Thread Pavel Jartsev

liufeng wrote:
> 
> thanks!
> i want to learn Regular expression.

http://www.php.net/manual/en/pcre.pattern.syntax.php

-- 
Pavel a.k.a. Papi

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Sablotron and remote URI's

2001-08-22 Thread Darron Froese

For some reason - this works just fine:

$processor = xslt_create();
xslt_run($processor, 'diary.xsl', 'test.xml');
print xslt_fetch_result($processor);
xslt_free($processor);

While this doesn't work at all:

$processor = xslt_create();
xslt_run($processor, 'diary.xsl', 'http://baby.froese.org/baby.xml');
print xslt_fetch_result($processor);
xslt_free($processor);

Fatal error: cannot read from URI 'http://baby.froese.org/baby.xml' in
/home/darron/public_html/baby/xslt.php on line 38

Can I not read from a remote URI?

I can segfault the server at will if I use fopen to work around that URI
problem:

http://baby.froese.org/baby.xml";, "r");
$xml = fread($fp, 1000);
fclose ($fp);

$processor = xslt_create();
xslt_run($processor, 'diary.xsl', $xml);
print xslt_fetch_result($processor);
xslt_free($processor);

?>

[Wed Aug 22 23:02:00 2001] [notice] child pid 15248 exit signal Segmentation
fault (11)
[Wed Aug 22 23:02:01 2001] [notice] child pid 15246 exit signal Segmentation
fault (11)

Note - it segfaults until I comment out the xslt_run command.

Any ideas?

I tried to update to 4.0.7-cvs just now but for some reason I can't get it
to buildconf properly.

I'm running:
Linux 2.2.19
Mandrake 7.1
expat-1.95.2
Sablotron 0.65

I've got PHP 4.0.6 compiled and working properly with this configure script:

./configure \
--with-apxs=/usr/local/apache_1.3.19/bin/apxs \
--with-mysql=/usr/local/mysql-3.23.38 \
--with-pgsql=/usr/local/pgsql-7.1.2 \
--enable-ftp \
--with-curl \
--with-zlib \
--with-pspell \
--with-ldap \
--with-pdflib=/usr/local/pdflib-4 \
--with-imap=/usr/local/src/imap-4.5 \
--with-zlib-dir=/usr/lib \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-gd \
--with-ttf \
--with-t1lib \
--with-xml \
--with-swf=/usr/local \
--with-ming \
--with-sablot \
--with-xslt-sablot \
--with-expat-dir=/usr \
--with-java=/usr/local/jdk \
--with-gettext \
--with-mcrypt \
--with-mhash \
--enable-wddx \
--enable-sockets \
--enable-calendar \
--enable-trans-sid \
--enable-track-vars=yes \
--enable-magic-quotes=yes

Thanks.
-- 
darron froese
new media technologist
sutton javelin corporate communications
t  403.716.0351
f  403.265.7662
e  [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Sablotron configure options...

2001-08-22 Thread Darron Froese

Do I need to use "--enable-xslt" as this bug report seems to indicate?



Or are these enough to enable Sablotron and get XSLT processing properly:

--with-sablot
--with-xslt-sablot
--with-expat-dir=/usr

It appears to be basically functional - transforms work just fine with
static .xsl and .xml files - but I am seeing a few segfaults at other times.

I tried removing "--with-sablot" and adding "--enable-xslt" but then I get
this error:

Fatal error: Call to undefined function: xslt_run() in
/home/darron/public_html/baby/xslt.php on line 37

When I try to use all four - it doesn't compile:

--enable-xslt
--with-sablot
--with-xslt-sablot
--with-expat-dir=/usr

Making all in .
make[1]: Entering directory `/home/darron/php-4.0.6'
/bin/sh /home/darron/php-4.0.6/libtool --silent --mode=compile gcc  -I.
-I/home/darron/php-4.0.6/ -I/home/darron/php-4.0.6/main
-I/home/darron/php-4.0.6 -I/usr/local/apache_1.3.19/include
-I/home/darron/php-4.0.6/Zend -I/usr/include/freetype
-I/usr/local/src/imap-4.5/c-client -I/usr/local/include
-I/usr/local/mysql-3.23.38/include/mysql -I/usr/local/pdflib-4/include
-I/usr/local/include/pspell -I/home/darron/php-4.0.6/TSRM  -DLINUX=22
-DMOD_SSL=208102 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -DSHARED_CORE
-DSUPPORT_UTF8 -g -O2  -c stub.c
/bin/sh /home/darron/php-4.0.6/libtool --silent --mode=link gcc  -I.
-I/home/darron/php-4.0.6/ -I/home/darron/php-4.0.6/main
-I/home/darron/php-4.0.6 -I/usr/local/apache_1.3.19/include
-I/home/darron/php-4.0.6/Zend -I/usr/include/freetype
-I/usr/local/src/imap-4.5/c-client -I/usr/local/include
-I/usr/local/mysql-3.23.38/include/mysql -I/usr/local/pdflib-4/include
-I/usr/local/include/pspell -I/home/darron/php-4.0.6/TSRM  -DLINUX=22
-DMOD_SSL=208102 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -DSHARED_CORE
-DSUPPORT_UTF8 -g -O2   -o libphp4.la -rpath /home/darron/php-4.0.6/libs
-avoid-version -L/usr/lib/lib -L/usr/local/src/imap-4.5/c-client
-L/usr/local/lib -L/usr/local/mysql-3.23.38/lib/mysql
-L/usr/local/pdflib-4/lib -L/usr/local/pgsql-7.1.2/lib  -R /usr/lib/lib -R
/usr/local/src/imap-4.5/c-client-R /usr/local/lib -R
/usr/local/mysql-3.23.38/lib/mysql -R /usr/local/pdflib-4/lib -R
/usr/local/pgsql-7.1.2/lib stub.lo  Zend/libZend.la sapi/apache/libsapi.la
main/libmain.la regex/libregex.la ext/zlib/libzlib.la
ext/calendar/libcalendar.la ext/curl/libcurl.la ext/ftp/libftp.la
ext/gd/libgd.la ext/gettext/libgettext.la ext/imap/libimap.la
ext/ldap/libldap.la ext/mcrypt/libmcrypt.la ext/mhash/libmhash.la
ext/ming/libming.la ext/mysql/libmysql.la ext/pcre/libpcre.la
ext/pdf/libpdf.la ext/pgsql/libpgsql.la ext/posix/libposix.la
ext/pspell/libpspell.la ext/sablot/libsablot.la ext/session/libsession.la
ext/sockets/libsockets.la ext/standard/libstandard.la ext/swf/libswf.la
ext/wddx/libwddx.la ext/xml/libxml.la ext/xslt/libxslt.la TSRM/libtsrm.la
-lpam -lc-client -ldl -lexpat -lexpat -lsablot-lexpat -lswf -lexpat -lexpat
-lsablot -lpspell -lpq -lpdf -ltiff -lpng -ljpeg -lz -lmysqlclient -lz
-lming -lmhash -lmcrypt -lltdl -lldap -llber -lpam -lgd -lt1 -lttf -lpng -lz
-ljpeg -lcurl -ldl -lcrypto -lssl -lz -lcrypt -lresolv -lm -ldl -lnsl
-lresolv
ext/xslt/.libs/libxslt.al(sablot.lo): In function `php_if_xslt_create':
/home/darron/php-4.0.6/ext/xslt/sablot.c:156: multiple definition of
`php_if_xslt_create'
ext/sablot/.libs/libsablot.al(sablot.lo):/home/darron/php-4.0.6/ext/sablot/s
ablot.c:572: first defined here
/usr/bin/ld: Warning: size of symbol `php_if_xslt_create' changed from 313
to 207 in sablot.lo
ext/xslt/.libs/libxslt.al(sablot.lo): In function
`php_if_xslt_set_error_handler':
/home/darron/php-4.0.6/ext/xslt/sablot.c:329: multiple definition of
`php_if_xslt_set_error_handler'
ext/sablot/.libs/libsablot.al(sablot.lo):/home/darron/php-4.0.6/ext/sablot/s
ablot.c:1084: first defined here
/usr/bin/ld: Warning: size of symbol `php_if_xslt_set_error_handler' changed
from 722 to 133 in sablot.lo
ext/xslt/.libs/libxslt.al(sablot.lo): In function `php_if_xslt_set_base':
/home/darron/php-4.0.6/ext/xslt/sablot.c:347: multiple definition of
`php_if_xslt_set_base'
ext/sablot/.libs/libsablot.al(sablot.lo):/home/darron/php-4.0.6/ext/sablot/s
ablot.c:968: first defined here
/usr/bin/ld: Warning: size of symbol `php_if_xslt_set_base' changed from 312
to319 in sablot.lo
ext/xslt/.libs/libxslt.al(sablot.lo): In function
`php_if_xslt_set_encoding':
/home/darron/php-4.0.6/ext/xslt/sablot.c:372: multiple definition of
`php_if_xslt_set_encoding'
ext/sablot/.libs/libsablot.al(sablot.lo):/home/darron/php-4.0.6/ext/sablot/s
ablot.c:951: first defined here
/usr/bin/ld: Warning: size of symbol `php_if_xslt_set_encoding' changed from
323 to 319 in sablot.lo
ext/xslt/.libs/libxslt.al(sablot.lo): In function `php_if_xslt_process':
/home/darron/php-4.0.6/ext/xslt/sablot.c:425: multiple definition of
`php_if_xslt_process'
ext/sablot/.libs/libsablot.al(sablot.lo):/home/darron/php-4.0.6/ext/sablot/s
ablot.c:497: first defined here
/usr/bin/ld: Warning: size of sy

Re: [PHP] Sorting IP Address Data

2001-08-22 Thread Chris Fry

Chris,

Understand the problem now.

All you need to keep is the last octect of the IP Address.

The following code snippet generates an array entry for each ip. The array is
then sorted and the result prepended with the base IP.

";
 $aryIP[$i] = $strIP;
}
sort($aryIP);
for ($i=0;$i<=255;$i++) {
 $strIP = $strBaseIP.$aryIP[$i];
 print "IP = $strIP";
}
?>

Pretty rough and ready but it should point you in the right direction.

If you need to sort IP's from differnet subnets then you need to split the IP as
per the previous suggestion.

Chris

Chris Aitken wrote:

> Hi all,
>
> Just a quick one,
>
> I am pulling a whole Class C list of IP addresses, and im trying to sort
> them in order, but im getting it displayed
>
> 127.0.0.1
> 127.0.0.10
> 127.0.0.100
> 127.0.0.101
> 127.0.0.102
>
> etc. Is there any other way to sort this thinking they are numbers, rather
> than text ?
>
> Thanks
>
> Chris
>
> --
>  Chris Aitken - Administration/Database Designer - IDEAL Internet
>   email: [EMAIL PROTECTED]  phone: +61 2 4628   fax: +61 2 4628 8890
>   __-__
>*** Big Brother ***
> It just shows that the dull will rule the world. And we will be watching it.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--

Chris Fry
Quillsoft Pty Ltd
Specialists in Secure Internet Services and E-Commerce Solutions
10 Gray Street
Kogarah
NSW  2217
Australia

Phone: +61 2 9553 1691
Fax: +61 2 9553 1692
Mobile: 0419 414 323
eMail: [EMAIL PROTECTED]
http://www.quillsoft.com.au

You can download our Public CA Certificate from:-
https://ca.secureanywhere.com/htdocs/cacert.crt

**

This information contains confidential information intended only for
the use of the authorised recipient.  If you are not an authorised
recipient of this e-mail, please contact Quillsoft Pty Ltd by return
e-mail.
In this case, you should not read, print, re-transmit, store or act
in reliance on this e-mail or any attachments, and should destroy all
copies of them.
This e-mail and any attachments may also contain copyright material
belonging to Quillsoft Pty Ltd.
The views expressed in this e-mail or attachments are the views of
the author and not the views of Quillsoft Pty Ltd.
You should only deal with the material contained in this e-mail if
you are authorised to do so.

This notice should not be removed.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Advanced Form Processing HELP

2001-08-22 Thread Egan

On Thu, 23 Aug 2001 05:24:17 -0700, "Arcadius  A."
<[EMAIL PROTECTED]> wrote:

:
>How could i make the values filled in the  form  remain unchanged even after
>the user click on  the browser "Refresh/Reload" button without submittingf
>the form ?

Until they submit the form, PHP has nothing to act on.

For this problem, you need a client-side solution:  Javascript

  

Egan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Advanced Form Processing HELP

2001-08-22 Thread Raphael Pirker


"Lang Sharpe" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Can't be done AFAIK. Because your webserver never receives the information
> when the page is reloaded, you can't send it back to him when he reloads.

only partly correct. it can't be done using PHP (and since we're in PHP
discussion list I'll presume with "Can't be done" you were referring to
PHP), because it's a SERVER-SIDE language and by hitting refresh you're not
actually sending any formdata to the server. you could, however, get some
client-side scripting language to store cookies everytime data is changed in
the form-fields. JavaScript would be a good start.

check at www.javascriptsource.com - they probably have a similar script that
you can then slightly adapt.

cheers,

raphael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] GET method and forms....

2001-08-22 Thread Egan

On Thu, 23 Aug 2001 03:23:16 +0100, "Seb Frost" <[EMAIL PROTECTED]>
wrote:

>> how do I prevent getting &submit=shop%21 in the url window?

> reason to use get, I want variables to become part of the url.

Using a frameset prevents the GET url from appearing in the browser
window, if that's all you want to achieve -- and you don't need lynx
compatibility.

Here's a dummy frameset that should get you started.  Just put it in a
file by itself, perhaps named "myscript.html"

Also notice the second frame uses "myscript.php" as its source:


 


 
 
This document requires frames.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: GET method and forms....

2001-08-22 Thread Gregory

Use "button" element instead of "submit" like this:

Gregory
"Seb Frost" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> how do I prevent getting &submit=shop%21 in the url window?
>
> 
>   Email address: 
> 
> 
>
> - seb



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: COM

2001-08-22 Thread Lara J. Fabans

At 05:40 PM 8/22/2001 -0500, Richard Lynch wrote:
> > I heard refs on using the COM interface to access MS Word files.
> >
> > Is this a procedure an interface that only works on Windows systems (as
> > that is where Word runs)?
>
>Yes...
>
>Almost for sure...
>
>There *MIGHT* be some hack port of COM objects to Un*x, but you'd be better
>off using a doc2xxx utility to convert Word to something usable instead.


You're supposed to technically be able to save COM objects out to a CORBA idl;
however, that may be far more work then the original poster wanted to do.

MS did join the OMG, and there are supposedly some tools out there, but 
nothing as
easy to use as java2idl.

-
Lara J. Fabans
Lodestone Software, Inc
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Sorting IP Address Data

2001-08-22 Thread Gregory

That looks clumsy, but it will work :
you could make a multidimensional hash (treat it like table) like
ips["first"][x]
ips["second"][x]
etc
it is like table "ips":

first  |   second   |  third  |   etc
-
127  |0   | 0   |
127. |0   | 1   |
etc

using split() function
and sort it by one of the dimensions with array_multisort
and then make every line of this table a string with something like
implode().
:))
Gregory.
"Chris Aitken" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> Just a quick one,
>
> I am pulling a whole Class C list of IP addresses, and im trying to sort
> them in order, but im getting it displayed
>
> 127.0.0.1
> 127.0.0.10
> 127.0.0.100
> 127.0.0.101
> 127.0.0.102
>
> etc. Is there any other way to sort this thinking they are numbers, rather
> than text ?
>
>
> Thanks
>
>
> Chris
>
> --
>  Chris Aitken - Administration/Database Designer - IDEAL Internet
>   email: [EMAIL PROTECTED]  phone: +61 2 4628   fax: +61 2 4628 8890
>   __-__
>*** Big Brother ***
> It just shows that the dull will rule the world. And we will be watching
it.
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] $HTTP_REFERER problem

2001-08-22 Thread pekesan

I know that some browsers doesn't gives support to $HTTP_REFERER variable ( 
lynx in example). I am thinking on checking the browser ident (with 
HTTP_USER_AGENT) and managing $HTTP_REFERER as a session var in those cases 
who doesn't give support. But it would be great that if somebody found 
another solution shares it with me.

Thanks in advance , and compaints about my English,

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Sorting IP Address Data

2001-08-22 Thread Raphael Pirker

> 127.0.0.1
> 127.0.0.10
> 127.0.0.100
> 127.0.0.101
> 127.0.0.102

well, this looks pretty sorted to me :) you wanted them sorted by numeric
value, right??



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problems compiling with Apache 2.0 Alpha 22

2001-08-22 Thread The Doctor

Can anyone explain what I am getting this?


Script started on Wed Aug 22 21:34:29 2001
doctor.nl2k.ab.ca//usr/source/php-4.0.6$ config2phpdso
loading cache ./config.cache
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal... missing
checking for working autoconf... found
checking for working automake... missing
checking for working autoheader... found
checking for working makeinfo... found
checking whether to enable maintainer-specific portions of Makefiles... no
checking host system type... i386-pc-bsdi4.2
checking for gawk... (cached) gawk
checking for bison... (cached) bison -y
checking bison version... 1.28 (ok)
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking how to run the C preprocessor... (cached) gcc -E
checking for AIX... no
checking for gcc option to accept ANSI C... (cached) none needed
checking for ranlib... (cached) ranlib
checking whether gcc and cc understand -c and -o together... (cached) yes
checking whether ln -s works... (cached) yes
checking for flex... (cached) flex
checking for yywrap in -lfl... (cached) yes
checking lex output file root... (cached) lex.yy
checking whether yytext is a pointer... (cached) yes
checking for working const... (cached) yes
checking for pthreads_cflags... (cached) 
checking for pthreads_lib... (cached) 

Configuring SAPI modules
checking for AOLserver support... no
checking for Apache module support via DSO through APXS... no
checking for Apache module support... no
checking for mod_charset compatibility option... no
checking for Apache 2.0 module support via DSO through APXS... 
Usage: apxs -g [-S =] -n 
   apxs -q [-S =]  ...
   apxs -c [-S =] [-o ] [-D [=]]
   [-I ] [-L ] [-l ] [-Wc,]
   [-Wl,]  ...
   apxs -i [-S =] [-a] [-A] [-n ]  ...
   apxs -e [-S =] [-a] [-A] [-n ]  ...
configure: error: Sorry, I cannot run apxs. Either you need to install Perl or you 
need to pass the absolute path of apxs by using --with-apxs2=/absolute/path/to/apxs
doctor.nl2k.ab.ca//usr/source/php-4.0.6$ 
config2phpdsoccat 
configure --prefix=/usr/contrib --localstatedir=/var --infodir=/usr/share/info 
--mandir=/usr/share/man --with-low-memory --with-elf --with-x 
--with-apxs2=/usr/contrib/bin/apxs  --with-mysql=/usr/contrib  --with-zlib 
--enable-track-vars   --enable-versioning --with-config-file-path=/usr/local/lib 
--with-openssl=/usr/contrib  --enable-ftp --with-gd=../gd-1.8.3 --enable-imap
doctor.nl2k.ab.ca//usr/source/php-4.0.6$ exit
exit

Script done on Wed Aug 22 21:35:05 2001

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: if statement and imageline()

2001-08-22 Thread Hugh Danaher

Richard,
Thanks for your help.  I'll try the error_log() and see what comes out.
Hugh
- Original Message -
From: Richard Lynch <[EMAIL PROTECTED]>
To: Hugh Danaher <[EMAIL PROTECTED]>
Sent: Wednesday, August 22, 2001 1:21 PM
Subject: Re: [PHP] Re: if statement and imageline()


> No.  150 lines is chump change.
>
> See if you can get ImageLine to work in a simpler fashion.
>
> Also, try adding:
>
> error_log("ImageLine: $start_x $start_y $x $y", E_NOTICE);
>
> And then look at your Apache logs.
>
> You'll at least be able to see if the program is getting there while it
> tries to draw stuff.
>
> --
> WARNING [EMAIL PROTECTED] address is an endangered species -- Use
> [EMAIL PROTECTED]
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
> - Original Message -
> From: Hugh Danaher <[EMAIL PROTECTED]>
> To: Richard Lynch <[EMAIL PROTECTED]>
> Cc: Php-General <[EMAIL PROTECTED]>
> Sent: Wednesday, August 22, 2001 3:50 AM
> Subject: Re: [PHP] Re: if statement and imageline()
>
>
> > Richard,
> > No, the code was cut from the php file and displayed as is in my e-mail.
> I
> > also tried to see if I could declare the two suspect variables in
another
> > IF() statement before the IF() statement that's fouling the execution of
> the
> > .jpg construct, but no luck there too.  Could I just be overburdening
the
> > program?  I've got a lot of code (about 150 lines) in the .jpg
construct.
> > Cheers,
> > Hugh
> > - Original Message -
> > From: Richard Lynch <[EMAIL PROTECTED]>
> > To: Hugh Danaher <[EMAIL PROTECTED]>
> > Sent: Wednesday, August 22, 2001 12:18 AM
> > Subject: Re: [PHP] Re: if statement and imageline()
> >
> >
> > > Hmm.
> > >
> > > Are you sure you didn't have:
> > >
> > > if ($year = $startyear)
> > >
> > > *THAT* would assign 1996 over and over to $year, after the ++, so it
> would
> > > never move forward, and the script would time out...
> > >
> > > Not sure what else could be wrong, if it's *JUST* the if part you are
> > > adding...
> > >
> > > --
> > > WARNING [EMAIL PROTECTED] address is an endangered species -- Use
> > > [EMAIL PROTECTED]
> > > Wanna help me out?  Like Music?  Buy a CD:
http://l-i-e.com/artists.htm
> > > Volunteer a little time: http://chatmusic.com/volunteer.htm
> > > - Original Message -
> > > From: Hugh Danaher <[EMAIL PROTECTED]>
> > > To: Richard Lynch <[EMAIL PROTECTED]>
> > > Cc: Php-General <[EMAIL PROTECTED]>
> > > Sent: Wednesday, August 22, 2001 1:05 AM
> > > Subject: Re: [PHP] Re: if statement and imageline()
> > >
> > >
> > > > Richard,
> > > >
> > > > Without the code below, I get a good .jpg file and it displays
nicely.
> > > But,
> > > > with the IF statement in, I get a time out error message "Execute
time
> > > > exceeds 30 seconds..."  I think it is because two of the variables
are
> > > > declared after the IF statement, even though they aren't being used
on
> > the
> > > > first loop.  I'll try to declare them before the FOR loop and see if
> > that
> > > > works.
> > > >
> > > > As you might tell from my code, the only software course I ever had,
> was
> > > in
> > > > college 20 years ago, and it was in BASIC language (with line
> numbers!).
> > > > However, I find php easy to work with, and have done some amazing
> things
> > > > with it in the last 2 months.  With your help and the help of
others,
> > I'll
> > > > certainly make progress.
> > > >
> > > > Thanks,
> > > > Hugh
> > > > - Original Message -
> > > > From: Richard Lynch <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Tuesday, August 21, 2001 5:16 PM
> > > > Subject: [PHP] Re: if statement and imageline()
> > > >
> > > >
> > > > > What are you getting?  An image at all?  Broken image?
> > > > >
> > > > > Try getting rid of the header("image/jpeg") or whatever, and see
if
> > you
> > > > have
> > > > > some error message.
> > > > >
> > > > > --
> > > > > WARNING [EMAIL PROTECTED] address is an endangered species -- Use
> > > > > [EMAIL PROTECTED]
> > > > > Wanna help me out?  Like Music?  Buy a CD:
> > http://l-i-e.com/artists.htm
> > > > > Volunteer a little time: http://chatmusic.com/volunteer.htm
> > > > > - Original Message -
> > > > > From: Hugh Danaher <[EMAIL PROTECTED]>
> > > > > Newsgroups: php.general
> > > > > To: Php-General <[EMAIL PROTECTED]>
> > > > > Sent: Tuesday, August 21, 2001 1:16 AM
> > > > > Subject: if statement and imageline()
> > > > >
> > > > >
> > > > > help,
> > > > >
> > > > > I am trying to set up a .jpg file to graph the earnings per year
of
> a
> > > > > company.  I can generate a log-normal graph, can get it to display
> the
> > > > > earnings per year as circles on the graph, but I can't get the  "
if
> > ()
> > > "
> > > > > statement to work.  I know I am setting two of the variables in
the
> if
> > > > > statement after the if statement executes once, but these
variables
> > > won't
> > > > be
> > > > > u

[PHP] Re: Advanced Form Processing HELP

2001-08-22 Thread Lang Sharpe

Can't be done AFAIK. Because your webserver never receives the information 
when the page is reloaded, you can't send it back to him when he reloads.

Lang Sharpe

Arcadius A. wrote:

> Hello !
> I have a simple form ("feedback.php") that could allow users to send me
> seedbacks... the form is processed(email is sent ) by the script
> "confirm.php".
> My question is :
> How could i make the values filled in the  form  remain unchanged even
> after
> the user click on  the browser "Refresh/Reload" button without submittingf
> the form ?
> So , I would like the user not to loose the data he has  filled in the
> form ..even after a realod
> My idea is to pass the vulues of  $smane , $smail etc in the URL  during
> the reload.. but I still don't know how to get it done ...
> 
> Here is may "feedback.php"
> 
> 
>   
>   
>E-Mail: 
>   
> 
> To: >
>   
>   message: cols="60" value="" >
>  
>  
>
> 
> Thanks in advance ...
> 
> Arcad.
> 
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sorting IP Address Data

2001-08-22 Thread Chris Fry

Chris,

What order are you trying to achieve? These look to be in order?

Chris

Chris Aitken wrote:

> Hi all,
>
> Just a quick one,
>
> I am pulling a whole Class C list of IP addresses, and im trying to sort
> them in order, but im getting it displayed
>
> 127.0.0.1
> 127.0.0.10
> 127.0.0.100
> 127.0.0.101
> 127.0.0.102
>
> etc. Is there any other way to sort this thinking they are numbers, rather
> than text ?
>
> Thanks
>
> Chris
>
> --
>  Chris Aitken - Administration/Database Designer - IDEAL Internet
>   email: [EMAIL PROTECTED]  phone: +61 2 4628   fax: +61 2 4628 8890
>   __-__
>*** Big Brother ***
> It just shows that the dull will rule the world. And we will be watching it.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--

Chris Fry
Quillsoft Pty Ltd
Specialists in Secure Internet Services and E-Commerce Solutions
10 Gray Street
Kogarah
NSW  2217
Australia

Phone: +61 2 9553 1691
Fax: +61 2 9553 1692
Mobile: 0419 414 323
eMail: [EMAIL PROTECTED]
http://www.quillsoft.com.au

You can download our Public CA Certificate from:-
https://ca.secureanywhere.com/htdocs/cacert.crt

**

This information contains confidential information intended only for
the use of the authorised recipient.  If you are not an authorised
recipient of this e-mail, please contact Quillsoft Pty Ltd by return
e-mail.
In this case, you should not read, print, re-transmit, store or act
in reliance on this e-mail or any attachments, and should destroy all
copies of them.
This e-mail and any attachments may also contain copyright material
belonging to Quillsoft Pty Ltd.
The views expressed in this e-mail or attachments are the views of
the author and not the views of Quillsoft Pty Ltd.
You should only deal with the material contained in this e-mail if
you are authorised to do so.

This notice should not be removed.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: force download in IE -- conclusion

2001-08-22 Thread Elias Santiago

Not necessarily an answer but on my work (a computer center for medical
students) we use a propietary Perl web-based course software and when doing
attachments on email messages on the system's bulletin board, the system
sends a header with "appplication/octet-stream" and IE 5.5 "attaches" the
.html extension to some downloads (not all). It is a known IE 5.5 bug, the
only way we have done to try to circumvent it (doesn't work everytime) is to
use the "Save Link As" feature, and sometimes that does the trick.   IE 5.5
is buggy.

"Pierre-Yves" <[EMAIL PROTECTED]> wrote in message
004901c12b54$08c1cb50$0100a8c0@py">news:004901c12b54$08c1cb50$0100a8c0@py...
> I worked on a script like yours for a looong time now!
>
> I need to force the download of various type of file, doc, pdf, zip, even
> html!
>
> Your script works fine on Opera 5.02 and netscape 4.76 on my win NT 4.0
box,
> but
> not on IE 5.5 On this one, it offers me to download the script file but
> instead of being
> a php file it has now an html extension !!
>
> Anyhow, I do have a download by email attachment button also, because I
gave
> up on trying
> to find a script to force download
>
> py
>
>
> - Original Message -
> From: "David Minor" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, August 22, 2001 4:10 PM
> Subject: [PHP] Re: force download in IE -- conclusion
>
>
> > I ran some tests of different header configurations of 6
browser/platform
> > combinations to find out what worked and what didn't.  I didn't cover
all
> of
> > the platforms available, just those that my user-base uses, so this
isn't
> > complete.
> >
> > combinations tested was IE5.5, NN4, NN6 for Windows 98 and IE5.5, NN4.7
> for
> > Mac 9.1.  I tested all of these browsers using/not using 'attachment' in
> the
> > Content-Disposition header.  and also changed out the Content-Type
header
> > with 'application/octet-stream', 'application/download', and '*/*'.
> >
> > Here's the summary and what I did to make things work as well as
possible.
> > My goal is to prompt the user with a save-as dialog for an mp3 file.
> >
> > IE5.5 for Mac always uses the quicktime plugin to play the file no
matter
> > what the disposition or type is.  (also no matter what the file
extension
> > is.  Couldn't figure out how to trick it to download the file.)
> >
> > IE5.5 for Win98 would attempt to download the file if
> ("content-disposition:
> > attachment; filename=") attachment was there.
> >
> > All 3 of the Win98 browsers would do prompt with as few clicks as
possible
> > when content-type was "application/octet-stream".  Therefore,  I test in
> my
> > script for the Mac users and give them "Content-type:
> application/downlaod"
> > while I give other users "Content-Type: application/octet-stream".  Of
> > course, this doesn't help the IE5.5 Mac users who still have to use
> > "Downlaod Link to Disk" routine to get a save-as prompt.
> >
> > Anyone who sees different ways this could be done, please respond.
> >
> > Here's my code:
> >
> > if (eregi("mac",$HTTP_USER_AGENT))
> >$type = "application/download";
> > else
> >$type = "application/octet-stream";
> >
> > // stream file to user
> > header("Content-Type: $type");
> > header("Content-Disposition: attachment; filename=$filename");
> > header("Content-Length: ".filesize($tmp_file));
> > header("Content-Transfer-Encoding: binary");
> > readfile($tmp_file);
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: how to disable the automated "userID/password" in Internet Explor er

2001-08-22 Thread Elias Santiago

You need to go to:

Tools -> Internet Options -> Content (tab) -> Autocomplete -> clear the box
beneath "User names and passwords on forms" also press "Clear Passwords" if
you're concerned about passwords being remembered. Just check/uncheck the
options you need.


"Gabe Da Silveira" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Just look through the preferences, disable forms auto-complete.  That
> should take care of it for forms, I don't know about dialog boxes.
>
> In article
> <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] (Zhu George-Czz010) wrote:
>
> > Hi, all.
> >
> >Sorry, I know there is out of the topic, but you are highly possible
to
> >help on this.
> > My browser --Internet Exporer will remember my userID and password, and
the
> > next time, after I type the first char of my user ID, it will
automatically
> > fill in the userID and password. Is there a way to disablt it?
> >
> > Thanks.
>
> --
> __
> Gabe da Silveira, Web Designer
> Twin Cities Student Unions
> University of Minnesota
> http://www.coffman.umn.edu
>
> wFone: (612)624-7270
> eMail: [EMAIL PROTECTED]
> hPage: http://www.visi.com/~jiblet



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Sorting IP Address Data

2001-08-22 Thread Chris Aitken

Hi all,

Just a quick one,

I am pulling a whole Class C list of IP addresses, and im trying to sort 
them in order, but im getting it displayed

127.0.0.1
127.0.0.10
127.0.0.100
127.0.0.101
127.0.0.102

etc. Is there any other way to sort this thinking they are numbers, rather 
than text ?


Thanks


Chris

--
 Chris Aitken - Administration/Database Designer - IDEAL Internet
  email: [EMAIL PROTECTED]  phone: +61 2 4628   fax: +61 2 4628 8890
  __-__
   *** Big Brother ***
It just shows that the dull will rule the world. And we will be watching it.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Advanced Form Processing HELP

2001-08-22 Thread Arcadius A.

Hello !
I have a simple form ("feedback.php") that could allow users to send me
seedbacks... the form is processed(email is sent ) by the script
"confirm.php".
My question is :
How could i make the values filled in the  form  remain unchanged even after
the user click on  the browser "Refresh/Reload" button without submittingf
the form ?
So , I would like the user not to loose the data he has  filled in the form
...even after a realod
My idea is to pass the vulues of  $smane , $smail etc in the URL  during the
reload.. but I still don't know how to get it done ...

Here is may "feedback.php"


  
  
   E-Mail: 
  

To: 
  
  message:
 
 
   

Thanks in advance ...

Arcad.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: The future of PHP

2001-08-22 Thread Thomas Deliduka

On 8/22/2001 10:52 PM this was written:

> I don't know if you refer to this list or other one, but I've been a
> webmaster since 1993 and in computers in general since 1988 and I also
> consider myself of the "advanced" type.

It definitely wasn't this list. It's another one.

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Looking for PHP job in US

2001-08-22 Thread Gregory

Hi!
The company,  I was working for, cut 30% of it's power in one day. So, I'm
looking for a PHP related job  in US.
My major experience is PHP/Perl/C++/JavaScript/DHTML front-end and back-end
development using various DBMS like MySQL, PosgreSQL, Oracle and other.

Here is my short resume. If you're interested, I will send you my full
resume.
CAREER OBJECTIVE:
Challenging position in Internet and/or intranet development company. Able
to learn and use new technologies quickly.
PROGRAMMING LANGUAGES:
PHP4/PHP3 (Expert), HTML (Expert hand coding, solving IE and NS DOM
compatibility issues), C++, Java, Perl, Unix Shell, JavaScript (Expert),
VBScript, Visual Basic, DHTML, CSS (Expert), WML, XML (modeling, creating
DTD, mapping SNMP objects to XML), SQL (Expert), PL/SQL (Excelent
knowledge), Transact SQL, ActionScript.
DBMS
Oracle 8, Informix, MS SQL7, MS SQL 2000, MySQL, PostgreSQL, FoxPro, dBase.
OS (Unix)
Linux, Solaris, IRIX, FreeBSD
OS (Other)
Windows 2000 Pro/Server, NT, 9x, 3.x; MacOS 8, 9.
EXPERIENCE:
More then 3 years of server-side and client-side web development. 3 years of
working with Apache web server, 1 year of working with IIS web server, 6
months of working with iPlanet web server. Developing WAP sites. Integrating
PHP with various tools and extensions. CGI programming.  Using Zend engine.
More then 3 years working with Photoshop, ImageReady, Fireworks, Flash
(versions from 1 to 5).
References are available.
No visa sponsorship is required.
Best regards, Gregory.
[EMAIL PROTECTED]
(650) 2798869





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] The future of PHP

2001-08-22 Thread Elias Santiago

Just by looking at M$ history we all know that their only interest is
$$money$$.  Even if the product is not fully tested/bug-free and if 20% of
it works, they spit it out and leave the dirty work (and headaches) to the
system administrators and everyone else who's not a "plain non-technical
user" just trying to get their memo or spreadsheet done.  Then after that,
either M$ continues to "develop" the product with their famous "Service
Packs" or drop support after 1-3 years and force everyone to move in their
stream (which continues to produce $$money$$ for them).


"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > So, the jist is, what does PHP have to offer to the web in the future?
I
> > think it's still a viable option that will be around for at least
another
> > 6-7 years. This kid thinks it's shelf life is another 3.  What do ya'll
> > think?
>
> Personally I would be a hell of a lot more worried if I was in the Java
> camp.  M$ with .NET and especially CLR is gunning directly for Java and
> its position in the enterprise.  PHP will roll with the punches and work
> alongside .NET and CLR and always keep up with all the latest technologies
> out there because PHP is developed by and for the web community.
>
> Name a single interested web-related technology that PHP can't interact
> with.  I can't think of one.  And as more come out, we'll find ways to get
> PHP to talk to them.
>
> -Rasmus
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Any point in learning ASP/JSP etc?

2001-08-22 Thread Elias Santiago

I have learned (and used) both PHP and ASP.  However, when I was beginning
with PHP, I always made it first on ASP then re-implemented on PHP.  I
always found PHP to be easier, shorter (but more powerful) logic (scripts
are shorter than ASP).

I guess it has served me well, I have learned to do it "the HARD" way and
then learn to do it easier and in a short time with PHP.  I guess it is  the
experience you have with programming: all the "tinkering", discoveries of
unusual command and function behaviors (c'mon we ALL have been tru this!),
OS and web server particularities, etc.  That's the kind of background any
employer would like to know and I have to agree with John in that point.

I specialize in PHP and MySQL on Windows NT/2K with IIS/Apache.  I know it's
impossible to be good in everything, but at least knowing a good piece from
each is not bad either.  For example, you don't have to be Picasso to paint
a house!  I have to admit, that not all people have the *aptitude* to do
this type of work, that's what makes the difference between exceptional
individuals and "plain Joes".  I can't judge myself on what type I am, or
believe that I'm something I may not be, that's a judgement others have to
take about me.  I just do my best to be on the "exceptionals" list.

my 2 cents.


"John Meyer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> At 01:29 AM 8/23/01 +0100, you wrote:
> >Ah ha, but am I better off becoming a PHP guru or a
> >jackofalltrades-notverygoodatanyofthem kind of person ;-)
>
>
> I don't know.  I've learned both PHP and ASP, and neither of them have
> decreased the other in terms of learning.
> The fact is, you are going to learn what you are going to learn.  If you
> want to go with PHP only, that's your choice.
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] The future of PHP

2001-08-22 Thread Rasmus Lerdorf

> So, the jist is, what does PHP have to offer to the web in the future?  I
> think it's still a viable option that will be around for at least another
> 6-7 years. This kid thinks it's shelf life is another 3.  What do ya'll
> think?

Personally I would be a hell of a lot more worried if I was in the Java
camp.  M$ with .NET and especially CLR is gunning directly for Java and
its position in the enterprise.  PHP will roll with the punches and work
alongside .NET and CLR and always keep up with all the latest technologies
out there because PHP is developed by and for the web community.

Name a single interested web-related technology that PHP can't interact
with.  I can't think of one.  And as more come out, we'll find ways to get
PHP to talk to them.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: [PHP-DB] restoring mysql db after mysqldump

2001-08-22 Thread Don Read


On 22-Aug-2001 Jay Paulson wrote:
> I've checked and the ROOT user has access to everything... but still no
> luck.. when i run the mysql -u root -p < 'all_databases.sql' it gets to the
> first table and tries to insert some information into it and says "blah
> table is read only" and it stops...
> 
> jay
> 
> - Original Message -
> From: "Rick Emery" <[EMAIL PROTECTED]>
> To: "'Jay Paulson'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Wednesday, August 22, 2001 12:18 PM
> Subject: RE: [PHP-DB] restoring mysql db after mysqldump
> 
> 
>> Are your privileges in MySQL set correctly?  If ROOT doesn't have
> read/write
>> access, the script will crash.
>>
>> rick
>>
>> -Original Message-
>> From: Jay Paulson [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, August 22, 2001 11:29 AM
>> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>> Subject: [PHP-DB] restoring mysql db after mysqldump
>>
>>
>> Hello everyone-
>>
>> I have done the mysqldump function and got the db in a all_database.sql
>> file.  Now I am running this command at the shell prompt of my Linux
>> machine:
>>
>> mysql -u root -p -e 'all_databases.sql'
>>
>> When I do that it works fine until it starts to insert the information
> into
>> the database.  I get the error that the table it is trying to read the
>> information into is 'read only'... Is there anyway around this problem?
>>
>> Thanks,
>> Jay
>>
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: [PHP-DB] restoring mysql db after mysqldump

2001-08-22 Thread Don Read


On 22-Aug-2001 Jay Paulson wrote:
> I've checked and the ROOT user has access to everything... but still no
> luck.. when i run the mysql -u root -p < 'all_databases.sql' it gets to the
> first table and tries to insert some information into it and says "blah
> table is read only" and it stops...
> 


can you drop or create tables ?

If not then your sql daemon permissions are messed up.

stop the daemon, chown -R mysql.mysql /path/to/mysql/data,
restart the daemon.

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Help alleviate the U.S. Nursing Shortage and Profit in

2001-08-22 Thread Don Read


On 22-Aug-2001 Jess Ragaza wrote:
> 

 

> It would seem like the nursing shortage here would be for years to come.

No doubt. 
I'll check with Mom, but I don't think i've nursed in some 40 years.

-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] who can give me a article about begining Regular expression?

2001-08-22 Thread liufeng

thanks!
i want to learn Regular expression.



[PHP] Re: The future of PHP

2001-08-22 Thread Elias Santiago

"Thomas Deliduka" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> A little background... Skip to "THE JIST" if you wanna make this quick.
>
> I am on this webmaster's list where most of the people are fairly new
> webmasters. They're just getting the hang of things. I am probably one of
> the only advanced ones on there (not to toot my own horn really) and I'm
one
> of two who use PHP (the other is just learning.)
>

I don't know if you refer to this list or other one, but I've been a
webmaster since 1993 and in computers in general since 1988 and I also
consider myself of the "advanced" type.

> I tout PHP and MySQL as awesome, which they are, but I don't say they're
the
> only technology out there.
>
> There is another guy, a kid, who is a major Java guy and he's BIG into XML
> and JSP.
>
> Some guy on this list asked what a good dynamic web solution is, I
> immediately chimed in and said PHP was great, free, and on most all linux
> hosts.  Told him how powerful it was and what could be done with it.
>
> This kid chimes in and says, something to the affect of that if the guy
> wants to live in the past and not let his website go anywhere then he
should
> go with PHP but JSP is the wave of the future and it's more powerful, and
> has the backing of the almighty Sun and the Open Source community (as if
PHP
> doesn't).
>
> THE JIST
>
> So, the jist is, what does PHP have to offer to the web in the future?  I
> think it's still a viable option that will be around for at least another
> 6-7 years. This kid thinks it's shelf life is another 3.  What do ya'll
> think?
>

He MAY be right, may not.  XML is just not so standardized (if in doubt look
how IE and Netscape each implement it "their way") I consider XML like
"freestyle HTML".   I know this technology has great potential but if
developers don't decide on how to standardize it, it could die young.  PHP
however (as an avid follower) is on a "fast track" and even Microsoft
considers it a strong contender to ASP.  However, both PHP and XML
technologies are just scripting engines.  Products like the Zend engine are
just starting to scratch the surface for truly dynamic, cached, real-time
web applications.  I'm not saying that either PHP or XML (or any other
technology that comes along) is going to die or leave the other "in the
dust" but look what has happened with Java, it has certainly lost momentum.


> --
>
> Thomas Deliduka
> IT Manager
>  -
> New Eve Media
> The Solution To Your Internet Angst
> http://www.neweve.com/
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] The future of PHP

2001-08-22 Thread Thomas Deliduka

A little background... Skip to "THE JIST" if you wanna make this quick.

I am on this webmaster's list where most of the people are fairly new
webmasters. They're just getting the hang of things. I am probably one of
the only advanced ones on there (not to toot my own horn really) and I'm one
of two who use PHP (the other is just learning.)

I tout PHP and MySQL as awesome, which they are, but I don't say they're the
only technology out there.

There is another guy, a kid, who is a major Java guy and he's BIG into XML
and JSP.

Some guy on this list asked what a good dynamic web solution is, I
immediately chimed in and said PHP was great, free, and on most all linux
hosts.  Told him how powerful it was and what could be done with it.

This kid chimes in and says, something to the affect of that if the guy
wants to live in the past and not let his website go anywhere then he should
go with PHP but JSP is the wave of the future and it's more powerful, and
has the backing of the almighty Sun and the Open Source community (as if PHP
doesn't).

THE JIST

So, the jist is, what does PHP have to offer to the web in the future?  I
think it's still a viable option that will be around for at least another
6-7 years. This kid thinks it's shelf life is another 3.  What do ya'll
think?

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] using PHP to browse and select a file on a local machine

2001-08-22 Thread David Robley

On Thu, 23 Aug 2001 11:11, Don wrote:
> Hi,
>
> I am running PHP 4.01 in a FreeBSD environment with Apache server.  Is
> there a way I can use PHP to browse the users PC and choose a file
> (choose = placing it in a text box)?
>
> Thanks,
> Don

Forrtunately , no. I wouldn't want someone wandering around in my machine 
and grabbing files at random.

But you can allow the client to select and upload files, which you could 
then display in a text box. See the manual section on handling file 
uploads.
-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Down with ignurance!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] GET method and forms....

2001-08-22 Thread Seb Frost

But I have good reason to use get, I want all the other variables to become
part of the url.

- seb

-Original Message-
From: ERISEN, Mehmet Kamil [mailto:[EMAIL PROTECTED]]
Sent: 23 August 2001 03:10
To: Seb Frost; [EMAIL PROTECTED]
Subject: Re: [PHP] GET method and forms


instead of method="GET"  use method="POST"
--- Seb Frost <[EMAIL PROTECTED]> wrote:
> how do I prevent getting &submit=shop%21 in the url
> window?
>
> 
>   Email address:  size="20">
>  name="submit">
> 
>
> - seb
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>


=
Mehmet Erisen
http://www.erisen.com

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] path to php

2001-08-22 Thread David Robley

On Thu, 23 Aug 2001 11:05, ReDucTor wrote:
> does anyone know all the possible paths to php...because i can't seem
> to find it on my current host...i have tried using the following
>
> php /path/to/script.php
> /usr/php /path/to/script.php
> /usr/local/bin/php /path/to/script.php
> /usr/bin/php /path/to/script.php
>
> but i still can't seem to get it to work with out it saying that it
> can't find the path to php...any one got any ideas?!?
>
> btw. i know php is on it..
>
> I have tried contacting them, but they don't seem to want to reply...

Have you tried which php or locate php? If you don't have shell access 
you'll have to fiddle around with backticks or whichever of system() and 
friends is appropriate.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Electricity was invented by rubbing cats backwards!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] GET method and forms....

2001-08-22 Thread ERISEN, Mehmet Kamil

instead of method="GET"  use method="POST"
--- Seb Frost <[EMAIL PROTECTED]> wrote:
> how do I prevent getting &submit=shop%21 in the url
> window?
> 
> 
>   Email address:  size="20">
>  name="submit">
> 
> 
> - seb
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 


=
Mehmet Erisen
http://www.erisen.com

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] GET method and forms....

2001-08-22 Thread Seb Frost

how do I prevent getting &submit=shop%21 in the url window?


  Email address: 



- seb

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: strange upload/db-insert problem with ie5.5

2001-08-22 Thread Serge Adamowsky

hey, thanks for the reply, richard
yes, most is done in one script, the very last step was because
i had to reuse the code and didn't want to forcefully merge it into
my script.
btw, i solved my inital problem, i had to revisit the designer's html-code,
duh ;)
next time i will be more attentive of what kind of dreamweaver-poisoned junk
i cut'n'paste into my jewels ;)

thanks,
serge


"Richard Lynch" <[EMAIL PROTECTED]> wrote in message
034b01c12aa4$3dbec480$6401a8c0@Lynchux100">news:034b01c12aa4$3dbec480$6401a8c0@Lynchux100...
> > 1)select the document, then upload  through form with method post ->
.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] using PHP to browse and select a file on a local machine

2001-08-22 Thread Don

Hi,

I am running PHP 4.01 in a FreeBSD environment with Apache server.  Is there a way I 
can use PHP to browse the users PC and choose a
file (choose = placing it in a text box)?

Thanks,
Don



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] path to php

2001-08-22 Thread ReDucTor

does anyone know all the possible paths to php...because i can't seem to
find it on my current host...i have tried using the following

php /path/to/script.php
/usr/php /path/to/script.php
/usr/local/bin/php /path/to/script.php
/usr/bin/php /path/to/script.php

but i still can't seem to get it to work with out it saying that it can't
find the path to php...any one got any ideas?!?

btw. i know php is on it..

I have tried contacting them, but they don't seem to want to reply...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] using PHP to browse and select a file on a Windows machine

2001-08-22 Thread Don

Hi,

I am running PHP 4.01 in a FreeBSD environment with Apache server.  Is there a way I 
can use PHP to browse the users PC and choose a
file (choose = placing it in a text box)?

Thanks,
Don



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Any point in learning ASP/JSP etc?

2001-08-22 Thread Dave

I would say that depends on what platform you wish to market yourself on.

Being of *nix mind...  PHP works beautifully for virtually all aspects of Web
based scripting, and personally i use it for a vast majority of server scripting
as well.  And if not, it isn't a far cry from Perl syntax and train of
thought...

Then again, i personally wouldn't touch a windows box for the purpose of web
server/web hosting, and as such my background is perl/PHP and like minded shell
scripting.

>Ah ha, but am I better off becoming a PHP guru or a
>jackofalltrades-notverygoodatanyofthem kind of person ;-)
>
>Well I've never used scripting of any sort before PHP, just c++ really.
>I'll stick to php i guess (for now).
>
>>Or is PHP the be-all and end all?

If you are a creative thinker, pretty much...

>>I know its strong points, but what are the WEAK points of PHP?
>>
>PHP isn't default on Microsoft systems

MS!=good web platform IMO so I wouldn't judge that to be a weak point

>You have to learn a new language for PHP: ASP is basically either VBScript
>or JScript around some objects.

I know I wasn't born with inate knowledge of VBScript or JScript, so one would
have to learn those anyway.

>To answer the question in your subject line, I think that if you were
>interested in programming, you should want to learn any new technology that
>you could.  Plus, the more languages, the more employable, I would think.

Some kid coming out of 3 years of school with a mitful of languages that they
were "introduced to" is no better off that the same kid who spent 3 years
learning the ins and outs just PHP or ASP...  just means that one has a poor
chance of getting an entry level job at either camp(MS/*nix)...  the other has a
slightly better chance of getting hired at only one.

And the desire to learn new and interesting things is always tempered by the
limited time to perfect ones chosen skillset.

In short, your best bet is to choose a camp...  MS based or *nix based...
master what is popular in the one you choose.

Dave


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] insert hyperlink to mysql query result

2001-08-22 Thread David Robley

On Thu, 23 Aug 2001 10:56, Andras Kende wrote:
> Hello,
>
> I have a mysql query with addresses , trying to insert a link to a map
>
> line 51
> echo " href=http://www.expedia.com/pub/agent.dll?qscr=mcst&strt1=$amyrow["addr
>ess"] &city1=$amyrow["city"]&stnm1=CA&zipc1=&cnty1=4>Map";
> echo "";
>
> Error Message:
>
> Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
> `T_NUM_STRING' in /home/sites/site15/web/salescomps.php on line 51
>
>
> I think its the  " character is the problem like :$amyrow["address"]
>
> Any help apprecciated,
> Thanks
>
> Andras

Yes. Normally you can escape with \" but in this case I think you will 
find that the array will not be parsed inside double quotes, so you need 
to concatenate the various parts of the string with .

Breaking your code down a bit to make it more easily understood:

echo '';
echo 'http://www.expedia.com/pub/agent.dll?qscr=mcst&strt1=';
echo $amyrow["address"] . '&city1=' . $amyrow["city"]';
echo '&stnm1=CA&zipc1=&cnty1=4">Map';
echo '';


-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   "It's only average," said Tom meanly.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] insert hyperlink to mysql query result

2001-08-22 Thread ReDucTor

echo "http://www.expedia.com/pub/agent.dll?qscr=mcst&strt1=".$amyrow["address
"]."
&city1=".$amyrow["city"]."&stnm1=CA&zipc1=&cnty1=4>Map";
echo "";
- Original Message -
From: "Andras Kende" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 11:26 AM
Subject: [PHP] insert hyperlink to mysql query result


> Hello,
>
> I have a mysql query with addresses , trying to insert a link to a map
>
> line 51
> echo "
href=http://www.expedia.com/pub/agent.dll?qscr=mcst&strt1=$amyrow["address";]
> &city1=$amyrow["city"]&stnm1=CA&zipc1=&cnty1=4>Map";
> echo "";
>
> Error Message:
>
> Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
> `T_NUM_STRING' in /home/sites/site15/web/salescomps.php on line 51
>
>
> I think its the  " character is the problem like :$amyrow["address"]
>
> Any help apprecciated,
> Thanks
>
> Andras
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: php-counter

2001-08-22 Thread Raphael Pirker

http://php.resourceindex.com/Complete_Scripts/Access_Counters/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] insert hyperlink to mysql query result

2001-08-22 Thread Andras Kende

Hello,

I have a mysql query with addresses , trying to insert a link to a map

line 51
echo "http://www.expedia.com/pub/agent.dll?qscr=mcst&strt1=$amyrow["address";]
&city1=$amyrow["city"]&stnm1=CA&zipc1=&cnty1=4>Map";
echo "";

Error Message:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in /home/sites/site15/web/salescomps.php on line 51


I think its the  " character is the problem like :$amyrow["address"]

Any help apprecciated,
Thanks

Andras


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Any point in learning ASP/JSP etc?

2001-08-22 Thread John Meyer

At 01:29 AM 8/23/01 +0100, you wrote:
>Ah ha, but am I better off becoming a PHP guru or a
>jackofalltrades-notverygoodatanyofthem kind of person ;-)


I don't know.  I've learned both PHP and ASP, and neither of them have 
decreased the other in terms of learning.
The fact is, you are going to learn what you are going to learn.  If you 
want to go with PHP only, that's your choice.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Any point in learning ASP/JSP etc?

2001-08-22 Thread Jack Dempsey

Seb,

I think the answer, tho it may not be a great one, is to become a
jackofalltrades-verygoodatallofthem kind of person if you truly want to
make yourself stand out...

Whether you love php or not, you have to respect the power it gives you
and the ease with which you can develop with it. However, it isn't the
end all language. No one would ever make that claim. If you truly want
to become a good programmer, then you should be able to look at a
problem, understand what you need, and then pick a language from your
arsenal. You could be Rasmus, but if your boss will not accept PHP, and
you don't know anything else, you're stuck...

I know what you mean about being good at one, or know many. I myself
have taken the latter approach. My Java skills aren't nearly as good as
a full time java programmer, but then again, I can look at
C++/Java/Perl/PHP code,understand it, and work with it...the fulltime
mono-language coder may not know the first thing about the last two.

So, ideally, know everything from C to Ruby well...but until then, get
good at what you can, and always try to learn more.

My $.02,
Jack

-Original Message-
From: Seb Frost [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 22, 2001 8:29 PM
To: John Meyer; [EMAIL PROTECTED]
Subject: RE: [PHP] Any point in learning ASP/JSP etc?

Ah ha, but am I better off becoming a PHP guru or a
jackofalltrades-notverygoodatanyofthem kind of person ;-)

Well I've never used scripting of any sort before PHP, just c++ really.
I'll stick to php i guess (for now).

- seb

-Original Message-
From: John Meyer [mailto:[EMAIL PROTECTED]]
Sent: 23 August 2001 02:13
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Any point in learning ASP/JSP etc?


At 01:10 AM 8/23/01 +0100, you wrote:
>Or is PHP the be-all and end all?
>
>I know its strong points, but what are the WEAK points of PHP?
>
>- seb


PHP isn't default on Microsoft systems
You have to learn a new language for PHP: ASP is basically either
VBScript
or JScript around some objects.
To answer the question in your subject line, I think that if you were
interested in programming, you should want to learn any new technology
that
you could.  Plus, the more languages, the more employable, I would
think.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] HTTP headers and include()

2001-08-22 Thread David Robley

On Thu, 23 Aug 2001 10:06, Casteele/ShadowLord wrote:
> Andy <[EMAIL PROTECTED]> wrote in article
> <003b01c12b23$d1f245d0$0b01a8c0@ANDreY>...
>
> >  See if is there some kind of echo before header()s, or HTML sent to
> > browser.
>
> No, I've been extremely careful to avoid that.  The following are the
> two test files I've been using to try to solve this..  (sans the
> -- File Begin/End --)
>
> lib.php:
> -- File Begin --
>  function do_nothing() {}
> ?>
> -- File End --
>
> test.php
> -- File Begin --
>  include_once("lib.php");
> if( headers_sent ) {
> $senthdrs = "Headers Sent";
> } else {
> $senthdrs = "Headers not sent";
> }
> ?>
> PHP Lib Test
> PHP Lib Test
>  echo( $senthdrs );
> ?>
> 
> -- File End --
>
> End result:
> PHP Lib Test
> 
> Headers sent
>
>
> From what I can tell from the documentation and through
> experimentation, either there's additional headers being generated when
> php includes the content (a content-type header maybe?) or more likely,
> after php is done parsing the file and 'removing' the code, it comes
> back as a single CRLF, which triggers Apache/PHP to send the headers. 
> Actually, that setup makes sense to me, but I'm trying to find out if
> there is a way around it.
>
> Thanx
> Cas

Check your included file for _ANY_ blank lines outside the http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Cant load dynamic library.... whats up?

2001-08-22 Thread Richard Lynch

> - extension_dir = "c:\windows\system\"

Try / instead of \

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Move recordset to first record problems...

2001-08-22 Thread Richard Lynch

> How to move recordset to the first record (i use to connect to database
> using ODBC).

http://php.net/manual/en/function.odbc-fetch-row.php

"To step through the result more than once, you can call odbc_fetch_row()
with row_number 1,
and then continue doing odbc_fetch_row() without row_number to review the
result. If a driver
doesn't support fetching rows by number, the row_number parameter is
ignored. "

So, if using 1 as the second arg doesn't work, your ODBC driver sucks, and
you have no recourse?...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: COM

2001-08-22 Thread Richard Lynch

> I heard refs on using the COM interface to access MS Word files.
>
> Is this a procedure an interface that only works on Windows systems (as
> that is where Word runs)?

Yes...

Almost for sure...

There *MIGHT* be some hack port of COM objects to Un*x, but you'd be better
off using a doc2xxx utility to convert Word to something usable instead.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: someone please explain weird getforeignkeys

2001-08-22 Thread Richard Lynch

> I need to look up a table's foreign keys using the unified ODBC-functions.
> 'odbc_foreignkeys()' requires me to pass seven parameters, each of them
being
> mandatory, to archive this.

Yes.

> Because the approach is not intuitive anyhow and there is no documentation
> available except of the PHP-manual's prototype, neither me nor my
co-workers
> have any idea of how to apply the function.

There *IS* some explanatory text about what happens depending on which args
you fill in.

Presumably you use "" for any args you don't care to fill in.

> The manual states that three of the arguments are superfluous, depending
on
> the application; but the prototype contradicts this, declaring them
mandatory.

Use "" on args you don't care about.  The function doesn't need them, but
PHP only allows leaving out arguments at the end of the list, not the
middle, so the "optional" argument language feature was probably not all
that useful.

> Can anyone please point me to a working code example or provide one?

That I can't do...

As near as I can figure, the pk_qualifier and pk_owner, and fk_qualifier and
fk_owner args are not needed?  Or, perhaps, if you specify them, the result
set is filtered down some way...

Try calling it with "" for all the arguments you don't understand, and see
what you get.

> Btw, how are the inter-table relationships defined at all? I cannot think
of
> a way to determine foreign keys without complete knowledge of all joins
and
> subqueries potentially run against the database.

When you CREATE a table, you can declare a given COLUMN as a "FOREIGN KEY".
If you didn't do that, this function is pretty useless to you...

PS  If you do figure something out, contribute to the notes, eh?

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Concept of Templates

2001-08-22 Thread Richard Lynch

> Does the link itself send any
> information someplace that tells the server what information is needed and
> how it has to be performed or placed?

By definition, this must be true.  (Short of some stupid JavaScript hack
that would really suck...)

You'll have to design your system such that everything you need to build a
page can be encompassed within that URL.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Problems benchmarking php Scripts

2001-08-22 Thread Richard Lynch

>I have been trying to benchmark the backend scripting for a flash online
>game, for this purpose i wrote another PHP Script that uses fopen to
>make exactly the same requests the flash movie would make with the same
>timing, and writes a log of the game session into a database.
>I run this script from the shell of a linux box using the php CGI
>binary, and start it for a couple of times,

Wild Hypothesis:
Bench-marking the PHP Binary as opposed to the Module is probably not very
accurate...

>Sometime i get to start a hundred scripts or more, but they disappear in
>very short time.

You may have simply run out of process space or hit some OS limit or...

>i have the outputs pointed to /dev/null when putting the scripts into

Don't.  Point them to /temp/$PID or something to get output you can use.  I
got no idea how to do that, mind you, but there has to be some way...

If nothing else, alter your logging to include a process ID, and output them
all using http://php.net/error_log

>I also noticed when looking at the output of 'top' i see few httpd
>processes crashing saying , this happens more rarely when i

By any chance do you have Oracle compiled in?...  There's some compile-time
configuration switch you need to use to re-compile to get rid of those...  I
forget exactly where I found that info...  Maybe ChangeLog?

>The benchmark scripts should log errors if there was no response from
>the server but i dont get any of those errors in the logs.

Have the benchmark scripts log much, much more, and narrow it down.
For example, add a line at the begining and end of your script logging the
process ID and that it's starting.

I suspect the 100 processes you see starting aren't *REALLY* starting, cuz
you're out of process space or there's some limit, and they live only long
enough to print "Unable to fork" or somesuch.  PHP itself never really gets
going.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: column_name

2001-08-22 Thread Richard Lynch

> I was wondering if there was a way to retreive a column_name instead of a
> value in a query?
>
> For example if my table has the fieldfirstname,  lastname, telephone,
> movie1, movie2, movie3..
>
>
> And my first record is JohnDoe  555-
> good   bad bad
> My second record isJane Doe  555- good
> goodbad
>
> I would like to know which movies Jane Doe rated "good"'...Is
> this possible and if so how?

http://php.net/mysql

Look for something like "get_field_names" or somesuch.

This is probably not the best design for doing Movie Reviews, so hopefully
that was just an example...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: imagemagick and file size

2001-08-22 Thread Richard Lynch

> function example() {
>  $convert = "cat $userfile | /usr/X11R6/bin/convert - $type:-";
>  return `$convert`;
> }
>
> the returned binary value is uploaded to the DB.
>
> My main problem is that I don't know how to measure the decreased image
size
> while its stored in the variable.

Use http://php.net/strlen on your binary value.  Use http://php.net/filesize
on your input file.

Also, you either typed too fast, or you left out the global statement or
something.  The code as posted won't work, unless backtick operates in
global space or something really weird...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] "Email this page to a friend"

2001-08-22 Thread Seb Frost

How can I implement this in php?

-seb

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Any point in learning ASP/JSP etc?

2001-08-22 Thread Seb Frost

Ah ha, but am I better off becoming a PHP guru or a
jackofalltrades-notverygoodatanyofthem kind of person ;-)

Well I've never used scripting of any sort before PHP, just c++ really.
I'll stick to php i guess (for now).

- seb

-Original Message-
From: John Meyer [mailto:[EMAIL PROTECTED]]
Sent: 23 August 2001 02:13
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Any point in learning ASP/JSP etc?


At 01:10 AM 8/23/01 +0100, you wrote:
>Or is PHP the be-all and end all?
>
>I know its strong points, but what are the WEAK points of PHP?
>
>- seb


PHP isn't default on Microsoft systems
You have to learn a new language for PHP: ASP is basically either VBScript
or JScript around some objects.
To answer the question in your subject line, I think that if you were
interested in programming, you should want to learn any new technology that
you could.  Plus, the more languages, the more employable, I would think.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] HTTP headers and include()

2001-08-22 Thread Casteele/ShadowLord



Andy <[EMAIL PROTECTED]> wrote in article
<003b01c12b23$d1f245d0$0b01a8c0@ANDreY>...

>  See if is there some kind of echo before header()s, or HTML sent to
> browser.

No, I've been extremely careful to avoid that.  The following are the two
test files I've been using to try to solve this..  (sans the --
File Begin/End --)

lib.php:
-- File Begin --

-- File End --

test.php
-- File Begin --

PHP Lib Test
PHP Lib Test


-- File End --

End result:
PHP Lib Test

Headers sent


>From what I can tell from the documentation and through experimentation,
either there's additional headers being generated when php includes the
content (a content-type header maybe?) or more likely, after php is done
parsing the file and 'removing' the code, it comes back as a single CRLF,
which triggers Apache/PHP to send the headers.  Actually, that setup makes
sense to me, but I'm trying to find out if there is a way around it.

Thanx
Cas


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Any point in learning ASP/JSP etc?

2001-08-22 Thread John Meyer

At 01:10 AM 8/23/01 +0100, you wrote:
>Or is PHP the be-all and end all?
>
>I know its strong points, but what are the WEAK points of PHP?
>
>- seb


PHP isn't default on Microsoft systems
You have to learn a new language for PHP: ASP is basically either VBScript 
or JScript around some objects.
To answer the question in your subject line, I think that if you were 
interested in programming, you should want to learn any new technology that 
you could.  Plus, the more languages, the more employable, I would think.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Any point in learning ASP/JSP etc?

2001-08-22 Thread Seb Frost

Or is PHP the be-all and end all?  

I know its strong points, but what are the WEAK points of PHP?

- seb

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Creditcard checksum and identification

2001-08-22 Thread Jason Murray

Here's what I pulled from px.sklar.com and modified to suit my own 
devious ends... :)

http://www.analysisandsolutions.com/code/ccvs-ph.htm
 // Checks the 1st 4 digits for validity, then checks
 // that the card number is the right length, and checks
 // the mod10 test, and finally checks that the card type
 // is the card type the user input.
 // Returns an array:
 //  - [success] 0 or 1 for a valid card
 //  - [reason] text explaining why the card's not valid
 //  - [callifvalid] redundant and not used.

 // Step 1 - Get rid of spaces and non-numeric characters.
 $Number = ereg_replace("[^0-9]", "", $Number);
 
 // Step 2 - Do the first four digits fit within proper ranges?
 //  If so, who's the card issuer and how long should the number
be?
 $NumberLeft = substr($Number, 0, 4);
 $NumberLength = strlen($Number);
 
 if ($NumberLeft >= 3000 and $NumberLeft <= 3059) 
 {
   $CardName = "Diners Club";
   $checkcard = "DINERS";
   $ShouldLength = 14;
 } 
 elseif ($NumberLeft >= 3600 and $NumberLeft <= 3699) 
 {
   $CardName = "Diners Club";
   $checkcard = "DINERS";
   $ShouldLength = 14;
 } 
 elseif ($NumberLeft >= 3800 and $NumberLeft <= 3889) 
 {
   $CardName = "Diners Club";
   $checkcard = "DINERS";
   $ShouldLength = 14;
 } 
 elseif ($NumberLeft >= 3400 and $NumberLeft <= 3499) 
 {
   $CardName = "American Express";
   $checkcard = "AMEX";
   $ShouldLength = 15;
 } 
 elseif ($NumberLeft >= 3700 and $NumberLeft <= 3799) 
 {
   $CardName = "American Express";
   $checkcard = "AMEX";
   $ShouldLength = 15;
 } 
 //elseif ($NumberLeft >= 3528 and $NumberLeft <= 3589) 
 //{
 //$CardName = "JCB";
 //$ShouldLength = 16;
 //} 
 //elseif ($NumberLeft >= 3890 and $NumberLeft <= 3899) 
 //{
 //$CardName = "Carte Blache";
 //$ShouldLength = 14;
 //} 
 elseif ($NumberLeft >= 4000 and $NumberLeft <= 4999) 
 {
   $CardName = "Visa";
   $checkcard = "VISA";
   if ($NumberLength > 14) 
   {
 $ShouldLength = 16;
   } 
   elseif ($NumberLength < 14) 
   {
 $ShouldLength = 13;
   } 
   else 
   {
 $debug .= "The Visa number entered, $Number, in is 14 \n"
  ."digits long.Visa cards usually have 16 digits, \n"
  ."though some have 13.Please check the number and
\n"
  ."try again.\n";
 $result = 0;
 $reason = "Visa cards have either 16 or 13 digits";
   }
 } 
 elseif ($NumberLeft >= 5100 and $NumberLeft <= 5599) 
 {
   $CardName = "MasterCard";
   $checkcard = "MASTERCARD";
   $ShouldLength = 16;
 } 
 elseif ($NumberLeft == 5610) 
 {
 $CardName = "Australian BankCard";
 $checkcard = "BANKCARD";
 $ShouldLength = 16;
 } 
 //elseif ($NumberLeft == 6011) 
 //{
 //$CardName = "Discover/Novus";
 //$ShouldLength = 16;
 //} 
 else 
 {
   $debug .= "The first four digits of the number entered are
\n"
."$NumberLeft. If that's correct, we don't accept that
\n"
."type of credit card.If it's wrong, please try
again.\n"
."\n";
   //return FALSE;
   $result = 0;
   $reason = "Your card number was not recognised as valid";
   $callifvalid = 1;
 }
 
 
 // Step 3 - Is the number the right length?
 if ($NumberLength <> $ShouldLength) 
 {
   $Missing = $NumberLength - $ShouldLength;
   if ($Missing < 0) 
   {
 $debug .= "The $CardName number entered, $Number, is
missing \n"
  .abs($Missing)." digit(s).Please check the number
and \n"
  ."try again.\n";
   } 
   else 
   {
 $debug .= "The $CardName number entered, $Number, has \n"
  ."$Missing too many digit(s).Please check the number
\n"
  ."and try again.\n";
   }
   $result = 0;
   $failed = 1;
   $reason = "Your card number has the wrong number of digits";
 }
 
 
 // Step 4 - Does the number pass the Mod 10 Algorithm Checksum?
 if (ccVerifyMod10($Number) == TRUE)
 {
   $debug .= "Passed mod10";
   $result = 1;
 } 
 else 
 {
   $debug .= "The $CardName number entered, $Number, is \n"
."invalid.Please check the number and try
again.\n";
   $failed = 1;
   $result = 0;
   $reason = "Your card number is invalid";
 }
 if ($failed)
 { $result = 0; }
 
 // Step 5 - Does the card type match the user's selected card type?
 if ($creditcardtype)
 {
   if ($creditcardtype != $checkcard)
   {
 $result = 0;
 $reason = "Your card number and card type don't match";
   }
 }
 
 $return[result] = $result;
  

Re: [PHP] Creditcard checksum and identification

2001-08-22 Thread Egan

On Thu, 23 Aug 2001 00:22:28 +0200, Peter Ostry <[EMAIL PROTECTED]> wrote:

>Has anyone a PHP Script for the checksum of Creditcards?
>And a Script which can identify card types based on their first numbers?
>(VISA, AMEX, MASTER, DINERS, JBC, DISCOVERY)
>
>There where a lot of JavaScript pages on the web some years ago, but I 
>have lost my local copies and the pages are vanished...
>
>
>TIA,
>Peter

Here is what I use for Visa, MasterCard, AMEX, and Discover. Feel free
to improve it by adding other card types:



function test_mod10 ($mycard) {

$mylen = strlen($mycard);
$sumdigits = 0;

// Add doubled digits from odd/even positions in even/odd length
for ($tx = ($mylen % 2); $tx < $mylen; $tx += 2) {
$digit = substr($mycard, $tx, 1) * 2;
if ($digit < 10) {
$sumdigits += $digit;
} else {
$sumdigits += $digit - 9;
}
}

// Add single digits from even/odd postions in even/odd length
for ($tx = 1 - ($mylen % 2); $tx < $mylen; $tx += 2) {
$digit = substr($mycard, $tx, 1);
$sumdigits += $digit;
}

// If divisible by 10, return true
return (($sumdigits % 10) == 0);
}


$cn = $HTTP_GET_VARS['cn'];

$tn = substr(ereg_replace("[^0-9]", "", $cn) , 0, 25);

$vl = strlen($tn);
$v1 = substr($tn, 0, 1);
$v2 = substr($tn, 0, 2);
$v4 = substr($tn, 0, 4);

$ep_cn = '';

if ($ct == 'V') {
if (($vl != 13 && $vl != 16) || $v1 != 4 || !(test_mod10($tn))) {
$ep_cn = "$cn is not a Visa card.";
}

} elseif ($ct == 'M') {
if ($vl != 16 || $v1 != 5 || !(test_mod10($tn))) {
$ep_cn = "$cn is not a MasterCard.";
}

} elseif ($ct == 'A') {
if ($vl != 15 || $v2 != 37 || !(test_mod10($tn))) {
$ep_cn = "$cn is not an AMEX card.";
}

} elseif ($ct == 'D') {
if ($vl != 16 || !($v4 == 6100) || !(test_mod10($tn))) {
$ep_cn = "$cn is not a Discover card.";
}
}



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Random PowerBall Generator

2001-08-22 Thread Jerry Lake

if array_unique does what I think,
The biggest problem with that
is that Powerball being a reasonable 
semblance of random, does allow non-unique series
to be selected. i.e. the powerball can be the
same as one of the other five.

Jerry Lake 
Interface Engineering Technician



-Original Message-
From: Montz, James C. (James Tower) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 22, 2001 2:00 PM
To: Php-General (E-mail)
Subject: [PHP] Random PowerBall Generator


More as an exercise to get back into the swing of PHP, I have created the
PowerBall number generator. (for those of you un-aware, the powerball is at
$200 mil).

Took me a while to figure out using arrays, and the array_unique function.
It also incorporate the imagepng function.

Thanks to CC Zona for pointing me to the function I needed to get the job
done!

The page is at http://www.usrlinux.com/pball.php

Source code is available for viewing.  Suggestions on cleaning up code
welcome.

Enjoy!

James

___
James C. Montz
James Tower
http://www.jamestower.com 
[EMAIL PROTECTED] 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] 2 NEWBIE QUESTIONS

2001-08-22 Thread Matthew Loff


1)  strftime("%T on the %D", strtotime($yourdate));

Should produce:  00:12:45 on the 08-22-2001  

You can check the manual page for strftime() to see different ways to
format the time to your liking:
http://www.php.net/manual/en/function.strftime.php


2)  The way you're trying to do that sounds a bit unnecessary, but take
a look at eval()
http://www.php.net/manual/en/function.eval.php



-Original Message-
From: Georgie [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 22, 2001 7:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] 2 NEWBIE QUESTIONS


1) Is there any PHP command that'll convert a MySQL database timestamp
into a format that humans can read?!! For example, I want to change
"20010822001245" into "00:12.45 on the 22-08-2001"?

2) This is the hard question. I have a script that gets values from a
database and then includes a php page which contains "echo $variable"
code to get the values from the database onto the page.

What I want to do is have the PHP page code in the main script instead
of being included externally. So i tried putting the code into a
variable and then including, but it didnt work. Then I tried echoing the
variable but the PHP code isnt executed.

If you dont fully understand my question, mail me. I'm really stuck and
NEEDD HELP!!!

TIA



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] 2 NEWBIE QUESTIONS

2001-08-22 Thread Kees Hoekzema

hey,
>
> 1) Is there any PHP command that'll convert a MySQL database
> timestamp into
> a format that humans can read?!! For example, I want to change
> "20010822001245" into "00:12.45 on the 22-08-2001"?

take a look at:
http://www.php.net/manual/en/function.date.php



> 2) This is the hard question. I have a script that gets values from a
> database and then includes a php page which contains "echo $variable" code
> to get the values from the database onto the page.
>
> What I want to do is have the PHP page code in the main script instead of
> being included externally. So i tried putting the code into a variable and
> then including, but it didnt work. Then I tried echoing the
> variable but the
> PHP code isnt executed.

and take a look at:
http://www.php.net/manual/en/function.eval.php

sincerly,
- Kees Hoekzema


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] 2 NEWBIE QUESTIONS

2001-08-22 Thread Jason Murray

> 1) Is there any PHP command that'll convert a MySQL database 
> timestamp into a format that humans can read?!! For example, I want to 
> change "20010822001245" into "00:12.45 on the 22-08-2001"?

\n";
 return $unix;
   }
?>

You could add a $dateformat input variable, and execute Date() 
inside that function using it ... but I'll leave that one up to
you. This will change it into a unix timestamp acceptable to 
the date() function.

> 2) This is the hard question. I have a script that gets values from a
> database and then includes a php page which contains "echo $variable" code
> to get the values from the database onto the page.
> 
> What I want to do is have the PHP page code in the main script instead of
> being included externally. So i tried putting the code into a variable and
> then including, but it didnt work. Then I tried echoing the variable but
the
> PHP code isnt executed.
> 
> If you dont fully understand my question, mail me. I'm really stuck and
> NEEDD HELP!!!

It sounds like you might be coming at this one from an odd approach... 
for one, include()'ing a file doesn't execute it externally, and it's 
probably the best way to do what I think you're trying to do, since you 
can then change the one include()'d file in order to change all your 
page layouts...

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"Work now, freak later!"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] 2 NEWBIE QUESTIONS

2001-08-22 Thread Georgie

1) Is there any PHP command that'll convert a MySQL database timestamp into
a format that humans can read?!! For example, I want to change
"20010822001245" into "00:12.45 on the 22-08-2001"?

2) This is the hard question. I have a script that gets values from a
database and then includes a php page which contains "echo $variable" code
to get the values from the database onto the page.

What I want to do is have the PHP page code in the main script instead of
being included externally. So i tried putting the code into a variable and
then including, but it didnt work. Then I tried echoing the variable but the
PHP code isnt executed.

If you dont fully understand my question, mail me. I'm really stuck and
NEEDD HELP!!!

TIA



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] MySQL trubs

2001-08-22 Thread hunter

sounds like you need to make sure the password in phpMyAdmin and the
MySQL for the user running the app are the same. You can reset the users
password with mysqladmin -u username password new-password and then edit
the phpMyAdmin config and make sure everything matchesalso, one
small suggestion, you should run a DB admin app for anything production
or accessible that uses root, you should create or select a user and
grant them the appropriate privileges to run phpMyAdmin. This could lead
to a potential security breach on a machine thats accessible.

just my $ 0.02
--
Michael O'Neal wrote:
> 
> Hi. I've recently set up phpMyAdmin on an OS X 10.1 server.  Everything was
> fine, and it set up great.  I then restarted the Apache server and am
> getting this message:
> 
> Warning: Access denied for user: 'root@localhost' (Using password: YES) in
> /Library/WebServer/Documents/Mangotest/phpMyAdmin/lib.inc.php on line 351
> 
> Warning: MySQL Connection Failed: Access denied for user: 'root@localhost'
> (Using password: YES) in
> /Library/WebServer/Documents/Mangotest/phpMyAdmin/lib.inc.php on line 351
> Error
> 
> MySQL said:  Access denied for user: 'root@localhost' (Using password: YES)
> 
> I've been mucking around the command line for a while, but can't figure out
> how to reset my root password.  It *was* setup with a root password, but it
> won't let me in now.  Anyone have any suggestions?
> 
> Please respond to [EMAIL PROTECTED], as I am on the digest.  Thanks.
> 
> mto
> 
> --
> 
> Michael O'Neal
> Web Producer/ Autocrosser
> ST 28 '89 Civic Si
> -
>  M   A   N   G   O
> B  O  U  L  D  E  R
> -
> http://www.thinkmango.com
> e- [EMAIL PROTECTED]
> p- 303.442.1821
> f- 303.938.8507
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Michael B. Weiner, Linux+, Linux+ SME
Systems Administrator/Partner
The UserFriendly Network (UFN)
--
Linux Registered User #94900Have you been counted?
http://counter.li.org

PGP: 30 1D CC BA 30 30 63 35  CD 58 E0 89 A9 17 CC C0  8C 55 F7 72

.Escape the 'Gates' of Hell
  `:::'  ...  ..
   :::  *  `::.::'
   ::: .::  .:.::.  .:: .::  `::. :'
   :::  ::   ::  ::  ::  :::::.
   ::: .::. .::  ::.  `. .:'  ::.
...:::.::'   ...
--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Executing perl scripts in a unix environment running php cgi-module

2001-08-22 Thread Shane Reid

Running the cgi-module trying to execute a perl script, dug through the
archives found something that would at least return something:

exec("/full/path/to/file.cgi", $results, $errorCode);
while (list(,$line) = each($results)){
  echo $line, "\n";
}
if ($errorCode){
  echo "OS Error: $errorCode\n";
}

It spits out nothing but but an error code of 2 ... so basically what i get
from it is OS Error: 2.

Anyone know another method of including a cgi script similar to SSI 

[PHP] Mcrypt: just a little tip:-)

2001-08-22 Thread Alex Piaz

Hi Folks!

I am working on a project where I need to encrypt some data that will be 
decrypted later by a visual basic application and also receive encrypted 
data from that application and decrypt it on the webserver. To exchange the 
data, I did some xml and everything went fine, but I can't tell you the 
same about the encryption.

We chose to use BLOWFISH cbc to encrypt the data on both ways (php and vb). 
On php I am using the mcrypt module and at the vb side, the guys are using 
a dll version of the Blowfish algoritm.

Well, we are starting to fight each other, me and the vb guys, because we 
can encrypt and decrypt data on our own applications, but the encrypted 
data from php cannot be decrypted by visual basic, and vice-versa.

Of course the key and the iv are the same on both sides and the data is 
converted to hexa before the encrypt process. I did a lot of tests 
according the manual and some other sources, and everything seems to be ok. 
The vb guys are telling me the same and we are all on a dilema now, and the 
time is becoming short

If anybody knows something about it please let me know. Another point of 
views on doing this are welcome too.
Sorry for any language mistakes I did.

Regards

Alex


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Creditcard checksum and identification

2001-08-22 Thread Peter Ostry

Has anyone a PHP Script for the checksum of Creditcards?
And a Script which can identify card types based on their first numbers?
(VISA, AMEX, MASTER, DINERS, JBC, DISCOVERY)

There where a lot of JavaScript pages on the web some years ago, but I 
have lost my local copies and the pages are vanished...


TIA,
Peter

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Mac PHP'ers -> New PHP editor!

2001-08-22 Thread Michael O'Neal

Hi all.  I just stumbled across this earlier this week.  It's an app called
"JaneBUILDER" that helps with some of the PHP tedium of connecting,
selecting, and grabbing data from your MySQL db.  I was amazed at how fast I
put together an admin section for a client...3 minutes generated 10 pages!!!
Here's a little blurb from their website:

What is JaneBUILDER?


JaneBUILDER is a visual editor for PHP. JaneBUILDER allows you build complex
PHP pages with mouse clicks and menu items. The files created are native PHP
(text) files (that can be opened by any html tool or text editor) and
uploaded to your web server for deployment.

JaneBUILDER Philosophy:

JaneBUILDER is simple tool that lets you build PHP pages extremely quickly.
JaneBUILDER is not a replacement for your current HTML editor. Nor, is it a
replacement for your current text editor. JaneBUILDER is a tool that lives
in and lets you work in between these two worlds. We call it middleware for
your middleware. We think you'll love it so much you will add it to your
current arsenal of web tools.


I certainly don't work for them, but I think it's a cool app.  Windows
version on the way, apparently.

http://www.seejanecode.com


mto

-- 

Michael O'Neal
Web Producer/ Autocrosser
ST 28 '89 Civic Si
-
 M   A   N   G   O
B  O  U  L  D  E  R
-
http://www.thinkmango.com
e- [EMAIL PROTECTED]
p- 303.442.1821
f- 303.938.8507


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: mysql_db_name not working (solved)

2001-08-22 Thread Peter Ostry

For those who might run into the same problem in the future:

If functions like "mysql_db_name" are not working and you get no 
mysqlerr, then most likely your PHP installation is messed up. Maybe you 
see the same behavior than we: phpinfo shows old and wrong stuff in the 
first section, i.e. an old servername or the wrong PHP version even if 
you installed a different one. phpinfo must never show wrong information!
In our case PHP is static compiled with Apache, I guess the Apache 
installation was not clean either.

This kind of error is easy to see if you install phpMyAdmin: you do not 
even get the index page. We finally connected to a running MySQL 
database on a production server, got the same result and could therefore 
isolate the problem - PHP or the combination Apache/PHP.

We run Solaris 2.8 on a Netra T1 AC200 and we are not familiar to this 
system yet. And we did more than one installation on this machine, maybe 
one or more were not correct. Since a complete new install of 
Apache/PHP/MySQL on a other Sun (X1) worked, we knew what to do:
Delete all previous installations of Apache and PHP. Make a fresh and 
empty /usr/local/ directory. delete all config files you might have in 
different locations. Unpack the downloads - all latest stable - only 
with gtar (important!) and compile only with gcc (important!). Now we 
are up and running, just the PHP library for dynamic image generation 
could not been installed - we are working on it.

Richard Lynch, thank you for your help. Your guess that there are 
accidently different libraries involved, pointed us in the right 
direction.


Peter Ostry

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] MySQL trubs

2001-08-22 Thread Michael O'Neal

Hi. I've recently set up phpMyAdmin on an OS X 10.1 server.  Everything was
fine, and it set up great.  I then restarted the Apache server and am
getting this message:



Warning: Access denied for user: 'root@localhost' (Using password: YES) in
/Library/WebServer/Documents/Mangotest/phpMyAdmin/lib.inc.php on line 351

Warning: MySQL Connection Failed: Access denied for user: 'root@localhost'
(Using password: YES) in
/Library/WebServer/Documents/Mangotest/phpMyAdmin/lib.inc.php on line 351
Error 

MySQL said:  Access denied for user: 'root@localhost' (Using password: YES)


I've been mucking around the command line for a while, but can't figure out
how to reset my root password.  It *was* setup with a root password, but it
won't let me in now.  Anyone have any suggestions?

Please respond to [EMAIL PROTECTED], as I am on the digest.  Thanks.


mto

-- 

Michael O'Neal
Web Producer/ Autocrosser
ST 28 '89 Civic Si
-
 M   A   N   G   O
B  O  U  L  D  E  R
-
http://www.thinkmango.com
e- [EMAIL PROTECTED]
p- 303.442.1821
f- 303.938.8507


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [PHP-DB] restoring mysql db after mysqldump

2001-08-22 Thread Gabe da Silveira

I know nothing about this, but did you investigate 'SHOW TABLE STATUS' 
for any clues?

In article <018601c12b3c$2c2970b0$6e00a8c0@webdesign>,
 [EMAIL PROTECTED] (Jay Paulson) wrote:

> I've checked and the ROOT user has access to everything... but still no
> luck.. when i run the mysql -u root -p < 'all_databases.sql' it gets to the
> first table and tries to insert some information into it and says "blah
> table is read only" and it stops...
> 
> jay

-- 
__
Gabe da Silveira, Web Designer
Twin Cities Student Unions
University of Minnesota
http://www.coffman.umn.edu

wFone: (612)624-7270
eMail: [EMAIL PROTECTED]
hPage: http://www.visi.com/~jiblet

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Please Help - getting a hightlight depending on selected page

2001-08-22 Thread Hugh Bothwell


"Martin Hughes" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> OK here's the code in the page:
>
> 
> 
> 
> 
> 
>  Welcome
> 
> Home
> Introduction
> Changes & Cuts
> Scores
> Orchestra
> Synthesizers
> Sound System
> Articles
> 21st Century Les
> Misérables
> Information
> Discussion Forums
>
> 
> 
> 
>
>
> I am using this 1 page as the php 'template' with content added depending
on
> the url. For example, to go to the synthesizers page the url is:
> index.php?sect=5&id=0&page=31
>
> where sect=5 is the part that sets the menu highlight (the menu is alway
the
> same, hard-coded into the page - all I want to do is change the css
id="sel"
> from Home to Synthesizers.



Welcome

".$index[$i]."";

echo "";
}
?>







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Please Help - getting a hightlight depending on selected page

2001-08-22 Thread Gabe da Silveira

Okay, well you could either put code like this into each td cell like 
this:

>

That is kind of ugly, however.  A more elegant solution would be to make 
an array containing the links then do a loop kind of like this (I'm just 
typing the code off the top of my head, so there is likely to be some 
errors):

$menuItems = array('Home', 'Introduction', 'Changes & Cuts', 
'Scores', 'Orchestra', 'Synthesizers', 'Sound System', 'Articles');
$i = 0;
foreach ($menuItems as $item) {
   if($sect == $i) {
  print "$item\n";
   } else {
  print "$item\n";
   }
   $i++;
}

The obvious problem with my solution is the links will also presumably 
have to be entered into an array, and I don't think the foreach 
construct can work on two arrays simultaneously, but you can use the $i 
variable as the index to your second array.

In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Martin Hughes) wrote:

> OK here's the code in the page:
> 
> 
> 
> 
> 
> 
>  Welcome
> 
> Home
> Introduction
> Changes & Cuts
> Scores
> Orchestra
> Synthesizers
> Sound System
> Articles
> 21st Century Les
> Misérables
> Information
> Discussion Forums
> 
> 
> 
> 
> 
> 
> I am using this 1 page as the php 'template' with content added depending on
> the url. For example, to go to the synthesizers page the url is:
> index.php?sect=5&id=0&page=31
> 
> where sect=5 is the part that sets the menu highlight (the menu is alway the
> same, hard-coded into the page - all I want to do is change the css id="sel"
> from Home to Synthesizers.
> 
> Cheers
> 
> Martin
> 
>

-- 
__
Gabe da Silveira, Web Designer
Twin Cities Student Unions
University of Minnesota
http://www.coffman.umn.edu

wFone: (612)624-7270
eMail: [EMAIL PROTECTED]
hPage: http://www.visi.com/~jiblet

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: force download in IE -- conclusion

2001-08-22 Thread pierre-yves

I worked on a script like yours for a looong time now!

I need to force the download of various type of file, doc, pdf, zip, even
html!

Your script works fine on Opera 5.02 and netscape 4.76 on my win NT 4.0 box,
but
not on IE 5.5 On this one, it offers me to download the script file but
instead of being
a php file it has now an html extension !!

Anyhow, I do have a download by email attachment button also, because I gave
up on trying
to find a script to force download

py


- Original Message -
From: "David Minor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 22, 2001 4:10 PM
Subject: [PHP] Re: force download in IE -- conclusion


> I ran some tests of different header configurations of 6 browser/platform
> combinations to find out what worked and what didn't.  I didn't cover all
of
> the platforms available, just those that my user-base uses, so this isn't
> complete.
>
> combinations tested was IE5.5, NN4, NN6 for Windows 98 and IE5.5, NN4.7
for
> Mac 9.1.  I tested all of these browsers using/not using 'attachment' in
the
> Content-Disposition header.  and also changed out the Content-Type header
> with 'application/octet-stream', 'application/download', and '*/*'.
>
> Here's the summary and what I did to make things work as well as possible.
> My goal is to prompt the user with a save-as dialog for an mp3 file.
>
> IE5.5 for Mac always uses the quicktime plugin to play the file no matter
> what the disposition or type is.  (also no matter what the file extension
> is.  Couldn't figure out how to trick it to download the file.)
>
> IE5.5 for Win98 would attempt to download the file if
("content-disposition:
> attachment; filename=") attachment was there.
>
> All 3 of the Win98 browsers would do prompt with as few clicks as possible
> when content-type was "application/octet-stream".  Therefore,  I test in
my
> script for the Mac users and give them "Content-type:
application/downlaod"
> while I give other users "Content-Type: application/octet-stream".  Of
> course, this doesn't help the IE5.5 Mac users who still have to use
> "Downlaod Link to Disk" routine to get a save-as prompt.
>
> Anyone who sees different ways this could be done, please respond.
>
> Here's my code:
>
> if (eregi("mac",$HTTP_USER_AGENT))
>$type = "application/download";
> else
>$type = "application/octet-stream";
>
> // stream file to user
> header("Content-Type: $type");
> header("Content-Disposition: attachment; filename=$filename");
> header("Content-Length: ".filesize($tmp_file));
> header("Content-Transfer-Encoding: binary");
> readfile($tmp_file);
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Random PowerBall Generator

2001-08-22 Thread Montz, James C. (James Tower)

More as an exercise to get back into the swing of PHP, I have created the
PowerBall number generator. (for those of you un-aware, the powerball is at
$200 mil).

Took me a while to figure out using arrays, and the array_unique function.
It also incorporate the imagepng function.

Thanks to CC Zona for pointing me to the function I needed to get the job
done!

The page is at http://www.usrlinux.com/pball.php

Source code is available for viewing.  Suggestions on cleaning up code
welcome.

Enjoy!

James

___
James C. Montz
James Tower
http://www.jamestower.com 
[EMAIL PROTECTED] 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: register_globals odd behaviour?

2001-08-22 Thread Richard Lynch

> What is the reason that I should not use the array? Is there any problem
> doing it that way?

They array is simply not designed for you to use as if it were your
variable.

What you want to do is this:



You are changing $HTTP_SESSION_VARS['count'], but I'm betting the *GLOBAL*
variable $count is not changing, and *THAT* is what was registered, and
*THAT* is what gets save.  $count in the global name-space.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Please Help - getting a hightlight depending on selected page

2001-08-22 Thread Martin Hughes

OK here's the code in the page:






 Welcome

Home
Introduction
Changes & Cuts
Scores
Orchestra
Synthesizers
Sound System
Articles
21st Century Les
Misérables
Information
Discussion Forums






I am using this 1 page as the php 'template' with content added depending on
the url. For example, to go to the synthesizers page the url is:
index.php?sect=5&id=0&page=31

where sect=5 is the part that sets the menu highlight (the menu is alway the
same, hard-coded into the page - all I want to do is change the css id="sel"
from Home to Synthesizers.

Cheers

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] More about forums

2001-08-22 Thread Emiliano Marmonti

Dear people:

I have tested the address you have send me. I like one or two but thay are too 
complex, I don´t need registration, sessions, etc. Only I need a mail input line, a 
person line input and the text. Pretty simple but I can´t find anything like this.

Could anybody help me? Thanks a lot

-
Emiliano H.Marmonti
Informático Módulo de Bibliotecas
Programa SIU
Ministerio de Educación de la Nación



[PHP] Help alleviate the U.S. Nursing Shortage and Profit in the process

2001-08-22 Thread Jess Ragaza


My e-mail to cousin Bobby will be most informative. The details are in the indicated 
web site.

 

---

To: "Bobby Lazam"

Subject: Thank you for the second set of newspaper clippings.

Cc: ...

Bcc: ...

Your contributions will certainly help us level a bit the playing field with our 
competitors.

Please send your future mailing to 

P.O. Box 2766 
Washington, D.C. 20013 

which is also now the postal address of

 http://www.internetarchitecture.com/

By the way, we have quietly announced our nursing recruitment plan in the web site.

It would seem like the nursing shortage here would be for years to come.

I was just thinking if we should have a strategy that goes beyond mere tactical 
recruitment but more toward seeding for the future ... e.g., scholarships for 
deserving nursing students? Can you imagine how many good, but possibly impoverished 
people we can help this way? Maybe we should ask Auntie Andy and Auntie Chata to come 
out of retirement and help through their school in Bulacan. What do you think?

Jess

--

If you do not want to receive further mails please reply with "remove" and you will be 
taken off the mailing list. 

--





Jess Ragaza, President, Internet Architecture Inc.; P.O. Box 2766, Washington, D.C. 
20013 [EMAIL PROTECTED] http://www.internetarchitecture.com/ With shopping and 
entertainment an experience in great deals, ease and comfort: Disney, amazon.com, 
eBay, AOL, CarsDirect, Sony, Franklin Mint, Playboy and others; Where everybody is 
given a chance to work profitably at home with Multilevel Marketing and Residual 
Income Galore; Watch for the next IPO that will reap rewards beyond your imagination!


-
Do You Yahoo!?
Make international calls for as low as $0.04/minute with Yahoo! Messenger.


[PHP] Question

2001-08-22 Thread Gustavo Luis Pereira Verly

Hello, I have the next problem and I don't know how can I have the solution:

I wan to read a socket output, and format the lines, but

first: Can I make some kind o "sizeof" in the buffer that I'm receiving?
That's because the read of the socket it's very slow; and if I read for
example 256 for the length of the packet, and the server send me just 117
characters (include spaces) what happened with the others 139 characters?? I
got another problem, because the second packet, must to have 117 character
as length, and the PHP, read part of the first packet (this 139) and part of
the second. and its very slow, and finish by timeout.

second: can I cut the lines when I found the \n between each one?

Thanks everybody

Gustavo


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: force download in IE -- conclusion

2001-08-22 Thread David Minor

I ran some tests of different header configurations of 6 browser/platform
combinations to find out what worked and what didn't.  I didn't cover all of
the platforms available, just those that my user-base uses, so this isn't
complete.  

combinations tested was IE5.5, NN4, NN6 for Windows 98 and IE5.5, NN4.7 for
Mac 9.1.  I tested all of these browsers using/not using 'attachment' in the
Content-Disposition header.  and also changed out the Content-Type header
with 'application/octet-stream', 'application/download', and '*/*'.

Here's the summary and what I did to make things work as well as possible.
My goal is to prompt the user with a save-as dialog for an mp3 file.

IE5.5 for Mac always uses the quicktime plugin to play the file no matter
what the disposition or type is.  (also no matter what the file extension
is.  Couldn't figure out how to trick it to download the file.)

IE5.5 for Win98 would attempt to download the file if ("content-disposition:
attachment; filename=") attachment was there.

All 3 of the Win98 browsers would do prompt with as few clicks as possible
when content-type was "application/octet-stream".  Therefore,  I test in my
script for the Mac users and give them "Content-type: application/downlaod"
while I give other users "Content-Type: application/octet-stream".  Of
course, this doesn't help the IE5.5 Mac users who still have to use
"Downlaod Link to Disk" routine to get a save-as prompt.

Anyone who sees different ways this could be done, please respond.

Here's my code:

if (eregi("mac",$HTTP_USER_AGENT))
   $type = "application/download";
else
   $type = "application/octet-stream";

// stream file to user
header("Content-Type: $type");
header("Content-Disposition: attachment; filename=$filename");
header("Content-Length: ".filesize($tmp_file));
header("Content-Transfer-Encoding: binary");
readfile($tmp_file);



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] pointers in php

2001-08-22 Thread Christian Zonsius

Hi,

I have a problem with pointers in php.
In the following code the parent object should be a pointer to class Main
($this), but it's a copy ...

Any ideas ?
Thx Chris

parent = &$parent;

}

function Modify($text) {

$this->parent->B->text = $text;

}

}

class Sub_B {

var $text = "untouched";

// constructor

function Sub_B(&$parent) {

$this->parent = &$parent;

}

}

class Main {

// constructor

function Main() {

$this->A = new Sub_A($this);

$this->B = new Sub_B($this);

}


}

$test = new Main();

$test->A->Modify('test');

// this method should work, but doesnt (should return "test" instead of
"untouched")

echo $test->B->text."";

// parent isnt a pointer but a copy so absolute addressing works

echo $test->A->parent->B->text."";

?>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] sessions and sessionfiles

2001-08-22 Thread Jay Paulson

in the php.ini you can set the garbbage collection higher than 1 but that
puts a bigger load on your computer... what garbage collection does is that
it goes through and deletes all the session files that have expired due to
the setting of the session.gc_maxlifetime.. so right now with the way you
have things set up is that 1 out of every 100 session requests php will go
though the session files and find the ones that are older than 1440 seconds
and delete them... if you set 1 to 100 then every time a session request is
made php will go and find all the files that are over 1440 seconds and
delete them.. as you can see that would be a huge load on your computer...
:) hope that helps!

jay

"Danny" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi there,
>
> well...I'm tired of searching so I'll drop a note here.
> I've been busy working with php (4.0.6) sessions lately for an online
> shopping cart, which works really great.
> Only problem is, the temporary session-files are not removed after a
certain
> timeout occurs.
> The "session.gc_maxlifetime"-variable is set to 1440 seconds, which means
> the temporary session-files should be deleted after 24 minutes of
inactivity
> from the client side. Unfortunately, nothing of a kind happens.
> A way around this problem is adding a cronjob which deletes session-files
> older than say 3 or 4 hours or so.
> I'd rather see a better solution...anyone?
> And is there any information available on wether or not the error of not
> deleting session-files has any consequences for newly created sessions?
>
> Anyone out there, if you have a serious and professional solution, please
> mail to [EMAIL PROTECTED]
> Thanks!
>
> Happy php-ing! Danny.
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] sessions and sessionfiles

2001-08-22 Thread Danny

Hi there,

well...I'm tired of searching so I'll drop a note here.
I've been busy working with php (4.0.6) sessions lately for an online
shopping cart, which works really great.
Only problem is, the temporary session-files are not removed after a certain
timeout occurs.
The "session.gc_maxlifetime"-variable is set to 1440 seconds, which means
the temporary session-files should be deleted after 24 minutes of inactivity
from the client side. Unfortunately, nothing of a kind happens.
A way around this problem is adding a cronjob which deletes session-files
older than say 3 or 4 hours or so.
I'd rather see a better solution...anyone?
And is there any information available on wether or not the error of not
deleting session-files has any consequences for newly created sessions?

Anyone out there, if you have a serious and professional solution, please
mail to [EMAIL PROTECTED]
Thanks!

Happy php-ing! Danny.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] strange error

2001-08-22 Thread Erik H. Mathy

Heya!

All adive given so far is good. You might also want to check for a
non-closed if { } statement.

If you've got something like:
-


html 1

html2


-

You'll get an error in the last line, where the  resides.

Hope this is a helpin'
- Erik


> -Original Message-
> From: Jeremy Morano [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 22, 2001 2:12 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] strange error
>
>
> Hi,
>
> I get an error message which I can't figure out.
>
> Its a Parse error: on line 142 which is the last line of the page
> containing
> absolutly no code. The last line of code is simply ..Did
> anyone have a similar experience? Can anyone help me out please?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] strange error

2001-08-22 Thread John Meyer

At 03:12 PM 8/22/01 -0400, you wrote:
>Hi,
>
>I get an error message which I can't figure out.
>
>Its a Parse error: on line 142 which is the last line of the page containing
>absolutly no code. The last line of code is simply ..Did
>anyone have a similar experience? Can anyone help me out please?


Try to post some code, particularity the lines that come just before line 
142.  A parse error usually means that something on the previous line is 
wrong, at least, that's been my experience.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] strange error

2001-08-22 Thread Gabor Gludovatz

On Wed, 22 Aug 2001, Jeremy Morano wrote:

> I get an error message which I can't figure out.
>
> Its a Parse error: on line 142 which is the last line of the page containing
> absolutly no code. The last line of code is simply ..Did
> anyone have a similar experience? Can anyone help me out please?

You may have not put an enclosing '?>' at the end of your code, or you may
have missed a closing bracket or quotation mark somewhere.

-- 
 Gabor Gludovatz <[EMAIL PROTECTED]> http://www.sopron.hu/~ggabor/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: strange error

2001-08-22 Thread Gijsbert te Riet

Hi Jeremy,

> I get an error message which I can't figure out.
>
> Its a Parse error: on line 142 which is the last line of the page containing
> absolutly no code. The last line of code is simply ..Did
> anyone have a similar experience? Can anyone help me out please?

I guess you haven't closed the , before your 
code.
Otherwise, the php parser will think that it's still parsing php code,
which results in an parse error.

Regards,
Gijs.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] strange error

2001-08-22 Thread Jeremy Morano

Hi,

I get an error message which I can't figure out.

Its a Parse error: on line 142 which is the last line of the page containing
absolutly no code. The last line of code is simply ..Did
anyone have a similar experience? Can anyone help me out please?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [PHP-DB] restoring mysql db after mysqldump

2001-08-22 Thread Jay Paulson

I've checked and the ROOT user has access to everything... but still no
luck.. when i run the mysql -u root -p < 'all_databases.sql' it gets to the
first table and tries to insert some information into it and says "blah
table is read only" and it stops...

jay

- Original Message -
From: "Rick Emery" <[EMAIL PROTECTED]>
To: "'Jay Paulson'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, August 22, 2001 12:18 PM
Subject: RE: [PHP-DB] restoring mysql db after mysqldump


> Are your privileges in MySQL set correctly?  If ROOT doesn't have
read/write
> access, the script will crash.
>
> rick
>
> -Original Message-
> From: Jay Paulson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 22, 2001 11:29 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP-DB] restoring mysql db after mysqldump
>
>
> Hello everyone-
>
> I have done the mysqldump function and got the db in a all_database.sql
> file.  Now I am running this command at the shell prompt of my Linux
> machine:
>
> mysql -u root -p -e 'all_databases.sql'
>
> When I do that it works fine until it starts to insert the information
into
> the database.  I get the error that the table it is trying to read the
> information into is 'read only'... Is there anyway around this problem?
>
> Thanks,
> Jay
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] session_write_close()

2001-08-22 Thread Gabor Gludovatz

Hello,

I'm having problems with sessions. Since I use MySQL to store sessions, I
always have to call session_write_close() at the end of every page,
otherwise session variables don't get saved.

If I use PHP's built-in 'files' method to store session vars, then
everything works fine, I don't need to call session_write_close() and even
so the variables get saved and are restored correctly.

Is it a bug? Or is there something I don't know about?

-- 
 Gabor Gludovatz <[EMAIL PROTECTED]> http://www.sopron.hu/~ggabor/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >