[PHP] PHP access to MS SQL Server 2000

2001-11-28 Thread Casey Allen Shobe

I need to somehow enable PHP on my unix server to connect to SQL Server 2000, 
running on a Windows machine on the same network.  I have been unsuccessful 
in all attempts.  Has anybody ever done this?

'Extreme gratitude' would not sufficiently express my feelings if I could 
find a way...

-- 
Casey Allen Shobe
[EMAIL PROTECTED]
GCS/CM d+ s+:-+: a-- C++() ULU$ P- L+++ E- W++ N++ !o K- w-- !O
M V- PS++ PE Y+ PGP++ t+ 5+ X R+ tv-- b++ DI+ D G++ e h-(*) r--- z--

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




[PHP] Image Uploads beeing corupted

2001-11-28 Thread Ryan Stephens

Hey guys,

I got my uploads to work thanks to some peoples help here in this
newsgroup but now im having a problem with the files beeing corrupted
upon upload. not sure why any help would be greatly apreciated.

I have included my code again if it helps any.


function UploadImage(){
global $HTTP_POST_FILES;
global $ImageFile;
reset($HTTP_POST_FILES);
$pic_file = $HTTP_POST_FILES['ImageFile'];
copy ($pic_file['tmp_name'], ../images/$ImageFile_name);
}

FORM ACTION=?php $SCRIPT_NAME ? Method=Post
ENCTYPE=multipart/form-data 
INPUT TYPE=hidden name=MAX_FILE_SIZE value=100

Input Type=File Name=ImageFile
Input Type=Submit Name=Submit
/FORM


I've found that just doing this seems to do the same

function UploadImage(){
global $ImageFile;
copy ($ImageFile, ../images/$ImageFile_name);
}


Thanks
Ryan Stephens



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




Re: [PHP] Image Uploads beeing corupted

2001-11-28 Thread Andrey Hristov

The problem is in that you do global only for $ImageFile, but not for $ImageFile_name.
Big flaw is that if someone make a form
FORM ACTION=?php $SCRIPT_NAME ? Method=Post
ENCTYPE=multipart/form-data 
INPUT TYPE=hidden name=MAX_FILE_SIZE value=100

Input Type=text Name=ImageFile__name value=../../../../etc/passwd
Input Type=Submit Name=Submit
/FORM

may be can make a big shot. Depends on under which user Apache is running.
The best technique is to use $HTTP_POST_FILES. Since PHP4.1.0 there will be new name
for it = $_FILES .This array will be global, so there is no need to write
global $_FILES . The same is done for $_GET, $_POST, $_COOKIE. $_REQUEST is 
merged array of $_GET,$_POST,$_COOKIE in the order of gpc(from php.ini).

Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS


- Original Message - 
From: Ryan Stephens [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 10:12 AM
Subject: [PHP] Image Uploads beeing corupted


 Hey guys,
 
 I got my uploads to work thanks to some peoples help here in this
 newsgroup but now im having a problem with the files beeing corrupted
 upon upload. not sure why any help would be greatly apreciated.
 
 I have included my code again if it helps any.
 
 
 function UploadImage(){
 global $HTTP_POST_FILES;
 global $ImageFile;
 reset($HTTP_POST_FILES);
 $pic_file = $HTTP_POST_FILES['ImageFile'];
 copy ($pic_file['tmp_name'], ../images/$ImageFile_name);
 }
 
 FORM ACTION=?php $SCRIPT_NAME ? Method=Post
 ENCTYPE=multipart/form-data 
 INPUT TYPE=hidden name=MAX_FILE_SIZE value=100
 
 Input Type=File Name=ImageFile
 Input Type=Submit Name=Submit
 /FORM
 
 
 I've found that just doing this seems to do the same
 
 function UploadImage(){
 global $ImageFile;
 copy ($ImageFile, ../images/$ImageFile_name);
 }
 
 
 Thanks
 Ryan Stephens
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 



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




Re: [PHP] LDAP server side sorting

2001-11-28 Thread Stig Venaas

Hi

On Tue, Nov 27, 2001 at 04:08:39PM +0200, Christos Sintoris wrote:
 Does anybody know how to call ldap_set_option in order to use server side
 sorting?
 
 using:
 $sortval={'cn', 0,1};
 $ctrl1 = array(oid = 1.2.840.113556.1.4.473, value =$sortval);
 ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array($ctrl1));
 
 reports success, but ldap_get_option() returns nothing and a subsequend
 ldap_search
 returns protocol error. I use LDAP V3 (iPlanet).

I think perhaps the control would have to be given as part of the
search (which is not possible in PHP right now).  Support for this
might be added if several people find it useful.  Why do you want
server side sorting?  How about sorting it on the client side?
Next PHP release (in CVS now) will have a function ldap_sort()
that helps you do it on the client.  After the search, you can
simply do ldap_sort($ds, $sr, cn); if you want to search on cn.

Stig

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




Re: [PHP] Image Uploads beeing corupted

2001-11-28 Thread Ryan Stephens

the funny thing is this

the information is beeing inserted into the database... the file is beeing
uploaded (as i can see it in the directory). I can get results from
$ImageFile
$ImageFile_name
$ImageFile_size

but i cant get a result for $ImageFile_type this comes up blank
there is obviously some connection, but just not sure what.

Ryan


Andrey Hristov [EMAIL PROTECTED] wrote in message
0b0c01c177e5$f0e15580$0b01a8c0@ANDreY">news:0b0c01c177e5$f0e15580$0b01a8c0@ANDreY...
 The problem is in that you do global only for $ImageFile, but not for
$ImageFile_name.
 Big flaw is that if someone make a form
 FORM ACTION=?php $SCRIPT_NAME ? Method=Post
 ENCTYPE=multipart/form-data 
 INPUT TYPE=hidden name=MAX_FILE_SIZE value=100

 Input Type=text Name=ImageFile__name value=../../../../etc/passwd
 Input Type=Submit Name=Submit
 /FORM

 may be can make a big shot. Depends on under which user Apache is running.
 The best technique is to use $HTTP_POST_FILES. Since PHP4.1.0 there will
be new name
 for it = $_FILES .This array will be global, so there is no need to write
 global $_FILES . The same is done for $_GET, $_POST, $_COOKIE. $_REQUEST
is
 merged array of $_GET,$_POST,$_COOKIE in the order of gpc(from php.ini).

 Regards,
 Andrey Hristov
 IcyGEN Corporation
 http://www.icygen.com
 BALANCED SOLUTIONS


 - Original Message -
 From: Ryan Stephens [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, November 28, 2001 10:12 AM
 Subject: [PHP] Image Uploads beeing corupted


  Hey guys,
 
  I got my uploads to work thanks to some peoples help here in this
  newsgroup but now im having a problem with the files beeing
corrupted
  upon upload. not sure why any help would be greatly apreciated.
 
  I have included my code again if it helps any.
 
  
  function UploadImage(){
  global $HTTP_POST_FILES;
  global $ImageFile;
  reset($HTTP_POST_FILES);
  $pic_file = $HTTP_POST_FILES['ImageFile'];
  copy ($pic_file['tmp_name'], ../images/$ImageFile_name);
  }
 
  FORM ACTION=?php $SCRIPT_NAME ? Method=Post
  ENCTYPE=multipart/form-data 
  INPUT TYPE=hidden name=MAX_FILE_SIZE value=100
 
  Input Type=File Name=ImageFile
  Input Type=Submit Name=Submit
  /FORM
  
 
  I've found that just doing this seems to do the same
 
  function UploadImage(){
  global $ImageFile;
  copy ($ImageFile, ../images/$ImageFile_name);
  }
 
 
  Thanks
  Ryan Stephens
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 





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




Re: [PHP] Image Uploads beeing corupted

2001-11-28 Thread Andrey Hristov

If you have GD extension build in your PHP use it to find the type(if you are limited 
ot jpeg/gif/png files). 
I want to say again that the using of $ImageFile* is a possible security hole.

Regards,
Andrey Hristov
- Original Message - 
From: Ryan Stephens [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 10:39 AM
Subject: Re: [PHP] Image Uploads beeing corupted


 the funny thing is this
 
 the information is beeing inserted into the database... the file is beeing
 uploaded (as i can see it in the directory). I can get results from
 $ImageFile
 $ImageFile_name
 $ImageFile_size
 
 but i cant get a result for $ImageFile_type this comes up blank
 there is obviously some connection, but just not sure what.
 
 Ryan
 
 
 Andrey Hristov [EMAIL PROTECTED] wrote in message
 0b0c01c177e5$f0e15580$0b01a8c0@ANDreY">news:0b0c01c177e5$f0e15580$0b01a8c0@ANDreY...
  The problem is in that you do global only for $ImageFile, but not for
 $ImageFile_name.
  Big flaw is that if someone make a form
  FORM ACTION=?php $SCRIPT_NAME ? Method=Post
  ENCTYPE=multipart/form-data 
  INPUT TYPE=hidden name=MAX_FILE_SIZE value=100
 
  Input Type=text Name=ImageFile__name value=../../../../etc/passwd
  Input Type=Submit Name=Submit
  /FORM
 
  may be can make a big shot. Depends on under which user Apache is running.
  The best technique is to use $HTTP_POST_FILES. Since PHP4.1.0 there will
 be new name
  for it = $_FILES .This array will be global, so there is no need to write
  global $_FILES . The same is done for $_GET, $_POST, $_COOKIE. $_REQUEST
 is
  merged array of $_GET,$_POST,$_COOKIE in the order of gpc(from php.ini).
 
  Regards,
  Andrey Hristov
  IcyGEN Corporation
  http://www.icygen.com
  BALANCED SOLUTIONS
 
 
  - Original Message -
  From: Ryan Stephens [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, November 28, 2001 10:12 AM
  Subject: [PHP] Image Uploads beeing corupted
 
 
   Hey guys,
  
   I got my uploads to work thanks to some peoples help here in this
   newsgroup but now im having a problem with the files beeing
 corrupted
   upon upload. not sure why any help would be greatly apreciated.
  
   I have included my code again if it helps any.
  
   
   function UploadImage(){
   global $HTTP_POST_FILES;
   global $ImageFile;
   reset($HTTP_POST_FILES);
   $pic_file = $HTTP_POST_FILES['ImageFile'];
   copy ($pic_file['tmp_name'], ../images/$ImageFile_name);
   }
  
   FORM ACTION=?php $SCRIPT_NAME ? Method=Post
   ENCTYPE=multipart/form-data 
   INPUT TYPE=hidden name=MAX_FILE_SIZE value=100
  
   Input Type=File Name=ImageFile
   Input Type=Submit Name=Submit
   /FORM
   
  
   I've found that just doing this seems to do the same
  
   function UploadImage(){
   global $ImageFile;
   copy ($ImageFile, ../images/$ImageFile_name);
   }
  
  
   Thanks
   Ryan Stephens
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] LDAP sorting

2001-11-28 Thread Stig Venaas

On Wed, Nov 28, 2001 at 03:08:52PM +0930, [EMAIL PROTECTED] wrote:
 Hi All-
 
 Can anyone tell me if PHP's LDAP functions support server side sorting of
 search results as defined in this RFC:
 
 http://www.ietf.org/rfc/rfc2891.txt

Not currently, maybe it will...  Depends on how many wants it.

 Sorting results from LDAP searches in PHP is a pain because of the
 structure
 of the result array.

Yes, but I think that's a poor excuse for doing it on the server side.
I think this should be done by the client in most cases.  One might
also need to take the clients locale into account when sorting the
data.

 Alternatively if anyone has a nice function for sorting the array returned
 by
 ldap_get_entries() by any desired attribute, that would be a great help
 also.

It's not that hard.  What I do, is that I create a new simple array
with just the attribute values I want to sort on and preserve the
indices of the result array.  Next I sort that array (again
preserving indices).  The indices of the sorted array now give me
the order I should use when displaying the entries from the result
array.  Not that hard, it looks something like this:

$n=ldap_count_entries($ds,$sr);
$info = ldap_get_entries($ds, $sr);
ldap_free_result($sr);

for ($i=0; $i$n; $i++) {
$cn[$i]=$info[$i][cn][0]);
}
asort($cn);
reset($cn);
for ($j=0; list($i,) = each($cn);) {
  $sorted[$j] = $info[$i];
}

Anyway, the next PHP release (in CVS or snapshots now) will have a
function ldap_sort() for client side sorting.  After you've done
the search, simply do ldap_sort($ds, $sr, cn);
and you have sorted the results on cn, and you access the result
as usual afterwards.

Stig

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




RE: [PHP] Hierarchies

2001-11-28 Thread Dimitris Kossikidis

You can do it only in few lines of code with a recursive function... You
can display full tree structure with unlimited  levels.

Mysql Table  :
cid int,
parent int,
Name varchar

Cid parent  varchar
1   0   A
2   1   C
3   0   B
4   1   D
5   2   E
6   3   F
This should output :

- A
- - C
- - - E
- - D
- B
- - F


  function ShowTree($parent=0,$level=0){
$query=mysql_query(select cid,parent,name from categories where
parent='$parent');
$level++;
while ($row=mysql_fetch_object($query) ){
   $cnt=$row-cid;
   $element[$cnt]['cid']=$row-cid;
   $element[$cnt]['parent']=$row-parent;
   $element[$cnt]['name']=$row-name;
   echo str_repeat('-', $level) .B.$element[$cnt]['name']./B
(level=$level)(counter=$cnt)br;
   ShowTree($element[$cnt]['cid'],$level);
 }
  }

 ShowTree(0,0);

 -Original Message-
 From: MindHunter [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, November 28, 2001 9:27 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Hierarchies
 
 
 Hi,
 
 I need to display hierarchies (hierarchical structures).  I 
 have a MYSQL table with data like this:
 
 Node,Parent
 A,
 B,A
 C,A
 D,B
 E,B
 F,D
 G,A
 
 It can go down to 10 levels.
 
 I do not want display one level and then click to display the 
 next, I want to see the entire tree at once, say like this:
 
 A
 ---B
 --D
 -F
 --E
 ---C
 ---G
 
 Any ideas, scripts on how I can do this?  I seems like I have 
 to use a recursive function and /or arrays?
 
 Any help will be appreciated!
 
 Thanks
 MH
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
 [EMAIL PROTECTED] To contact the list 
 administrators, e-mail: [EMAIL PROTECTED]
 


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




Re: [PHP] Image Uploads beeing corupted

2001-11-28 Thread Andrey Hristov

As I showed by this :
FORM ACTION=http://your.domain.com/your.script.php; Method=Post  
ENCTYPE=multipart/form-data 
Input Type=text Name=ImageFile_name  value=../../../../etc/passwd
Input Type=Submit Name=Submit
/FORM
I can write this in a simple html, press the submit button and instead of file you 
will receive $ImageFile_name as a text variable.
I can write in it everything but you rely on that PHP made it. No PHP didn't. Also in 
such form $ImageFile_tmpname can be supplied
and if someone does this :
?php
echo (implode('',file($ImageFile_tmpname)));
?
The /etc/passwd file can be shown easily.
My suggestion : rely on $HTTP_POST_FILES . Yes it is long to type but it's secured. 
Also as I said. Since the new PHP 4.1.0 there
will
be $_FILES array, equivalent of $HTTP_POST_FILES(which will exists also).

The GD extension is used for dynamic construction of jpg,png,gif(up to some 1.x 
version). The constructed image can be saved to file
or sent to the
browser. GetImageSize() is one of the many functions provided by GD. 
http://www.php.net/manual/en/ref.image.php


Best regards,
Andrey Hristov

- Original Message -
From: Ryan Stephens (Hotmail) [EMAIL PROTECTED]
To: Andrey Hristov [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 10:51 AM
Subject: Re: [PHP] Image Uploads beeing corupted


 this means nothing to me... sorry, i've only been working with PHP for a
 couple weeks. and a few month of web learning. the site im working
 on is hosted by some other guy, so i dont have access to it if i had to
 change anything there.

 Why is $ImageFile a possible security hole?
 What is GD extension?

 I dont need to find the type... i just used that as a test to see if that
 might have anything to do with my corrupted file problem. And i found that
 all the information beeing entered into the database re: its name and size
 is fine... but it wont return a type... Im thinking if it cant return a type
 (but still uploads the file) there must be a connection to it beeing
 corrupt.

 Ryan


 - Original Message -
 From: Andrey Hristov [EMAIL PROTECTED]
 To: Ryan Stephens [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Wednesday, November 28, 2001 12:46 AM
 Subject: Re: [PHP] Image Uploads beeing corupted


  If you have GD extension build in your PHP use it to find the type(if you
 are limited ot jpeg/gif/png files).
  I want to say again that the using of $ImageFile* is a possible security
 hole.
 
  Regards,
  Andrey Hristov
  - Original Message -
  From: Ryan Stephens [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, November 28, 2001 10:39 AM
  Subject: Re: [PHP] Image Uploads beeing corupted
 
 
   the funny thing is this
  
   the information is beeing inserted into the database... the file is
 beeing
   uploaded (as i can see it in the directory). I can get results from
   $ImageFile
   $ImageFile_name
   $ImageFile_size
  
   but i cant get a result for $ImageFile_type this comes up blank
   there is obviously some connection, but just not sure what.
  
   Ryan
  
  
   Andrey Hristov [EMAIL PROTECTED] wrote in message
   0b0c01c177e5$f0e15580$0b01a8c0@ANDreY">news:0b0c01c177e5$f0e15580$0b01a8c0@ANDreY...
The problem is in that you do global only for $ImageFile, but not for
   $ImageFile_name.
Big flaw is that if someone make a form
FORM ACTION=?php $SCRIPT_NAME ? Method=Post
ENCTYPE=multipart/form-data 
INPUT TYPE=hidden name=MAX_FILE_SIZE value=100
   
Input Type=text Name=ImageFile__name
 value=../../../../etc/passwd
Input Type=Submit Name=Submit
/FORM
   
may be can make a big shot. Depends on under which user Apache is
 running.
The best technique is to use $HTTP_POST_FILES. Since PHP4.1.0 there
 will
   be new name
for it = $_FILES .This array will be global, so there is no need to
 write
global $_FILES . The same is done for $_GET, $_POST, $_COOKIE.
 $_REQUEST
   is
merged array of $_GET,$_POST,$_COOKIE in the order of gpc(from
 php.ini).
   
Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS
   
   
- Original Message -
From: Ryan Stephens [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 10:12 AM
Subject: [PHP] Image Uploads beeing corupted
   
   
 Hey guys,

 I got my uploads to work thanks to some peoples help here in
 this
 newsgroup but now im having a problem with the files beeing
   corrupted
 upon upload. not sure why any help would be greatly
 apreciated.

 I have included my code again if it helps any.

 
 function UploadImage(){
 global $HTTP_POST_FILES;
 global $ImageFile;
 reset($HTTP_POST_FILES);
 $pic_file = $HTTP_POST_FILES['ImageFile'];
 copy ($pic_file['tmp_name'], ../images/$ImageFile_name);
 }

 FORM ACTION=?php 

[PHP] Re: Date Problem

2001-11-28 Thread lallous

you can use the MySql's function:

DATE_ADD(datefield, INTERVAL 3 MONTH)

Mindhunter [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 I am reading a date from an input in format 'DD-MM-' ex. 10-11-2001.
 Now I want to add 3 months to the date.  I have tested mktime and strftime
 etc and no matter what I do I get the year as 1970.  (Systemdate works
 fine).  How would I go about adding 3 months to a date in that format?

 Thanks
 MH





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




[PHP] Classes and functions

2001-11-28 Thread Daniel Reichenbach

Hy,

I'm writing a class for POP3 access and I want some of the internal
functions to be private, like the mime decoding stuff.

Is there any way to do this? I found nothing in the docs :(

Daniel



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




[PHP] Re: Classes and functions

2001-11-28 Thread Roko Roic

 I'm writing a class for POP3 access and I want some of the internal
 functions to be private, like the mime decoding stuff.

 Is there any way to do this? I found nothing in the docs :(

Unfortunately, PHP does not understand terms private, public, protected...
PHP coders adopted a coding standard to name all 'private' methdods like

_methodName()

i.e. Beginning with an underscore.

That's the best you can do, so live with it :)

Cheers
Roko



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




[PHP] nested include_once()

2001-11-28 Thread Roko Roic

If I use include_once() to include these files in main.php:

main.php
-
include_once('lib.php');
include_once('service.php');
-

And file service.php also has a line in it:

service.php
--
include_once('lib.php');
--

Will lib.php get included twice or only _once() ?

I am wondering because get_included_files() acts kind of 'strange' and does
not display files included from included files. Damn recursion :)

[OT] Is there a way to tail files that get read from a Linux filesystem.
That could help me find out what gets included and when?

Cheers
Roko





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




[PHP] mkdir()

2001-11-28 Thread Christoph Starkmann

Hi there!

I got the following problem:

I want to mirror a complete directory tree. Now I traverse
the original tree, do changes to some of the files and want to
write the resulting files to a parallel directory.

Lets say $INPUT_PATH is the source path and $OUTPUT_PATH is
where I want to put the copies.
$file is the path o the current file.

Now I tried to do the following:

//...snip...

$outfileName = ereg_replace($INPUT_PATH, $OUTPUT_PATH, $file); 
$OUTFILE = fopen($outfileName, w) || die (Oooops, couldn't open $file);

// ... more blahblah...

fclose($OUTFILE);

But now I got an error:

Warning: fopen(path/directory/template.html,w) - No such file or
directory in filename.php on line 231

Okay, I hoped PHP would create the directory, too, along with creating 
the file Iwant to write to when it doesn't exist.

When I try to create the directory manually using

mkdir(path/directory, 0777) || die (Yet another ugly death...);

I get yet another ugly error:

Warning: MkDir failed (No such file or directory) in filename.php on line 29

Why is this? Of course there is no such file or directory... If there was, I
wouldn't have to create one ;)

Any ideas? Hints?

Every tidy bit of wisom is appreciated...

Cheers,

Kiko

-
It's not a bug, it's a feature.
christoph starkmann
mailto:[EMAIL PROTECTED]
http://www.fh-augsburg.de/~kiko
ICQ: 100601600
-

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




Re: [PHP] Classes and functions

2001-11-28 Thread Andrey Hristov

There is something like RFC on this URL :http://www.zend.com/engine2/ZendEngine-2.0.pdf
What is supposed to be new in Zend Engine 2.0 . private members, and other things.
But now everything is public. Why? Because every variable in PHP is zval (zend 
value).PHP is built on the top of Zend using Zend
API.
Simply the structure of zval is not suitable for private members. The cast from array 
to object and vice versa is possible. When you
cast array to
object your receive an instace with properties - array_keys() with correspoding values 
- array_values(). When you cast from object
to array, the names of the properties are key names, the values of the keys - values.
From zend.h
/*
 * zval
 */
typedef struct _zval_struct zval;
typedef struct _zend_class_entry zend_class_entry;

typedef struct _zend_object {
 zend_class_entry *ce;
 HashTable *properties;
} zend_object;

typedef union _zvalue_value {
 long lval; /* long value */
 double dval;/* double value */
 struct {
  char *val;
  int len;
 } str;
 HashTable *ht;/* hash table value */
 zend_object obj;
} zvalue_value;


struct _zval_struct {
 /* Variable information */
 zvalue_value value;  /* value */
 zend_uchar type; /* active type */
 zend_uchar is_ref;
 zend_ushort refcount;
};

Regars,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS

- Original Message -
From: Daniel Reichenbach [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 12:17 PM
Subject: [PHP] Classes and functions


 Hy,

 I'm writing a class for POP3 access and I want some of the internal
 functions to be private, like the mime decoding stuff.

 Is there any way to do this? I found nothing in the docs :(

 Daniel



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




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




Re: [PHP] nested include_once()

2001-11-28 Thread Andrey Hristov

Try with
in lib.php
define(__LIB_PHP__,1);
in service.php:
define(__SERVICE_PHP__',1);
if (!__LIB_PHP__){
require('lib.php');
}

__might__ this help

Regards,
Andrey Hristov

- Original Message - 
From: Roko Roic [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 12:18 PM
Subject: [PHP] nested include_once()


 If I use include_once() to include these files in main.php:
 
 main.php
 -
 include_once('lib.php');
 include_once('service.php');
 -
 
 And file service.php also has a line in it:
 
 service.php
 --
 include_once('lib.php');
 --
 
 Will lib.php get included twice or only _once() ?
 
 I am wondering because get_included_files() acts kind of 'strange' and does
 not display files included from included files. Damn recursion :)
 
 [OT] Is there a way to tail files that get read from a Linux filesystem.
 That could help me find out what gets included and when?
 
 Cheers
 Roko
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




[PHP] Re: mkdir()

2001-11-28 Thread lallous

Never tried it though:

learn to use (L|U)nix's TAR command, and then execute it from your PHP
script with options that allow TAR to recurse into directories and stuff.
then copy that TARed file from source dir to dest. dir, and then untar it
back again.

good luck.

Christoph Starkmann [EMAIL PROTECTED] wrote in message
B120D7EC8868D411A63D0050040EDA771118FF@XCHANGE">news:B120D7EC8868D411A63D0050040EDA771118FF@XCHANGE...
 Hi there!

 I got the following problem:

 I want to mirror a complete directory tree. Now I traverse
 the original tree, do changes to some of the files and want to
 write the resulting files to a parallel directory.

 Lets say $INPUT_PATH is the source path and $OUTPUT_PATH is
 where I want to put the copies.
 $file is the path o the current file.

 Now I tried to do the following:

 //...snip...

 $outfileName = ereg_replace($INPUT_PATH, $OUTPUT_PATH, $file);
 $OUTFILE = fopen($outfileName, w) || die (Oooops, couldn't open $file);

 // ... more blahblah...

 fclose($OUTFILE);

 But now I got an error:

 Warning: fopen(path/directory/template.html,w) - No such file or
 directory in filename.php on line 231

 Okay, I hoped PHP would create the directory, too, along with creating
 the file Iwant to write to when it doesn't exist.

 When I try to create the directory manually using

 mkdir(path/directory, 0777) || die (Yet another ugly death...);

 I get yet another ugly error:

 Warning: MkDir failed (No such file or directory) in filename.php on line
29

 Why is this? Of course there is no such file or directory... If there was,
I
 wouldn't have to create one ;)

 Any ideas? Hints?

 Every tidy bit of wisom is appreciated...

 Cheers,

 Kiko

 -
 It's not a bug, it's a feature.
 christoph starkmann
 mailto:[EMAIL PROTECTED]
 http://www.fh-augsburg.de/~kiko
 ICQ: 100601600
 -



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




Re: [PHP] mkdir()

2001-11-28 Thread Andrey Hristov

May be your httpd is running under nobody.nobody but the owner of the htdocs dir, or 
wherever are running your php scripts is owned
by someone else.

Regards,
Andrey Hristov
- Original Message -
From: Christoph Starkmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 12:32 PM
Subject: [PHP] mkdir()


 Hi there!

 I got the following problem:

 I want to mirror a complete directory tree. Now I traverse
 the original tree, do changes to some of the files and want to
 write the resulting files to a parallel directory.

 Lets say $INPUT_PATH is the source path and $OUTPUT_PATH is
 where I want to put the copies.
 $file is the path o the current file.

 Now I tried to do the following:

 file://...snip...

 $outfileName = ereg_replace($INPUT_PATH, $OUTPUT_PATH, $file);
 $OUTFILE = fopen($outfileName, w) || die (Oooops, couldn't open $file);

 // ... more blahblah...

 fclose($OUTFILE);

 But now I got an error:

 Warning: fopen(path/directory/template.html,w) - No such file or
 directory in filename.php on line 231

 Okay, I hoped PHP would create the directory, too, along with creating
 the file Iwant to write to when it doesn't exist.

 When I try to create the directory manually using

 mkdir(path/directory, 0777) || die (Yet another ugly death...);

 I get yet another ugly error:

 Warning: MkDir failed (No such file or directory) in filename.php on line 29

 Why is this? Of course there is no such file or directory... If there was, I
 wouldn't have to create one ;)

 Any ideas? Hints?

 Every tidy bit of wisom is appreciated...

 Cheers,

 Kiko

 -
 It's not a bug, it's a feature.
 christoph starkmann
 mailto:[EMAIL PROTECTED]
 http://www.fh-augsburg.de/~kiko
 ICQ: 100601600
 -

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




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




Re: [PHP] nested include_once()

2001-11-28 Thread Roko Roic

 in lib.php
 define(__LIB_PHP__,1);
 in service.php:
 define(__SERVICE_PHP__',1);
 if (!__LIB_PHP__){
 require('lib.php');


I am not sure I was clear enough.

I _want_ those include_once('lib.php') statements to be in service.php,
because service.php could get included from a file other than main.php,
let's say non_main.php.
That file (non_main.php) does not contain a statement
include_once('lib.php'), but only include_once('service_php') and so in
order to use that library, service.php has to include it itself.

Clear? :)

So, I am trying to find out what happens in case of main.php which includes
lib.php and service.php (which also includes lib.php) when I use
include_once(). Does it get included TWICE?

Roko



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




Re: [PHP] nested include_once()

2001-11-28 Thread Roko Roic

 include_once(). Does it get included TWICE?

By it, I mean lib.php.

Sorry
Roko



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




Re: [PHP] Printing Reports

2001-11-28 Thread Dan Koken

 From what I've read the new PHP printer functions look like they do 
exactly what I want. Unfortunately they only run on windows. Wonder if 
this will ever be available to all OS.

For now I've got a lot of good ideas from everyone, and I'm on my way to 
'having fun'.

Thanks loads to everyone...
Dan


 
 The print function sets focus on the report and then executes this.print().
 The print dialogue box will automatically pop up and the user can select
 their own printer along with number of copies, etc. If you use HTML you can
 even set page breaks (in IE5 anyway).
 
 Have fun,
 
 
 Dean
 
 
 
 
 
 -Original Message-
 From: Dan Koken [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, November 27, 2001 5:00 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Printing Reports 
 
 
 As a Newbe to PHP, I need to print reports. I'd like to stay away from 
 PDF but will use it if necessary.
 
 In general, what seems to be the best way to print reports??
 
 It would be nice when they ask for a report it would brint in the report 
 window that allows them to select the printer, number of copies, print 
 quality etc.
 
 Thanks for your help...
 Dan.
 
 
 


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




RE: [PHP] Directory Contents Listing

2001-11-28 Thread Rea_David

Here's an example code I use

?
// print the current directory in unordered list
print(UL\n);

// get each entry within the directory  return to user with the
link
$myDirectory = dir(.);
while($entryName = $myDirectory-read())
{
if ($entryName != .  $entryName != ..  $entryName !=
index.php){
print(LIa href=$entryName$entryName \n/a);
}
}
?

Hope it helps!

-Original Message-
From: Steve Werby [mailto:[EMAIL PROTECTED]]
Sent: 28 November 2001 05:39
To: Deependra B. Tandukar; [EMAIL PROTECTED]
Subject: Re: [PHP] Directory Contents Listing


Deependra B. Tandukar [EMAIL PROTECTED] wrote:
 How do I display the directory contents using PHP?

See readdir() in the online manual.  I'm pretty sure it even has example
code you could paste in.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


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

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




[PHP] Read from files display selected lines under the file name while indexing

2001-11-28 Thread Kevin Garrett

Hi all.

I have a script that indexes html files within a directory.  The files are 
created using the date  time stamps by another script  what I'm looking to 
do is somehow create a preview panel for the message which would read the 
2nd to the 4th line  disply it under the filename so as to provide a better 
description.  I'd really appreciate somebodies help with this  if you need 
more information please let me know

My index script looks like the following:

?
print(UL\n);

$thisdir = dir(.);
while($filename = $myDirectory-read())
{
if ($filename != .  $filename != ..  eregi 
(.*\.htm,$filename)){
   print(LIa href=$filename$filename \n/a);
}
}

$thisdir-close();
print(/UL\n);
?

Thanks
Kev

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


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




[PHP] Re: nested include_once()

2001-11-28 Thread Yasuo Ohgaki
Roko Roic wrote:

 If I use include_once() to include these files in main.php:
 
 main.php
 -
 include_once('lib.php');
 include_once('service.php');
 -
 
 And file service.php also has a line in it:
 
 service.php
 --
 include_once('lib.php');
 --
 
 Will lib.php get included twice or only _once() ?
 
 I am wondering because get_included_files() acts kind of 'strange' and does
 not display files included from included files. Damn recursion :)


include_once() include files once. Next include_once() looks up
hash and if file is already included, PHP does not include.


 
 [OT] Is there a way to tail files that get read from a Linux filesystem.
 That could help me find out what gets included and when?


I'm not sure why tail function is useful. Anyway, you can use
get_included_files()/get_requried_files() to know which files are
included/required.

--
Yasuo Ohgaki


 


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


Re: [PHP] Directory Contents Listing

2001-11-28 Thread Andrey Hristov

Here is my PHPCommander 1000bytes
?php
var_dump($HTTP_POST_VARS);
if (@!$HTTP_POST_VARS['dir']) $HTTP_POST_VARS['dir']='./';
if (is_dir($HTTP_POST_VARS['dir'])){
 echo 'form method=post action='.$PHP_SELF.' name=ok';
 echo input type='hidden' name='dir' value='.$HTTP_POST_VARS['dir'].'/form;

 if ($dir = @opendir($HTTP_POST_VARS['dir'].'/')) {
  while($file = readdir($dir)) {
   if (is_file($HTTP_POST_VARS['dir']./$file)){
$fsize=filesize($HTTP_POST_VARS['dir']./$file);
   }else{
$fsize=0;
   }
  printf(pre%120s,%10d/prebr\n,a
href='javascript:document.ok.elements[\dir\].value=\.$HTTP_POST_VARS['dir']./.$file.\;document.ok.submit();'$file/a,$fsi
ze);
  }
  closedir($dir);
 }
}else{
 echo a href=\javascript:history.go(-1);\Back/abrbr;
 $ar=file($HTTP_POST_VARS['dir']);
 while (list($k,$v)=each($ar)){
  $ln+=strlen($v);
  if ($ln0){
   echo htmlspecialchars($v).br\n;
  }
 }
}
?

Enjoy

Andrey Hristov

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 1:38 PM
Subject: RE: [PHP] Directory Contents Listing


 Here's an example code I use

 ?
 // print the current directory in unordered list
 print(UL\n);

 // get each entry within the directory  return to user with the
 link
 $myDirectory = dir(.);
 while($entryName = $myDirectory-read())
 {
 if ($entryName != .  $entryName != ..  $entryName !=
 index.php){
 print(LIa href=$entryName$entryName \n/a);
 }
 }
 ?

 Hope it helps!

 -Original Message-
 From: Steve Werby [mailto:[EMAIL PROTECTED]]
 Sent: 28 November 2001 05:39
 To: Deependra B. Tandukar; [EMAIL PROTECTED]
 Subject: Re: [PHP] Directory Contents Listing


 Deependra B. Tandukar [EMAIL PROTECTED] wrote:
  How do I display the directory contents using PHP?

 See readdir() in the online manual.  I'm pretty sure it even has example
 code you could paste in.

 --
 Steve Werby
 President, Befriend Internet Services LLC
 http://www.befriend.com/


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

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




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




[PHP] Re:

2001-11-28 Thread mcaldwell

Warning
Unable to process data: 
multipart/related; type=multipart/alternative; boundary=_ABC1234567890DEF_




Re: [PHP] Session script hangs page on Windows

2001-11-28 Thread MM

 At 05:17 PM 11/27/01 -0500, MM wrote

 I am a newbie running 4.06 on PWS in Win 98. Any sample script about
 sessions I can find just hangs in Personal Web Server. Session id gets
 created in data file but nothing happens on the page.
 
 Has anyone come across this? Have searched on Google and can't find any
 reference.
 
 Thanks in advance for the help.



Urb Lejeune [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Don't run PWS. Go to nusphere.com and get the complete package
 of Apache, PHP, Perl, and MySQL works like a champ.

Don't have $400 to blow on a configuration wizard for otherwise free
software.  It's a nice idea, though.

Did, however, take the spirit of your advice and installed Apache as my
local server, a very good idea. Unfortunately, my session script is still
screwing up, but this time it's telling me why (or trying to.)  Says it
can't open the session data file.  That's a start, I guess.

Regards

M







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




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




RE: [PHP] Printing Reports

2001-11-28 Thread Grimes, Dean



-Original Message-
From: John Monfort [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 27, 2001 5:03 PM
To: Grimes, Dean
Cc: 'Dan Koken'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Printing Reports 
Have you been able to bypass the dialog box? That is, send the file
directly to the printer, without the user's interaction?

Actually, I have never tried to bypass the dialog box. Around here, for
reports that first come to the screen in the browser, the user decides
whether or not they want to print. If they do, they click the print button
and then select their printer.

However, I have other reports that print automatically and I just use PHP
along with KSH to send them to the appropriate printers. Of course these
reports contain no HTML. The user selects which reports they want to print,
what printers they want them to go to and then submit the report selection
form. The system takes it from there.

Dean








Grimes,

 I do this a lot. If you want to use just the browser and server abilities
 without introducing the complexities of PDF/XML/XSLT and such, it is not
too
 hard. I have done PDF, Standard Text and HTML to the browser and I have
 printed directly to a printer from the server using PHP.

Have you been able to bypass the dialog box? That is, send the file
directly to the printer, without the user's interaction?

If so, then I would love to learn how you did it. I was trying to do that
with one of my projects, but couldn't. As far as I know, the browsers do
not allow that. But, I've been told you could do it via sockets...

Were you able to bypass the dialog box?

-john


 First, is the site a Corporate intranet where the server knows about all
of
 the shared printers connected to the network? Or, is the site accessed
over
 the internet? If it's a Corporate intranet then you can create reports and
 submit them to the appropriate spooler. On Unix this is easy. I'm not sure
 about Windows. You can gather a list of available printers and create a
 little form that allows the user to select which printer to send the
report
 to.

 If the site is over the internet then create the report in a separate
window
 that is divided into two frames. The top frame will consist of close and
 print buttons. The second will contain the report and a JavaScript
function
 that performs the printing. The print button in the top frame, when
pushed,
 will execute the print function in the bottom frame.

 The print function sets focus on the report and then executes
this.print().
 The print dialogue box will automatically pop up and the user can select
 their own printer along with number of copies, etc. If you use HTML you
can
 even set page breaks (in IE5 anyway).

 Have fun,


 Dean





 -Original Message-
 From: Dan Koken [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, November 27, 2001 5:00 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Printing Reports


 As a Newbe to PHP, I need to print reports. I'd like to stay away from
 PDF but will use it if necessary.

 In general, what seems to be the best way to print reports??

 It would be nice when they ask for a report it would brint in the report
 window that allows them to select the printer, number of copies, print
 quality etc.

 Thanks for your help...
 Dan.


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

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


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




[PHP] PDF generation post vs get

2001-11-28 Thread Dominic Schanen

Hello,

I'm trying to generate address labels on a pdf sheet. If I use a method of
'GET' for my form, it works fine. However, if I use 'POST', I just get what
seems like a blank white pdf. It does the same in either Netscape 4.7 or IE
6.

Any ideas?

PHP v. 4.0.6
PDFLib 4.0.1

Thanks.

--
Dominic



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




RE: [PHP] LDAP server side sorting

2001-11-28 Thread Christos Sintoris


Server side sorting is useful when network traffic costs more than
processing time. 

The server side sorting control in conjunction with the virtual list
view control returns only a subset of entries to the client. 

In the PHP Manual is stated that is possible to set ldap controls using
the ldap_set_option directive. This however does not seem to work. The
code I used to try this is below.

I would like to know if anyone has tried it successfully or has any
experience in setting up server side controls through php.



Thanks anyway

-Original Message-
From: Stig Venaas [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, November 28, 2001 10:31 AM
To: Christos Sintoris
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] LDAP server side sorting

Hi

On Tue, Nov 27, 2001 at 04:08:39PM +0200, Christos Sintoris wrote:
 Does anybody know how to call ldap_set_option in order to use server
side
 sorting?
 
 using:
 $sortval={'cn', 0,1};
 $ctrl1 = array(oid = 1.2.840.113556.1.4.473, value =$sortval);
 ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array($ctrl1));
 
 reports success, but ldap_get_option() returns nothing and a
subsequend
 ldap_search
 returns protocol error. I use LDAP V3 (iPlanet).

I think perhaps the control would have to be given as part of the
search (which is not possible in PHP right now).  Support for this
might be added if several people find it useful.  Why do you want
server side sorting?  How about sorting it on the client side?
Next PHP release (in CVS now) will have a function ldap_sort()
that helps you do it on the client.  After the search, you can
simply do ldap_sort($ds, $sr, cn); if you want to search on cn.

Stig


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




[PHP] LDAP enabled

2001-11-28 Thread Chris Seymour

Hi All,
Is there anyplace I can get a win32 PHP binary with LDAP enabled? If not,
can I create one myself?

Any info would be greatly appreciated.

Chris

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




[PHP] script timeouts

2001-11-28 Thread Jon Farmer

OK I have a problem with a script that is occasionally timing out. Of course
I could just increase the timeout but that is not the answer completly. The
script connects to a server through sockets. The server then connects to
another server to do a credit card authorisation. The server then returns to
the script some information after the authorisation. The script then logs
the result in a db and formats the result on a web page to the user.

What I have noticed is that the script is timing out after it is logging in
the database for no apparent reason. So what I would like to do is instead
of the script dieing on timeout for it to go and do something else. Ideally
it will redirect to another php script which will check for the entry in the
database. Can this be done? Any pointers?

Regards

jon

--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07763 620378
PGP Key available, send email with subject: Send PGP Key



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




[PHP] Re: LDAP enabled

2001-11-28 Thread Chris Seymour

Answered my own question.
Thanks anyway.

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




[PHP] ASP and PHP

2001-11-28 Thread Luis Espinosa

Hi!

I have been using ASP for some time, and now I am beginning with PHP. I
would like to know which
are the main differences between both languages. I'd appreciate if you can
give the advantages and disadvantages
of both languages.

Thanks

Luis Espinosa



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




Re: [PHP] LDAP server side sorting

2001-11-28 Thread Stig Venaas

On Wed, Nov 28, 2001 at 05:26:22PM +0200, Christos Sintoris wrote:
 
 Server side sorting is useful when network traffic costs more than
 processing time. 

Yes, there are some exceptions.

 The server side sorting control in conjunction with the virtual list
 view control returns only a subset of entries to the client. 

Yes.

 In the PHP Manual is stated that is possible to set ldap controls using
 the ldap_set_option directive. This however does not seem to work. The
 code I used to try this is below.
 
 I would like to know if anyone has tried it successfully or has any
 experience in setting up server side controls through php.

I have, it works. If you were to use it for this, you would have to BER
encode a sequence and pass a string not an array. But that's not the
main problem. The way I interpret RFC 2891, the server side control is
to be sent along with the search operation, not as a individual
operation. This is not currently supported in PHP. I'm sort of planning
to implement it. I'm not able to test it though, if you or others know
of a publicly available server that I can test against, let me know
(okay, I could probably find one myself with some digging around).

Stig

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




[PHP] Cincinatti Developers?

2001-11-28 Thread Erik H. Mathy

Hey All!

I might have a prospective client for someone local to the Cinci area.
Being up in Wisconsin I'm just not really able to fully help him out. There
will be some onsite work, so I'm out. Here's what he's looking for:

Skills:
NT Server setup
Xitami
PHP4
MySQL
Experience with a web e-mail/groupware app such as TWIG.
Experience with file uploads  downloads.

I'm doing the pre-screening for him. If you're interested send me a 
resume, three links and your hourly fees.

Thanks!
- Erik Mathy
  Applications Developer

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




Re: [PHP] ASP and PHP

2001-11-28 Thread py

Hello,
Please make searchs in the archives of this newsgroup as this was discussed
many many times before.
The bottom line is always that both language are valuable and will do the
job. But PHP
will do the job on both MS and Linux, Unix, *BSD... That in itself is the
biggest Yippers for PHP ;)

py


- Original Message -
From: Luis Espinosa [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 11:43 AM
Subject: [PHP] ASP and PHP


 Hi!

 I have been using ASP for some time, and now I am beginning with PHP. I
 would like to know which
 are the main differences between both languages. I'd appreciate if you can
 give the advantages and disadvantages
 of both languages.

 Thanks

 Luis Espinosa



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




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




Re: [PHP] ASP and PHP

2001-11-28 Thread Luis Espinosa

Sorry for the duplicate post. I didn't know that. I'll search for other
similar posts.

Thank you


Py [EMAIL PROTECTED] wrote in message
035e01c17825$ac820610$0100a8c0@py">news:035e01c17825$ac820610$0100a8c0@py...
 Hello,
 Please make searchs in the archives of this newsgroup as this was
discussed
 many many times before.
 The bottom line is always that both language are valuable and will do the
 job. But PHP
 will do the job on both MS and Linux, Unix, *BSD... That in itself is the
 biggest Yippers for PHP ;)

 py


 - Original Message -
 From: Luis Espinosa [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, November 28, 2001 11:43 AM
 Subject: [PHP] ASP and PHP


  Hi!
 
  I have been using ASP for some time, and now I am beginning with PHP. I
  would like to know which
  are the main differences between both languages. I'd appreciate if you
can
  give the advantages and disadvantages
  of both languages.
 
  Thanks
 
  Luis Espinosa
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 




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




[PHP] Forms lose data when going back in browser

2001-11-28 Thread Zavier Sheran

I have a submission form distributed over 5 pages. When the user hits the
back button in the browser on one of the pages to make changes on a
previous page, all fields are emptied. This is only when I have a session
running. When I use the same pages without the session, the data stays in
the form. 

So I understand that the session expires the page immediately after leaving
it. Is there a way to give the page a few minutes before it expires or a
similar behaviour? 

Thanks a lot. 

-Zavier


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




[PHP] Re: Forms lose data when going back in browser

2001-11-28 Thread Julio Nobrega Trabalhando

  Register the submited vars values on a session and echo them inside the
value= part (or similar behavior, selected, checked, etc...) of your form
fields.

--

Julio Nobrega

No matter where you go, this.

Zavier Sheran [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a submission form distributed over 5 pages. When the user hits the
 back button in the browser on one of the pages to make changes on a
 previous page, all fields are emptied. This is only when I have a session
 running. When I use the same pages without the session, the data stays in
 the form.

 So I understand that the session expires the page immediately after
leaving
 it. Is there a way to give the page a few minutes before it expires or a
 similar behaviour?

 Thanks a lot.

 -Zavier




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




[PHP] Very interesting and challenging question

2001-11-28 Thread Dan McCullough

I need to take a file, similar to this and strip it of everything but this, and write 
it to a
database.  Are there any thoughts on how to get the information out, all the files are 
consistent.
!-- start strip --
Race Final   Watkins Glen International
 2.450 miles31 laps

Fin Str  Driver Laps  Led   Pts Qual   Reason Out

!-- end strip --
!-- start output --
 1   2   18  Dynamike18   31   24   185  118.007  Running
 2   7   68  jcordeiro310   170  116.078  Running
 3   5   80  MattyJ140310   165  116.881  Running
 4   1   28  RUDD#28  316   165  118.219  Running
 5  13   57  1SpeedDemon  310   155   Running
 6   9   84  legends3 311   155  115.131  Running
 7   3   56  RobertFx3D   310   146  117.854  Running
 8  12   55  24skids  310   142   98.644  Running
 9   4   53  Mark_O_10310   138  117.323  Running
10   8   91  JJinsane 310   134  116.061  Running
11  108  beertipper   310   130  114.154  Running
12  11   44  WisOutLaw   100   127  111.022  DNF
13   6   51  BdgrOtlw  30   124  116.702  DNF
!-- End 1st output --

!-- Start second output --


Race time - 72:52.030

Average speed - 62.538mph

Margin of victory - 1.944sec

Caution flags - 7

# of lead changes - 3

Weather - Clear 70^ E 0mph
!-- End second output --

thanks for any help


=
Dan McCullough
---
Theres no such thing as a problem unless the servers are on fire!
h: 603.444.9808
w: McCullough Family
w: At Work

__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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




Re: [PHP] Very interesting and challenging question

2001-11-28 Thread Conor McTernan



I had something like this to do a couple of months back, unfortunately, my
code was deleted by someone smart in my office. But i can pretty much
remember the algorithim behind it. 

What I done was read in my file into a buffer, then use the explode function,
i think, or something like it, basicially there is a function that allows you
to parse a string using a set number of char as the delimiters, e.g. first
item = first 10 chars etc, i think i was able to differentiate the number of
chars, e.g. 10 for the first item, maybe 15 for the second and so on. 

I then read them all into an arry. once in the array it's a piece of cake, I
know which item in the array corresponds to which field from the original
file, e.g. item 1 = row 1 col 1, item 2 = row 1 col 2, item 5 = row 2 col 1
(assuming there are 4 cols). 

At this point you can just loop through the array inserting the fields into
the database, or whatever you want to do.

I cant remember what happens when I had empty fields. I think I may have had
to fill in all blank fields for some reason.


I'm not sure if this makes any sense. But I hope it's been a help.

Conor


On Wed, Nov 28, 2001 at 09:01:26AM -0800, Dan McCullough wrote:
 I need to take a file, similar to this and strip it of everything but this, and 
write it to a
 database.  Are there any thoughts on how to get the information out, all the files 
are consistent.
 !-- start strip --
 Race Final   Watkins Glen International
  2.450 miles31 laps
 
 Fin Str  Driver Laps  Led   Pts Qual   Reason Out
 
 !-- end strip --
 !-- start output --
  1   2   18  Dynamike18   31   24   185  118.007  Running
  2   7   68  jcordeiro310   170  116.078  Running
  3   5   80  MattyJ140310   165  116.881  Running
  4   1   28  RUDD#28  316   165  118.219  Running
  5  13   57  1SpeedDemon  310   155   Running
  6   9   84  legends3 311   155  115.131  Running
  7   3   56  RobertFx3D   310   146  117.854  Running
  8  12   55  24skids  310   142   98.644  Running
  9   4   53  Mark_O_10310   138  117.323  Running
 10   8   91  JJinsane 310   134  116.061  Running
 11  108  beertipper   310   130  114.154  Running
 12  11   44  WisOutLaw   100   127  111.022  DNF
 13   6   51  BdgrOtlw  30   124  116.702  DNF
 !-- End 1st output --
 
 !-- Start second output --
 
 
 Race time - 72:52.030
 
 Average speed - 62.538mph
 
 Margin of victory - 1.944sec
 
 Caution flags - 7
 
 # of lead changes - 3
 
 Weather - Clear 70^ E 0mph
 !-- End second output --
 
 thanks for any help
 
 
 =
 Dan McCullough
 ---
 Theres no such thing as a problem unless the servers are on fire!
 h: 603.444.9808
 w: McCullough Family
 w: At Work
 
 __
 Do You Yahoo!?
 Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
 http://geocities.yahoo.com/ps/info1
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




RE: [PHP] Very interesting and challenging question

2001-11-28 Thread Chris Bailey

You could read the file in with file(), which will give you each line as an
array.  Then, depending on how those strings are separated (are they by
tabs, or is it just whitespace?), use strtok() to tokenize each line.  If
they are by space, not tab, but you know the column width, then you can just
pull out each part by using substr() or similar.  For the non lap/time
records, just check whether the string starts with a number or not, and if
not check if it starts with the known labels, e.g. Caution Flags.

-Original Message-
From: Dan McCullough [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 28, 2001 9:01 AM
To: PHP General List
Subject: [PHP] Very interesting and challenging question


I need to take a file, similar to this and strip it of everything but this,
and write it to a
database.  Are there any thoughts on how to get the information out, all the
files are consistent.
!-- start strip --
Race Final   Watkins Glen International
 2.450 miles31 laps


Fin Str  Driver Laps  Led   Pts Qual   Reason
Out


!-- end strip --
!-- start output --
 1   2   18  Dynamike18   31   24   185  118.007
Running
 2   7   68  jcordeiro310   170  116.078
Running
 3   5   80  MattyJ140310   165  116.881
Running
 4   1   28  RUDD#28  316   165  118.219
Running
 5  13   57  1SpeedDemon  310   155
Running
 6   9   84  legends3 311   155  115.131
Running
 7   3   56  RobertFx3D   310   146  117.854
Running
 8  12   55  24skids  310   142   98.644
Running
 9   4   53  Mark_O_10310   138  117.323
Running
10   8   91  JJinsane 310   134  116.061
Running
11  108  beertipper   310   130  114.154
Running
12  11   44  WisOutLaw   100   127  111.022
DNF
13   6   51  BdgrOtlw  30   124  116.702
DNF
!-- End 1st output --

!-- Start second output --


Race time - 72:52.030

Average speed - 62.538mph

Margin of victory - 1.944sec

Caution flags - 7

# of lead changes - 3

Weather - Clear 70^ E 0mph
!-- End second output --

thanks for any help


=
Dan McCullough
---
Theres no such thing as a problem unless the servers are on fire!
h: 603.444.9808
w: McCullough Family
w: At Work

__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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



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




[PHP] Debugging Techniques for PHP4

2001-11-28 Thread Dr. Ian McDonald

Are there any debugging techniques for PHP4 *other* than adding lines to
print where you are and variable values, et cetera?

PHP3 used to send debugging information to a port, for example.

(I have looked, expecting this to be a FAQ, but couldn't find the answer
anywhere.)

--
Dr. Ian McDonald
Website Developer, No Fuss Websites.com
T: +44 (0) 20 761 32110   F: +44 (0) 20 769 25461


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




Re: [PHP] Very interesting and challenging question

2001-11-28 Thread Chris Hobbs

A fellow wannabe Winston Cup driver :)
 
I'm thinking about setting a switch on $mode, which will change what it 
does based on the value of $mode. Something like this:

$mode = 1; // 1 for stripping text, 2 for adding driver results, 3 for 
adding race results
$file = file('/path/to/filename');
foreach ($file as $line) {
switch ($mode)  {
case 1: if (preg_match(/^ *[0-9][0-9]*  */, $line)) {
   $mode = 2;
   // split line up with explode() and enter it into db  
  }
break;
case 2: if (!preg_match(/^ *[0-9]* */, $line)) {
   $mode = 3;
} else {
// split line up with explode() and enter it into db
}
break;
case 3: if (preg_match(^[a-zA-Z#]*) { // avoid matching blank 
lines
// do whatever to put these into a INSERT query...
}
}
}

So in mode 1, it merely loops through lines until it finds one with zero 
or more spaces followed by one or more numbers followed by one or more 
spaces. When it hits one of those, it breaks that line apart and enters 
it into the db, then sets $mode to 2.

In mode 2, it continues to loop through looking for the same lines until 
it doesn't get a match, then sets mode 3.

Mode 3 looks for lines starting with text (skipping blank lines). It's 
left as an exercise for the reader to figure out how to get those values 
into the db :)

Hope this helps!

Chris Hobbs
#42 NNASCAR league :)


Dan McCullough wrote:

I need to take a file, similar to this and strip it of everything but this, and write 
it to a
database.  Are there any thoughts on how to get the information out, all the files 
are consistent.
!-- start strip --
Race Final   Watkins Glen International
 2.450 miles31 laps

Fin Str  Driver Laps  Led   Pts Qual   Reason Out

!-- end strip --
!-- start output --
 1   2   18  Dynamike18   31   24   185  118.007  Running
 2   7   68  jcordeiro310   170  116.078  Running
 3   5   80  MattyJ140310   165  116.881  Running
 4   1   28  RUDD#28  316   165  118.219  Running
 5  13   57  1SpeedDemon  310   155   Running
 6   9   84  legends3 311   155  115.131  Running
 7   3   56  RobertFx3D   310   146  117.854  Running
 8  12   55  24skids  310   142   98.644  Running
 9   4   53  Mark_O_10310   138  117.323  Running
10   8   91  JJinsane 310   134  116.061  Running
11  108  beertipper   310   130  114.154  Running
12  11   44  WisOutLaw   100   127  111.022  DNF
13   6   51  BdgrOtlw  30   124  116.702  DNF
!-- End 1st output --

!-- Start second output --


Race time - 72:52.030

Average speed - 62.538mph

Margin of victory - 1.944sec

Caution flags - 7

# of lead changes - 3

Weather - Clear 70^ E 0mph
!-- End second output --

thanks for any help


=
Dan McCullough
---
Theres no such thing as a problem unless the servers are on fire!
h: 603.444.9808
w: McCullough Family
w: At Work

__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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


-- 
   ___  ____    _
Chris Hobbs   / \ \/ / |  | |/ ___\|  __ \
Head Geek| (___  \ \  / /| |  | | (___ | |  | |
WebMaster \___ \  \ \/ / | |  | |\___ \| |  | |
PostMaster) |  \  /  | |__| |) | |__| |
  \/\/\/ \/|_/
  http://www.silvervalley.k12.ca.us
  [EMAIL PROTECTED]




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




[PHP] Problems in IIS

2001-11-28 Thread William Sanchez Sanchez


   I got a web site with php pages, I was working in Apache. Now I have
installed IIS and Windows2000 and I want to run my web site in this
platform. I have installed php like cgi and it works ok. But I got some
errors accessing some php pages i.e. session_start() function.

  Is there a difference between IIS and Apache concerning to the sintaxis
of some functions in PHP?

  Sorry for my little english, I really speak spanish.

   Thanks.

William

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




[PHP] HELP: Writing Files securely from apache php module

2001-11-28 Thread Michael Blower

Can some one explain how to write file php in the apache module version 
of php ?
I don't want to make the directories world writable, or writable by web 
clients.  How is this accomplished.

Sorry if the is a really newbie question.


Michael Blower
[EMAIL PROTECTED]
[EMAIL PROTECTED]
707 468 1258
707 272 2020 cell


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




Re: [PHP] Problems in IIS

2001-11-28 Thread Ali Pakkan


Hello,

  I think the following document will solve your problem : 

  http://www.php.net/manual/en/function.session-save-path.php

  If you don't wanna read just try:

  session_save_path(C:\\Winnt\\Temp);

Ali Pakkan

E-Mail: [EMAIL PROTECTED]
Gsm: +90542 3268742

On Wed, 28 Nov 2001, William Sanchez Sanchez wrote:

 
I got a web site with php pages, I was working in Apache. Now I have
 installed IIS and Windows2000 and I want to run my web site in this
 platform. I have installed php like cgi and it works ok. But I got some
 errors accessing some php pages i.e. session_start() function.
 
   Is there a difference between IIS and Apache concerning to the sintaxis
 of some functions in PHP?
 
   Sorry for my little english, I really speak spanish.
 
Thanks.
 
   William
 
 


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




[PHP] ZIp files? Help needed...

2001-11-28 Thread Emiliano Marmonti

Hi people,

I´m looking for alternatives in using zip files. Our users should upload into our 
server zipped files and we need to unzip this files and process it. I have read there 
is a library that could be used like an extension, but I´ve tried to use it from NT 
and don´t seems like the extension was added and when I try to use the commands PHP 
says that don´t recognoice the commands. In the other hand somebody has told me that 
PHP must be recompiled for using this library. Our platform is Windows NT but in the 
future could be Solaris.

Anybody could send me your experience?




Re: [PHP] HELP: Writing Files securely from apache php module

2001-11-28 Thread Mike Eheler

This is something I have been battling with for ages.

I finally decided on just setting up a system that saves the files to a 
world-writeable temp directory, then uploads them via FTP.

If anyone has a better solution, I would *love* to hear it.

Mike

Michael Blower wrote:

 Can some one explain how to write file php in the apache module 
 version of php ?
 I don't want to make the directories world writable, or writable by 
 web clients.  How is this accomplished.

 Sorry if the is a really newbie question.


 Michael Blower
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 707 468 1258
 707 272 2020 cell





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




Re: [PHP] PHP 4.1 out?

2001-11-28 Thread Mike Eheler

Ahh I see. Thanks! :)

Mike

Andrey wrote:

Already known. 4.1.0 is 4.1.0RC3 . 
Final tests are in progress.

Regards,
Andrey Hristov
- Original Message - 
From: Mike Eheler [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 7:56 PM
Subject: [PHP] PHP 4.1 out?


Try it:

http://www.php.net/distributions/php-4.1.0.tar.gz

No word on the website, though.

Mike


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




_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





Re: Fw: [PHP] PHP 4.1 out?

2001-11-28 Thread Derick Rethans

Hello Mike,

PHP 4.1.0 is NOT out yet. You pointed a lot of people to a build that may
_not_ be bug free. The release is NOT out of QA yet. The release is only
official if it is announced on the website.

Derick Rethans
The PHP QA Team

On Wed, 28 Nov 2001, Richard Heyes wrote:

 Mike Eheler [EMAIL PROTECTED] scrawled:

  Try it:
 
  http://www.php.net/distributions/php-4.1.0.tar.gz
 
  No word on the website, though.
 
  Mike
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] fatal error

2001-11-28 Thread William Sanchez Sanchez

  I got that, Why it could be?
Fatal error: Cannot redeclare reporte_llamada() in
c:\Inetpub\wwwroot\online\includes\funciones.php on line 4
and the code for  reporte_llamada()in   ...\funciones.phpis   :

function reporte_llamada ($telefono,$folio,$fecha_ini,$fecha_fin, $tipo) {
// llama a diferentes procedimientos en función de $tipo
switch($tipo){
case 0: // DETALLE LLAMADAS TELEFONOS
$connstring = begin
PRODUCCION.REPORTE_LLAMADA_ONLINE($telefono,0,:FOLIO,'$fecha_ini','$fecha_fi
n'); end;; 
break;
case 1: // DETALLE LLAMADAS REVENDEDORES
$connstring = begin
PACK_REVENDEDOR.OBTENER_REPORTE_RV_P($telefono,'$fecha_ini','$fecha_fin',:FO
LIO); end;; 
break;
}
$conn = ocilogon(conn_user, conn_pwd, conn_sid); 
$stmt = ociparse($conn, $connstring);
//obtener parámetros
ocibindbyname($stmt,:FOLIO,$folio,32); 
ociexecute($stmt);
ocifreestatement($stmt);
} // reporte llamada


  THANK U.


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




[PHP] How to use the Object returned from COM?

2001-11-28 Thread Flower Rose

Hi guys.
I can't find an answer at PHP-WIN maillist. So I
forward the email here. Wish someone will help me.
Thanks a lot.

==
Thank you for your suggestion. But it doesn't work.
The line
$VusersArray = $Vusers-Next($Vusers-{'Count'});
doesn't work. PHP said: 

==
bWarning/b:  Unable to lookup next:  Unknown name.

 in btt.php/b on line b8/bbr
==

I am new in PHP and COM. I think it is a common
question. There should be a way to solve it. But if
PHP can't handle so simple a task, it's a big problem
for him. Such as database in PHP, I can't believe that
they provide different methods for different database.
It's not like a new and professional language.

Anyway, thank alain samoun again for your help.

Regards,

--- alain samoun [EMAIL PROTECTED] wrote:
 Use variant, Try:
 ?php
   $AU = new COM(Persits.AspUser);
   $Vusers = new VARIANT(, VT_BSTR|VT_BYREF);
   $Vusers = $AU-LocalUsers;#Should be returning a
 collection
$VusersArray =
 $Vusers-Next($Vusers-{'Count'});# Get the
 collection in array
foreach ($VusersArray as $Vusers)
   {
   $VusersSet-Reset;
   $username=$Vusers-{'name'} ;
   $userfullname=$Vusers-{'fullname'} ;
   print User name: $username Full name:
 $userfullnameBR;
   }
 ?
 Didn't test it maybe some bug...
 A+
 Alain
 
 -Original Message-
 From: Flower Rose [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, November 27, 2001 4:15 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-WIN] How to use the Object returned
 from COM?
 
 
 I want to try a PHP script which use COM Object.
 But I don't know how to use the data returned from
 COM.
 
 There is an ASP example on how to use the data.
 ===
 %
 Set AU = Server.CreateObject(Persits.AspUser)
 For Each User in AU.LocalUsers
Response.Write User.Name   (  User.FullName 
 )BR
 Next
 %
 
 It will print all users, such as: Administrator,
 Guest.. (10 users now)
 ===
 But how to use it in PHP?
 ===
 ?
 $AU = new COM(Persits.AspUser);
 $user = $AU-LocalUsers;
 echo $user-Count(); // It will print 10. That's
 right
 
 //I want to access those 10 users. But I can't find
 a
 //way. Anybody know how to access it? Thanks.
 //The $user is an object, not a object array. Any
 other method I can use to get those data? Actually,
 I
 just find the method Count(). Any documents about
 these?
 ?
 
 BTW, all class/object function, such as:
 get_class_methods, get_class_vars, get_object_vars
 return unuseful results. If I use print_r to print
 it,
 it's like:
 Array {[0]-2} That's not what I want. The
 method
 Count, I just find it by accident.
 
 Regards,
 
 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com
 
 --
 PHP Windows Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 


__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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




[PHP] fsockopen() prob

2001-11-28 Thread Yura

I have a global variable 
$socket_open = fsockopen($pop_server, 110,  $errno, $errstr, 60 );
then I define the function:

130   function get_line {
131   $buffer = fgets($socket_open,500);
132   $buffer = eregi_replace((\r|\n),,$buffer);
133   return $buffer;
134   }

Here I've got the prob - it doesn't work, it sais: Warning: Supplied argument is not a 
valid File-
Handle resource in .../inc/pop-functions.inc on line 131

At the same time $socket_open returns Resource id #2 I don't know what it means, 
could 
anyone help me with it?

Youri




God is our provider 
http://www.body-builders.org



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




Re: [PHP] PHP 4.1 out?

2001-11-28 Thread Derick Rethans

Hello,

Another thing, php 4.1.0 is NOT 4.1.0 RC3

Derick Rethans
The PHP QA Team


Mike Eheler [EMAIL PROTECTED] scrawled:
 Try it:

 http://www.php.net/distributions/php-4.1.0.tar.gz

 No word on the website, though.

 Mike


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




[PHP] Re: fatal error

2001-11-28 Thread Fred

This error indicates that the code declaring the function is in the code
more than one time.  You can only have the function declaration once.  If
you are including the funciones.php in another script, make sure that it is
only included once.  If it is included more than once it will give you this
error the second time it is included.

Fred

William Sanchez Sanchez [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I got that, Why it could be?
Fatal error: Cannot redeclare reporte_llamada() in
c:\Inetpub\wwwroot\online\includes\funciones.php on line 4
and the code for  reporte_llamada()in   ...\funciones.phpis   :

function reporte_llamada ($telefono,$folio,$fecha_ini,$fecha_fin, $tipo) {
// llama a diferentes procedimientos en función de $tipo
switch($tipo){
case 0: // DETALLE LLAMADAS TELEFONOS
$connstring = begin
PRODUCCION.REPORTE_LLAMADA_ONLINE($telefono,0,:FOLIO,'$fecha_ini','$fecha_fi
n'); end;;
break;
case 1: // DETALLE LLAMADAS REVENDEDORES
$connstring = begin
PACK_REVENDEDOR.OBTENER_REPORTE_RV_P($telefono,'$fecha_ini','$fecha_fin',:FO
LIO); end;;
break;
}
$conn = ocilogon(conn_user, conn_pwd, conn_sid);
$stmt = ociparse($conn, $connstring);
file://obtener parámetros
ocibindbyname($stmt,:FOLIO,$folio,32);
ociexecute($stmt);
ocifreestatement($stmt);
} // reporte llamada


  THANK U.




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




[PHP] Re: fsockopen() prob

2001-11-28 Thread Fred

Global variables are not really global in php because they are not available
from within functions unless you specifically declare them as global.  This
should work:

130   function get_line {
131   global $socket_open;
132   $buffer = fgets($socket_open,500);
133   $buffer = eregi_replace((\r|\n),,$buffer);
134   return $buffer;
135   }

Fred

Yura [EMAIL PROTECTED] wrote in message
3C054EE3.19234.2726172@localhost">news:3C054EE3.19234.2726172@localhost...
 I have a global variable
 $socket_open = fsockopen($pop_server, 110,  $errno, $errstr, 60 );
 then I define the function:

 130   function get_line {
 131   $buffer = fgets($socket_open,500);
 132   $buffer = eregi_replace((\r|\n),,$buffer);
 133   return $buffer;
 134   }

 Here I've got the prob - it doesn't work, it sais: Warning: Supplied
argument is not a valid File-
 Handle resource in .../inc/pop-functions.inc on line 131

 At the same time $socket_open returns Resource id #2 I don't know what
it means, could
 anyone help me with it?

 Youri




 God is our provider
 http://www.body-builders.org





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




[PHP] _pconnect in multi-host environment

2001-11-28 Thread Richard Lynch

So, I was thinking about _pconnect and friends last night in a multi-host ISP-type 
environment.

Assume there are 100 Apache children, and that each of 20 clients with db access has a 
different MySQL username/password for login.

Does that mean that under worst-case analysis, there should be 20 X 100 == 2000 MySQL 
connections available, so each Apache child could end up holding on to a connection 
for each username/password?

Otherwise, it seems to me that you'd have a fair amount of thrashing as connections 
were destroyed to be re-created.

Of course, that's just worst-case.  In reality, there are usually two or three sites 
with heavy traffic that would each need 100 connections available, and a bunch of 
others that need maybe 5 or 6 concurrent connections.

Am I (A) understanding connection pooling correctly and (B) doing the math right?

-- 
Like Music?  http://l-i-e.com/artists.htm

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




[PHP] storing dates 2038

2001-11-28 Thread Justin Long

I hope this is the right place to ask this.

How can you use mktime() to store a date in integer format that is  2040?
We are archiving material, some of which is closed for a set period if
time (e.g. 40 years, 50 years, etc.)

--
Never retreat. Never surrender. Never cut a deal with a dragon.
___
Justin Long   Instant Messenger:
Network for Strategic MissionsMSN [EMAIL PROTECTED]
1732 South Park Court My E-Zines:
Chesapeake, VA 23320, USA [EMAIL PROTECTED]
(757) 420-4500, Fax 420-5373  [EMAIL PROTECTED]
http://www.strategicnetwork.org   [EMAIL PROTECTED]
http://www.justinlong.org [EMAIL PROTECTED]
___

No armor? Unclean life? Then do not mess in the affairs of dragons,
for you are crunchy and taste good with ketchup.




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




[PHP] storing dates 2038

2001-11-28 Thread Justin Long

(Sorry, may be a duplicate posting...)

I hope this is the right place to ask this.

How can you use mktime() to store a date in integer format that is  2040?
We are archiving material, some of which is closed for a set period if
time (e.g. 40 years, 50 years, etc.)

--
Never retreat. Never surrender. Never cut a deal with a dragon.
___
Justin Long   Instant Messenger:
Network for Strategic MissionsMSN [EMAIL PROTECTED]
1732 South Park Court My E-Zines:
Chesapeake, VA 23320, USA [EMAIL PROTECTED]
(757) 420-4500, Fax 420-5373  [EMAIL PROTECTED]
http://www.strategicnetwork.org   [EMAIL PROTECTED]
http://www.justinlong.org [EMAIL PROTECTED]
___

No armor? Unclean life? Then do not mess in the affairs of dragons,
for you are crunchy and taste good with ketchup.




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




Re: [PHP] storing dates 2038

2001-11-28 Thread faeton

Maybe You should try multiplying two date values? :)
JL I hope this is the right place to ask this.
JL How can you use mktime() to store a date in integer format that is  2040?
JL We are archiving material, some of which is closed for a set period if
JL time (e.g. 40 years, 50 years, etc.)



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com


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




[PHP] Problems outputting HTML through PHP

2001-11-28 Thread Steven Marsh

Hello everyone,

I have an array that holds some HTML code in each item, I shuffle this array
and then output item[0] so that it is a random item chosen each page view.
But, when it's outputted, it is commented out! The code I have isn't
commented so I don't know why this is happening. It seems PHP is changing my
A HREF to !--ref and my IMG SRC to !--src. Can somone help?

Here is the PHP code I'm using:
/*/
/* THIS PUTS THE HTML CODE IN $banLoad */
//
$banLoan = array();
 $banLoan[0] = a href=\http://www.qksrv.net/click-984570-53060\;
target=\_blank\ 
img src=\http://www.qksrv.net/image-984570-53060\; width=\88\
height=\31\ alt=\LoanApp.com - apply once to 4 lenders!\
border=\0\brHave lenders bid on your loan!/a;
 $banLoan[1] = a href=\http://www.qksrv.net/click-984570-1142650\;
target=\_blank\ 
img src=\http://www.qksrv.net/image-984570-1142650\; width=\88\
height=\31\ alt=\Click here!\ border=\0\brLooking for a loan?/a;
//
/* THIS ECHOS A RANDOM $banLoan */
/***/
shuffle($banLoan);
echo $banLoan[0];

And here is it's output:
!--ref=http://www.qksrv.net/click-984570-53060; target=_blank
 !-- src=http://www.qksrv.net/image-984570-53060; width=88 height=31
alt=LoanApp.com - apply once to 4 lenders! border=--  br Have lenders bid
on your loan! --

Can someone please explain what is causing this to comment out, and how I
can fix it?

Thanks in advance...



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




[PHP] IMPORTANT FOR YOU

2001-11-28 Thread Zeynab

Under Bill 1618 TITLE III passed by the 105th U.S. Congress, This 
letter 
cannot be considered Spam as long as we include: Contact information 
 
a Remove Link. If not interested in the services offered, 
To be removed from future mailings just reply with 'REMOVE' in the 
subject line. Your request to be removed will be processed within 24 
hours.  
*
***



 Zeynab 
Marketing Division
   
[EMAIL PROTECTED] 

Position: E-Mail Processor

WE are currently looking for SERIOUS HOMEWORKERS.
We have immediate vacancies for E-Mail Processors. Experience is 
NOT necessary. Part time/full time. Anywhere in the world! I do 
require that you have a computer and are familiar with internet/email 
functions. Training and other necessary Softwares are provided. 

About Us:
We are an offshore company based on Sri Lanka since 1996, 
specializing in trade and support services for the international trading 
community. Our main business activities are International trading of high 
profitable goods, Import Export Agent, Commission agent, Internet 
marketing, Market research through Internet etc.

You will be paid working for us as follows:

1. Refer others and get paid $1.00

2.Your associate commission is 5% for all direct sales and 1% on 
sales made by your  
   Affiliates for one level. 

For example:

If you refer 70 affiliate under you, get paid =$70.00
If you se11 3 product ($275 x 3), get paid  =$41.25
If your afiliate sell 2 products ($200x2),get paid =$ 4.00 
   
Your Salary  =   $115.25

If you are looking for a get-rich-quick scheme, please do not reply us. 

This is a limited time offer.

Registation free: 
We only want SERIOUS homeworkers to work for us.  For that 
reason we must ask for a one-time PAYMENT of US$20. This is 
necessary to protect both: you and us from unreliable job 
seekers.

How to Apply: 
   Contact us to [EMAIL PROTECTED]   Applicationat the 
subject line.
   


Thank you for your time.


*
***

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




Re: [PHP] PHP 4.1 out?

2001-11-28 Thread Zeev Suraski

And for a good reason.  Please don't publish such URLs in the future...

Zeev

At 18:56 28/11/2001, Mike Eheler wrote:
Try it:

http://www.php.net/distributions/php-4.1.0.tar.gz

No word on the website, though.

Mike


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


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




[PHP] Re: Testing MySQL 4.0 ; detaching queries

2001-11-28 Thread Julio Nobrega Trabalhando

  Save the queries on different files, one for each query. Then make a
script that will read all these files and execute the queries, maybe run it
as a cron job, and delete the succesful ones . With several files will be
easier to spot an error if occur, just open it and see the query.

  Okay, it's not much 'on-the-fly', because doesn't have all agreggated
processes from the whole script running, but your queries will be tested...

--

Julio Nobrega

No matter where you go, this.

Steven Roussey [EMAIL PROTECTED] wrote in message
news:003001c17844$9c7b9aa0$[EMAIL PROTECTED]...
  You could just exec() the page again, with a parameter telling it to
 use
  the test server, like so:

 I like this general idea, though the above method would take a little
 more work since I would have to pass the environment variables and
 apache variables (GET and POST, etc) to exec and I don't know how.

 However, I can try and setup a test web server on the test SQL server
 and have a auto_postpend file that sets up all these variables (cookies,
 post vars, etc) and sends them off using fsockopen, etc., as a HTTP
 request to the other server. If I setup the other server to ignore
 hangups, then I can send the request and quit.

 Thanks for the idea!

 Sincerely,
 Steven Roussey
 http://Network54.com/?pp=e






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




Re: [PHP] PHP 4.1 out?

2001-11-28 Thread Julio Nobrega Trabalhando

  Mind if I ask why? I do have a few ideas, but I feel I am terribly wrong
about them :-)

--

Julio Nobrega

No matter where you go, this.

Zeev Suraski [EMAIL PROTECTED] wrote in message
5.1.0.14.2.20011128204245.01e71090@localhost">news:5.1.0.14.2.20011128204245.01e71090@localhost...
 And for a good reason.  Please don't publish such URLs in the future...

 Zeev

 At 18:56 28/11/2001, Mike Eheler wrote:
 Try it:
 
 http://www.php.net/distributions/php-4.1.0.tar.gz
 
 No word on the website, though.
 
 Mike
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




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




Re: [PHP] PHP 4.1 out?

2001-11-28 Thread Zeev Suraski

There were some last minute issues that required further testing...

Zeev

At 20:53 28/11/2001, Julio Nobrega Trabalhando wrote:
   Mind if I ask why? I do have a few ideas, but I feel I am terribly wrong
about them :-)

--

Julio Nobrega

No matter where you go, this.

Zeev Suraski [EMAIL PROTECTED] wrote in message
5.1.0.14.2.20011128204245.01e71090@localhost">news:5.1.0.14.2.20011128204245.01e71090@localhost...
  And for a good reason.  Please don't publish such URLs in the future...
 
  Zeev
 
  At 18:56 28/11/2001, Mike Eheler wrote:
  Try it:
  
  http://www.php.net/distributions/php-4.1.0.tar.gz
  
  No word on the website, though.
  
  Mike
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 



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


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




[PHP] Problem Solved

2001-11-28 Thread Ryan Stephens

I figured i would post my solution to the problem that i found somewhere. It
had nothing to do with anything i was doing. Its a bug in some versions of
PHP.

here is the function i had to use to fix this

function fix_php_upload_bug($tmp){
 $infile=fopen($tmp,r); // Open the file for the copy
 $outfile=fopen($tmp.new,w); // create a new temp file
 $header=fgets($infile,255); //get the 1st line (netscape sometimes doesn't
add a Content-type line)
 //if its more than just a \r\n sequence then
 if (strlen($header)2) $header=fgets($infile,255); //get next line also
 while(!feof($infile)) { // Loop through the remaining file
  $temp=fread($infile,128);
  fwrite($outfile,$temp,strlen($temp)); //copying contents to new temp file
 }
 fclose($outfile);
 fclose($infile);
 copy($tmp.new,$tmp); //replace the original with our new bug fixed file
 unlink($tmp.new); //and delete the new file
 return $tmp;
}

Ryan


Andrey Hristov [EMAIL PROTECTED] wrote in message
0b4501c177eb$8b02c900$0b01a8c0@ANDreY">news:0b4501c177eb$8b02c900$0b01a8c0@ANDreY...
 As I showed by this :
 FORM ACTION=http://your.domain.com/your.script.php; Method=Post
ENCTYPE=multipart/form-data 
 Input Type=text Name=ImageFile_name  value=../../../../etc/passwd
 Input Type=Submit Name=Submit
 /FORM
 I can write this in a simple html, press the submit button and instead of
file you will receive $ImageFile_name as a text variable.
 I can write in it everything but you rely on that PHP made it. No PHP
didn't. Also in such form $ImageFile_tmpname can be supplied
 and if someone does this :
 ?php
 echo (implode('',file($ImageFile_tmpname)));
 ?
 The /etc/passwd file can be shown easily.
 My suggestion : rely on $HTTP_POST_FILES . Yes it is long to type but it's
secured. Also as I said. Since the new PHP 4.1.0 there
 will
 be $_FILES array, equivalent of $HTTP_POST_FILES(which will exists also).

 The GD extension is used for dynamic construction of jpg,png,gif(up to
some 1.x version). The constructed image can be saved to file
 or sent to the
 browser. GetImageSize() is one of the many functions provided by GD.
http://www.php.net/manual/en/ref.image.php


 Best regards,
 Andrey Hristov

 - Original Message -
 From: Ryan Stephens (Hotmail) [EMAIL PROTECTED]
 To: Andrey Hristov [EMAIL PROTECTED]
 Sent: Wednesday, November 28, 2001 10:51 AM
 Subject: Re: [PHP] Image Uploads beeing corupted


  this means nothing to me... sorry, i've only been working with PHP for a
  couple weeks. and a few month of web learning. the site im
working
  on is hosted by some other guy, so i dont have access to it if i had to
  change anything there.
 
  Why is $ImageFile a possible security hole?
  What is GD extension?
 
  I dont need to find the type... i just used that as a test to see if
that
  might have anything to do with my corrupted file problem. And i found
that
  all the information beeing entered into the database re: its name and
size
  is fine... but it wont return a type... Im thinking if it cant return a
type
  (but still uploads the file) there must be a connection to it beeing
  corrupt.
 
  Ryan
 
 
  - Original Message -
  From: Andrey Hristov [EMAIL PROTECTED]
  To: Ryan Stephens [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Wednesday, November 28, 2001 12:46 AM
  Subject: Re: [PHP] Image Uploads beeing corupted
 
 
   If you have GD extension build in your PHP use it to find the type(if
you
  are limited ot jpeg/gif/png files).
   I want to say again that the using of $ImageFile* is a possible
security
  hole.
  
   Regards,
   Andrey Hristov
   - Original Message -
   From: Ryan Stephens [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Wednesday, November 28, 2001 10:39 AM
   Subject: Re: [PHP] Image Uploads beeing corupted
  
  
the funny thing is this
   
the information is beeing inserted into the database... the file is
  beeing
uploaded (as i can see it in the directory). I can get results from
$ImageFile
$ImageFile_name
$ImageFile_size
   
but i cant get a result for $ImageFile_type this comes up
blank
there is obviously some connection, but just not sure what.
   
Ryan
   
   
Andrey Hristov [EMAIL PROTECTED] wrote in message
0b0c01c177e5$f0e15580$0b01a8c0@ANDreY">news:0b0c01c177e5$f0e15580$0b01a8c0@ANDreY...
 The problem is in that you do global only for $ImageFile, but not
for
$ImageFile_name.
 Big flaw is that if someone make a form
 FORM ACTION=?php $SCRIPT_NAME ? Method=Post
 ENCTYPE=multipart/form-data 
 INPUT TYPE=hidden name=MAX_FILE_SIZE value=100

 Input Type=text Name=ImageFile__name
  value=../../../../etc/passwd
 Input Type=Submit Name=Submit
 /FORM

 may be can make a big shot. Depends on under which user Apache is
  running.
 The best technique is to use $HTTP_POST_FILES. Since PHP4.1.0
there
  will
be new name
 for it = $_FILES .This array will be global, so there is no need
to
 

[PHP] ocilogon()

2001-11-28 Thread William Sanchez Sanchez

I got this error:


Fatal error: Call to undefined function: ocilogon() in
C:\Inetpub\wwwroot\online\classes\class.Telefono.php on line 19


  Why it could be?

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




Re: [PHP] PHP 4.1 out?

2001-11-28 Thread Mike Eheler

Interesting.

I'll hold off, but people will still try stuff like that. I'm not trying 
to tell ya what to do, but I've found it best never to put files with 
release-names in their primary download spots, regardless of how hidden 
they may seem, until your absolutely positive that will be the release file.

I've been randomly trying various filenames with wget for the past week 
or so, and last night it worked. One of the older tricks in the books 
for getting pre-releases.

Also, beyond this.. other than grabbing from CVS, does php ever publish 
milestone development versions for download anywhere?

Mike

Zeev Suraski wrote:

 And for a good reason.  Please don't publish such URLs in the future...

 Zeev

 At 18:56 28/11/2001, Mike Eheler wrote:

 Try it:

 http://www.php.net/distributions/php-4.1.0.tar.gz

 No word on the website, though.

 Mike


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






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




Re: [PHP] PHP 4.1 out?

2001-11-28 Thread Kurt Lieber

On Wednesday 28 November 2001 01:03 pm, Mike Eheler wrote:

 I'll hold off, but people will still try stuff like that. I'm not trying
 to tell ya what to do, but I've found it best never to put files with
 release-names in their primary download spots, regardless of how hidden
 they may seem, until your absolutely positive that will be the release
 file.

FWIW (not much), I agree with this.  If it looks like a released version and 
talks like a released version, then it probably is a released version, even 
if the announcement hasn't come out.  That may be faulty logic, but it's what 
most folks are likely to assume.  

 Also, beyond this.. other than grabbing from CVS, does php ever publish
 milestone development versions for download anywhere?

Yes -- follow the php-dev mailling list -- they're announced there.  RC 
versions are generally posted under someone's home directory rather than in 
the distributions directory.  Not sure why that wasn't the case with the 
not-really-4.1.0 version.

--kurt

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




[PHP] RE: Php connection with mysql?

2001-11-28 Thread Wee Chua

I understand what you are saying. Let's go further for the different tables
privilege, if I have Select privilege on table A, and Delete privilege on
table B of Database mydatabase, how can the built-in privilege tables to
check on this problem since the mysql_connect doesn't include the client
host IP?

-Original Message-
From: Ryan Fox [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 28, 2001 4:44 PM
To: Wee Chua; MySQL (E-mail)
Subject: Re: Php connection with mysql?


In your situation, MySQL sees the client to be the web server, as it is the
box that connects to the database and executes queries.  If you need finer
granualarity on the access controls at the MySQL level, you can pass
different usernames/passwords to MySQL through the php mysql_connect()
function dependant on what user is authenticated in to your web server.  If
you need to restrict clients on a per-IP basis, you can do this at the php
level by checking the $REMOTE_ADDR variable and acting accordingly.

Hope this helps,
Ryan Fox


- Original Message -
From: Wee Chua [EMAIL PROTECTED]

 I have a question regarding the client IP address between PHP and MySql.
The
 built-in mysql database have different privilege tables. When I log on to
 mysql through the internet browser, does mysql know where I am connecting
 from if I use mysq_connect(.) function? From what I see, this function
 doesn't tell where I am connecting from, if this is true, those privilege
 tables are not helping to check on the privileges if the client is from
 browser. Does it have any other ways to tell mysql server where the client
 is connection from besides default localhost?

 Thank you,
 Calvin

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




Re: [PHP] RE: Php connection with mysql?

2001-11-28 Thread Erik Price

Basically, you don't log on to mysql through the internet browser.  
You are using the internet browser only to request a file that is on a 
web server.  The web server is handing the request to PHP, and PHP is 
accessing the MySQL database.  PHP is accessing MySQL as whatever host 
and user has been specified in mysql_connect().

The browser has no direct connection to MySQL, so you are correct -- 
those privilege tables are not helping to check on the privileges if 
the client is from browser.


 I have a question regarding the client IP address between PHP and 
 MySql.
 The
 built-in mysql database have different privilege tables. When I log on 
 to
 mysql through the internet browser, does mysql know where I am 
 connecting
 from if I use mysq_connect(.) function? From what I see, this 
 function
 doesn't tell where I am connecting from, if this is true, those 
 privilege
 tables are not helping to check on the privileges if the client is from
 browser. Does it have any other ways to tell mysql server where the 
 client
 is connection from besides default localhost?

 Thank you,
 Calvin


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




[PHP] FREE Non Surgical Face Lift in A Bottle

2001-11-28 Thread creatingwealth_

Removal Instructions are at the end of this letter. Thank you.

FREE Non-Surgical Face Lift in a Bottle!
You Can Look 5-10 Years Younger
with One 30 Minute Application in the
Comfort of Your Own Home!

AND YOU CAN...

Become Rich through Giving Away  
Free Samples of Our Life Enhancing 
Non-Surgical Face Lift in a Bottle
to your Friends and Family! You
Heard Me Right, NO SELLING!!

Try our Miraculous Non-Surgical Face 
Lift in a Bottle Absolutely Free! And
If you Love It, We'll Pay You Handsomely
Just for Giving Away Free Samples.
(Not Required but a Nice Way in
which to Become Rich!) 

What would you give to look 5 to 10 years 
younger? Imagine the possibilities...
Having a Great Appearance Enhances your Self Esteem, 
which could lead to a Huge Promotion, Electrify 
Your Love Life and Give You the Power to Rule!

Click on this link http://rightnow.to/thedreamteam

To Receive a One Months Supply of our Life Enhancing
Non Surgical Face Lift in a Bottle ABSOLUTELY FREE!

or respond to this email with the subject line More Info

We Make Your Life Better.

Come on in and Relax while we Help You to Look
5-10 Years Younger...



You are receiving this message because you have either subscribed to
one of my ffa-pages, newsletters or we have corresponded in the past. I
respect your privacy.
If you do not wish to receive any further messages or
updates, please respond to this e-mail with the subject line remove and
we will immediately remove your e-mail address from our database.
To speed up your remove request please make sure you place the word
remove in the Subject Line, not in the body of the e-mail.
Thank you.


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




Re: [PHP] Help - html mail

2001-11-28 Thread Hank Marquardt

http://www.php.net/stripslashes

... in short they are there to ease db insertions.

On Wed, Nov 28, 2001 at 05:23:02PM -0500, Brian V Bonini wrote:
 I'm passing an html email from a form
 like this:
 
 $message = $message_html;
 
 where message_html is the text area name.
 
 mail($to, $subject, $message, $headers);
 
 I end up with, for example:
 
 div align=center\
 table width=550\ border=0\ cellspacing=0\ cellpadding=0\
 tr
 td bgcolor=#01405A\img
 src=http://www.gfx-design.com/vantico/spacer.gif\; width=1\ height=10\
 alt=\ border=0\/td
 /tr
 
 it's trying to escape the quotes and at times completely
 cutting them out.
 
 The same snippet prior to being sent:
 
 div align=center
 table width=550 border=0 cellspacing=0 cellpadding=0
 tr
 td bgcolor=#01405Aimg
 src=http://www.gfx-design.com/vantico/spacer.gif; width=1 height=10
 alt= border=0/td
 /tr
 
 Why is this happening? How can I stop it?
 
 -brian
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

-- 
Hank Marquardt [EMAIL PROTECTED]
http://web.yerpso.net
GPG Id: 2BB5E60C
Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C
*** Web Development: PHP, MySQL/PgSQL - Network Admin: Debian/FreeBSD
*** PHP Instructor - Intnl. Webmasters Assn./HTML Writers Guild 
*** Beginning PHP -- Starts January 7, 2002 
*** See http://www.hwg.org/services/classes

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




[PHP] Re: How can you determine if you on the last result?

2001-11-28 Thread Philip Hallstrom

You could use whatever OCI function returns the number of rows returned
and then keep a counter or you could do it this way:

while(OCIFetchInto ($curs, $data)) {
# do normal stuff for *ALL* rows
}

# do some stuff with $data which now contains the last row.

-philip

On Wed, 28 Nov 2001, J. Anderson Scarbrough wrote:

 If I execute a query and fill a resultset, how can i tell if I am on the
 last result in the set? I want to something like:

 while(OCIFetchInto ($curs, $data)) {

 if($isLastRecord)
  // do something
 }

 Thanks.

 Anderson

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


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



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




RE: [PHP] Re: How can you determine if you on the last result?

2001-11-28 Thread Martin Towell

I believe there's no row count function for oci, so could you change the
logic to:

while(OCIFetchInto ($curs, $data)) {
// normal code here
}
if($isLastRecord)
 // do something

??

Martin

-Original Message-
From: Philip Hallstrom [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 9:28 AM
To: J. Anderson Scarbrough
Cc: [EMAIL PROTECTED]
Subject: [PHP] Re: How can you determine if you on the last result?


You could use whatever OCI function returns the number of rows returned
and then keep a counter or you could do it this way:

while(OCIFetchInto ($curs, $data)) {
# do normal stuff for *ALL* rows
}

# do some stuff with $data which now contains the last row.

-philip

On Wed, 28 Nov 2001, J. Anderson Scarbrough wrote:

 If I execute a query and fill a resultset, how can i tell if I am on the
 last result in the set? I want to something like:

 while(OCIFetchInto ($curs, $data)) {

 if($isLastRecord)
  // do something
 }

 Thanks.

 Anderson

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


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



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



Re: [PHP] RE: Php connection with mysql?

2001-11-28 Thread Fred


 The browser has no direct connection to MySQL, so you are correct --
 those privilege tables are not helping to check on the privileges if
 the client is from browser.


I find this a bit misleading.  The privilege tables still work exactly as
they are intended.
That is, they check for a valid username and password pair and then check to
see if the
request is coming from an authorized ip address.  Because the web server is
on localhost
it is determined to be an authorized ip address and the privileges in the
grant table are
granted.

If, on the other hand, someone tried to connect to mysql remotely from a
mysql client,
their ip address would be checked, just as the web server's ip address is
checked.  If the
ip address is listed in the grant tables, privileges are given.  If the ip
address is not in the
grant table then access is denied.

It seems to me that you are concerned about who may or may not access your
web pages
that happen to access mysql.  If that is the case, then you are concerned
with your web
server's authentication scheme and not mysql's authentication.

For instance, if I have phpmyadmin running on my web server, I will need to
use the web
server's authentication scheme to verify by username, password and ip
address whether or
not the remote user should have access to phpmyadmin.  phpmyadmin, on the
other hand,
already has access to mysql because I put the correct username and password
in the
config file and it exists on localhost where I have granted privileges.

Fred



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




Re[2]: [PHP] Help - html mail

2001-11-28 Thread faeton

Hello Hank,

Wednesday, November 28, 2001, 11:11:38 PM, you've written:
HM http://www.php.net/stripslashes
HM ... in short they are there to ease db insertions.

Turn off magic quotes or use stripslashes().

:)


Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com


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




Re: [PHP] PHP 4.1 out?

2001-11-28 Thread Zeev Suraski

Well, the big difference is that people who try out stuff like that are 
usually aware of the fact that they may very well be downloading something 
bogus.  However, when you paste a URL that is typically a click away from a 
download with today's mailers, it goes to a much broader and unsuspecting 
audience.

As for snapshots, you can take a look at snaps.php.net.  No need to blindly 
browse for pre-releases anymore :)

Zeev

At 23:03 28/11/2001, Mike Eheler wrote:
Interesting.

I'll hold off, but people will still try stuff like that. I'm not trying 
to tell ya what to do, but I've found it best never to put files with 
release-names in their primary download spots, regardless of how hidden 
they may seem, until your absolutely positive that will be the release file.

I've been randomly trying various filenames with wget for the past week or 
so, and last night it worked. One of the older tricks in the books for 
getting pre-releases.

Also, beyond this.. other than grabbing from CVS, does php ever publish 
milestone development versions for download anywhere?

Mike

Zeev Suraski wrote:

And for a good reason.  Please don't publish such URLs in the future...

Zeev

At 18:56 28/11/2001, Mike Eheler wrote:

Try it:

http://www.php.net/distributions/php-4.1.0.tar.gz

No word on the website, though.

Mike


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





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




[PHP] thanks

2001-11-28 Thread Yoed Anis

thanks guys it would have taken me forever to discover your tips.


Yoed Anis [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hey Guys,

 I'm having a trouble I can't seem to solve and hoped maybe one of you
might
 take a look and see if you can help me.
 (If you don't want to learn my approach just skip to the bottom to help me
 with the final bit.. skip to hear)

 What I want to do is open the text file testtext.txt (attached) and input
 all the information from one row (divided into fields and colum) and input
 that into a database (mysql)... I thought the easiest way to do this is
 split the fields in the row into an array... since they are all seperated
by
 spaces If only it was so easy. This is what I did:

 code
 $count=0;
 $fd = fopen (./Testtext.txt, r);
 while (!feof ($fd)) {
 $buffer = fgets($fd, 4096);
 $count++;
 if($count  2  $count  4){
  $thearray=split([ ]+, $buffer);
  $maxi=count($thearray);
  for($i=0; $i$maxi; $i++){
   echo $thearray[$i] $i ;
  }
  echo br;
 }
 }
 /code
 Ok now the echo statement above prints the following:
 07/29/2001 12:00 0 a 28.6 28.6 28.5 0.0 31.2 -- 0 0.0 0.0 1018.8
3.1
 6.3 N 28.0 1.9 0.00 0.0 74 23.4 32.1 10 12.00 1
 It looks all good till well the 0 (where did that come from?) after
the
 12:00! But upon further code writing:
 code
 $wdate=$thearray[0];
 $wtime=$thearray[1];
 $wtimeampm=$thearray[2];

 echo BRThe date of the data is : $wdate taken at the time of $wtime
 $wtimampm;
 /code
 that prints:
 The date of the data is : 07/29/2001 12:00 taken at the time of a 28.6
28.6
 28.5 0.0 31.2 -- 0 0.0 0.0 1018.8 3.1 6.3 N 28.0 1.9 0.00 0.0 74 23.4
 32.1 10 12.00
 It looks as the array is having trouble splitting the date from the time
 (why there is a space there!!??) and makes all the other data into one or
 two other parts of the area (instead of the many fields).

 --HEAR--
 So I've narrowed it to this:  $thearray=split([ ]+, $buffer);
 Does this look like what I should use to separate all my data in the
array?
 It gets this data from one row in the file testtext.txt which looks like
all
 fields are separated by at least one space. What should I do?

 Thanks a bunch,
 Yoed







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




[PHP] include or fread a binary file?

2001-11-28 Thread Bryant Brabson

I have a flash file that I need to embed in an iframe on a page. I dynamically get the 
path to the file from a MySQL database. I've tried to include the file and use 
fopen/fread to execute the file, but I only get binary code back, which makes sense 
actually. What's the best way to go about this?



[PHP] FREE Non Surgical Face Lift in A Bottle

2001-11-28 Thread creatingwealth_

Removal Instructions are at the end of this letter. Thank you.

FREE Non-Surgical Face Lift in a Bottle!
You Can Look 5-10 Years Younger
with One 30 Minute Application in the
Comfort of Your Own Home!

AND YOU CAN...

Become Rich through Giving Away  
Free Samples of Our Life Enhancing 
Non-Surgical Face Lift in a Bottle
to your Friends and Family! You
Heard Me Right, NO SELLING!!

Try our Miraculous Non-Surgical Face 
Lift in a Bottle Absolutely Free! And
If you Love It, We'll Pay You Handsomely
Just for Giving Away Free Samples.
(Not Required but a Nice Way in
which to Become Rich!) 

What would you give to look 5 to 10 years 
younger? Imagine the possibilities...
Having a Great Appearance Enhances your Self Esteem, 
which could lead to a Huge Promotion, Electrify 
Your Love Life and Give You the Power to Rule!

Click on this link http://rightnow.to/thedreamteam

To Receive a One Months Supply of our Life Enhancing
Non Surgical Face Lift in a Bottle ABSOLUTELY FREE!

or respond to this email with the subject line More Info

We Make Your Life Better.

Come on in and Relax while we Help You to Look
5-10 Years Younger...



You are receiving this message because you have either subscribed to
one of my ffa-pages, newsletters or we have corresponded in the past. I
respect your privacy.
If you do not wish to receive any further messages or
updates, please respond to this e-mail with the subject line remove and
we will immediately remove your e-mail address from our database.
To speed up your remove request please make sure you place the word
remove in the Subject Line, not in the body of the e-mail.
Thank you.



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




Re: [PHP] RE: Php connection with mysql?

2001-11-28 Thread Erik Price


On Wednesday, November 28, 2001, at 05:40  PM, Fred wrote:


 The browser has no direct connection to MySQL, so you are correct --
 those privilege tables are not helping to check on the privileges if
 the client is from browser.


 I find this a bit misleading.

Yes, I did too -- but I thought that I would use the questioner's own 
statement to confirm what I was saying.  Simply that the privilege 
tables have NOTHING to do with the browser.




Erik


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




Re: [PHP] include or fread a binary file?

2001-11-28 Thread faeton

Hello Bryant,

Thursday, November 29, 2001, 12:56:07 AM, you've written:
BB I have a flash file that I need to embed in an iframe on a page. I
BB dynamically get the path to the file from a MySQL database. I've
BB tried to include the file and use fopen/fread to execute the
BB file, but I only get binary code back, which makes sense actually.
BB What's the best way to go about this?

Maybe something like:
header(Content-type: image/swf-flash);
(if I am not mistaken)

Or just embed src=filename.swf/embed would be easier? :)



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com


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




[PHP] Re: include or fread a binary file?

2001-11-28 Thread Fred

Simply echo whatever html you would normally use to embed the animation in
an iframe.

Fred

Bryant Brabson [EMAIL PROTECTED] wrote in message
001201c1785f$dd959ac0$648e90d1@bryant">news:001201c1785f$dd959ac0$648e90d1@bryant...
I have a flash file that I need to embed in an iframe on a page. I
dynamically get the path to the file from a MySQL database. I've tried to
include the file and use fopen/fread to execute the file, but I only get
binary code back, which makes sense actually. What's the best way to go
about this?




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




[PHP] MySQL to Excel with mutiple sheets

2001-11-28 Thread Brian Lee

I have a script that searches a MySQL DB and produces an Excel file from 
each table in the search.

EX. You search 4 different tables for the “Seattle” you would come up with 4 
different Excel files.

Now I was wondering if it was possible to take the 4 different Excel files I 
just created and combine into one excel file with 4 different sheets?

If anyone has a code for this or could possible help me it would be great.

I am using:
PHP: 4.04
Linux:  7.0
MySQL: 3.22.32

Thanks

-Brian


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


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




[PHP] WHat has happened to parse_str in the Docs????

2001-11-28 Thread Brian White

I have had a good hunt around the www.php.net site and I can find no reference
to the parse_str function in the docs, except as what looks like
cached results in old searches.

Anyway - the reason I ask is I was wondering if there was a function that
did what parse_str did, except that it put the results of parsing the
query string into an associative array rather than creating variables.
I have a vague recollection of something like that

Regs

Brian White

-
Brian White
Step Two Designs Pty Ltd - SGML, XML  HTML Consultancy
Phone: +612-93197901
Web:   http://www.steptwo.com.au/
Email: [EMAIL PROTECTED]



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




[PHP] Re: MySQL to Excel with mutiple sheets

2001-11-28 Thread Fred

What type of Excel file are you using?  I'm assuming that you are using tab
or comma delimited files.  These text or CSV files do not support multiple
sheets, and in fact do not support cell formatting or any of a number of
excel functions.  Only native Excel files (*.xls) support mutliple sheets.
Unfortunately these files are binary and are not easily created.  As a
result it may be impossible to accomplish what you ask.

Fred

Brian Lee [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a script that searches a MySQL DB and produces an Excel file from
 each table in the search.

 EX. You search 4 different tables for the Seattle you would come up with
4
 different Excel files.

 Now I was wondering if it was possible to take the 4 different Excel files
I
 just created and combine into one excel file with 4 different sheets?

 If anyone has a code for this or could possible help me it would be great.

 I am using:
 PHP: 4.04
 Linux:  7.0
 MySQL: 3.22.32

 Thanks

 -Brian


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




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




[PHP] Recommended book on PHP e-commerce

2001-11-28 Thread Martin Wright

Can someome recommend such a book to a relative newcomer.  I'm looking
for something on writing carts and the processing that goes thereafter.

Martin



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




[PHP] Re: Recommended book on PHP e-commerce

2001-11-28 Thread Fred

PHP and MySQL Web Development by Luke Welling and Laura Thomson may be what
you are looking for if you are going to use mysql as the database.  There
are introductory chapters for mysql and php.  The book then moves on to more
advanced topics related to using php with mysql.  It also includes a
detailed chapter and sample code for building a shopping cart.

Fred

Martin Wright [EMAIL PROTECTED] wrote in message
01c1786d$dde9cce0$5aa3fea9@serv">news:01c1786d$dde9cce0$5aa3fea9@serv...
 Can someome recommend such a book to a relative newcomer.  I'm looking
 for something on writing carts and the processing that goes thereafter.

 Martin





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




[PHP] Confirm mysql support option with php install

2001-11-28 Thread Joelmon2001

Hi, guys. Just want to confirm when I install all the other libraries like gd 
and freetype and what not, and I get the php file installed and I am about to 
run
./configure

since mysql currently runs with asp beautifully my option would be

--with mysql and PATH to mysql not *just*
-- with mysql if I want php to connect to the same db's and not overwrite any 
mysql data, correct?

I ask as one raq 3 site with rpm's gave instruction on installing php with 
mysql, but showed 
-- with mysql not the path
and I got confused as to the best way

I thought it was said to require the *path* to mysql if it's installed and 
working pre
php installation

Just hoping ot confirm so I don't fudge this up, and god forbid, even erase 
my mysql data (I will make backups, but still)

Thanks
Joel



[PHP] Explanation

2001-11-28 Thread Gerard Samuel

Hi.  Im looking over someone else's code and I come across something I 
dont understand and dont know where in the manual to look for it.
Here is an example ==

$string1 = (isset($string2)) ? $HTTP_GET_VARS['pid'] : ;

I have no idea what the '?' in the line and the ':' at the end, so I 
have no way of interpreting what $string1 could be.
If you could point me to the page in the manual that would be great.

Thanks...


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




RE: [PHP] Explanation

2001-11-28 Thread Martin Towell

it's a ternary operator

$string1 = (isset($string2)) ? $HTTP_GET_VARS['pid'] : ;

is the same as

if (isset($string2))
  $string1 = $HTTP_GET_VARS['pid'];
else
  $string1 = ;


-Original Message-
From: Gerard Samuel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 12:28 PM
To: PHP
Subject: [PHP] Explanation


Hi.  Im looking over someone else's code and I come across something I 
dont understand and dont know where in the manual to look for it.
Here is an example ==

$string1 = (isset($string2)) ? $HTTP_GET_VARS['pid'] : ;

I have no idea what the '?' in the line and the ':' at the end, so I 
have no way of interpreting what $string1 could be.
If you could point me to the page in the manual that would be great.

Thanks...


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



Re: [PHP] Explanation

2001-11-28 Thread Hank Marquardt

ternary operator ... if/else shorthand; here's the long way to to do it:

if(isset($string2)) {
$string1 = $HTTP_GET_VARS['pid'];
} else {
$string1 = ;
}

-or- 

$string1 = ;
if(isset($string2)) {
$string1 = $HTTP_GET_VARS['pid'];
}

Hank

On Wed, Nov 28, 2001 at 08:28:12PM -0500, Gerard Samuel wrote:
 Hi.  Im looking over someone else's code and I come across something I 
 dont understand and dont know where in the manual to look for it.
 Here is an example ==
 
 $string1 = (isset($string2)) ? $HTTP_GET_VARS['pid'] : ;
 
 I have no idea what the '?' in the line and the ':' at the end, so I 
 have no way of interpreting what $string1 could be.
 If you could point me to the page in the manual that would be great.
 
 Thanks...
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

-- 
Hank Marquardt [EMAIL PROTECTED]
http://web.yerpso.net
GPG Id: 2BB5E60C
Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C
*** Web Development: PHP, MySQL/PgSQL - Network Admin: Debian/FreeBSD
*** PHP Instructor - Intnl. Webmasters Assn./HTML Writers Guild 
*** Beginning PHP -- Starts January 7, 2002 
*** See http://www.hwg.org/services/classes

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




Re: [PHP] Confirm mysql support option with php install

2001-11-28 Thread Tyler Longren

Hi Joel,

You could do the --with-mysql=/path/to/mysql.  But you could also
do --with-mysql.  I usually just do --with-mysql and it all works prefectly.

Good luck!
Tyler Longren

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 7:24 PM
Subject: [PHP] Confirm mysql support option with php install


 Hi, guys. Just want to confirm when I install all the other libraries like
gd
 and freetype and what not, and I get the php file installed and I am about
to
 run
 ./configure

 since mysql currently runs with asp beautifully my option would be

 --with mysql and PATH to mysql not *just*
 -- with mysql if I want php to connect to the same db's and not overwrite
any
 mysql data, correct?

 I ask as one raq 3 site with rpm's gave instruction on installing php with
 mysql, but showed
 -- with mysql not the path
 and I got confused as to the best way

 I thought it was said to require the *path* to mysql if it's installed and
 working pre
 php installation

 Just hoping ot confirm so I don't fudge this up, and god forbid, even
erase
 my mysql data (I will make backups, but still)

 Thanks
 Joel



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




[PHP] PDFLib - Builds Installs, but doesn't show up in phpinfo()

2001-11-28 Thread Ben Holt

Hi all,

I've been banging my head against the wall for a few days and have 
finally decided to consult the list.  Here's what I'm trying to do and 
what is happening:

Platform:

Various version of RH Linux, primary 6.2 (on an i586), but when that 
failed (repeatedly) I started trying it on a 7.1 box (Athlon).

Goal:

Build libpdf support into PHP for dynamic pdf generation

What is Happening:

-libpdf appears to configure, build, and install properly (from source)
-php is rebuilt and appears to configure, build, and install properly
-the output of phpinfo() does _not_ list any information on libpdf and 
libpdf functions do not work

What I've Been Doing:

Aside from beating my head against the wall I have been configuring 
libpdf builds with the following:

./configure --enable-shared-pdflib --enable-php --enable-cxx

The output at the end of the ./configure process indicates that shared 
library, C++, and PHP support (among others) has been enabled.

pdflib then appears to build and install properly with 'make; make install'

* Note, I have been blowing away the pdflib source directory and 
re-untaring each time I do a build.

For PHP builds I have been configuring with the following:

./configure --with-apxs --with-pdflib=/usr/local/lib 
--with-mysql=/usr/local/mysql/lib/mysql --with-zlib=/usr/include 
--with-ttf=/usr/lib --with-jpeg-dir=/usr/lib --with-tiff-dir=/usr/lib

Again, it appears to configure properly. I then build PHP with ./make 
and ./make install.

When apache is restarted and the output of testinfo() is checked pdflib 
is _not_ listed and pdflib specific functions do _not_ work. The 
configure options shown above are listed in the Configure Command 
portion of the output.

Any pointers or tips would be most appreciated.  I would be happy to 
provide any additional information that might explain what I've done.

Thanks,

Ben


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




[PHP] Re: Confirm mysql support option with php install

2001-11-28 Thread Fred

The difference between the two options is that using --with-mysql without a
path will use the mysql libraries which come with php.  This is probably
fine in most cases.  Using --with-mysql=/path/to/mysql will compile in the
native  mysql libraries rather than the php versions.  This is desirable if,
for instance, you have used some advanced configuration options when
installing mysql or have patched the mysql sources.

Fred

[EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi, guys. Just want to confirm when I install all the other libraries like
gd
 and freetype and what not, and I get the php file installed and I am about
to
 run
 ./configure

 since mysql currently runs with asp beautifully my option would be

 --with mysql and PATH to mysql not *just*
 -- with mysql if I want php to connect to the same db's and not overwrite
any
 mysql data, correct?

 I ask as one raq 3 site with rpm's gave instruction on installing php with
 mysql, but showed
 -- with mysql not the path
 and I got confused as to the best way

 I thought it was said to require the *path* to mysql if it's installed and
 working pre
 php installation

 Just hoping ot confirm so I don't fudge this up, and god forbid, even
erase
 my mysql data (I will make backups, but still)

 Thanks
 Joel




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




[PHP] Re: Explanation

2001-11-28 Thread Fred

The manual is rather sparse about the ternary operator, you may find one
sentence about it here:
http://php.he.net/manual/en/language.operators.comparison.php

Basically if the expression before the ? evaluates to true then the whole
expression evaluates to the expression after the ?.  If the expression
before the ?  evaluates to false then the whole expression evaluates to the
expression after the :

This is a really effective shorthand for if..then...else if you are just
going to assign different values to a variable based on the outcome of the
if statement.

Fred

Gerard Samuel [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi.  Im looking over someone else's code and I come across something I
 dont understand and dont know where in the manual to look for it.
 Here is an example ==

 $string1 = (isset($string2)) ? $HTTP_GET_VARS['pid'] : ;

 I have no idea what the '?' in the line and the ':' at the end, so I
 have no way of interpreting what $string1 could be.
 If you could point me to the page in the manual that would be great.

 Thanks...




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




  1   2   >