[PHP] PHP & QUERY_STRING

2002-05-21 Thread Stavros Patiniotis

Hello,

My web server hdd just crashed, and I have replaced and rebuilt it with a
new drive.

All of my websites have been transferred over the the new site from
backup, and I am having a problem with PHP seeing GET variables.

My searching says that I should look in the php.ini file, but cannot
see any settings that would apply.

Can any one help, eg


http://webserver/stav.php?Action=Run



stav.php



Any suggestions or pointers would be much appreciated.




Kind Regards,


0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0
 escape net
  m a k i n g   t h e   n e t  w o r k   f o r   y o u

465b South Road ph 8293 2526
KESWICK SA 5035 fx 8293 2949
0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP & QUERY_STRING

2002-05-21 Thread Rasmus Lerdorf

register_globals

On Tue, 21 May 2002, Stavros Patiniotis wrote:

> Hello,
>
> My web server hdd just crashed, and I have replaced and rebuilt it with a
> new drive.
>
> All of my websites have been transferred over the the new site from
> backup, and I am having a problem with PHP seeing GET variables.
>
> My searching says that I should look in the php.ini file, but cannot
> see any settings that would apply.
>
> Can any one help, eg
>
>
> http://webserver/stav.php?Action=Run
>
>
>
> stav.php
>  //test
>
> print "Action is $Action";
>
> ?>
>
>
> Any suggestions or pointers would be much appreciated.
>
>
>
>
> Kind Regards,
>
>
> 0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0
>  escape net
>   m a k i n g   t h e   n e t  w o r k   f o r   y o u
>
> 465b South Road ph 8293 2526
> KESWICK SA 5035 fx 8293 2949
> 0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP & QUERY_STRING

2002-05-21 Thread Stavros Patiniotis


Hello,

Great stuff!

Thank you!

Kind Regards,


0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0
 escape net
  m a k i n g   t h e   n e t  w o r k   f o r   y o u

465b South Road ph 8293 2526
KESWICK SA 5035 fx 8293 2949
0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0

On Tue, 21 May 2002, Rasmus Lerdorf wrote:

> register_globals



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Informix Abstraction Class the PHPLIB Way

2002-05-21 Thread Martin Cabrera Diaubalick

Hello everyone,

I'm starting to work with Informix 9.3 and I was wondering if someone has
created a class in the phplib way using the same methods.

My knowledge of Informix is less than zero, so if you could point me to
another DB abstraction system that uses Informix and classes, I will
appreciate it! :-)

Thanks in advance
Regards



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] how to configure PHP (.ini) so I can use include() from any directory

2002-05-21 Thread Wilbert Enserink

Hi all,


anybody knows how to configure PHP (.ini) so I can use include() from any directory 
instead of declaring specified "paths" in php.ini? 

I'm currently using php 4.05 with apache 1.3 something on a winXP test machine

regards. Wilbert



-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-


Re: [PHP] timezone problem

2002-05-21 Thread Baba Buehler

Miguel Cruz wrote:
> 
> In short, I believe it's an OS rather than a PHP thing.
> 

time zones can be a messy and tricky beast.  all the PHP functions rely on 
the underlying OS implementation of time zone information.  sometimes this 
is controlled by the TZ environment variable, sometimes it is not.

my solution was to extract as much info as reasonable from the zoneinfo 
database and manipulate it in PHP directly.  the solution is not perfect, 
but is probably the best that can be done without more PHP access to the 
underlying zoneinfo implementation.

my code (with all the time zone data & zone IDs) is in PEAR:
http://pear.php.net/package-info.php?pacid=57


thanks,
baba


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] array empty after use

2002-05-21 Thread Web

Hi there.

When an array is 'used' with something like do while I can't re-access it
later in the page.  It is as if the array gets used up and doesn't exist.
The array is from a select statement using myself.  I have inserted a
duplicate array with a different name to get around this but figure there
must be a simpler way.

Any ideas please?

Thanks
Kevin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] array empty after use

2002-05-21 Thread Tom Rogers

Hi
You just need to reset the array pointer with reset($array_name)
Tom

At 07:47 PM 21/05/2002, Web wrote:
>Hi there.
>
>When an array is 'used' with something like do while I can't re-access it
>later in the page.  It is as if the array gets used up and doesn't exist.
>The array is from a select statement using myself.  I have inserted a
>duplicate array with a different name to get around this but figure there
>must be a simpler way.
>
>Any ideas please?
>
>Thanks
>Kevin
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] how to configure PHP (.ini) so I can use include() from any directory

2002-05-21 Thread Tom Rogers

Hi
I use this at the start of my pages, it adds the original path to the extra 
one: (keeps the include files out of the web servers view :)

ini_set ("include_path",ini_get("include_path").":../include");

Tom



At 06:47 PM 21/05/2002, Wilbert Enserink wrote:
>Hi all,
>
>
>anybody knows how to configure PHP (.ini) so I can use include() from any 
>directory instead of declaring specified "paths" in php.ini?
>
>I'm currently using php 4.05 with apache 1.3 something on a winXP test machine
>
>regards. Wilbert
>
>
>
>-
>Pas de Deux
>Van Mierisstraat 25
>2526 NM Den Haag
>tel 070 4450855
>fax 070 4450852
>http://www.pdd.nl
>[EMAIL PROTECTED]
>-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Searching for any number in a mysql query

2002-05-21 Thread webmaster




This isn't a one hundred percent PHP Q but here I 
go.
 
If I have the following query:

$query = "SELECT code FROM links WHERE ".$text." like '".$l."%' ORDER BY 
sort_text";
and define the letter a letter i.e x.
it works fine.
I am not sure what to do if I want to say get 
something that starts with (from one to ten).
I want to say all the numbers at once, not one at a 
time.
Any help appreciated,
JJ Harrison[EMAIL PROTECTED]www.tececo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Searching for any number in a mysql query

2002-05-21 Thread liljim

Hi,

try something like this:

"select [fields] from [table(s)] where [fieldtosearch] regexp
"^([1-9]{1}|10)";

~James

<[EMAIL PROTECTED]> wrote in message
003901c200b2$27ccff40$0100a8c0@JohnH">news:003901c200b2$27ccff40$0100a8c0@JohnH...
This isn't a one hundred percent PHP Q but here I go.

If I have the following query:
$query = "SELECT code FROM links WHERE ".$text." like '".$l."%' ORDER BY
sort_text";
and define the letter a letter i.e x.
it works fine.
I am not sure what to do if I want to say get something that starts with
(from one to ten).
I want to say all the numbers at once, not one at a time.
Any help appreciated,
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Reverse mySQL date

2002-05-21 Thread webmaster



How can I reverse the date coming out of 
mySQL?
 
 
ie 2002-05-21
 
becomes 21-05-2002
 
Can do it in the mySQL query or do I need to use 
PHP?
 
Thanks in advance,
 
JJ Harrison[EMAIL PROTECTED]www.tececo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Reverse mySQL date

2002-05-21 Thread liljim

Hello,

use DATE_FORMAT

"select date_format(datefield, '%d-%m-%Y') as mydate from table";

~James


<[EMAIL PROTECTED]> wrote in message
005e01c200b5$194184c0$0100a8c0@JohnH">news:005e01c200b5$194184c0$0100a8c0@JohnH...
How can I reverse the date coming out of mySQL?


ie 2002-05-21

becomes 21-05-2002

Can do it in the mySQL query or do I need to use PHP?

Thanks in advance,

JJ Harrison
[EMAIL PROTECTED]
www.tececo.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] XML Transformation

2002-05-21 Thread José León Serna

Hello:
I would like to perform XML transformations on my website, I have the
xml file in a string and the xsl file in another string, I have tested
sablotron, but it give me parse and encoding problems. Is there any "good"
solution out there?

By "good" I mean portable and reliable solutions, this module is going to be
on a intranet and the xml files are going to be uploaded to be transformed
to HTML.

Best Regards.

QaDRAM Studio, RAD Development for the WEB
http://studio.qadram.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] file functions and clearstatcache

2002-05-21 Thread Gerard Samuel

Im just double checking on the use of clearstatcache.

I have a function that checks whether a file exists and loads it like so

function foo($bar)
{
if (file_exists($bar))
{
 include($bar);
}
}

According to clearstat cache, its use is for files that change often. 
 In my case the files are static,
so I wanted to be clear, as to whether I should/shouldn't be using 
clearstatcache() in my sudo function??

Thanks


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP & form data

2002-05-21 Thread Stavros Patiniotis


Hello,

I am experiencing problems with receiving form data into my
scripts.  The phpinfo() function shows me:

PHP_SELF
_POST["Action"] checkEmail 
_POST["emailAddress"]   st 
_POST["submit"] Next >> 
_COOKIE["uid"]
_COOKIE["emailAddress"]
_COOKIE["testCookie"]   Success 


However, I can only see $Action in my script, if I try to access
$emailAddress, it doesn't work.

Any pointers, or documents to refer me to??


Kind Regards,


0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0
 escape net
  m a k i n g   t h e   n e t  w o r k   f o r   y o u

465b South Road ph 8293 2526
KESWICK SA 5035 fx 8293 2949
0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Accessing PHP globals from a module.

2002-05-21 Thread Eric Veldhuyzen

Hi,

I have just written a module for PHP (in C, linked with PHP statically).
Now I need to access session variables and other globals from whithin my
module. But I can't find how I should do this, I see documentation on how
to call user functions, and how to create new global varables, but now
how to access existing globals. Could somebody please tell me where
tell me where this is documented if it is documented at all, or explain
it to me if it is not documented yet?

-- 
#!perl #   Life ain't fair, but root passwords help.
# Eric Veldhuyzen  [EMAIL PROTECTED]
$!=$;=$_+(++$_);($:,$~,$/,$^,$*,$@)=$!=~   # Perl Monger
/.(.)...(.)(.)(.)..(.)..(.)/;`$^$~$/$: $^$*$@$~ $_>&$;`

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Accessing PHP globals from a module.

2002-05-21 Thread Eric Veldhuyzen

Hi,

I have just written a module for PHP (in C, linked with PHP statically).
Now I need to access session variables and other globals from whithin my
module. But I can't find how I should do this, I see documentation on
how
to call user functions, and how to create new global varables, but now
how to access existing globals. Could somebody please tell me where
tell me where this is documented if it is documented at all, or explain
it to me if it is not documented yet?

-- 
#!perl #   Life ain't fair, but root passwords help.
# Eric Veldhuyzen  [EMAIL PROTECTED]
$!=$;=$_+(++$_);($:,$~,$/,$^,$*,$@)=$!=~   # Perl Monger
/.(.)...(.)(.)(.)..(.)..(.)/;`$^$~$/$: $^$*$@$~ $_>&$;`

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] dbase

2002-05-21 Thread eoghan

anyone ther eused dbase with php.
was looking for best pratices on 
searching... any code snippets appreciated.

thanks...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP & form data

2002-05-21 Thread Stavros Patiniotis

 
> I am experiencing problems with receiving form data into my
> scripts.  The phpinfo() function shows me:
> 
> PHP_SELF
> _POST["Action"]   checkEmail 
> _POST["emailAddress"] st 
> _POST["submit"]   Next >> 
> _COOKIE["uid"]
> _COOKIE["emailAddress"]
> _COOKIE["testCookie"] Success 
> 

Further to my last email, I'd just like to point out that the scripts that
I am using used to work with an older php4 version (not sure of the
version number).

I'd also like to point out how the script works:

(1) joinup.php
   -set test cookie
   -delete emailAddress cookie
   -redirect to joinup1.php

(2) joinup1.php
   -if test cookie
   -ask for email/passwd ->submit
   -sumbits to self with Action=checkEmail
   -checkemail is failing due to this "problem".

So basically the $emailAddress variable is being overwritten by the
emailAddress cookie in (1).  How can I prevent this?  Remember that I need
to delete the emailAddress cookie as the user will not be able to sign in
in (2) when they to use a different email address (which is required).


Thanks.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] << and >> Operators

2002-05-21 Thread Jonathan Rosenberg

Are the << and >> operators identical in semantics to those
operators in C?  In particular, do they handle sign extension in
the same manner?

--
JR


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] php+oracle

2002-05-21 Thread Mauricio

Hi for all.
I have php+apache+win2000+client oracle in my machine.
I configured my php.ini with:
extension_dir and uncomment extensions in php_oci8.dll
But, when I restart my apache, I receive the following error:

Unable to load dynamic library "c:\php\extensions/php_oci8.dll". It was not
possible to find the specified procedure.
Can anyone help me with the configuration of php+oracle?

--
Mauricio
+55 - (041) - 219-5246
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Searching for any number in a mysql query

2002-05-21 Thread John Holmes

Use regular expressions or LEFT. This might work
 
SELECT code FROM links WHERE LEFT($text,1) IN (1,2,3,4,5,6,7,8,9,0);
 
Check the manual for regular expression examples. They will probably
work better.
 
---John Holmes.
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 21, 2002 6:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Searching for any number in a mysql query
 
This isn't a one hundred percent PHP Q but here I go.
 
If I have the following query:
$query = "SELECT code FROM links WHERE ".$text." like '".$l."%' ORDER BY
sort_text";
and define the letter a letter i.e x.
it works fine.
I am not sure what to do if I want to say get something that starts with
(from one to ten).
I want to say all the numbers at once, not one at a time.
Any help appreciated,
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com



[PHP] SQ: what does the & sign do

2002-05-21 Thread Wilbert Enserink

Hi all,


maybe this is a stupid Q, but lately I'm diving into OOP. Below you can see a piece of 
example code from the manual. 
my Q: what does the & sign do in functioncb_modify( &$item,$key) ??

I noticed this sign is used more, so it should be handy, but hwat does it do?

thx Wilbert

-


class mod {
var $thearray;
function mod( $a ) {
  $this->thearray = $a;
}
function cb_modify( &$item, $key ) {
  $item = "pref_".$item;
}
function modify() {
  array_walk( $this->thearray, array( $this, 'cb_modify' ) );
}
  }
  $m = new mod(array("one","two","three"));
  $m->modify();
  print_r($m);

which prints out:

  mod Object
  (
  [thearray] => Array
  (
  [0] => pref_one
  [1] => pref_two
  [2] => pref_three
  )
  )




-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-


[PHP] XML parser vs objects

2002-05-21 Thread Mirek Novak

Hi,
   is it possible to use methods of a class as a handlers in 
xml_set_element_handler(...)? How it can be done?
TIA,
   M.N.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Getting PHP on FreeBSD to talk to MSSQL Server 7...

2002-05-21 Thread Andrew Hill

And you can also use ODBC Drivers, after linking --with-iodbc as per the
HOWTO's on www.iodbc.org.  You may obtain drivers from OpenLink.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Virtuoso Universal Server
 

-Original Message-
From: Danny Shepherd [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 15, 2002 3:29 PM
To: [EMAIL PROTECTED]; Michael Kimsal
Subject: Re: [PHP] Re: Getting PHP on FreeBSD to talk to MSSQL Server
7...

In my expierence you'll have much greater chance of sucess if you
compile
with --with-sybase-ct :)

I just used --with-sybase-ct=/usr/local  - I didn't bother with
--with-mssql
or --with-sybase

Paticulars:
FreeBSD 4.5
PHP 4.2.0
FreeTDS 0.53

Of course, using this methods means you also have to use the sybase
commands
not the mssql commands but they're pretty much identical in function -
just
the names that are different.

HTH

Danny.

- Original Message -
From: "Michael Kimsal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 11, 2002 2:08 AM
Subject: [PHP] Re: Getting PHP on FreeBSD to talk to MSSQL Server 7...


> Glenn Sieb wrote:
> > Hi.. it's me again :)
> >
> > We have a few different servers here, most of which are FreeBSD,
> > including our internal web server (Apache 1.3.24). We have PHP 4.2.0
> > installed as well.
> >
> > Currently I'm running my MSSQL query scripts on a Win2k webserver,
as I
> > can't seem to get PHP to talk to MSSQL on the FreeBSD side. I'd
really
> > prefer to have my PHP scripts all running on the FreeBSD side,
rather
> > than on Win2k.
> >
> > We do have Perl able to talk to the MSSQL server using FreeTDS and
the
> > DBI::Sybase package on the same FreeBSD machine.
> >
> > My ./configure:
> >
> >  ./configure --prefix=/usr/local
> > --with-apache=/home/src/Apache/Apachetoolbox
> > -1.5.56/apache_1.3.24 --enable-exif --enable-track-vars
> > --with-calendar=shared -
> > -enable-safe-mode --enable-magic-quotes --enable-trans-sid
--enable-wddx
> > --enabl
> > e-ftp --with-gd=/usr/local --with-zlib --enable-gd-native-tt
> > --with-t1lib=/usr/l
> > ocal --with-jpeg-dir=/usr/local --with-png-dir=/usr/local
> > --with-zlib-dir=/usr -
> > -with-ttf --with-freetype-dir=/usr/local
> > --with-unixodbc=/usr/local/unixODBC --w
> > ith-openssl=/usr/local --with-curl=/usr/local --enable-apc
> > --with-mysql=/sw/mysq
> >
l --with-mssql=/usr/local/etc/freetds
--with-sybase=/usr/local/etc/freetds
> >
> > (built using ApacheToolbox, 1.5.56)
> >
> > FreeTDS' interfaces file is located in /usr/local/etc/freetds, which
it
> > is/was my understanding that this is what's supposed to be there.
Yet
> > not only does PHP give me:
>
> the --with-sybase= line needs to point to where freetds was compiled,
> not the interfaces file.  We don't use the interfaces file, which
seems
> to be primarily a way to map names to IPs.  We just use the IP address
> directly in the mssql_connect() functions and it works.
>
> Michael Kimsal
> http://www.phphelpdesk.com
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] SQ: what does the & sign do

2002-05-21 Thread Adam Alkins

Its a Reference Operator. You can use it to reference variables to one
another, like $a = &$b; meaning that anytime you change the value of $a it
would change the value of $b

Used for functions works in the same way. Its a way of improving the scope
of a variable. Instead of passing a value to the function and working with
that value only in the function, its a reference to a global function and
will change the value outside the function.

-Adam

- Original Message -
From: "Wilbert Enserink" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 8:32 AM
Subject: [PHP] SQ: what does the & sign do


Hi all,


maybe this is a stupid Q, but lately I'm diving into OOP. Below you can see
a piece of example code from the manual.
my Q: what does the & sign do in functioncb_modify( &$item,$key) ??

I noticed this sign is used more, so it should be handy, but hwat does it
do?

thx Wilbert

-


class mod {
var $thearray;
function mod( $a ) {
  $this->thearray = $a;
}
function cb_modify( &$item, $key ) {
  $item = "pref_".$item;
}
function modify() {
  array_walk( $this->thearray, array( $this, 'cb_modify' ) );
}
  }
  $m = new mod(array("one","two","three"));
  $m->modify();
  print_r($m);

which prints out:

  mod Object
  (
  [thearray] => Array
  (
  [0] => pref_one
  [1] => pref_two
  [2] => pref_three
  )
  )




-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Full-Duplex communication

2002-05-21 Thread Vinod Panicker

Hi,

We have developed a client-server application where the server 
needs to send asynchronous data to the client.  Now since we are 
using Apache/PHP/MySQL, the client needs to poll the server 
periodically for information.

I was thinking if there was some way to get around this basic 
problem.  I understand that this is how things are supposed to 
work, but it would be just great if i could PUSH data from the 
server to the client, using HTTP.

Since HTTP is a request/response based protocol, Apache would not 
send any data to the client asynchronously.  So what i was 
thinking was - If i tell the server to allow Keep-Alive 
connections, and increase the timeout value and max requests, I 
would effectively have a constant TCP connection.  Now the only 
problem would be of sending asynchronous data to the client.  
Solution?  Here goes - If there was some way in which i could get 
hold of the file descriptor(socket) that is being used by apache 
to write data to the client, then i could, from a PHP script also 
send any data to the client using the socket functions of PHP 
since i already have the socket with me.

This would mean that the client doesnt have to poll the server for 
data any more... and if the connection does get closed, the client 
could reconnect to the server asking for another keep-alive 
connection.

Now I know that this is probably the wrong place to put such a 
query - maybe the apache list would have been better.  But since 
I'm using PHP out here, i thought i'd give it a try.

Does the solution sound very outlandish?  Are there any pitfalls?  
And finally, how do i get hold of the socket?

Tx in advance,
Vinod.
_
Click below to visit monsterindia.com and review jobs in India or 
Abroad
http://monsterindia.rediff.com/jobs


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE: [php-objects] XML parser vs objects

2002-05-21 Thread Fredrik Davidsson

Dear Mirek,

This is how we use the handler for our XML class.
Hope it helps!

class XML
{
function parseXML()
{

/
Parse string XML data.

/
$parser = xml_parser_create(); 
xml_set_object($parser, &$this);
xml_set_element_handler($parser, "start_element",
"stop_element");
}

function start_element($parser, $name, $attrs) 
{ 
/***
Handles opening tags
/
}

function stop_element($parser, $name) 
{ 

/
Handles closing of  tags!

/
}
}

Best regards

Fredrik Davidsson
Alfaproject AB


-Original Message-
From: Mirek Novak [mailto:[EMAIL PROTECTED]] 
Sent: den 21 maj 2002 14:52
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [php-objects] XML parser vs objects

Hi,
   is it possible to use methods of a class as a handlers in
xml_set_element_handler(...)? How it can be done?
TIA,
   M.N.


 Yahoo! Groups Sponsor -~-->
Tied to your PC? Cut Loose and
Stay connected with Yahoo! Mobile
http://us.click.yahoo.com/QBCcSD/o1CEAA/sXBHAA/saFolB/TM
-~->

Look here for Free PHP Classes of objects:
http://phpclasses.UpperDesign.com/
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

 

Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/ 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] eregi(mail)

2002-05-21 Thread Denis L. Menezes

Hello friends,

I use the following code, but it does not work. Is there something wrong?

If
(ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_`a
-z{|}~]+\.'.'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$',
$email_address))
){
  Print ("Sorry, the email address seems to be invalid.");
  exit;
  }

Please help.
Denis
- Original Message -
From: "Steve Buehler" <[EMAIL PROTECTED]>
To: "Kevin Stone" <[EMAIL PROTECTED]>
Cc: "PHP" <[EMAIL PROTECTED]>
Sent: Saturday, May 11, 2002 2:45 AM
Subject: Re: [PHP] eregi(mail)


> Either Google is wrong (probably) or they are now allowing things like
> spaces into an email address.  There are actually several things that are
> not allowed in a standard email address.  Here is the code that I use.
>
ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_`a-
z{|}~]+\.'.'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$',
> $subarray))
> I am honestly not sure where I got this code, but it has always worked for
> me and I have not found any YET that are good address that this kills.  I
> have also not found any bad ones YET that this lets through (unless the
> domain or user doesn't exist, of course).
>
> Steve
>
> At 01:26 PM 5/10/2002, you wrote:
> >I had always been suspicious about email validators so I did a big long
> >search on Google about standard address formats.  It turns out that aside
> >from the @ symbol emails have no standard format whatsoever.  So
ereg('@',
> >$email) is really the only functional email validator.
> >
> >You also have to think about what kind of email validation you need.  Do
you
> >really need to control the format of the emails being stored in your
> >database?  Or do you need to control the validity of the emails being
stored
> >in your database?  There is a big difference.  A valid email address
isn't
> >necessarily one that is formated in the way you expect.  It is one that
is
> >active and can be mailed to.  There are a number of techniques you can
use
> >to determine that.
> >
> >Well.. anyway sorry for going off on a tangent there.  In your search for
an
> >email validator you got a bit more information than you expected.  I hope
it
> >was useful in some tiny miniscule sort of way.  :)
> >
> >--
> >Kevin Stone
> >[EMAIL PROTECTED]
> >
> >
> >- Original Message -
> >From: "Analysis & Solutions" <[EMAIL PROTECTED]>
> >To: "PHP List" <[EMAIL PROTECTED]>
> >Sent: Friday, May 10, 2002 10:59 AM
> >Subject: Re: [PHP] eregi(mail)
> >
> >
> > > Hi Liam:
> > >
> > > On Fri, May 10, 2002 at 09:48:58AM -0700, Liam Gibbs wrote:
> > > > Does anyone have a decent eregi statement for
> > > > validating e-mail addresses?
> > >
> > > eregi('^[a-z0-9_.=+-]+@([a-z0-9-]+\.)+([a-z]{2,6})$', $Email);
> > >
> > > Enjoy,
> > >
> > > --Dan
> > >
> > > --
> > >PHP classes that make web design easier
> > > SQL Solution  |   Layout Solution   |  Form Solution
> > > sqlsolution.info  | layoutsolution.info |  formsolution.info
> > >  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
> > >  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Full-Duplex communication

2002-05-21 Thread Manuel Lemos

Hello,

On 05/21/2002 10:20 AM, Vinod Panicker wrote:
> Does the solution sound very outlandish?  Are there any pitfalls?  And 
> finally, how do i get hold of the socket?

Why don't you just use echo and flush() like PHP chat programs do?



-- 

Regards,
Manuel Lemos


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Secure eval();

2002-05-21 Thread Chris Boget

I need to store equations in a DB for later use.  For example,
something like the following might appear in one of the fields:

(( 2 * 3 ) + 7 ) / ( 8 / 4 )

So I want to eval() *only* equations.  However, there is nothing
stoping someone from entering in a valid PHP command that
accesses the file system.  While only a certain class of user
will be able to access the page that allows the input of this 
of this equation, there isn't anything to stop them from entering
malicious code.
So my question, aside from parsing the value of the field, is there
any way to run eval so that it won't run system commands?  So
that it will only run mathematical equations?  Has anyone already
come up with this kind of code?  Suggestions?  Ideas?

thnx,
Chris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP 4.2.1 install

2002-05-21 Thread Conover, Ryan

What do I set cgi_redirect var in the php.ini if I install php 4.2.1 under
win2k/iis5.

Ryan Conover
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.pitt.edu/~rscst25/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Full-Duplex communication

2002-05-21 Thread Bogdan Stancescu

Hi!

I'm looking for an answer to your questions as well, so if you do find a 
solution on other lists, could you please post it here as well?

Regarding the issue, your proposal wouldn't make for full-duplex as far 
as I understand since I don't see how the client would be able to send 
any data on the same connection _after_ getting connected.

What are you using on the other end of the pipe (on the client)? Plain 
HTML? Flash? Java? Something else?

Bogdan

Vinod Panicker wrote:

> Hi,
>
> We have developed a client-server application where the server needs 
> to send asynchronous data to the client.  Now since we are using 
> Apache/PHP/MySQL, the client needs to poll the server periodically for 
> information.
>
> I was thinking if there was some way to get around this basic 
> problem.  I understand that this is how things are supposed to work, 
> but it would be just great if i could PUSH data from the server to the 
> client, using HTTP.
>
> Since HTTP is a request/response based protocol, Apache would not send 
> any data to the client asynchronously.  So what i was thinking was - 
> If i tell the server to allow Keep-Alive connections, and increase the 
> timeout value and max requests, I would effectively have a constant 
> TCP connection.  Now the only problem would be of sending asynchronous 
> data to the client.  Solution?  Here goes - If there was some way in 
> which i could get hold of the file descriptor(socket) that is being 
> used by apache to write data to the client, then i could, from a PHP 
> script also send any data to the client using the socket functions of 
> PHP since i already have the socket with me.
>
> This would mean that the client doesnt have to poll the server for 
> data any more... and if the connection does get closed, the client 
> could reconnect to the server asking for another keep-alive connection.
>
> Now I know that this is probably the wrong place to put such a query - 
> maybe the apache list would have been better.  But since I'm using PHP 
> out here, i thought i'd give it a try.
>
> Does the solution sound very outlandish?  Are there any pitfalls?  And 
> finally, how do i get hold of the socket?
>
> Tx in advance,
> Vinod.
> _
> Click below to visit monsterindia.com and review jobs in India or Abroad
> http://monsterindia.rediff.com/jobs
>
>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Secure eval();

2002-05-21 Thread 1LT John W. Holmes

You'll have to come up with a regular expression to check for bad
characters. How complex are the equations? If they are like your example,
you can just check that the equation doesn't have any letters and is only
made up of [0-9+*-/()] characters.

---John Holmes...

- Original Message -
From: "Chris Boget" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 9:47 AM
Subject: [PHP] Secure eval();


> I need to store equations in a DB for later use.  For example,
> something like the following might appear in one of the fields:
>
> (( 2 * 3 ) + 7 ) / ( 8 / 4 )
>
> So I want to eval() *only* equations.  However, there is nothing
> stoping someone from entering in a valid PHP command that
> accesses the file system.  While only a certain class of user
> will be able to access the page that allows the input of this
> of this equation, there isn't anything to stop them from entering
> malicious code.
> So my question, aside from parsing the value of the field, is there
> any way to run eval so that it won't run system commands?  So
> that it will only run mathematical equations?  Has anyone already
> come up with this kind of code?  Suggestions?  Ideas?
>
> thnx,
> Chris
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Java PHP Integration

2002-05-21 Thread Conover, Ryan

I was wondering if anyone uses php to call enterprise javabeans?

I wrote a java class that is accessed by some php code.  This java class
calls an EJB and gets a custom object returned to the java class called
report.  When I returned the custom object to php to reference, everything I
try to ouput in the object gets outputed as "Object".

Tried this way
$Client = new Java("Custom.Client");
$Report=$Client->getTheReport(String str);
 echo($Report->Jobs[0]->getjobnum());

And this way 
$Client = new Java("Custom.Client");
$Client->getTheReport(String str);
 echo($Client->thereport->Jobs[0]->getjobnum());


Any help or links to anyone that tried this would be useful.


Ryan Conover
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.pitt.edu/~rscst25/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: Re: [PHP] Full-Duplex communication

2002-05-21 Thread Vinod Panicker

Hi,

Tx for your very prompt reply.

Yeah, I'll post the solution as soon as I find it someplace.

Let me outline the problem in more detail -

Client (VC++) calls a PHP script on the server, specifies the 
connection type as Keep-Alive.  The PHP script, somehow (still a 
big question) gets the socket on which the apache server has 
received the client request (so that it can send data to the 
client later) and stores it in a database.

Now whenever another PHP script wants to send data asynchronously 
to the client, it gets the socket from the database, and just 
calls a write() on it.  Since the connection is still open 
(Keep-Alive), the client receives the information, and doesnt have 
to poll the server periodically.

The application of this is indeed destined for a messaging 
product, and could benefit a lot of other areas as well.

The only thing that is needed is the socket from apache.

Someone somewhere knows how to get this done, i'm sure :)

Possibly a hack into the PHP module can get this done, i'm open to 
suggestions.

Tx,
Vinod.

On Tue, 21 May 2002 Bogdan Stancescu wrote :
>Hi!
>
>I'm looking for an answer to your questions as well, so if you do 
>find a solution on other lists, could you please post it here as 
>well?
>
>Regarding the issue, your proposal wouldn't make for full-duplex 
>as far as I understand since I don't see how the client would be 
>able to send any data on the same connection _after_ getting 
>connected.
>
>What are you using on the other end of the pipe (on the client)? 
>Plain HTML? Flash? Java? Something else?
>
>Bogdan
>
>Vinod Panicker wrote:
>
>>Hi,
>>
>>We have developed a client-server application where the server 
>>needs to send asynchronous data to the client.  Now since we are 
>>using Apache/PHP/MySQL, the client needs to poll the server 
>>periodically for information.
>>
>>I was thinking if there was some way to get around this basic 
>>problem.  I understand that this is how things are supposed to 
>>work, but it would be just great if i could PUSH data from the 
>>server to the client, using HTTP.
>>
>>Since HTTP is a request/response based protocol, Apache would 
>>not send any data to the client asynchronously.  So what i was 
>>thinking was - If i tell the server to allow Keep-Alive 
>>connections, and increase the timeout value and max requests, I 
>>would effectively have a constant TCP connection.  Now the only 
>>problem would be of sending asynchronous data to the client.  
>>Solution?  Here goes - If there was some way in which i could 
>>get hold of the file descriptor(socket) that is being used by 
>>apache to write data to the client, then i could, from a PHP 
>>script also send any data to the client using the socket 
>>functions of PHP since i already have the socket with me.
>>
>>This would mean that the client doesnt have to poll the server 
>>for data any more... and if the connection does get closed, the 
>>client could reconnect to the server asking for another 
>>keep-alive connection.
>>
>>Now I know that this is probably the wrong place to put such a 
>>query - maybe the apache list would have been better.  But since 
>>I'm using PHP out here, i thought i'd give it a try.
>>
>>Does the solution sound very outlandish?  Are there any 
>>pitfalls?  And finally, how do i get hold of the socket?
>>
>>Tx in advance,
>>Vinod.
>>_
>>Click below to visit monsterindia.com and review jobs in India 
>>or Abroad
>>http://monsterindia.rediff.com/jobs
>>
>>
>
>
>

_
Click below to visit monsterindia.com and review jobs in India or 
Abroad
http://monsterindia.rediff.com/jobs


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Secure eval();

2002-05-21 Thread Chris Boget

> You'll have to come up with a regular expression to check for bad
> characters. How complex are the equations? If they are like your example,
> you can just check that the equation doesn't have any letters and is only
> made up of [0-9+*-/()] characters.

It's pretty complex.  What I gave was a very simplistic example.  The numbers
are actually going to be table.fieldnames and the values in those fields are going
to be referenced to get the actual number used in the equation.  However, once
I interpolate the fieldnames to numbers I guess I could run the equation against
some sort of regex to make sure that it's valid.
hmmm  Might be easier than I thought.

Thanks for the input!

Chris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] unknown problem of script

2002-05-21 Thread erich

i run a install.php, the server says the following statement,
Warning: Undefined index: install in d:\wwwroot\program_files\install.php on
line 14

the strange things is when i install the php program, it does not have
outputted this warning, but this warning occurs when i put all the files to
a remote server

the install.php source is as follows:
Internal table $table_internal_name correctly
created..";

  for ($i=0; $i..The system is correctly installed!!";
  echo "You can now manage your table $table_name, starting from
index.php";
  echo "In order to customize the internal db you have to use the administration page.";

  if ($unique_field_name == ""){
   echo "Your table $table_name hasn't any primary keys set, if
you don't set a primary key  won't show the edit/delete/details buttons.";
  } // end if
 } // end if ($install == "1")
 else{
  echo "";
  echo "";
  echo "";
  echo "";
 } // end else
} // end if ($table_name != "" and $table_internal_name != "")
else{
 echo "Please specify table_name and table_internal_name in config.php";
} // end else

// include footer
include ("./include/footer_admin.php");
?>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Secure eval();

2002-05-21 Thread 1LT John W. Holmes

Are you sure you have to run it through eval()? It sounds like you're
creating a query. Couldn't you just create the query dynamically, then put
it in a mysql_query() function? (or whatever DB you're using) Then, even if
they try some kung fu on you, it'll just result in a bad query, not some
rogue code being executed.

---John Holmes...

- Original Message -
From: "Chris Boget" <[EMAIL PROTECTED]>
To: "1LT John W. Holmes" <[EMAIL PROTECTED]>; "PHP General"
<[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 10:17 AM
Subject: Re: [PHP] Secure eval();


> > You'll have to come up with a regular expression to check for bad
> > characters. How complex are the equations? If they are like your
example,
> > you can just check that the equation doesn't have any letters and is
only
> > made up of [0-9+*-/()] characters.
>
> It's pretty complex.  What I gave was a very simplistic example.  The
numbers
> are actually going to be table.fieldnames and the values in those fields
are going
> to be referenced to get the actual number used in the equation.  However,
once
> I interpolate the fieldnames to numbers I guess I could run the equation
against
> some sort of regex to make sure that it's valid.
> hmmm  Might be easier than I thought.
>
> Thanks for the input!
>
> Chris
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Secure eval();

2002-05-21 Thread Chris Boget

> Are you sure you have to run it through eval()? It sounds like you're
> creating a query. Couldn't you just create the query dynamically, then put
> it in a mysql_query() function? (or whatever DB you're using) Then, even if
> they try some kung fu on you, it'll just result in a bad query, not some
> rogue code being executed.

Try some kung fu?  Never heard it put like that before. :P

I am kind of creating a query.  The equation is going to look something like
this:

(({table1.field1} * {table2.field2}) + {table3.field3})

Then I'm going to get the values in those fields and parse the above as if they
were macros (which, in a sense, they are).  That could yield something like:

((8 * 5) + 3)

and it is that equation that I'm going to need to eval.  So I don't think I'll be able
to do this in a query.

Chris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] unknown problem of script

2002-05-21 Thread Analysis & Solutions

Erich:

On Tue, May 21, 2002 at 10:22:10PM +0800, erich wrote:
> Warning: Undefined index: install in d:\wwwroot\program_files\install.php
> on line 14

Undefined index means that the index you requested from an array doesn't 
exist.


>  
> $install = $HTTP_POST_VARS["install"];

That's line 14.  So, "install" isn't set, but you're using it as if it 
was.


> the strange things is when i install the php program, it does not have
> outputted this warning, but this warning occurs when i put all the files
> to a remote server

You have different error reporting levels on the different servers.

One option to solve the problem is change error reporting.  The more
preferable thing to do is this:

   if ( empty($_POST['install']) ) {
  $install = '';
   } else {
  $install = $_POST['install'];
   }

Enjoy,

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




php-general Digest 21 May 2002 15:58:17 -0000 Issue 1358

2002-05-21 Thread php-general-digest-help


php-general Digest 21 May 2002 15:58:17 - Issue 1358

Topics (messages 98557 through 98607):

Re: MySQL and sorting
98557 by: Miguel Cruz
98558 by: Tyler Longren
98559 by: Jason Wong
98562 by: David Freeman

Smart quote algorithm
98560 by: Miguel Cruz

Re: php4.2.0 (win) error message question
98561 by: Rasmus Lerdorf

Re: exec() sytem() problem with starting ext. prg
98563 by: Alexander Saupe

PHP & QUERY_STRING
98564 by: Stavros Patiniotis
98565 by: Rasmus Lerdorf
98566 by: Stavros Patiniotis

Informix Abstraction Class the PHPLIB Way
98567 by: Martin Cabrera Diaubalick

how to configure PHP (.ini) so I can use include() from any directory
98568 by: Wilbert Enserink
98572 by: Tom Rogers

Re: timezone problem
98569 by: Baba Buehler

array empty after use
98570 by: Web
98571 by: Tom Rogers

Searching for any number in a mysql query
98573 by: webmaster.tececo.com
98574 by: liljim
98586 by: John Holmes

Reverse mySQL date
98575 by: webmaster.tececo.com
98576 by: liljim

XML Transformation
98577 by: José León Serna

file functions and clearstatcache
98578 by: Gerard Samuel

PHP & form data
98579 by: Stavros Patiniotis
98583 by: Stavros Patiniotis

Accessing PHP globals from a module.
98580 by: Eric Veldhuyzen
98581 by: Eric Veldhuyzen
98605 by: Rasmus Lerdorf

dbase
98582 by: eoghan

<< and >> Operators
98584 by: Jonathan Rosenberg

php+oracle
98585 by: Mauricio

Re: what does the & sign do
98587 by: Wilbert Enserink
98590 by: Adam Alkins

XML parser vs objects
98588 by: Mirek Novak

Re: Getting PHP on FreeBSD to talk to MSSQL Server 7...
98589 by: Andrew Hill

Full-Duplex communication
98591 by: Vinod  Panicker
98594 by: Manuel Lemos
98597 by: Bogdan Stancescu
98600 by: Vinod  Panicker

Re: [php-objects] XML parser vs objects
98592 by: Fredrik Davidsson

Re: eregi(mail)
98593 by: Denis L. Menezes

Secure eval();
98595 by: Chris Boget
98598 by: John Holmes
98601 by: Chris Boget
98603 by: John Holmes
98604 by: Chris Boget
98606 by: John Holmes

PHP 4.2.1 install
98596 by: Conover, Ryan

Java PHP Integration
98599 by: Conover, Ryan

unknown problem of script
98602 by: erich
98607 by: Analysis & Solutions

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

--- Begin Message ---

On Mon, 20 May 2002, Cleeker wrote:
> Is there a way to extract lets say a bunch of dates from a mysql db, and
> the sort them in order from newest to oldest? Also how would you sort
> names in alphabetical order?

Read the section of the MySQL manual that covers "ORDER BY" clauses.

miguel


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

The MySQL manual will explain this in great detail.

To sort by date:
SELECT * FROM table ORDER BY date ASC;

for that to work, all the values in date should be a timestamp (ex:
2002052000)

To sort by names:
SELECT  * FROM table ORDER BY name ASC;

If you want reverse the order, replace the 'ASC' with 'DESC'.

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]
- Original Message -
From: "Cleeker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 20, 2002 9:11 PM
Subject: [PHP] MySQL and sorting


> Is there a way to extract lets say a bunch of dates from a mysql db, and
> the sort them in order from newest to oldest? Also how would you sort
> names in alphabetical order?
>
> ~Cleeker
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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

On Tuesday 21 May 2002 10:11, Cleeker wrote:
> Is there a way to extract lets say a bunch of dates from a mysql db, and
> the sort them in order from newest to oldest? Also how would you sort
> names in alphabetical order?

Yes, look at the date/time functions in the (mysql) manual.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Not one hundred percent efficient, of course ... but nothing ever is.
-- Kirk, "Metamorphosis", stardate 3219.8
*/


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


 > Is there a way to extract lets say a bunch of dates from a 
 > mysql db, and the sort them in order from newest to oldest? 
 > Also how would you sort names in alphabetical order?

Yes, and a php list is obviously a good place to ask an sql question.

In any case

[PHP] Mcrypt: Blowfish or Twofish or no fish?

2002-05-21 Thread Jimmy Lantz

Hi,
started playing with Mcrypt and just wanted to ask which encryption method 
makes the stronger encryption?
(I can supply the necesary keylength).
Should I go for MCRYPT_BLOWFISH or MCRYPT_TWOFISH? Or no fish at all :)

So what do I need it for? I'm going to use it encrypting files, sizes 
varies between some 100 k's and 4-5 mb's.
/ Jim

Paranoia + A system w/o users = Safe system :) 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP&Apache config to not require "?"

2002-05-21 Thread Timothy J. Luoma


Hello PHP'ers

I am currently using the very cool PHPSlideshow(1)

This gives me URLs that look like this:

http://www.tntluoma.com/show.php?directory=nursery/

I would like to be able to have simpler URL like this:

http://www.tntluoma.com/show/directory=nursery/

I was researching for an answer for this and came across some information
at http://www.evolt.org/article/rdf/18/22880/ that was quite helpful about
Apache's 'force type' which means (I think) that I can use this:


ForceType application/x-httpd-php


that will mean that I do not have to use the .php, which is good.

But the question remains how I can drop the ? (originally found after the
show.php? for a / as above)

I came across a site once that talked about how to do that too, but my
bookmarks were recently destroyed (bad day) and I can't find it now that
I'm looking for it.

Any help/pointers appreciated.

TjL

(1) The very cool PHPSlideshow can be found at:
http://www.zinkwazi.com/pages.php?page_name=scripts


-- 
Site: www.tntluoma.com   mailto:[EMAIL PROTECTED]
Info: Apache/1.3.19 (Unix) with PHP/4.0.6


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] timezone problem

2002-05-21 Thread SP

Hi Baba

I've been trying to get as much info on this as
possible and you are right it is quite messy.
Thanks for that link, I'm going to take a look at
your code.



-Original Message-
From: Baba Buehler [mailto:[EMAIL PROTECTED]]
Sent: May 21, 2002 5:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] timezone problem


Miguel Cruz wrote:
>
> In short, I believe it's an OS rather than a PHP
thing.
>

time zones can be a messy and tricky beast.  all
the PHP functions rely on
the underlying OS implementation of time zone
information.  sometimes this
is controlled by the TZ environment variable,
sometimes it is not.

my solution was to extract as much info as
reasonable from the zoneinfo
database and manipulate it in PHP directly.  the
solution is not perfect,
but is probably the best that can be done without
more PHP access to the
underlying zoneinfo implementation.

my code (with all the time zone data & zone IDs)
is in PEAR:
http://pear.php.net/package-info.php?pacid=57


thanks,
baba


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP&Apache config to not require "?"

2002-05-21 Thread Jason Wong

On Wednesday 22 May 2002 00:37, Timothy J. Luoma wrote:
> Hello PHP'ers
>
> I am currently using the very cool PHPSlideshow(1)
>
> This gives me URLs that look like this:
>
>   http://www.tntluoma.com/show.php?directory=nursery/
>
> I would like to be able to have simpler URL like this:
>
>   http://www.tntluoma.com/show/directory=nursery/
>
> I was researching for an answer for this and came across some information
> at http://www.evolt.org/article/rdf/18/22880/ that was quite helpful about
> Apache's 'force type' which means (I think) that I can use this:
>
> 
> ForceType application/x-httpd-php
> 
>
> that will mean that I do not have to use the .php, which is good.

Once you have forced 

http://www.tntluoma.com/show

To run as your php script then ...

> But the question remains how I can drop the ? (originally found after the
> show.php? for a / as above)

... use $HTTP_SERVER_VARS['REQUEST_URI'] (or $_SERVER[...]) to grab and parse 
the rest of the URL. Obviously you'll have to make some minor changes to 
PHPSlideshow so that it will output the URL without the '?'

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Everybody gets free BORSCHT!
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] timezone problem

2002-05-21 Thread Christopher Riordan

I had a similar issue, for a thing I'm doing for a Messageboard I am writing
I need the timezones and offsets, so I compiled the best I could off
different sites and info, and created a Mysql Table with all the timezones
and offsets. there are duplicate offsets but since people know their TZ as
different things depending where they live. I can do a dump if people would
like


Chris Riordan
http://www.hal-9000.net


- Original Message -
From: "SP" <[EMAIL PROTECTED]>
To: "Baba Buehler" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 12:47 PM
Subject: RE: [PHP] timezone problem


> Hi Baba
>
> I've been trying to get as much info on this as
> possible and you are right it is quite messy.
> Thanks for that link, I'm going to take a look at
> your code.
>
>
>
> -Original Message-
> From: Baba Buehler [mailto:[EMAIL PROTECTED]]
> Sent: May 21, 2002 5:37 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] timezone problem
>
>
> Miguel Cruz wrote:
> >
> > In short, I believe it's an OS rather than a PHP
> thing.
> >
>
> time zones can be a messy and tricky beast.  all
> the PHP functions rely on
> the underlying OS implementation of time zone
> information.  sometimes this
> is controlled by the TZ environment variable,
> sometimes it is not.
>
> my solution was to extract as much info as
> reasonable from the zoneinfo
> database and manipulate it in PHP directly.  the
> solution is not perfect,
> but is probably the best that can be done without
> more PHP access to the
> underlying zoneinfo implementation.
>
> my code (with all the time zone data & zone IDs)
> is in PEAR:
> http://pear.php.net/package-info.php?pacid=57
>
>
> thanks,
> baba
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit:
> http://www.php.net/unsub.php
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Mcrypt: Blowfish or Twofish or no fish?

2002-05-21 Thread Sqlcoders.com Programming Dept

hiya,
twofish runs at just over 25MB/sec when compiled into a test VC++
application,
blowfish runs at 18MB/sec.

As far as I remember,
if you use the same keylenght (256 or 128) then you should get around the
same level of encryption (probably not exact, but if one was that much
weaker there'd be a warning on the Mcrypt page).

HTH,
Dw


Sqlcoders.com Dynamic data driven web solutions
- Original Message -
From: "Jimmy Lantz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: May 21 2002 09:27 AM
Subject: [PHP] Mcrypt: Blowfish or Twofish or no fish?


> Hi,
> started playing with Mcrypt and just wanted to ask which encryption method
> makes the stronger encryption?
> (I can supply the necesary keylength).
> Should I go for MCRYPT_BLOWFISH or MCRYPT_TWOFISH? Or no fish at all :)
>
> So what do I need it for? I'm going to use it encrypting files, sizes
> varies between some 100 k's and 4-5 mb's.
> / Jim
>
> Paranoia + A system w/o users = Safe system :)
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] timezone problem

2002-05-21 Thread SP

Here's what I was just thinking.  This timezone
seems too complicated and what do you guys think
about me just displaying all the times in GMT and
then allow the user to set to their local time by
selecting a pulldown list of all the times GMT -11
to GMT +12.

set local time to 1:10pm
set local time to 2:10pm
set local time to 3:10pm
set local time to 4:10pm
.
.
.

They would have to change their settings once a
year for day light savings but the good thing is I
don't have to worry about tz anymore.  What do you
think?


-Original Message-
From: Christopher Riordan
[mailto:[EMAIL PROTECTED]]
Sent: May 21, 2002 1:05 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] timezone problem


I had a similar issue, for a thing I'm doing for a
Messageboard I am writing
I need the timezones and offsets, so I compiled
the best I could off
different sites and info, and created a Mysql
Table with all the timezones
and offsets. there are duplicate offsets but since
people know their TZ as
different things depending where they live. I can
do a dump if people would
like


Chris Riordan
http://www.hal-9000.net


- Original Message -
From: "SP" <[EMAIL PROTECTED]>
To: "Baba Buehler" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 12:47 PM
Subject: RE: [PHP] timezone problem


> Hi Baba
>
> I've been trying to get as much info on this as
> possible and you are right it is quite messy.
> Thanks for that link, I'm going to take a look
at
> your code.
>
>
>
> -Original Message-
> From: Baba Buehler [mailto:[EMAIL PROTECTED]]
> Sent: May 21, 2002 5:37 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] timezone problem
>
>
> Miguel Cruz wrote:
> >
> > In short, I believe it's an OS rather than a
PHP
> thing.
> >
>
> time zones can be a messy and tricky beast.  all
> the PHP functions rely on
> the underlying OS implementation of time zone
> information.  sometimes this
> is controlled by the TZ environment variable,
> sometimes it is not.
>
> my solution was to extract as much info as
> reasonable from the zoneinfo
> database and manipulate it in PHP directly.  the
> solution is not perfect,
> but is probably the best that can be done
without
> more PHP access to the
> underlying zoneinfo implementation.
>
> my code (with all the time zone data & zone IDs)
> is in PEAR:
> http://pear.php.net/package-info.php?pacid=57
>
>
> thanks,
> baba
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit:
> http://www.php.net/unsub.php
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit:
http://www.php.net/unsub.php
>
>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Post form values - script flow

2002-05-21 Thread Tim Greenleaf

I am very new to PHP about two hours.  I have a search page that I post back
to the same URL.  When the form is loaded I check to see if the seach
variable is set ($srch is the name of the text box on the form) and then
determine what function to call.  I either call a welcome message function
to be printed to the page or a function to search a database and build a
table of results.  I have included my script belowMy question is:  Is
this a good way to handle search forms with PHP?  Since I have no examples
to work from I am not sure what the proper way is.

Thanks for the help.

 if (isset($srch)){
   if (strlen(trim($srch)) > 0) {
   $srch = strtoupper(trim($srch));
   buildtable($srch);
  }
  else {
   dispwelcome();
  }
  }
 else {
  dispwelcome();
 }






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] in_array problems (another pair of eyes?)

2002-05-21 Thread Jas

I don't think I am using the syntax correctly, I have been looking at this
function on php.net and everything I have seen says my code should be
working.
A form allows the user to upload a file:

 
 
 
 
Resulting file (upload_done.php):

And here is my error:
Warning: Wrong datatype for first argument in call to in_array in
upload_done.php on line 7



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Post form values - script flow

2002-05-21 Thread Jerome Houston

Looks good Tim.

if you're going to do it this way, make sure register_globals is set on in 
your php.ini.  also you check isset($srch) AND strlen(trim($srch)).  in most 
cases, both checks won't be necessary.  unless you have high error 
reporting, and php will complain if you check a variable that hasn't been 
set yet.

jerome


Original Message Follows
From: "Tim Greenleaf" <[EMAIL PROTECTED]>

I am very new to PHP about two hours.  I have a search page that I post back
to the same URL.  When the form is loaded I check to see if the seach
variable is set ($srch is the name of the text box on the form) and then
determine what function to call.  I either call a welcome message function
to be printed to the page or a function to search a database and build a
table of results.  I have included my script belowMy question is:  Is
this a good way to handle search forms with PHP?  Since I have no examples
to work from I am not sure what the proper way is.

Thanks for the help.

  if (isset($srch)){
if (strlen(trim($srch)) > 0) {
$srch = strtoupper(trim($srch));
buildtable($srch);
   }
   else {
dispwelcome();
   }
   }
  else {
   dispwelcome();
  }






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Secure eval();

2002-05-21 Thread Scott Hurring

> -Original Message-
> From: Chris Boget [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP] Secure eval();
> 
> > Are you sure you have to run it through eval()? It sounds 
> like you're
> > creating a query. Couldn't you just create the query 
> dynamically, then put
> > it in a mysql_query() function? (or whatever DB you're 
> using) Then, even if
> > they try some kung fu on you, it'll just result in a bad 
> query, not some
> > rogue code being executed.
> 
> Try some kung fu?  Never heard it put like that before. :P
> 
> I am kind of creating a query.  The equation is going to look 
> something like
> this:
> 
> (({table1.field1} * {table2.field2}) + {table3.field3})
> 
> Then I'm going to get the values in those fields and parse 
> the above as if they
> were macros (which, in a sense, they are).  That could yield 
> something like:
> 
> ((8 * 5) + 3)
> 
> and it is that equation that I'm going to need to eval.  So I 
> don't think I'll be able
> to do this in a query.
> 
> Chris

Make sure you check if the tables are valid and present
in the database.  But like others have suggested, you
should *really* look for a better way to do this.

Putting text into a database and then blindly eval()'ing
it later on is just begging for trouble.

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] in_array problems (another pair of eyes?)

2002-05-21 Thread Jason Wong

On Wednesday 22 May 2002 01:45, Jas wrote:
> I don't think I am using the syntax correctly, I have been looking at this
> function on php.net and everything I have seen says my code should be
> working.

What version of php are you using? In PHP versions before 4.2.0 needle was not 
allowed to be an array.

> if (in_array(array ('.jpg', '.jpeg'), $types)) { //this is the error line
> (line 7)
>  print "jpg file"; }
> ?>
> And here is my error:
> Warning: Wrong datatype for first argument in call to in_array in
> upload_done.php on line 7

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Punning is the worst vice, and there's no vice versa.
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Getting only 255 chars from SQL Server

2002-05-21 Thread Tim Greenleaf

FYI:  MS SQL Server 7 and greater, Varchar is a max of 8000 characters so it
sounds like there is some limitation in the PHP functions that is limiting
this.
"Niklas lampén" <[EMAIL PROTECTED]> wrote in message
008901c1fa7b$14539d30$ba93c5c3@Niklas">news:008901c1fa7b$14539d30$ba93c5c3@Niklas...
> The platform doesn't matter here, since VarChar's maximum length is 255
> chars, so everything above that is cutted away on insert.
> Creating table with VarChar(800) should give an error..
>
>
> Niklas
>
>
> -Original Message-
> From: Michael Sims [mailto:[EMAIL PROTECTED]]
> Sent: 13. toukokuuta 2002 15:32
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Getting only 255 chars from SQL Server
>
>
> On Sun, 12 May 2002 18:43:47 -0700, you wrote:
>
> >I have an SQL Server database running on a server on the internet. I
> >need to have php connecting to the db and returning values. Simple
> >stuff. No problem making the connection and getting data using the
> mssql
> >functions. The weird thing is that 4 of the fields in the table are
> >vchar fields of length 800. When getting the data from the db for the
> >web page, all that gets returned are the first 255 characters of each
> >field.
>
> Are you using FreeTDS on *nix, or is this a Windows server making the
> connection?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] substr....what does this mean? (newbie)

2002-05-21 Thread r

Hi ppl,
Can you tell me what does this mean?

if (substr($text, -1) == ".")
{$test = substr($text, 0, -1);}

I know the if part searches the $text from the starting for the "."
I am just confused about what the second and third arguement does in the
substr. (Second line)

I know that this is an easy question for you PHP guys out there,
 and I know i will get an answer,
 so I thank you all in advance.

Cheers
-Ryan A.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Mcrypt: Blowfish or Twofish or no fish?

2002-05-21 Thread Thalis A. Kalfigopoulos

On Tue, 21 May 2002, Jimmy Lantz wrote:

> Hi,
> started playing with Mcrypt and just wanted to ask which encryption method 
> makes the stronger encryption?
> (I can supply the necesary keylength).
> Should I go for MCRYPT_BLOWFISH or MCRYPT_TWOFISH? Or no fish at all :)
> 
> So what do I need it for? I'm going to use it encrypting files, sizes 
> varies between some 100 k's and 4-5 mb's.
> / Jim
> 
> Paranoia + A system w/o users = Safe system :) 

I'd suggest you went for neither. Rijndael is the AES 
(http://csrc.nist.gov/encryption/aes/) block cypher of choice. You can take it all the 
way up to 256 and its a standard. Of course that can mean one of two things: it was 
approved either because it can be broken, or because it is infact good. How paranoid 
are you 8-)
I don't know though how fast it is.
More online at http://www.esat.kuleuven.ac.be/~rijmen/rijndael/

cheers,
thalis

> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] substr....what does this mean? (newbie)

2002-05-21 Thread Scott Hurring

-1 is the index of the char number you want to examine.
http://www.php.net/manual/en/function.substr.php

So that code is checking the last char of the string
to see if its ".", if it is, it returns everything *except*
the ".".

Please consult the online manual in the future... 
it wants to be your friend.

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

> -Original Message-
> From: r [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 22, 2002 2:51 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] substrwhat does this mean? (newbie)
> 
> 
> Hi ppl,
> Can you tell me what does this mean?
> 
> if (substr($text, -1) == ".")
> {$test = substr($text, 0, -1);}
> 
> I know the if part searches the $text from the starting for the "."
> I am just confused about what the second and third arguement 
> does in the
> substr. (Second line)
> 
> I know that this is an easy question for you PHP guys out there,
>  and I know i will get an answer,
>  so I thank you all in advance.
> 
> Cheers
> -Ryan A.
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] eregi(mail)

2002-05-21 Thread Miguel Cruz

On Tue, 21 May 2002, Denis L. Menezes wrote:
> I use the following code, but it does not work. Is there something wrong?
> 
> If
> (ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_`a
> -z{|}~]+\.'.'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$',
> $email_address))

One problem (syntax issues aside) is that it doesn't seem to be checking
for anything remotely similar to a valid email address.

Here's what we use. Not 100% perfect but closer than most, I think:

function validate_email ($addr)
{
  return

preg_match('/^[^\'"\s,;]+@([a-z0-9]+[a-z0-9\-]*\.)+[a-z0-9]+[a-z0-9\-]*[a-z0-9]+$/i',
  trim($addr)));
}

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] OOP with PHP

2002-05-21 Thread Erik Price

Yesterday, I read in the archives somewhere that in PHP, class 
attributes are all static attributes (class variables), not instance 
variables.  (Figures, I can't find it again, so I can't provide a 
link.)  In other words, the attributes apply to every single instance of 
an object.  This contradicts my limited experience with OOP in PHP, but 
I hoped someone could confirm this before I write up this giant class 
I'm working on.

Thanks!


Erik







Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] file functions and clearstatcache

2002-05-21 Thread Miguel Cruz

On Tue, 21 May 2002, Gerard Samuel wrote:
> I have a function that checks whether a file exists and loads it like so
> 
> function foo($bar)
> {
> if (file_exists($bar))
> {
>  include($bar);
> }
> }
> 
> According to clearstat cache, its use is for files that change often. 
>  In my case the files are static,
> so I wanted to be clear, as to whether I should/shouldn't be using 
> clearstatcache() in my sudo function??

You don't need it unless you expect the file will have changed during a
single execution of your PHP program (i.e., the .01sec - 30sec that it
takes to run). This does not sound like anything you need to worry about.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] OOP with PHP

2002-05-21 Thread Scott Hurring

Try it out for yourself. :-

class Test{
var $x = '';
function Test(){}
}

$x = new Test();
$y = new Test();
$x->x = "Way";
$y->x = "No";
print $y->x . $x->x;


---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

> -Original Message-
> From: Erik Price [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 21, 2002 2:14 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] OOP with PHP
> 
> 
> Yesterday, I read in the archives somewhere that in PHP, class 
> attributes are all static attributes (class variables), not instance 
> variables.  (Figures, I can't find it again, so I can't provide a 
> link.)  In other words, the attributes apply to every single 
> instance of 
> an object.  This contradicts my limited experience with OOP 
> in PHP, but 
> I hoped someone could confirm this before I write up this giant class 
> I'm working on.
> 
> Thanks!
> 
> 
> Erik
> 
> 
> 
> 
> 
> 
> 
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> [EMAIL PROTECTED]
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Thanks for the substr help

2002-05-21 Thread r

Hi,
Thanks for the help,
To answer your question and suggestion,
The reason I didnt know that is coz i am not going by the online manual but
by a book called "PHP blackbook" Its pretty good but just a bit hazy here
and there.
Thanks again.
-Ryan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Thanks for the substr help

2002-05-21 Thread Miguel Cruz

On Wed, 22 May 2002, r wrote:
> To answer your question and suggestion,
> The reason I didnt know that is coz i am not going by the online manual but
> by a book called "PHP blackbook" Its pretty good but just a bit hazy here
> and there.

You should definitely download or use the online manual. It provides 
definitive answers to all sorts of questions.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] array empty after use

2002-05-21 Thread Jim lucas

when you loop through a mysql result set you move the pointer up one place.
you need to use the mysql_data_seek($results, 0); to reset the pointer

Jim Lucas
- Original Message -
From: "Web" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 2:47 AM
Subject: [PHP] array empty after use


> Hi there.
>
> When an array is 'used' with something like do while I can't re-access it
> later in the page.  It is as if the array gets used up and doesn't exist.
> The array is from a select statement using myself.  I have inserted a
> duplicate array with a different name to get around this but figure there
> must be a simpler way.
>
> Any ideas please?
>
> Thanks
> Kevin
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Getting only 255 chars from SQL Server

2002-05-21 Thread Philip Hallstrom

A long time ago I had this problem and discovered a checkbox in the ODBC
configuration wizard with NT where you could specify how many chars of a
varcar to return...

you might look there...

On Mon, 20 May 2002, Tim Greenleaf wrote:

> FYI:  MS SQL Server 7 and greater, Varchar is a max of 8000 characters so it
> sounds like there is some limitation in the PHP functions that is limiting
> this.
> "Niklas lampén" <[EMAIL PROTECTED]> wrote in message
> 008901c1fa7b$14539d30$ba93c5c3@Niklas">news:008901c1fa7b$14539d30$ba93c5c3@Niklas...
> > The platform doesn't matter here, since VarChar's maximum length is 255
> > chars, so everything above that is cutted away on insert.
> > Creating table with VarChar(800) should give an error..
> >
> >
> > Niklas
> >
> >
> > -Original Message-
> > From: Michael Sims [mailto:[EMAIL PROTECTED]]
> > Sent: 13. toukokuuta 2002 15:32
> > To: [EMAIL PROTECTED]
> > Subject: Re:  Getting only 255 chars from SQL Server
> >
> >
> > On Sun, 12 May 2002 18:43:47 -0700, you wrote:
> >
> > >I have an SQL Server database running on a server on the internet. I
> > >need to have php connecting to the db and returning values. Simple
> > >stuff. No problem making the connection and getting data using the
> > mssql
> > >functions. The weird thing is that 4 of the fields in the table are
> > >vchar fields of length 800. When getting the data from the db for the
> > >web page, all that gets returned are the first 255 characters of each
> > >field.
> >
> > Are you using FreeTDS on *nix, or is this a Windows server making the
> > connection?
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] smtp

2002-05-21 Thread Steve Buehler

I am trying to use the "smtp class" from phpguru.org with a mysql database 
using PHP.  My question is this.  I understand that I can send out email to 
multiple email addresses using this class.  How can I populate these arrays 
with the email addresses.  The fields that would have all of the addresses 
in them would be the ones that have [EMAIL PROTECTED] as the address.

$send_params['recipients'] = array('[EMAIL PROTECTED]');   // The recipients 
(can be multiple)
$send_params['headers'] = array('From: "' . $mailer . '" <[EMAIL PROTECTED]>',
'To: [EMAIL PROTECTED]' , 'Subject: ' . $mail_subject
   );
I figure that I would be using a while loop like the following:
while($query_data = mysql_fetch_row($result)) {
$row=mysql_fetch_object($result);
//  This is where I would use something to add $row->email to the arrays.
}

Thank you in Advance
Steve Buehler


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] smtp

2002-05-21 Thread Miguel Cruz

http://php.net/array_push

miguel

On Tue, 21 May 2002, Steve Buehler wrote:

> I am trying to use the "smtp class" from phpguru.org with a mysql database 
> using PHP.  My question is this.  I understand that I can send out email to 
> multiple email addresses using this class.  How can I populate these arrays 
> with the email addresses.  The fields that would have all of the addresses 
> in them would be the ones that have [EMAIL PROTECTED] as the address.
> 
> $send_params['recipients'] = array('[EMAIL PROTECTED]'); // The recipients 
> (can be multiple)
> $send_params['headers'] = array('From: "' . $mailer . '" <[EMAIL PROTECTED]>',
>   'To: [EMAIL PROTECTED]' , 'Subject: ' . $mail_subject
>  );
> I figure that I would be using a while loop like the following:
> while($query_data = mysql_fetch_row($result)) {
> $row=mysql_fetch_object($result);
> //  This is where I would use something to add $row->email to the arrays.
> }
> 
> Thank you in Advance
> Steve Buehler
> 
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] smtp

2002-05-21 Thread 1LT John W. Holmes


- Original Message -
From: "Steve Buehler" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 2:34 PM
Subject: [PHP] smtp


> I am trying to use the "smtp class" from phpguru.org with a mysql database
> using PHP.  My question is this.  I understand that I can send out email
to
> multiple email addresses using this class.  How can I populate these
arrays
> with the email addresses.  The fields that would have all of the addresses
> in them would be the ones that have [EMAIL PROTECTED] as the address.
>
> $send_params['recipients'] = array('[EMAIL PROTECTED]'); // The recipients
> (can be multiple)
> $send_params['headers'] = array('From: "' . $mailer . '"
<[EMAIL PROTECTED]>',
> 'To: [EMAIL PROTECTED]' , 'Subject: ' . $mail_subject
>);
> I figure that I would be using a while loop like the following:
> while($query_data = mysql_fetch_row($result)) {
> $row=mysql_fetch_object($result);
> //  This is where I would use something to add $row->email to the arrays.
> }

while($row = mysql_fetch_object($result))
{ $send_params['recipients'][] = $row->email; }

I just noticed in your code that you call fetch_row and
fetch_object...that's going to mess up things. just call one or the other.

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Mail() function performance/optimization question

2002-05-21 Thread Wesley Furgiuele

Adding a mail() step to my page increases the page load time from an average
of about 2 seconds to nearly 8 seconds.  That would be OK if the page
completed displaying all the text and then just kind of hung there while the
mail() function finished.  The page I am using, by the way, is a
5-column/3-row table listing some project information, pulled from a MySQL
database.

Is there anything I can do to make this appear more responsive for the user?
It would be nice if it was actually more responsive, but the illusion will
do just fine.  I¹ve tried moving the mail() function around in the order,
but no matter what it causes part of the page to not finish displaying until
mail() has completed.

Wes





Re: [PHP] Mail() function performance/optimization question

2002-05-21 Thread Miguel Cruz

What platform and MTA are you using? Your MTA may be trying to handle the 
message while-u-wait rather than queuing it properly. 

miguel

On Tue, 21 May 2002, Wesley Furgiuele wrote:
> Adding a mail() step to my page increases the page load time from an average
> of about 2 seconds to nearly 8 seconds.  That would be OK if the page
> completed displaying all the text and then just kind of hung there while the
> mail() function finished.  The page I am using, by the way, is a
> 5-column/3-row table listing some project information, pulled from a MySQL
> database.
> 
> Is there anything I can do to make this appear more responsive for the user?
> It would be nice if it was actually more responsive, but the illusion will
> do just fine.  I¹ve tried moving the mail() function around in the order,
> but no matter what it causes part of the page to not finish displaying until
> mail() has completed.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] printer_open

2002-05-21 Thread J. Wharton

I'm attempting to use the printer_open function in php, and am getting the
following error:

Fatal error: Call to undefined function: printer_open() in c:\program
files\apache group\apache\htdocs\new\aview.php on line 209

I've tried commenting and uncommenting the extension=php_printer.dll
line in php.ini with no results.

Help!

J. Wharton




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] printer_open

2002-05-21 Thread Sqlcoders.com Programming Dept

Hiya!,
Have you tried adding this line in the very top of your script (just inside
the opening 
To: <[EMAIL PROTECTED]>
Sent: May 21 2002 11:19 AM
Subject: [PHP] printer_open


> I'm attempting to use the printer_open function in php, and am getting the
> following error:
>
> Fatal error: Call to undefined function: printer_open() in c:\program
> files\apache group\apache\htdocs\new\aview.php on line 209
>
> I've tried commenting and uncommenting the extension=php_printer.dll
> line in php.ini with no results.
>
> Help!
>
> J. Wharton
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Mail() function performance/optimization question

2002-05-21 Thread Wesley Furgiuele

I am in a shared hosting environment.  Here's the info I grab from
phpinfo():

SunOS admin 5.7 Generic_106541-16 sun4u sparc SUNW,UltraAX-MP
sendmail_path: /usr/lib/sendmail -t
SMTP: localhost

I don't yet know what the "-t" flag means on the Sendmail path.  Also, I
included the SMTP value but I am going on the assumption that Sendmail is
what I am using for mail().

Wes




On 5/21/02 3:20 PM, "Miguel Cruz" <[EMAIL PROTECTED]> wrote:

> What platform and MTA are you using? Your MTA may be trying to handle the
> message while-u-wait rather than queuing it properly.
> 
> miguel
> 
> On Tue, 21 May 2002, Wesley Furgiuele wrote:
>> Adding a mail() step to my page increases the page load time from an average
>> of about 2 seconds to nearly 8 seconds.  That would be OK if the page
>> completed displaying all the text and then just kind of hung there while the
>> mail() function finished.  The page I am using, by the way, is a
>> 5-column/3-row table listing some project information, pulled from a MySQL
>> database.
>> 
>> Is there anything I can do to make this appear more responsive for the user?
>> It would be nice if it was actually more responsive, but the illusion will
>> do just fine.  I¹ve tried moving the mail() function around in the order,
>> but no matter what it causes part of the page to not finish displaying until
>> mail() has completed.
> 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] How to simultaneously send HTML *and* start download?

2002-05-21 Thread D. D. Brierton

The result I'm looking for is like the CGI script at netscape for downloading
NS6 - it takes you to a page which says aomething like "The download should
start automatically" and then the download begins. I'm having trouble figuring
out how to do this in PHP - I suspect through ignorance of the appropriate
HTTP headers. Am I looking for something like Content-type: multipart? So what
I'm looking to achieve is a bit like what this obviously fails to do (but
hopefuly you can see what I'm aiming at):


http://www.w3.org/TR/html4/loose.dtd";>

  
Download
  
  
The download should start automatically. If it does not, right click
the following link and choose "Save as ..."
Download MyFile
  


Obviously what actually happens with the above is that the HTML after the PHP
script is appended to myfile.foo.

Can anyone point me in the right direction?

TIA, Darren

-- 
==
D. D. Brierton[EMAIL PROTECTED]   www.dzr-web.com
Trying is the first step before failure (Homer Simpson)
==

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] printer_open

2002-05-21 Thread 1LT John W. Holmes

Restart your web server when you make changes to php.ini.

Also, note that these functions are for the printer on the server, i.e.
where the code is running.

---John Holmes...

- Original Message -
From: "Sqlcoders.com Programming Dept" <[EMAIL PROTECTED]>
To: "php general" <[EMAIL PROTECTED]>
Cc: "J. Wharton" <[EMAIL PROTECTED]>
Sent: Wednesday, May 22, 2002 1:29 AM
Subject: Re: [PHP] printer_open


> Hiya!,
> Have you tried adding this line in the very top of your script (just
inside
> the opening  DL("php_printer.dll");
>
> (this call to load a dynamic extension must occur before any printer_
> related functions, if it works at all)
>
> Usually that works for me, if it doesn't work for you then check that you
> have the php_printer dll and that it's in the appropriate directory.
>
> HTH,
> Dw
>
> Sqlcoders.com Dynamic data driven web solutions
> - Original Message -
> From: "J. Wharton" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: May 21 2002 11:19 AM
> Subject: [PHP] printer_open
>
>
> > I'm attempting to use the printer_open function in php, and am getting
the
> > following error:
> >
> > Fatal error: Call to undefined function: printer_open() in c:\program
> > files\apache group\apache\htdocs\new\aview.php on line 209
> >
> > I've tried commenting and uncommenting the extension=php_printer.dll
> > line in php.ini with no results.
> >
> > Help!
> >
> > J. Wharton
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How to simultaneously send HTML *and* start download?

2002-05-21 Thread Robert Cummings

"D. D. Brierton" wrote:
> 
> The result I'm looking for is like the CGI script at netscape for downloading
> NS6 - it takes you to a page which says aomething like "The download should
> start automatically" and then the download begins. I'm having trouble figuring
> out how to do this in PHP - I suspect through ignorance of the appropriate
> HTTP headers. Am I looking for something like Content-type: multipart? So what
> I'm looking to achieve is a bit like what this obviously fails to do (but
> hopefuly you can see what I'm aiming at):
> 
>$fp = fopen("myfile.foo","r");
>   header("Content-type: application/foo");
>   header("Content-Disposition: filename=myfile.foo");
>   fpassthru($fp);
>   fclose($fp);
> ?>
>"http://www.w3.org/TR/html4/loose.dtd";>
> 
>   
> Download



Your automatic download javascript code goes here!!



>   
>   
> The download should start automatically. If it does not, right click
> the following link and choose "Save as ..."
> Download MyFile
>   
> 
> 
> Obviously what actually happens with the above is that the HTML after the PHP
> script is appended to myfile.foo.
> 
> Can anyone point me in the right direction?
> 
> TIA, Darren
> 
> --
> ==
> D. D. Brierton[EMAIL PROTECTED]   www.dzr-web.com
> Trying is the first step before failure (Homer Simpson)
> ==
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How to simultaneously send HTML *and* start download?

2002-05-21 Thread 1LT John W. Holmes

Use PHP to write a META-REFRESH to the file that's going to be downloaded,
or a php file that controls the download. Basically, you show them an HTML
page that says the download will begin, the META tag refreshes after X
seconds to the actual file, and the download box pops up.

---John Holmes...

- Original Message -
From: "D. D. Brierton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 3:37 PM
Subject: [PHP] How to simultaneously send HTML *and* start download?


> The result I'm looking for is like the CGI script at netscape for
downloading
> NS6 - it takes you to a page which says aomething like "The download
should
> start automatically" and then the download begins. I'm having trouble
figuring
> out how to do this in PHP - I suspect through ignorance of the appropriate
> HTTP headers. Am I looking for something like Content-type: multipart? So
what
> I'm looking to achieve is a bit like what this obviously fails to do (but
> hopefuly you can see what I'm aiming at):
>
>$fp = fopen("myfile.foo","r");
>   header("Content-type: application/foo");
>   header("Content-Disposition: filename=myfile.foo");
>   fpassthru($fp);
>   fclose($fp);
> ?>
>"http://www.w3.org/TR/html4/loose.dtd";>
> 
>   
> Download
>   
>   
> The download should start automatically. If it does not, right
click
> the following link and choose "Save as ..."
> Download MyFile
>   
> 
>
> Obviously what actually happens with the above is that the HTML after the
PHP
> script is appended to myfile.foo.
>
> Can anyone point me in the right direction?
>
> TIA, Darren
>
> --
> ==
> D. D. Brierton[EMAIL PROTECTED]   www.dzr-web.com
> Trying is the first step before failure (Homer Simpson)
> ==
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Gibberish returned from forms

2002-05-21 Thread Gwen Fremonti

(cross-posted to php.dev)

Hi - I don't know whether I'm looking in the right place for information,
but I figured it couldn't hurt. We have our website hosted at a place that
uses PHP. We have several forms that users submit information to us with.
Just lately the email that we receive is completely unreadable. Here's a
sample (note that the first line is OK, and usually is):

Gwen Fremonti at Yew Creek Institute submitted the
followEën®sÚ¶h²Ùs²×«s?n-ë ®<©r?Ozˁâ5q
LDOD""t£¼Ý4ÓM7ïÙñz{^®sâ±é¨vén²
èº-(Ts«S§jP+®+Ú.8¦{mLk-´Ómzß~9ÓͼQ0. ± Áã¡nÓPÓAin ifomaio:
Prdut am: esryt/DI
rouc VrsonNube: .#.#
omutr peatngSyte: C:Widos T/00
ririy:48hors
Eai PF:Ye
pdtesotwre Ys
Prvie emorryliene:Ye
eranntliene:
Sppy rouc mdi: C:Elctonc
Aditonl nfrmtin:May,I m esin tisfom.I no tisisal gbbrih,bu cul yu leselok t
hevCrdatacedtoth milmesae ndtel e hehe al heinoratonapeas o e hee,an weterth
ifomaio i te ots ied ppar t b tunatd?Thnk, we. Wh i raly ic o tisan wnt t
lar t d te crptprgrmmnghe on am slf)
Liene gremnt ###
am: we Femnt
oman nme Yw rek nsitte
Adrss 750 BueMontinLae Cotae roe,OR
942 Uitd taesofAmria
Phnenube: 54) 67388
EmilAdres:[EMAIL PROTECTED]

 I know that the company recently moved our site to a new server and at the
same time upgraded all of their software, and I'm fairly certain that this
problem started right after that. Does anyone have any idea what could be
causing this, or whether it's even related to the mail script?





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How to simultaneously send HTML *and* start download?

2002-05-21 Thread Billy S Halsey

Hi,

Here's the shell of a script I wrote a while back to do exactly what you 
want:




Note the format of the "Boundary" headers, especially the dashes.

/bsh/

-- 


/-=[ BILLY S HALSEY ]=--\
| Member of Technical Staff, Sun Microsystems, Inc. ESP Solaris SW  |
| "All opinions and technical advice offered in this message are my |
| own and not necessarily endorsed by my employer." |
\--=[ [EMAIL PROTECTED] ]=/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How to simultaneously send HTML *and* start download?

2002-05-21 Thread Stuart Dallas

On 21 May 2002 at 20:37, D. D. Brierton wrote:
> The result I'm looking for is like the CGI script at netscape for
> downloading NS6 - it takes you to a page which says aomething like
> "The download should start automatically" and then the download
> begins. I'm having trouble figuring out how to do this in PHP - I
> suspect through ignorance of the appropriate HTTP headers. Am I
> looking for something like Content-type: multipart? So what I'm
> looking to achieve is a bit like what this obviously fails to do (but
> hopefuly you can see what I'm aiming at):

This is usually done with Javascript...

http://www.w3.org/TR/html4/loose.dtd";>

  
Download
  
  
The download should start automatically. If it does not, right
click the following link and choose "Save as ..." Download MyFile
  


-- 
Stuart

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How to simultaneously send HTML *and* start download?

2002-05-21 Thread D. D. Brierton

On Tue, 21 May 2002 20:57:46 +0100, 1lt John W. Holmes wrote:

> Use PHP to write a META-REFRESH to the file that's going to be downloaded,
> or a php file that controls the download. Basically, you show them an HTML
> page that says the download will begin, the META tag refreshes after X
> seconds to the actual file, and the download box pops up.

Oh, okay. I was obviously overlooking the simple solution. But, just out of
curiousity, does that mean that you *can't* do what I was at first trying to
do - that is use PHP to send a file and some HTML as some kind of multipart
content to a browser?

-- 
==
D. D. Brierton[EMAIL PROTECTED]   www.dzr-web.com
Trying is the first step before failure (Homer Simpson)
==

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] printer_open

2002-05-21 Thread J. Wharton

I wish they had noted this in the PHP manual. Does anyone know of a way to
manipulate the client computer's printer orientation?


J. Wharton

"1lt John W. Holmes" <[EMAIL PROTECTED]> wrote in message
006101c20101$6c3ae7b0$2f7e3393@TB447CCO3">news:006101c20101$6c3ae7b0$2f7e3393@TB447CCO3...
> Restart your web server when you make changes to php.ini.
>
> Also, note that these functions are for the printer on the server, i.e.
> where the code is running.
>
> ---John Holmes...
>
> - Original Message -
> From: "Sqlcoders.com Programming Dept" <[EMAIL PROTECTED]>
> To: "php general" <[EMAIL PROTECTED]>
> Cc: "J. Wharton" <[EMAIL PROTECTED]>
> Sent: Wednesday, May 22, 2002 1:29 AM
> Subject: Re: [PHP] printer_open
>
>
> > Hiya!,
> > Have you tried adding this line in the very top of your script (just
> inside
> > the opening  > DL("php_printer.dll");
> >
> > (this call to load a dynamic extension must occur before any printer_
> > related functions, if it works at all)
> >
> > Usually that works for me, if it doesn't work for you then check that
you
> > have the php_printer dll and that it's in the appropriate directory.
> >
> > HTH,
> > Dw
> >
> > Sqlcoders.com Dynamic data driven web solutions
> > - Original Message -
> > From: "J. Wharton" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: May 21 2002 11:19 AM
> > Subject: [PHP] printer_open
> >
> >
> > > I'm attempting to use the printer_open function in php, and am getting
> the
> > > following error:
> > >
> > > Fatal error: Call to undefined function: printer_open() in c:\program
> > > files\apache group\apache\htdocs\new\aview.php on line 209
> > >
> > > I've tried commenting and uncommenting the extension=php_printer.dll
> > > line in php.ini with no results.
> > >
> > > Help!
> > >
> > > J. Wharton
> > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: substr....what does this mean? (newbie)

2002-05-21 Thread J. Wharton

>From what it looks like, R, this code:

if (substr($text, -1) == ".")
{$test = substr($text, 0, -1);}

checks to see if there is a period at the end of text. If there is, it
simply assigns $test to be $text without the '.' .
I'm rather new at this, so if someone has a counterclaim to what this might
be, feel free to speak up.

J. Wharton

"R" <[EMAIL PROTECTED]> wrote in message
000701c2015c$fd2e1570$0a6da8c0@lgwezec83s94bn">news:000701c2015c$fd2e1570$0a6da8c0@lgwezec83s94bn...
> Hi ppl,
> Can you tell me what does this mean?
>
> if (substr($text, -1) == ".")
> {$test = substr($text, 0, -1);}
>
> I know the if part searches the $text from the starting for the "."
> I am just confused about what the second and third arguement does in the
> substr. (Second line)
>
> I know that this is an easy question for you PHP guys out there,
>  and I know i will get an answer,
>  so I thank you all in advance.
>
> Cheers
> -Ryan A.
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How to simultaneously send HTML *and* start download?

2002-05-21 Thread D. D. Brierton

On Tue, 2002-05-21 at 21:02, Billy S Halsey wrote:
> Here's the shell of a script I wrote a while back to do exactly what you 
> want:

Thanks, Billy! That's really helpful. I'm curious as to the significance
of the number 12399. Is this just a random number used as a separator,
or does it indicate the length of one of the parts? (In other words
should I alter the boundary marker to reflect the content I'm sending?)

>  
> header("Content-Type: multipart/mixed; boundary=\"-Boundary-12399\"");
> 
> print "---Boundary-12399\r\n";
> print "Content-Type: text/html\r\n";
> print "\r\n";
> 
> // Your HTML code goes here
> 
> print "\n";
> print "---Boundary-12399\r\n";
> print "Content-Type: application/octet-stream\r\n";
> print "Content-Disposition: attachment; filename=foo.tar.gz\r\n\r\n";
> readfile("./foo.tar.gz");
> 
> print "---Boundary-12399--\r\n";
> print "\r\n";
> 
> ?>
> 
> 
> Note the format of the "Boundary" headers, especially the dashes.

-- 
==
D. D. Brierton[EMAIL PROTECTED]   www.dzr-web.com
Trying is the first step before failure (Homer Simpson)
==

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Which weblog package

2002-05-21 Thread Mike Payson

I'm in charge of setting up a web site/community for a non-profit group. We 
are looking for a few key features: weblog, forums, a calendar, possibly 
web-mail (not all of these need to be offered in the same package, of 
course). Other features may be added as time goes on. To start with, I'm 
focusing on the weblog. I've been browsing around & come accross several: 
PHPSlash, PHPNuke, PostNuke, Thatware, and of course Slash...

Whichever package I use must be stable for a low to moderate volume production 
site, have reasonably simple administration (some moderator-level admins may 
be non-techical), a high degree of aesthetic customizability, and it must be 
stable. As a user, I am very partial to the features offered by Slash 2.0. 
but not being a Perl guy, would much prefer something PHP based. In addition, 
anyone who has ever attempted to install Slash knows that there are few 
programs that have more absurd requirements (They strongly recommend that you 
recompile MySQL, PERL, and Apache to run it. Oh, yeah, they also do not 
recommend you run PHP on the same site...)

What have you had luck with? What hasn't worked out? I like Slash, but is it 
worth the hassles?

Thanks,
Mike



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Mcrypt: Blowfish or Twofish or no fish?

2002-05-21 Thread Javier

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

What about MD5?

Jimmy Lantz wrote:
| Hi,
| started playing with Mcrypt and just wanted to ask which encryption
| method makes the stronger encryption?
| (I can supply the necesary keylength).
| Should I go for MCRYPT_BLOWFISH or MCRYPT_TWOFISH? Or no fish at all :)
|
| So what do I need it for? I'm going to use it encrypting files, sizes
| varies between some 100 k's and 4-5 mb's.
| / Jim
|
| Paranoia + A system w/o users = Safe system :)


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (MingW32)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjzqsWUACgkQNcG5oyVditt1ZgCdHrRHjk/Pvb8xfJFZyXBa2/SR
rGUAn3+5uV6YdDDWGmtz4ZxEYlYJV/57
=c0Rt
-END PGP SIGNATURE-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?

2002-05-21 Thread Ray Hunter

MD5 is not that secure compared to blowfish or twofish or the other
types of encryption available with mcrypt...

Thanks,

Ray Hunter



-Original Message-
From: Javier [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 21, 2002 2:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

What about MD5?

Jimmy Lantz wrote:
| Hi,
| started playing with Mcrypt and just wanted to ask which encryption 
| method makes the stronger encryption? (I can supply the necesary 
| keylength). Should I go for MCRYPT_BLOWFISH or MCRYPT_TWOFISH? Or no 
| fish at all :)
|
| So what do I need it for? I'm going to use it encrypting files, sizes 
| varies between some 100 k's and 4-5 mb's. / Jim
|
| Paranoia + A system w/o users = Safe system :)


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (MingW32)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjzqsWUACgkQNcG5oyVditt1ZgCdHrRHjk/Pvb8xfJFZyXBa2/SR
rGUAn3+5uV6YdDDWGmtz4ZxEYlYJV/57
=c0Rt
-END PGP SIGNATURE-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?

2002-05-21 Thread Thalis A. Kalfigopoulos

On Tue, 21 May 2002, Ray Hunter wrote:

> MD5 is not that secure compared to blowfish or twofish or the other
> types of encryption available with mcrypt...
> 
> Thanks,
> 
> Ray Hunter

How does MD5 relate to encrypting the file? It's just used as a hash function.

--thalis

> 
> 
> 
> -Original Message-
> From: Javier [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, May 21, 2002 2:43 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?
> 
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> What about MD5?
> 
> Jimmy Lantz wrote:
> | Hi,
> | started playing with Mcrypt and just wanted to ask which encryption 
> | method makes the stronger encryption? (I can supply the necesary 
> | keylength). Should I go for MCRYPT_BLOWFISH or MCRYPT_TWOFISH? Or no 
> | fish at all :)
> |
> | So what do I need it for? I'm going to use it encrypting files, sizes 
> | varies between some 100 k's and 4-5 mb's. / Jim
> |
> | Paranoia + A system w/o users = Safe system :)
> 
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (MingW32)
> Comment: For info see http://www.gnupg.org
> 
> iEYEARECAAYFAjzqsWUACgkQNcG5oyVditt1ZgCdHrRHjk/Pvb8xfJFZyXBa2/SR
> rGUAn3+5uV6YdDDWGmtz4ZxEYlYJV/57
> =c0Rt
> -END PGP SIGNATURE-
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] printer_open

2002-05-21 Thread Sqlcoders.com Programming Dept

hiya,
there's not that much you can do directly (i.e.: without some activeX
controls which the client has to accept and then only work on IE),
you can print a document in JavaScript with window.print();

Something like this would work if you wanted to print the document on
screen:
(in the body tag)



HTH,
Dw

Sqlcoders.com Dynamic data driven web solutions
- Original Message -
From: "J. Wharton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: May 21 2002 12:13 PM
Subject: Re: [PHP] printer_open


> I wish they had noted this in the PHP manual. Does anyone know of a way to
> manipulate the client computer's printer orientation?
>
> 
> J. Wharton
>
> "1lt John W. Holmes" <[EMAIL PROTECTED]> wrote in message
> 006101c20101$6c3ae7b0$2f7e3393@TB447CCO3">news:006101c20101$6c3ae7b0$2f7e3393@TB447CCO3...
> > Restart your web server when you make changes to php.ini.
> >
> > Also, note that these functions are for the printer on the server, i.e.
> > where the code is running.
> >
> > ---John Holmes...
> >
> > - Original Message -
> > From: "Sqlcoders.com Programming Dept" <[EMAIL PROTECTED]>
> > To: "php general" <[EMAIL PROTECTED]>
> > Cc: "J. Wharton" <[EMAIL PROTECTED]>
> > Sent: Wednesday, May 22, 2002 1:29 AM
> > Subject: Re: [PHP] printer_open
> >
> >
> > > Hiya!,
> > > Have you tried adding this line in the very top of your script (just
> > inside
> > > the opening  > > DL("php_printer.dll");
> > >
> > > (this call to load a dynamic extension must occur before any printer_
> > > related functions, if it works at all)
> > >
> > > Usually that works for me, if it doesn't work for you then check that
> you
> > > have the php_printer dll and that it's in the appropriate directory.
> > >
> > > HTH,
> > > Dw
> > >
> > > Sqlcoders.com Dynamic data driven web solutions
> > > - Original Message -
> > > From: "J. Wharton" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: May 21 2002 11:19 AM
> > > Subject: [PHP] printer_open
> > >
> > >
> > > > I'm attempting to use the printer_open function in php, and am
getting
> > the
> > > > following error:
> > > >
> > > > Fatal error: Call to undefined function: printer_open() in
c:\program
> > > > files\apache group\apache\htdocs\new\aview.php on line 209
> > > >
> > > > I've tried commenting and uncommenting the extension=php_printer.dll
> > > > line in php.ini with no results.
> > > >
> > > > Help!
> > > >
> > > > J. Wharton
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?

2002-05-21 Thread Sqlcoders.com Programming Dept

>
> What about MD5?
>

MD5 is a message digest I believe,
something akin to the oldstyle CRC32.

Then again I haven't used it much (just to verify a client's credit card
number without revealing the CC number).

HTH,
Dw.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?

2002-05-21 Thread Javier

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I missed the part that talked about encrypting files. I thought it was
just for a password.

Sorry.


Thalis A. Kalfigopoulos wrote:
| On Tue, 21 May 2002, Ray Hunter wrote:
|
|
|>MD5 is not that secure compared to blowfish or twofish or the other
|>types of encryption available with mcrypt...
|>
|>Thanks,
|>
|>Ray Hunter
|
|
| How does MD5 relate to encrypting the file? It's just used as a hash
function.
|
| --thalis
|
|
|>
|>
|>-Original Message-
|>From: Javier [mailto:[EMAIL PROTECTED]]
|>Sent: Tuesday, May 21, 2002 2:43 PM
|>To: [EMAIL PROTECTED]
|>Subject: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?
|>
|>
|>-BEGIN PGP SIGNED MESSAGE-
|>Hash: SHA1
|>
|>What about MD5?
|>
|>Jimmy Lantz wrote:
|>| Hi,
|>| started playing with Mcrypt and just wanted to ask which encryption
|>| method makes the stronger encryption? (I can supply the necesary
|>| keylength). Should I go for MCRYPT_BLOWFISH or MCRYPT_TWOFISH? Or no
|>| fish at all :)
|>|
|>| So what do I need it for? I'm going to use it encrypting files, sizes
|>| varies between some 100 k's and 4-5 mb's. / Jim
|>|
|>| Paranoia + A system w/o users = Safe system :)
|>
|>
|>-BEGIN PGP SIGNATURE-
|>Version: GnuPG v1.0.6 (MingW32)
|>Comment: For info see http://www.gnupg.org
|>
|>iEYEARECAAYFAjzqsWUACgkQNcG5oyVditt1ZgCdHrRHjk/Pvb8xfJFZyXBa2/SR
|>rGUAn3+5uV6YdDDWGmtz4ZxEYlYJV/57
|>=c0Rt
|>-END PGP SIGNATURE-
|>
|>
|>--
|>PHP General Mailing List (http://www.php.net/)
|>To unsubscribe, visit: http://www.php.net/unsub.php
|>
|>
|>--
|>PHP General Mailing List (http://www.php.net/)
|>To unsubscribe, visit: http://www.php.net/unsub.php
|>
|
|


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (MingW32)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjzqtBcACgkQNcG5oyVdittlCACfc0q91tND2IRnQMmbQv68KZMu
WbcAoJ3F0qiB8txUzKTHmG/l0z7A7vTP
=Gjh3
-END PGP SIGNATURE-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?

2002-05-21 Thread 1LT John W. Holmes

I imagine he would want to un-encrypt his files at some point and MD5 is a
one-way method and not an encryption technique at all...

---John Holmes...

- Original Message -
From: "Javier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 4:43 PM
Subject: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?


> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> What about MD5?
>
> Jimmy Lantz wrote:
> | Hi,
> | started playing with Mcrypt and just wanted to ask which encryption
> | method makes the stronger encryption?
> | (I can supply the necesary keylength).
> | Should I go for MCRYPT_BLOWFISH or MCRYPT_TWOFISH? Or no fish at all :)
> |
> | So what do I need it for? I'm going to use it encrypting files, sizes
> | varies between some 100 k's and 4-5 mb's.
> | / Jim
> |
> | Paranoia + A system w/o users = Safe system :)
>
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (MingW32)
> Comment: For info see http://www.gnupg.org
>
> iEYEARECAAYFAjzqsWUACgkQNcG5oyVditt1ZgCdHrRHjk/Pvb8xfJFZyXBa2/SR
> rGUAn3+5uV6YdDDWGmtz4ZxEYlYJV/57
> =c0Rt
> -END PGP SIGNATURE-
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?

2002-05-21 Thread Ray Hunter

It is a one way hash that many people use for simple
encryption...however, it should not be used for encrypting sensitive
information...some people have used it for encrypting data contained in
files...

For example do a md5 hash then encrypt the hash

Thanks,

Ray Hunter



-Original Message-
From: Thalis A. Kalfigopoulos [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 21, 2002 2:47 PM
To: Ray Hunter
Cc: 'Javier'; [EMAIL PROTECTED]
Subject: RE: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?


On Tue, 21 May 2002, Ray Hunter wrote:

> MD5 is not that secure compared to blowfish or twofish or the other 
> types of encryption available with mcrypt...
> 
> Thanks,
> 
> Ray Hunter

How does MD5 relate to encrypting the file? It's just used as a hash
function.

--thalis

> 
> 
> 
> -Original Message-
> From: Javier [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 21, 2002 2:43 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?
> 
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> What about MD5?
> 
> Jimmy Lantz wrote:
> | Hi,
> | started playing with Mcrypt and just wanted to ask which encryption
> | method makes the stronger encryption? (I can supply the necesary 
> | keylength). Should I go for MCRYPT_BLOWFISH or MCRYPT_TWOFISH? Or no

> | fish at all :)
> |
> | So what do I need it for? I'm going to use it encrypting files, 
> | sizes
> | varies between some 100 k's and 4-5 mb's. / Jim
> |
> | Paranoia + A system w/o users = Safe system :)
> 
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (MingW32)
> Comment: For info see http://www.gnupg.org
> 
> iEYEARECAAYFAjzqsWUACgkQNcG5oyVditt1ZgCdHrRHjk/Pvb8xfJFZyXBa2/SR
> rGUAn3+5uV6YdDDWGmtz4ZxEYlYJV/57
> =c0Rt
> -END PGP SIGNATURE-
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?

2002-05-21 Thread Ray Hunter

And yes...md5 is a message digest hashing utility for "compact digital
signatures for an arbitrarily long stream of binary data."

MD5 website...

Thanks,

Ray Hunter



-Original Message-
From: Sqlcoders.com Programming Dept [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 22, 2002 12:47 AM
To: php general
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?


>
> What about MD5?
>

MD5 is a message digest I believe,
something akin to the oldstyle CRC32.

Then again I haven't used it much (just to verify a client's credit card
number without revealing the CC number).

HTH,
Dw.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Full-Duplex communication

2002-05-21 Thread Bogdan Stancescu

For your specific problem, I think Mr. Lemos has provided a viable 
solution (using print() or echo() and flush() whenever you need to, 
instead of grabbing the socket and write() to it). My problem however is 
how you envision solving the communication the other way around (i.e. 
when the CLIENT wants to send data to the server).

Bogdan

Vinod Panicker wrote:

> Hi,
>
> Tx for your very prompt reply.
>
> Yeah, I'll post the solution as soon as I find it someplace.
>
> Let me outline the problem in more detail -
>
> Client (VC++) calls a PHP script on the server, specifies the 
> connection type as Keep-Alive.  The PHP script, somehow (still a big 
> question) gets the socket on which the apache server has received the 
> client request (so that it can send data to the client later) and 
> stores it in a database.
>
> Now whenever another PHP script wants to send data asynchronously to 
> the client, it gets the socket from the database, and just calls a 
> write() on it.  Since the connection is still open (Keep-Alive), the 
> client receives the information, and doesnt have to poll the server 
> periodically.
>
> The application of this is indeed destined for a messaging product, 
> and could benefit a lot of other areas as well.
>
> The only thing that is needed is the socket from apache.
>
> Someone somewhere knows how to get this done, i'm sure :)
>
> Possibly a hack into the PHP module can get this done, i'm open to 
> suggestions.
>
> Tx,
> Vinod.
>
> On Tue, 21 May 2002 Bogdan Stancescu wrote :
>
>> Hi!
>>
>> I'm looking for an answer to your questions as well, so if you do 
>> find a solution on other lists, could you please post it here as well?
>>
>> Regarding the issue, your proposal wouldn't make for full-duplex as 
>> far as I understand since I don't see how the client would be able to 
>> send any data on the same connection _after_ getting connected.
>>
>> What are you using on the other end of the pipe (on the client)? 
>> Plain HTML? Flash? Java? Something else?
>>
>> Bogdan
>>
>> Vinod Panicker wrote:
>>
>>> Hi,
>>>
>>> We have developed a client-server application where the server needs 
>>> to send asynchronous data to the client.  Now since we are using 
>>> Apache/PHP/MySQL, the client needs to poll the server periodically 
>>> for information.
>>>
>>> I was thinking if there was some way to get around this basic 
>>> problem.  I understand that this is how things are supposed to work, 
>>> but it would be just great if i could PUSH data from the server to 
>>> the client, using HTTP.
>>>
>>> Since HTTP is a request/response based protocol, Apache would not 
>>> send any data to the client asynchronously.  So what i was thinking 
>>> was - If i tell the server to allow Keep-Alive connections, and 
>>> increase the timeout value and max requests, I would effectively 
>>> have a constant TCP connection.  Now the only problem would be of 
>>> sending asynchronous data to the client.  Solution?  Here goes - If 
>>> there was some way in which i could get hold of the file 
>>> descriptor(socket) that is being used by apache to write data to the 
>>> client, then i could, from a PHP script also send any data to the 
>>> client using the socket functions of PHP since i already have the 
>>> socket with me.
>>>
>>> This would mean that the client doesnt have to poll the server for 
>>> data any more... and if the connection does get closed, the client 
>>> could reconnect to the server asking for another keep-alive connection.
>>>
>>> Now I know that this is probably the wrong place to put such a query 
>>> - maybe the apache list would have been better.  But since I'm using 
>>> PHP out here, i thought i'd give it a try.
>>>
>>> Does the solution sound very outlandish?  Are there any pitfalls?  
>>> And finally, how do i get hold of the socket?
>>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] "Zend Timeout Window" crashed due to an Access Violation. -- Any ideas?

2002-05-21 Thread Sqlcoders.com Programming Dept

Hi there!,
I've been testing some code for a company and I'm encountering something
which I've never found before,
right after making a call to a simple DB abstraction class which basically
just makes a call to odbc_connect, then odbc_do, and then loops through the
data saving the value of any field which is inside a passed array.
Every time it access's this class, Norton crashguard pops up with the
following: "'Zend Timeout Window' crashed due to an Access Violation."

"Zend Timeout Window" is hidden, and I assume only exists for the lifetime
of a PHP interpreter request.

Does anyone know of a documented or undocumented problem using odbc_* under
windows that causes the underlying Zend system to croak?

TIA,
Dw.

Sqlcoders.com
Dynamic data driven web solutions


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] do I need sessions?

2002-05-21 Thread Pushkar Pradhan

I've an array $layer in php, I pass this to javascript, JS can then
add/remove elements and I get it back in php. I do this using:

layerDesStr = '';  // php to JS

// JS to php
   for(var i = 1; i < layer.length; i++) {
  goURL = goURL + "&layer[]=" + layer[i];
   }
   document.location.href = goURL;
I retrieve them in my php code using $HTTP_GET_VARS["layer"]

This is fine when the user uses JS to modify the array, but if the user
uses JS to modify it and then wants to do some operation on it in php,
this variable ($layer) doesn't show up, because now
$HTTP_GET_VARS["layer"] is not defined.
My ques. is how do I save the variable betn. successive clicks by the
user, do I need sessions? I tried the foll. without success:
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How to simultaneously send HTML *and* start download?

2002-05-21 Thread D. D. Brierton

I just thought that members of this list following this thread might
like to know the results of my experimenting with this technique:

All tests on Linux (testing on Windows 98 tomorrow):

* Mozilla 0.9.9 worked perfectly.
* Netscape 4.78 appeared to work but downloaded file was very
  slightly larger than original (can't tell if that's a problem
  because it's a Windows binary).
* Konqueror 2.2.1 downloaded the binary, but opened a file save
  as dialog defaulted to the script name not the name in
  Content-Disposition, and failed to display the HTML.
* Opera 5.05 (don't have 6.0 yet) crashes instantly and crashes
  X with it!

I'll let you know (if you're interested) the results of testing on
Windows tomorrow. Look like it might have to be the meta http-equiv
refresh technique after all (although I'm worried about the browser
attempting to display the file instead of saving it with that
technique).

Thank to everyone for their help.

Best, Darren

On Tue, 2002-05-21 at 21:02, Billy S Halsey wrote:
> Hi,
> 
> Here's the shell of a script I wrote a while back to do exactly what you 
> want:
> 
>  
> header("Content-Type: multipart/mixed; boundary=\"-Boundary-12399\"");
> 
> print "---Boundary-12399\r\n";
> print "Content-Type: text/html\r\n";
> print "\r\n";
> 
> // Your HTML code goes here
> 
> print "\n";
> print "---Boundary-12399\r\n";
> print "Content-Type: application/octet-stream\r\n";
> print "Content-Disposition: attachment; filename=foo.tar.gz\r\n\r\n";
> readfile("./foo.tar.gz");
> 
> print "---Boundary-12399--\r\n";
> print "\r\n";
> 
> ?>
> 
> 
> Note the format of the "Boundary" headers, especially the dashes.

-- 
==
D. D. Brierton[EMAIL PROTECTED]   www.dzr-web.com
Trying is the first step before failure (Homer Simpson)
==

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




  1   2   >