RE: [PHP] Mcrypt Under IIS 5 / Win32?

2002-11-12 Thread Nick Richardson
I'm trying to load it via php.ini w/ extension=php_mcrypt.dll and
php_mcrypt.dll is in the extension_dir - When php_mcrypt.dll is not in
the right place, it tells me it can't load the dll.

Is there something other than the cygwin1.dll and php_mcrypt.dll that I
have to install on the system - all the documentation (what little there
is that I have found) has said that I don't need anything other than
these 2 files.

-Original Message-
From: Ray Hunter [mailto:[EMAIL PROTECTED]] 
Sent: Monday, November 11, 2002 12:48 PM
To: Nick Richardson
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Mcrypt Under IIS 5 / Win32?


Basically, 

Are you loading the dll via the file or php?  Make sure that the
directory(s) where the dlls are located are in your windows path.

If that doesnt work then you can always put the dll in your systems dll
directory...


On Mon, 2002-11-11 at 19:58, Nick Richardson wrote:
 Ok, another question if you can help.
 
 I have (I think) all the components I need (cygwin1.dll, 
 php_mcrypt.dll, etc...).  Php_mcrypt.dll is in the PHP dir, everything

 else is in %windir%.
 
 When I try to use any of the mcrypt stuff now, I get:
 
 PHP Warning: Unable to load dynamic library './php_mcrypt.dll' - The 
 specified procedure could not be found. in Unknown on line 0
 
 You have any idea what I might be doing wrong?
 
 //Nick
 
 -Original Message-
 From: .: B i g D o g :. [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 11, 2002 4:50 AM
 To: Nick Richardson
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] Mcrypt Under IIS 5 / Win32?
 
 
 You need to uncomment the dll in the php.ini file...do a search for it

 and then uncomment it or add it to the php.ini file...
 
 That will load it...
 
 *Note: i would add that directory to your path that contains the 
 mcrypt dll or all dlls for php and the extension directory to...
 
 
 On Mon, 2002-11-11 at 19:42, Nick Richardson wrote:
  Yes, there is a DLL for it, but getting PHP to know it is there is
  where I'm having the problem - I don?t know how to get PHP to under 
  windows to do the equivalent of --with-mcrypt in configure under 
  linux. - maybe I havn't registered the mcrypt dll's correctly or 
  something like that... But I just can't get it to work.
  
  Everytime I try to do it I get 'call to undefined function . '
  
  //Nick
  
  -Original Message-
  From: .: B i g D o g :. [mailto:[EMAIL PROTECTED]]
  Sent: Monday, November 11, 2002 4:37 AM
  To: Nick Richardson
  Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: Re: [PHP] Mcrypt Under IIS 5 / Win32?
  
  
  
  is there not a dll for mcrypt?
  
  
  On Mon, 2002-11-11 at 19:34, Nick Richardson wrote:
   I asked this before, but didn't get a response.
   
   Anyone out there have any experience a/o know where I can find 
   information on getting the mcrypt functionality to work under 
   Win32
 -
   I have found a port of mcrypt for Win32, and also learned that you
 can
  
   compile it using cygwin - but I don?t know how to register mcrypt 
   w/ PHP and 'turn on' the mcrypt* functions.
   
   If anyone has any information or urls / how-tos it would be 
   greatly appreciated!
   
   Thanks!
   
   //Nick Richardson
   // [EMAIL PROTECTED]
   
   
   ---
   Outgoing mail is certified Virus Free. Can McAfee do that? - Hell
   NO!
   Checked by AVG anti-virus system (http://www.grisoft.com).
   Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002

  --
  .: B i g D o g :.
  
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
  ---
  Outgoing mail is certified Virus Free. Can McAfee do that? - Hell 
  NO!
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
   
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 --
 .: B i g D o g :.
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 ---
 Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO! 
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
  
-- 
Thank you,

Ray Hunter


---
Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO!
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
 


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




RE: [PHP] Mcrypt Under IIS 5 / Win32?

2002-11-12 Thread Nick Richardson
Still having problems getting mcrypt to work under Windows.  But I think
I have narrowed it down to me not having the correct version of
php_mcrypt.dll.

I downloaded the source for PHP and attempted to compile this myself,
but can not get it to work.  If anyone has any information about where I
can get a current php_mcrypt.dll or how I can compile it from the php
source (and don’t say google, because I've been there already), please
let me know.

I'm about to lose my mind!!

Thanks!
//Nick

-Original Message-
From: Nick Richardson [mailto:esoteric.web;gte.net] 
Sent: Tuesday, November 12, 2002 12:18 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Mcrypt Under IIS 5 / Win32?


I'm trying to load it via php.ini w/ extension=php_mcrypt.dll and
php_mcrypt.dll is in the extension_dir - When php_mcrypt.dll is not in
the right place, it tells me it can't load the dll.

Is there something other than the cygwin1.dll and php_mcrypt.dll that I
have to install on the system - all the documentation (what little there
is that I have found) has said that I don't need anything other than
these 2 files.

-Original Message-
From: Ray Hunter [mailto:rhunter;venticon.com] 
Sent: Monday, November 11, 2002 12:48 PM
To: Nick Richardson
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Mcrypt Under IIS 5 / Win32?


Basically, 

Are you loading the dll via the file or php?  Make sure that the
directory(s) where the dlls are located are in your windows path.

If that doesnt work then you can always put the dll in your systems dll
directory...


On Mon, 2002-11-11 at 19:58, Nick Richardson wrote:
 Ok, another question if you can help.
 
 I have (I think) all the components I need (cygwin1.dll,
 php_mcrypt.dll, etc...).  Php_mcrypt.dll is in the PHP dir, everything

 else is in %windir%.
 
 When I try to use any of the mcrypt stuff now, I get:
 
 PHP Warning: Unable to load dynamic library './php_mcrypt.dll' - The
 specified procedure could not be found. in Unknown on line 0
 
 You have any idea what I might be doing wrong?
 
 //Nick
 
 -Original Message-
 From: .: B i g D o g :. [mailto:bigdog;venticon.com]
 Sent: Monday, November 11, 2002 4:50 AM
 To: Nick Richardson
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] Mcrypt Under IIS 5 / Win32?
 
 
 You need to uncomment the dll in the php.ini file...do a search for it

 and then uncomment it or add it to the php.ini file...
 
 That will load it...
 
 *Note: i would add that directory to your path that contains the
 mcrypt dll or all dlls for php and the extension directory to...
 
 
 On Mon, 2002-11-11 at 19:42, Nick Richardson wrote:
  Yes, there is a DLL for it, but getting PHP to know it is there is 
  where I'm having the problem - I don?t know how to get PHP to under 
  windows to do the equivalent of --with-mcrypt in configure under 
  linux. - maybe I havn't registered the mcrypt dll's correctly or 
  something like that... But I just can't get it to work.
  
  Everytime I try to do it I get 'call to undefined function . '
  
  //Nick
  
  -Original Message-
  From: .: B i g D o g :. [mailto:bigdog;venticon.com]
  Sent: Monday, November 11, 2002 4:37 AM
  To: Nick Richardson
  Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: Re: [PHP] Mcrypt Under IIS 5 / Win32?
  
  
  
  is there not a dll for mcrypt?
  
  
  On Mon, 2002-11-11 at 19:34, Nick Richardson wrote:
   I asked this before, but didn't get a response.
   
   Anyone out there have any experience a/o know where I can find
   information on getting the mcrypt functionality to work under 
   Win32
 -
   I have found a port of mcrypt for Win32, and also learned that you
 can
  
   compile it using cygwin - but I don?t know how to register mcrypt
   w/ PHP and 'turn on' the mcrypt* functions.
   
   If anyone has any information or urls / how-tos it would be
   greatly appreciated!
   
   Thanks!
   
   //Nick Richardson
   // [EMAIL PROTECTED]
   
   
   ---
   Outgoing mail is certified Virus Free. Can McAfee do that? - Hell 
   NO! Checked by AVG anti-virus system (http://www.grisoft.com).
   Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002

  --
  .: B i g D o g :.
  
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
  ---
  Outgoing mail is certified Virus Free. Can McAfee do that? - Hell
  NO!
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
   
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 --
 .: B i g D o g :.
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 ---
 Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO!
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
  
-- 
Thank you,

Ray Hunter

RE: [PHP] Trying to e-mail password

2002-11-12 Thread Nick Richardson
If the password is md5, then no - you can't reverse it because md5 is a
one way hash.

If you want to have bi-direction encryption/decryption, look into using
mcrypt. - just not on windows... Because it will make you want to kill
yourself.

http://www.php.net/mcrypt

-Original Message-
From: Ben C. [mailto:benc;cox.net] 
Sent: Tuesday, November 12, 2002 5:08 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Trying to e-mail password


Is there not any way to reverse the crypted password before e-mailing??


If not, how do I use ENCODE / DECODE?


 
 From: rija [EMAIL PROTECTED]
 Date: 2002/11/12 Tue PM 07:32:28 EST
 To: php [EMAIL PROTECTED], 
   Ben C. [EMAIL PROTECTED]
 Subject: Re: [PHP] Trying to e-mail password
 
 You should do like this:
 
 $password = $row['password'];
 This return weird crypted value of your password.
 
 Unless you want send the this weird password. The function 
 mysql_password is irreversible, you cannot get back the value crypted 
 by password. Use ENCODE and DECODE instead,
 
 
 
 - Original Message -
 From: Ben C. [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, November 13, 2002 11:09 AM
 Subject: [PHP] Trying to e-mail password
 
 
  I am trying to have a form that send a user their email and password

  to
 login.  I am using the following:
 
  while ($row = mysql_fetch_array($result)) {
  $email = $row['email'];
  $password = $row['password(password)'];
 
  When I use the mail() function to send both $email and $password I 
  receive
 an e-mail with a blank password.
 
  What am I doing wrong.  Please help!
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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

---
Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO!
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
 


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




RE: [PHP] _POST _GET

2002-11-11 Thread Nick Richardson
yes

-Original Message-
From: GC [mailto:gregchagnon;hotmail.com] 
Sent: Monday, November 11, 2002 11:27 AM
To: [EMAIL PROTECTED]
Subject: [PHP] _POST  _GET


Hi-
Can I use both _GET and _POST in the same php file?  Thanks!! -Greg



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

---
Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO!
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
 


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




RE: [PHP] _POST _GET

2002-11-11 Thread Nick Richardson
One thing to watch out for when doing this is that all browsers do not
support the ?foo=blah in the action attribute of the form tag.  IE and
Mozilla can handle it fine, but (and what a surprise this is) Netscape
will sometime have some trouble with it (mostly in older versions
(4.x)).  But this is the only way that get and post can be combined in
the same form.

As far as using the same php file to generate different forms (some get,
some post)... Yes that's easy. :)


-Original Message-
From: .: B i g D o g :. [mailto:bigdog;venticon.com] 
Sent: Monday, November 11, 2002 4:31 AM
To: GC
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] _POST  _GET


Basically your form is going to use one or the other

you might be able to do this...

form action=file.php?op=submit method=post name=someform /form

Then you can use _GET to get the op=submit and use _POST for the form...

never tried so i do not know...but in theory it should work...


On Mon, 2002-11-11 at 19:26, GC wrote:
 Hi-
 Can I use both _GET and _POST in the same php file?  Thanks!! -Greg
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
-- 
.: B i g D o g :.



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

---
Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO!
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
 


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




RE: [PHP] Mcrypt Under IIS 5 / Win32?

2002-11-11 Thread Nick Richardson
Yes, there is a DLL for it, but getting PHP to know it is there is where
I'm having the problem - I don’t know how to get PHP to under windows to
do the equivalent of --with-mcrypt in configure under linux. - maybe I
havn't registered the mcrypt dll's correctly or something like that...
But I just can't get it to work.

Everytime I try to do it I get 'call to undefined function . '

//Nick

-Original Message-
From: .: B i g D o g :. [mailto:bigdog;venticon.com] 
Sent: Monday, November 11, 2002 4:37 AM
To: Nick Richardson
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] Mcrypt Under IIS 5 / Win32?



is there not a dll for mcrypt?


On Mon, 2002-11-11 at 19:34, Nick Richardson wrote:
 I asked this before, but didn't get a response.
 
 Anyone out there have any experience a/o know where I can find 
 information on getting the mcrypt functionality to work under Win32 - 
 I have found a port of mcrypt for Win32, and also learned that you can

 compile it using cygwin - but I don’t know how to register mcrypt w/ 
 PHP and 'turn on' the mcrypt* functions.
 
 If anyone has any information or urls / how-tos it would be greatly 
 appreciated!
 
 Thanks!
 
 //Nick Richardson
 // [EMAIL PROTECTED]
 
 
 ---
 Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO! 
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
  
-- 
.: B i g D o g :.



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

---
Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO!
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
 


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




RE: [PHP] Exec()ing two strings, using same shell?

2002-11-11 Thread Nick Richardson
Exec(dir c:\somedir) or exec(cd somedir  dir)

i.e. $dirContent = one of the above;
print($dirContent);


-Original Message-
From: Leif K-Brooks [mailto:eurleif;buyer-brokerage.com] 
Sent: Monday, November 11, 2002 11:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Exec()ing two strings, using same shell?


Sorry if I'm using the wrong words - not sure of the exact terminology. 
 Anyway, is there a way to exec() two statments in the same shell?
Example: //On win32 test machine exec(cd somedir); print `dir`;
//Outputs directory listing for c:\, not c:\somedir //But is there a way
to get the directory listing for somedir instead? // I know I could do
`dir c:\someidr`, but I'm doing more complex stuff 
than this example.

-- 
The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent
of the law.



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

---
Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO!
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
 


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




RE: [PHP] Mcrypt Under IIS 5 / Win32?

2002-11-11 Thread Nick Richardson
I will try that - Thanks for the suggestion.  If it was something that
simple, I'm going to shoot myself :)

Thanks!

//Nick

-Original Message-
From: .: B i g D o g :. [mailto:bigdog;venticon.com] 
Sent: Monday, November 11, 2002 4:50 AM
To: Nick Richardson
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Mcrypt Under IIS 5 / Win32?


You need to uncomment the dll in the php.ini file...do a search for it
and then uncomment it or add it to the php.ini file...

That will load it...

*Note: i would add that directory to your path that contains the mcrypt
dll or all dlls for php and the extension directory to...


On Mon, 2002-11-11 at 19:42, Nick Richardson wrote:
 Yes, there is a DLL for it, but getting PHP to know it is there is 
 where I'm having the problem - I don’t know how to get PHP to under 
 windows to do the equivalent of --with-mcrypt in configure under 
 linux. - maybe I havn't registered the mcrypt dll's correctly or 
 something like that... But I just can't get it to work.
 
 Everytime I try to do it I get 'call to undefined function . '
 
 //Nick
 
 -Original Message-
 From: .: B i g D o g :. [mailto:bigdog;venticon.com]
 Sent: Monday, November 11, 2002 4:37 AM
 To: Nick Richardson
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] Mcrypt Under IIS 5 / Win32?
 
 
 
 is there not a dll for mcrypt?
 
 
 On Mon, 2002-11-11 at 19:34, Nick Richardson wrote:
  I asked this before, but didn't get a response.
  
  Anyone out there have any experience a/o know where I can find
  information on getting the mcrypt functionality to work under Win32
- 
  I have found a port of mcrypt for Win32, and also learned that you
can
 
  compile it using cygwin - but I don’t know how to register mcrypt w/
  PHP and 'turn on' the mcrypt* functions.
  
  If anyone has any information or urls / how-tos it would be greatly
  appreciated!
  
  Thanks!
  
  //Nick Richardson
  // [EMAIL PROTECTED]
  
  
  ---
  Outgoing mail is certified Virus Free. Can McAfee do that? - Hell 
  NO!
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
   
 --
 .: B i g D o g :.
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 ---
 Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO! 
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
  
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
-- 
.: B i g D o g :.



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

---
Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO!
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
 


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




[PHP] Mcrypt Under IIS 5 / Win32?

2002-11-11 Thread Nick Richardson
I asked this before, but didn't get a response.

Anyone out there have any experience a/o know where I can find
information on getting the mcrypt functionality to work under Win32 - I
have found a port of mcrypt for Win32, and also learned that you can
compile it using cygwin - but I don’t know how to register mcrypt w/ PHP
and 'turn on' the mcrypt* functions.

If anyone has any information or urls / how-tos it would be greatly
appreciated!

Thanks!

//Nick Richardson
// [EMAIL PROTECTED]


---
Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO!
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
 



RE: [PHP] Mcrypt Under IIS 5 / Win32?

2002-11-11 Thread Nick Richardson
Ok, another question if you can help.

I have (I think) all the components I need (cygwin1.dll, php_mcrypt.dll,
etc...).  Php_mcrypt.dll is in the PHP dir, everything else is in
%windir%.

When I try to use any of the mcrypt stuff now, I get:

PHP Warning: Unable to load dynamic library './php_mcrypt.dll' - The
specified procedure could not be found. in Unknown on line 0 

You have any idea what I might be doing wrong?

//Nick

-Original Message-
From: .: B i g D o g :. [mailto:bigdog;venticon.com] 
Sent: Monday, November 11, 2002 4:50 AM
To: Nick Richardson
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Mcrypt Under IIS 5 / Win32?


You need to uncomment the dll in the php.ini file...do a search for it
and then uncomment it or add it to the php.ini file...

That will load it...

*Note: i would add that directory to your path that contains the mcrypt
dll or all dlls for php and the extension directory to...


On Mon, 2002-11-11 at 19:42, Nick Richardson wrote:
 Yes, there is a DLL for it, but getting PHP to know it is there is 
 where I'm having the problem - I don’t know how to get PHP to under 
 windows to do the equivalent of --with-mcrypt in configure under 
 linux. - maybe I havn't registered the mcrypt dll's correctly or 
 something like that... But I just can't get it to work.
 
 Everytime I try to do it I get 'call to undefined function . '
 
 //Nick
 
 -Original Message-
 From: .: B i g D o g :. [mailto:bigdog;venticon.com]
 Sent: Monday, November 11, 2002 4:37 AM
 To: Nick Richardson
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] Mcrypt Under IIS 5 / Win32?
 
 
 
 is there not a dll for mcrypt?
 
 
 On Mon, 2002-11-11 at 19:34, Nick Richardson wrote:
  I asked this before, but didn't get a response.
  
  Anyone out there have any experience a/o know where I can find
  information on getting the mcrypt functionality to work under Win32
- 
  I have found a port of mcrypt for Win32, and also learned that you
can
 
  compile it using cygwin - but I don’t know how to register mcrypt w/
  PHP and 'turn on' the mcrypt* functions.
  
  If anyone has any information or urls / how-tos it would be greatly
  appreciated!
  
  Thanks!
  
  //Nick Richardson
  // [EMAIL PROTECTED]
  
  
  ---
  Outgoing mail is certified Virus Free. Can McAfee do that? - Hell 
  NO!
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
   
 --
 .: B i g D o g :.
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 ---
 Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO! 
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
  
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
-- 
.: B i g D o g :.



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

---
Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO!
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
 


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




[PHP] Mcrypt under Win32?

2002-11-10 Thread Nick Richardson

Anyone out there know how to get the mcrypt functions running under
Win32?

Any help / how-to's / URLs will be greatly appreciated. - I have
searched around the web and found a few things, but nothing that really
gives any good information

Thanks in advance for the help!!! 

//Nick Richardson
// [EMAIL PROTECTED]

---
Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO!
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
 


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




[PHP] Calling class functions using string variables?

2002-09-22 Thread Nick Richardson

Hi,

Anyone know if it's possible to call a class function using 2 string
variables WITHOUT instantiating the class?

i.e.:

$clName = myClass;
$fuName = myFunc;

$clName::$fuName();

I have tried several different combinations of eval and {} and just
about everything else I can think of… and they all give parse errors
when the class name is a string var. (i.e. myClass::$fuName() works fine
(as expected) but $clName::myFunc() does not).  Everytime it doesn't
work, it just gives a simple parse error.

Any suggested are much appreciated!

Thanks in advance!

//Nick Richardson
// [EMAIL PROTECTED]


---
Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO!
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.386 / Virus Database: 218 - Release Date: 9/9/2002
 



RE: [PHP] Calling class functions using string variables?

2002-09-22 Thread Nick Richardson

Nevermind, I have finally figured it out... I was missing a ; in the
eval statement.

For anyone who wanted to know, there's 2 ways...
1) the long way
$clName = myClass;
$fuName = myFunc;

$t = new $clName;
$t-$fuName();
unset($t);

2) the short way
$cl = myClass;
$fu = myFunc;

eval($cl::$fu(););

-Original Message-
From: Nick Richardson [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, September 22, 2002 12:50 PM
To: 'PHP General'
Subject: [PHP] Calling class functions using string variables?


Hi,

Anyone know if it's possible to call a class function using 2 string
variables WITHOUT instantiating the class?

i.e.:

$clName = myClass;
$fuName = myFunc;

$clName::$fuName();

I have tried several different combinations of eval and {} and just
about everything else I can think of… and they all give parse errors
when the class name is a string var. (i.e. myClass::$fuName() works fine
(as expected) but $clName::myFunc() does not).  Everytime it doesn't
work, it just gives a simple parse error.

Any suggested are much appreciated!

Thanks in advance!

//Nick Richardson
// [EMAIL PROTECTED]


---
Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO!
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.386 / Virus Database: 218 - Release Date: 9/9/2002
 

---
Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO!
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.386 / Virus Database: 218 - Release Date: 9/9/2002
 


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




[PHP] Download Page?

2002-06-06 Thread Nick Richardson

Hi all,

I was wondering how i could make a download 'landing' page, that once a user
has filled out the download form and submitted it, it will send the file
they are requesting as a download (not display a link to it, or display it
in the browser) and also render a page that says something like thanks for
downloading blah blah... behind it at the same time.

I would assume i would have to use header() to do this, but i dont know
where i should start, a/o what headers to send.

Any help would be appreciated.

Thanks!

//Nick Richardson ([EMAIL PROTECTED])
//SiteCommand LLC
---=---
--]  SiteCommand Control Panel:  Coming June 1st, 2002  [--
--] 'The Secure Solution To Easy Enterprise Management' [--
---=---
--]  Visit http://www.sitecommand.com to PreOrder Now   [--
---=---


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




RE: [PHP] the document contained no data

2002-04-12 Thread Nick Richardson

The fact that there's a seg fault involved makes me think that's it's not so
much a problem w/ code, but a problem with either apache (or whatever web
server you use) a/o your PHP installation -

PHP may be seg faulting before it's done reading the data from the directory
and apache is reporting that no data was sent but the parser has stopped
responding and is what it thinks is done.

Could also be that the user apache runs under doesn't have access to that
directory.

Or i could be completley wrong too... who knows ;)

//Nick

-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 10:43 PM
To: 'Phieu Huynh'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] the document contained no data


does that code work if you set the directory path to ./ ?

-Original Message-
From: Phieu Huynh [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 12, 2002 3:33 PM
To: Martin Towell
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] the document contained no data



I also try the following code and still have the same problem.
I am runing php4.0.?, solaris(linux)

$dir_name = /export/home/phuynh/php/main/student/upload/;
$dir = opendir($dir_name);
 while (false !== ($file_names = readdir($dir))) {
  echo $file_names;
 }
 closedir($dir);


Martin Towell wrote:

 odd, I copied your code, changed the dir to ./ and it works for me
 (php4.0.?, winnt)

 if dir() doesn't work for you, you might need to use opendir(), readdir(),
 etc

 -Original Message-
 From: Phieu Huynh [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 12, 2002 2:14 PM
 To: Martin Towell; [EMAIL PROTECTED]
 Subject: Re: [PHP] the document contained no data

 Sorry, the file has ; I retype it wrong,
 I did set error_reporting but no change,
 but in the httpd error log file I found exit signal segmentation fault
 (11)

 Martin Towell wrote:

  is that a direct copy of your code - if it is, you're missing a ; after
  $entry=$d-read()
  but that wound have stopped the first one...
 
  to set error level to E_ALL, use:
  error_reporting(E_ALL);
 
  or set it in your php.ini file
  error_reporting = E_ALL
 
  -Original Message-
  From: Phieu Huynh [mailto:[EMAIL PROTECTED]]
  Sent: Friday, April 12, 2002 12:31 PM
  To: Martin Towell; [EMAIL PROTECTED]
  Subject: Re: [PHP] the document contained no data
 
  I don't know how to set erro level to E_ALL, can you give me some
sample.
  I did try different way
 
  ?
$d = dir(/export/home/phuy/www/test/upload);
echo Handle: .$d-handle.br;
echo Path: .$d-path.br;
  $entry=$d-read()
  echo $entry ;
$d-close();
  ?
 
  it is ok and the output is only a dot(.)
  if I add another read() statement then I got  ... no data
 
  ?
$d = dir(/export/home/phuy/www/test/upload);
echo Handle: .$d-handle.br;
echo Path: .$d-path.br;
  $entry=$d-read()
  echo $entry ;
  $entry=$d-read()
  echo $entry ;
$d-close();
  ?
 
  can anyone tell me what has read() has
  and readdir() return.
 
  Martin Towell wrote:
 
   turn the displaying of errors on, and set the error level to E_ALL
   I'm thinking that you've got a error somewhere that's stopping the
 script
   prematurely
  
   -Original Message-
   From: Phieu Huynh [mailto:[EMAIL PROTECTED]]
   Sent: Friday, April 12, 2002 10:49 AM
   To: [EMAIL PROTECTED]
   Subject: [PHP] the document contained no data
  
   Hi,
   I am trying to read the files in the directory and display them .
   but I got the message  the document contained no data 
  
   this is my code
   ?
 $d = dir(/export/home/phuy/www/test/upload);
 echo Handle: .$d-handle.br;
 echo Path: .$d-path.br;
  
 while($entry=$d-read()) {
   echo $entry.br\n;
 }
 echo hr;
 $d-close();
   ?
  
 Can anyone tell me what should I do to correct it.
 I would like some help, thank in advance.
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
 
   Phieu (phil) Huynh
   Computer System Officer
   Monash University
   Electrical  Computer Systems Engineering
   Phone : +61 3 990 53469

 --

  Phieu (phil) Huynh
  Computer System Officer
  Monash University
  Electrical  Computer Systems Engineering
  Phone : +61 3 990 53469

--

 Phieu (phil) Huynh
 Computer System Officer
 Monash University
 Electrical  Computer Systems Engineering
 Phone : +61 3 990 53469



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



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




RE: [PHP] Re: Variable wildcards

2002-04-11 Thread Nick Richardson

Following on the same subject (kinda) of Variable Variables... i have
actually wondered this before... is there a difference between these 2
blocks?? (both should print worldhello if i am not mistaken, but is there
a difference in how the nested variable is handled when it's inside curly
braces?):

$a = hello;
$hello = world;

print($$a.$a);

-- and --

$a = hello;
$hello = world;

print(${$a}.$a);

-Original Message-
From: Jason Bell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 7:33 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Variable wildcards


This would certainly work, but I got a suggestion for using select
name=array[] multiple that i think will be a much cleaner solution.

Thanks!


- Original Message -
From: Philip Hallstrom [EMAIL PROTECTED]
To: Jason Bell [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, April 11, 2002 4:10 PM
Subject: Re: Variable wildcards


 If you want to process the list when they submit the form you can do
 something like this:

 foreach($_REQUEST as $key = $value ) {
 if( ereg(user([0-9]*), $key, $match_ary) ) {
 #go crazy;
 }
 }

 ??
 -philip

 On Thu, 11 Apr 2002, Jason Bell wrote:

  Yeah, I thought so too, but variable variables doesn't seem to provide
for
  this to add a little bit of detail to what I am doing, it is a user
  list, and I want to have a check box next to each user so that you can
  select 1 or more users for deletion. Each checkbox will be named User$id
  ($id of course being the numerical id of the user in the database)
 
 
  I did try doing somehting like $User{ereg ([0-9])} but it doesn't seem
to
  work, or I'm doing it wrong.
 
 
  I guess maybe an easier way is if I could somehow drop all of the
selected
  id's into an array? Then I wouldn't need to worry about needing to
determine
  which variables exist.
 
 
  - Original Message -
  From: Kevin Stone [EMAIL PROTECTED]
  To: Jason Bell [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Thursday, April 11, 2002 3:44 PM
  Subject: Re:  Variable wildcards
 
 
   Sounds like what you want is Variable Variables.
   http://www.php.net/manual/en/language.variables.variable.php
  
   - Original Message -
   From: Jason Bell [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Thursday, April 11, 2002 4:24 PM
   Subject:  Variable wildcards
  
  
   are there wildcard characters for variables?
  
   Lets say that I have a varable that always starts with $user but then
has
   the 2 digit user id attached to the end, so it could be $user12 or
$user28
  
  
   is there a way to grab these? sort of like in unix standards, where I
  could
   use user?? or user* ?
  
  
   Thanks!
  
  
  
  
  
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 






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



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




[PHP] Anyone out there ever tried this?

2002-04-09 Thread Nick Richardson

I'm trying to bind a script to a machine.  So, esentially, the script will
only be able to run on a system that it's told it can run on.  The
information for this will be stored in some for of license file as data
encrypted by mcrypt and will have to be fairly easy to retrieve/create.

Can anyone point me in the right direction to attempt to do this.  I'm even
open to checking against the MAC addr. of the netcard on the system, but
would like to avoid that if possible.

If anyone has any ideas for how to do this, a/o tutorials/exmaples i might
be able to check out, please let me know!!

Thanks in advance!

//Nick Richardson
[EMAIL PROTECTED]
[EMAIL PROTECTED]


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




[PHP] Changing PHPSESSID= to something else?

2002-04-03 Thread Nick Richardson

Hi all,

What would i put in my php.ini to change PHPSESSID to something else, like
's', so that my URL for sessions would be:

http://foo/bar.php?s=00as9s8fa9s0a7as9125 instead of
http://foo/bar.php?PHPSESSID=a8as982t8as8268

AND, can this be done w/ ini_set inside the script?

Thanks in advance!

//Nick Richardson
[EMAIL PROTECTED]


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




[PHP] Finding variable names in strings, and replacing with values?

2002-03-08 Thread Nick Richardson

Been working on this one for quite awhile, and it's probably a fairly easy
solution, but i can't find it... so thought i would ask.

I'm opening a file, and going through it line by line.  I need for find
places where the line contains %value% and replace it with $value.

So if the line says body bgcolor=%bgcolor% text=%textcolor%
link=%linkcolor%, i need to replace the text where the %% stuff is and set
it to $bgcolor,$textcolor,or $linkcolor respectively. -

I'm sure this can be done, but i'm just no good w/ the pattern matching
stuff... so if anyone has any ideas on this, please let me know!!!

Thanks

//Nick Richardson
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--
--   We must come to see that the end we seek, is a society --
-- at peace with itself.  A society that can live with its  --
-- concience.  That will be a day not of the white man, not --
-- of the black man... That will be the day of man, as man! --
--  -Dr. Martin Luther King Jr. --
-- -March 25th, 1965--
--


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




RE: [PHP] two different MySQL connections without always select_db?

2002-03-08 Thread Nick Richardson

i dont know if this will work, but you can try selecting them in the
query... i.e.:

select * from database.table

I am by no means a guru on sql queries, but it may work.

-Original Message-
From: PHP freak [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 08, 2002 8:39 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] two different MySQL connections without always select_db?


How would you keep two different MySQL connections to two different MySQL
databases (on two different MySQL servers) up and available with two
different pointers (id), and not need to always do select_db() to switch
between them?

I thought that if I did this:

--- php: -
$aaa_link = mysql_pconnect(localhost, u, p);
mysql_select_db(apples, $aaa_link);

$zzz_link = mysql_pconnect(remotehost, u, p);
mysql_select_db(zebras, $zzz_link);
--

... that I'd be able to access both pretty easily. Like this:

--- php: -
$aaa_result = mysql_query(select * from apples, $aaa_link);
$orchard = mysql_fetch_assoc($aaa_result);

$zzz_result = mysql_query(select * from zebras, $zzz_link);
$zoo = mysql_fetch_assoc($zzz_result);

$aaa_result = mysql_query(update apples set something=' . $zoo['zebrafur']
. ', $aaa_link);
--

But it seems to tell me that $zzz_result is not a valid resource - unless I
do the select_db thing inbetween the two commands.

Is there anyone doing this successfully?  Back-n-forth between two
databases?

Thanks for any help.



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


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




[PHP] mcrypt? - Can't find any good info

2002-03-07 Thread Nick Richardson

I'm getting this error:

Warning: mcrypt module initialization failed in /home/www/common.php on line
314

When running this code:

?php
function encryptPassword($password) {
  $key = randomString();
  $code = mcrypt_ecb(MCRYPT_BLOWFISH_128, $key, $password, MCRYPT_ENCRYPT);

  print($code = enc w/ $key);
}

encryptPassword(testing);
?

And i can't find any documentation on what might be causing this... anyone
out there know?

//Nick Richardson
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--
--   We must come to see that the end we seek, is a society --
-- at peace with itself.  A society that can live with its  --
-- concience.  That will be a day not of the white man, not --
-- of the black man... That will be the day of man, as man! --
--  -Dr. Martin Luther King Jr. --
-- -March 25th, 1965--
--


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




[PHP] Auth against unshadowed /etc/passwd?

2002-03-05 Thread Nick Richardson

Anyone know how i can auth a username and password against the /etc/passwd
file?

Any help will be much appreciated!

//Nick Richardson
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--
--   We must come to see that the end we seek, is a society --
-- at peace with itself.  A society that can live with its  --
-- concience.  That will be a day not of the white man, not --
-- of the black man... That will be the day of man, as man! --
--  -Dr. Martin Luther King Jr. --
-- -March 25th, 1965--
--


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




[PHP] Prepending string to TOP of files?

2002-02-26 Thread Nick Richardson

Is there any way to prepend a string into the top of a file? - only docs on
fopen show how to append to the end?

//Nick Richardson
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--
--   We must come to see that the end we seek, is a society --
-- at peace with itself.  A society that can live with its  --
-- concience.  That will be a day not of the white man, not --
-- of the black man... That will be the day of man, as man! --
--  -Dr. Martin Luther King Jr. --
-- -March 25th, 1965--
--


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




[PHP] Encrypt/Decrypt

2002-02-26 Thread Nick Richardson

Forgive me if this is a very basic question, i can't find the info in the
manual/function list.

I want to encrypt a password w/ a salt string that is randomly generated (10
chars), and then prepend the salt string onto the beginning of the encrypted
string, save the string in a database, and move on.

Later, i want to be able to retrive the encrypted string w/ the salt in it,
grab the salt and use it to decrypt the password. - Is this possible and how
would it be done?

Thanks in advance for any suggestions.

//Nick Richardson
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--
--   We must come to see that the end we seek, is a society --
-- at peace with itself.  A society that can live with its  --
-- concience.  That will be a day not of the white man, not --
-- of the black man... That will be the day of man, as man! --
--  -Dr. Martin Luther King Jr. --
-- -March 25th, 1965--
--


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




[PHP] Variables containing HTML?

2002-02-25 Thread Nick Richardson

Stupid question for everyone... i'm just having one of those braindead
moments.

I have a page which allows users to add custom headers and footers in HTML.
(i.e. Fill in a text area with a bunch of html, and that's stored in a mysql
database and retrived when that user logs in again).

The problem i'm having is this:

When a users fills in all the info, and hits submit, they are taken to a
preview page which renders everything and has an accept button.
If i try to store the header and footer data in a hidden input it just
renders it on the screen (if it's more than one line it gets even worse).

How can i get this info (variable w/ strings that are QUITE long, and
include quotes and apostrophes) from the form they are entered on, into a
preview page, then back into the script to be written into the database?

I have thought about sessions, and they work until the user decides they
dont like the way it turned out and try to discard and change it, even after
re-registering the variables in the session, they do not change to the new
input.

I hope someone out there can make sence of what i have said... because i
think i confused even myself ;)

Thanks for any help!

//Nick Richardson


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




RE: [PHP] Variables containing HTML?

2002-02-25 Thread Nick Richardson

Right on!!! - This works great!!

Can you explain what it does ;) - i'm completly lost in it ;)

//Nick

-Original Message-
From: Demitrious S. Kelly [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 8:02 PM
To: 'Nick Richardson'; 'PHP General'
Subject: RE: [PHP] Variables containing HTML?


Try these...

function encode($string) {
$string=stripslashes($string);
$temp='';
$newstring='';
for ( $counter=0; $counter != ; $counter++ ) {
$temp=substr($string, $counter, 1);
if ( $temp == '' ) {
break;
}
$newstring=$newstring . str_pad( ord($temp), 3, 0,
STR_PAD_LEFT);
}
return ($newstring);
}

function decode($string) {
$temp='';
$newstring='';
for ( $counter=0; $counter != ; $counter+=3 ) {
$temp=substr($string, $counter, 3);
if ( $temp == '' ) {
break;
}
$newstring=$newstring . chr($temp);
}
return ($newstring);
}

-Original Message-
From: Nick Richardson [mailto:[EMAIL PROTECTED]] 
Sent: Monday, February 25, 2002 7:56 PM
To: PHP General
Subject: [PHP] Variables containing HTML?

Stupid question for everyone... i'm just having one of those braindead
moments.

I have a page which allows users to add custom headers and footers in
HTML.
(i.e. Fill in a text area with a bunch of html, and that's stored in a
mysql
database and retrived when that user logs in again).

The problem i'm having is this:

When a users fills in all the info, and hits submit, they are taken to a
preview page which renders everything and has an accept button.
If i try to store the header and footer data in a hidden input it just
renders it on the screen (if it's more than one line it gets even
worse).

How can i get this info (variable w/ strings that are QUITE long, and
include quotes and apostrophes) from the form they are entered on, into
a
preview page, then back into the script to be written into the database?

I have thought about sessions, and they work until the user decides they
dont like the way it turned out and try to discard and change it, even
after
re-registering the variables in the session, they do not change to the
new
input.

I hope someone out there can make sence of what i have said... because i
think i confused even myself ;)

Thanks for any help!

//Nick Richardson


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





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




[PHP] What's wrong w/ this line?

2002-02-25 Thread Nick Richardson

PHP seems to be completly ignoring this line...

Funny part is that i use this same line in another place in my code and it
works fine there... i have no clue - Need coffee.

 } elseif(!(preg_match(/^[A-Za-z0-9-]+$/,$uname))) {

//Nick Richardson
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--
--   We must come to see that the end we seek, is a society --
-- at peace with itself.  A society that can live with its  --
-- concience.  That will be a day not of the white man, not --
-- of the black man... That will be the day of man, as man! --
--  -Dr. Martin Luther King Jr. --
-- -March 25th, 1965--
--


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




RE: [PHP] Re: Hyperlinks vs Buttons

2002-02-20 Thread Nick Richardson

Actually, i have seen problems with this under Oprah and Netscape (dont ask
me why... it just seems kinda flaky.

So instead, use this:

a href=javascript:document.formname.submit()Login/a

//Nick

-Original Message-
From: Gary [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 7:49 PM
To: [EMAIL PROTECTED]; Steven Walker
Subject: [PHP] Re: Hyperlinks vs Buttons




Steven Walker wrote:

 Is there a way to regular hyperlinked text to submit a form?

 For example, rather than having a button that says [Login], I just want
 underlined text: Login

 Steven J. Walker
 Walker Effects
 www.walkereffects.com
 [EMAIL PROTECTED]


a href=javascript:submitForm(1)Login/a

HTH
Gary


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



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




[PHP] mysql_pconnect to remote system

2001-10-23 Thread Nick Richardson

Ok, after all the problems trying to get into the flat file and stuff, i
decided it will just be easier to use mysql... Only problem is the database
is on the machine that is going to host the site when it's done... (Redhat
Linux) and is being developed in my office on a windows box...

So i need to connect to the database from my win box - and it's giving
connection failed messages.

This is what i'm doing:

?php
$server = IP of server:3306;
$user = username;
$pass = password;

if(!($myLink = mysql_pconnect($server,$user,$pass))) {
print(Unable to connect to databasebr\n);
exit();
}

?

and every time it gives me the error. - do i need to change the script? or
do i need to contact the ISP that's hosting the database?

//Nick Richardson
[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/Apache/Windows 2000 - Does not send mail

2001-10-23 Thread Nick Richardson

You need to make sure you have a few things configured on you SMTP Virtual
server.

Start IISAdmin and right click on 'Default SMTP Virtual Server' then choose
properties.

Ok, from here, things might not match perfectly because i'm running Windows
XP (no i didn't pirate it, i work for microsoft).

Under the access tab in access control, click authentication
make sure that anonymous access is checked.
you can leave basic auth and integrated windows auth checked also
click ok
click on relay under relay restrictions
add your local machine to the list allowed to relay, and enable relaying
go to the delivery tab
under outbound security, verify it's set to anonymous access.

If all this stuff is setup, you should be able to use mail() -

//Nick

-Original Message-
From: Yuval Zukerman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 8:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP/Apache/Windows 2000 - Does not send mail


Hi there,

I installed PHP 4.0.6 on a Windows 2000 machine running Apache 1.3.22.
I followed all the instructions for installation - added the php.ini file
to the C:\winnt directory, added php to httpd.conf. I tried both the module
and the CGI versions and the following problem still persisted:
Whenever I try to use the mail() function to send a an e-mail with a single
file attachment, I receive a server error.

If I set the SMTP variable in php.ini to localhost (where I am running an
SMTP server) , I receive a PHP error and Apache logs a 'Premature end of
script headers: C:/php/php.exe' error.
If my SMTP variable is set to either a remote host, php reports in the next
browser window of a server error at the line containing the mail() function
call.

Do I have a permissions issue with any of my files or directories? I did
not know how to set the IUSR_MachineName permissions as described in the
instructions. Do I need to create such a user? where do I find it if it
exists?

Thanks for any response,

Yuval


--
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] MSSQL 7.0 and PHP

2001-10-23 Thread Nick Richardson

my understanding (and i could be totally wrong) is varchar only accepts
values up to 255 (so does char).  To get larger than that you have to use
'text' (i.e. create table name (column text not null..);

-Original Message-
From: Franco Breciano [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 7:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] MSSQL 7.0 and PHP


I'm using php to retrieve a Query from a SQLServer 7.0 database.

My code is this one:

$base = mssql_select_db($db,$conexion);

$sql=SELECT MarcasSolicitante FROM Marcas;

$result = mssql_query($sql,$conexion);

  while ($myrow = mssql_fetch_array($result))
  {
   $mensaje= $myrow[MarcasSolicitante];

   ?
pstrongfont size=4uMensaje:/u/strong nbsp nbsp/u font
size=3?echo $mensaje;? /font/a/P
hr




The problem is that the field MarcasSolicitante in the database is
VarChar(7000), and php receives a Char(255), what I'm I doing wrong? Isi
there any parameter I can modify in order to retrieve correctly the fields??

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 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] Matching strings in a flat/text file?

2001-10-22 Thread Nick Richardson

Hey everyone,

Anyone out there know how i could do this:

I have a client who is an import car tuner.  They would like to feature the
cars they work on in their website.  Instead of creating a new .html or .php
file for every car they add to include the background setup, and the general
content (type of car, owner, etc...) i want to put the information in to
text file and search for it in there.

So that's where i need help.  I want to be able to put the info into a text
file and pass the string to search for through the URL, then match
everything between that line and an ending line in the text file, and print
that out to the browser.

Example: I want to pass a string using the URL (blah.php?car=civic_si) then
search for ##civic_si in the text file, and print everything until it finds
##end.  So the text file will look like this:

##civic_si
This is my content, blah blah
##end

##nissan
This is more content... yadda yadda
##end

Any ideas on how i can do this???

//Nick Richardson
[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] Matching strings in a flat/text file?

2001-10-22 Thread Nick Richardson

Jack, thanks for the response:

I can use a database if really really needed.  The main reason for wanting
to use a flat file is for ease of update from the client's side.  They are
not technical in the least, and this will save me from having to update a
database everytime.

Although i guess i could write a front end to let them add stuff to the
database... but i'm lazy like that ;).

To do the 3 things you suggested, can you give me a code snippet to do that?

//Nick

-Original Message-
From: Jack Dempsey [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 10:20 PM
To: [EMAIL PROTECTED]; Nick Richardson
Subject: RE: [PHP] Matching strings in a flat/text file?


lots of ideas nick, but can you use a database? MySQL is free and i've found
its almost always better to use databases when you can...
if you can't, you could do something like this:
1. find the pos of the string you need using strpos
2. find the pos of the ending delimiter
3. substr from the first pos to the end (you'll need to add/subtract some
strlen's to slice off the delimiters as well...

jack

-Original Message-
From: Nick Richardson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 1:10 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Matching strings in a flat/text file?


Hey everyone,

Anyone out there know how i could do this:

I have a client who is an import car tuner.  They would like to feature the
cars they work on in their website.  Instead of creating a new .html or .php
file for every car they add to include the background setup, and the general
content (type of car, owner, etc...) i want to put the information in to
text file and search for it in there.

So that's where i need help.  I want to be able to put the info into a text
file and pass the string to search for through the URL, then match
everything between that line and an ending line in the text file, and print
that out to the browser.

Example: I want to pass a string using the URL (blah.php?car=civic_si) then
search for ##civic_si in the text file, and print everything until it finds
##end.  So the text file will look like this:

##civic_si
This is my content, blah blah
##end

##nissan
This is more content... yadda yadda
##end

Any ideas on how i can do this???

//Nick Richardson
[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 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]