[PHP] how to run php from the command line in Linux?

2002-08-13 Thread Jean-Christian Imbeault

How can I run a PHP program from the command line in linux?

I want to dosomething like:

#php prog.PHP

Jc


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




Re: [PHP] how to run php from the command line in Linux?

2002-08-13 Thread Jason Wong

On Tuesday 13 August 2002 14:41, Jean-Christian Imbeault wrote:
 How can I run a PHP program from the command line in linux?

 I want to dosomething like:

 #php prog.PHP

Manual - Using PHP from the command line

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

/*
How many weeks are there in a light year?
*/


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




Re: [PHP] how to run php from the command line in Linux?

2002-08-13 Thread Jean-Christian Imbeault

Jason Wong wrote:

 
 Manual - Using PHP from the command line


Thanks!

Now for a really dumb question. How do I compile PHP so that I can get a 
binary executable instead of an Apache module?

Jc


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




Re: [PHP] how to run php from the command line in Linux?

2002-08-13 Thread Jason Wong

On Tuesday 13 August 2002 15:12, Jean-Christian Imbeault wrote:
 Now for a really dumb question. How do I compile PHP so that I can get a
 binary executable instead of an Apache module?

./configure
make  make install

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

/*
Things are not always what they seem.
-- Phaedrus
*/


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




[PHP] printer_draw_text

2002-08-13 Thread Peter Bottenberg

Hi All,

I'm trying to print some date right out of an php file,
to do this i use the  printer_draw_text  function.
All works fine for one line, but how can i print more than one line?

When i put my text in a string, and try to print the string
it will print nice squares, but it will not print multiple lines.

I have read the manual, but no help there.

This works for one line:
$handle = printer_open();
printer_start_doc($handle, My Document);
printer_start_page($handle);

$font = printer_create_font(Helvetica,36,24,200,false,false,false,0);
printer_select_font($handle, $font);
printer_draw_text($handle, test, 10, 10);
printer_delete_font($font);

printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);

but when i try this, it will print squares (like unknown character)

$handle = printer_open();
printer_start_doc($handle, My Document);
printer_start_page($handle);

$font = printer_create_font(Arial,36,24,200,false,false,false,0);
printer_select_font($handle, $font);

$text = Hello,\nThis will be the second line;

printer_draw_text($handle, $text, 10, 10);
printer_delete_font($font);

printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);


Greetings
Peter




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




Re: [PHP] how to run php from the command line in Linux?

2002-08-13 Thread Jean-Christian Imbeault

Jason Wong wrote:

 
 ./configure
 make  make install


Thanks!

I also have PHP compiled as an apache module and need it. Will this 
overwrite anything needed by the PHP/apache module?

Jc


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




Re: [PHP] In version 4.2.1 ereg_replace break Apache

2002-08-13 Thread Marcello Lupo

Probably i missunderstand your question but this is my production build...
I discovered this problem yesterday after 2 week from the installation??
It is a problem that i had with the dialup_admin package to administer radius 
account via web, but i was thinking to be a problem of coding of the author 
of the package, so i left the problem there.
But now i have the error with my code.
Do you have any ideas?
Which difference there is between compiling wit --system-regex and without ? 
(may the problem reside there?).
Bye 
MArcello

On Monday 12 August 2002 21:10, Danny Shepherd wrote:
 Have you tried it on a non debug build?

 Danny

 - Original Message -
 From: Marcello Lupo [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, August 12, 2002 8:14 PM
 Subject: [PHP] In version 4.2.1 ereg_replace break Apache

  ## A simple function to remove consonant ##
  $temp=thisisatry;
  $temp=ereg_replace([BCDFGHJKLMNPQRSTVWXYZ],,$temp);
  echo $temp;
 
 
  I get :
 
  [Mon Aug 12 18:13:29 2002] [notice] child pid 16363 exit signal

 Segmentation

  fault (11)
  FATAL:  emalloc():  Unable to allocate 1087156712 bytes
 
  In apache logs.
 
 
  THis is my configure line:
 
  './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--enable-debug'
  '--enable- calendar' '--enable-ftp'
  '--with-imap=../imap-2001.BETA.SNAP-0107022325' '-- with-mcrypt'
  '--with-mhash' '--with-mysql=/usr' '--enable-memory-limit' '--
  enable-track-vars' '--with-zlib' '--with-pdflib'
  '--with-ttf=/usr/local/include' '-- with-jpeg-dir=/usr'
  '--with-tiff-dir=/usr' '--with-system-regex=yes' '--with-gettext'
  '--with-openssl' '--with-fdftk'

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




Re[2]: [PHP] Credit Card suggestions

2002-08-13 Thread Geoff Caplan

Mike,

Does anyone have any suggested method of scrambling a user's credit card
number before I stick it in a mysql database?

With respect, if you have to ask the question, you don't have the
technical skills to do this safely. In particular, there is no way to
keep the numbers secure if you are storing them on a machine which can
be accessed directly from the internet. Both your encryption keys and
your card numbers would have to be stored on a back-end machine
protected by a sophisticated firewall.

Payment gateway providers have to meet challenging standards and
undergo rigorous audits from the banks before they are allowed to
store numbers. Much your best solution is to use one of these
providers, who will store the card numbers for you. You can then do
all the transactions you require, such as repeats, refunds etc without
ever having to store the card number. Many providers offer the options
of using forms on their servers, or using your own SSL forms and
posting them the data using the SSL. With the CURL library, writing an
interface for this is relatively trivial.

Many countries (such as the UK where we operate) have laws about the
storage of credit cards on computer networks, so what you are planning
may even be illegal!

-- 
Geoff Caplan
Advantae Ltd

mailto:[EMAIL PROTECTED]
http://www.advantae.com


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




Re: [PHP] In version 4.2.1 ereg_replace break Apache

2002-08-13 Thread Marcello Lupo

Solved the problem.
I have recompiled php with --with-regex=system instead of --with-system-regex 
and the problem is disappeared.
Thanks anyway for help,
Bye Marcello


On Tuesday 13 August 2002 10:01, Marcello Lupo wrote:
 Probably i missunderstand your question but this is my production build...
 I discovered this problem yesterday after 2 week from the installation??
 It is a problem that i had with the dialup_admin package to administer
 radius account via web, but i was thinking to be a problem of coding of the
 author of the package, so i left the problem there.
 But now i have the error with my code.
 Do you have any ideas?
 Which difference there is between compiling wit --system-regex and without
 ? (may the problem reside there?).
 Bye
 MArcello

 On Monday 12 August 2002 21:10, Danny Shepherd wrote:
  Have you tried it on a non debug build?
 
  Danny
 
  - Original Message -
  From: Marcello Lupo [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, August 12, 2002 8:14 PM
  Subject: [PHP] In version 4.2.1 ereg_replace break Apache
 
   ## A simple function to remove consonant ##
   $temp=thisisatry;
   $temp=ereg_replace([BCDFGHJKLMNPQRSTVWXYZ],,$temp);
   echo $temp;
  
  
   I get :
  
   [Mon Aug 12 18:13:29 2002] [notice] child pid 16363 exit signal
 
  Segmentation
 
   fault (11)
   FATAL:  emalloc():  Unable to allocate 1087156712 bytes
  
   In apache logs.
  
  
   THis is my configure line:
  
   './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--enable-debug'
   '--enable- calendar' '--enable-ftp'
   '--with-imap=../imap-2001.BETA.SNAP-0107022325' '-- with-mcrypt'
   '--with-mhash' '--with-mysql=/usr' '--enable-memory-limit' '--
   enable-track-vars' '--with-zlib' '--with-pdflib'
   '--with-ttf=/usr/local/include' '-- with-jpeg-dir=/usr'
   '--with-tiff-dir=/usr' '--with-system-regex=yes' '--with-gettext'
   '--with-openssl' '--with-fdftk'

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




Re: AW: [PHP] image function

2002-08-13 Thread Nicholas Mercier

At 03:37 AM 8/13/2002 +0200, you wrote:
Hey there,

I created a set of scripts that did basically what you are looking to do.

THINGS TO CHECK:
1.   You may have a problem if you uncommented both DLL files.  Apache will 
complain when it tries to load two libraries with the same functions in them.

2.Make sure that the dll file is in the correct place.  It should match 
the extension directory listed in your php.ini file.

3.Additionally you may want to copy the DLL to your WINNT/SYSTEM 
directory (don't know why, but I've been told this helps.)

4.Stop and restart Apache

5. When uploading an image to be resized realize that the data may type 
image/pjpeg (progressive jpeg) and not image/jpeg (This caused my scripts 
to choke on me when checking image types for filtering purposes)

If PHP 4.2.2 doesn't support Jpeg then that is odd since I'm working with 
version 4.1.1 and I have no problems with my image scripts.

Feel free to reply if you'd like to show me your scripts or ask for 
additional clarification.

Nick

Hello,

I got the same Problem right yet. I´m using an create thumbnail library on
my website, but the class don't work on my computer and either not on my
webspace where i tested it too.

On my Computer there is installed Win2K with apache 2.0.35 and PHP 4.2.2. I
used both GDLibs wich came along with my PHP Package, but they both didn't
have support for Jpeg Images.

I'm running ill while I work on this shit. 'Cause I need to create to create
Thumbs from very large images, they're about 2.5 MB each. And right yet I
don't know some about performance and if it will work ever. Later the hole
site will run on an dedicated Linux machine. But I'm not the super pro on
installing and compiling packages on a linux systems. And it would be nice
if i could test the scripts on my WinNT 5 machine.

Please tell me what you found out yet! - I got a very nice image creation
library, wich is under GPL. I'm going to send it soon to ya if you want it.

Thanks

Schura

-Ursprüngliche Nachricht-
Von: NoWhErEMan [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 12. August 2002 15:50
An: [EMAIL PROTECTED]
Betreff: Re: [PHP] image function


Thank you Jay, Yup my apache is on Windows : )
Let's me try first.
Jay Blanchard [EMAIL PROTECTED] ¼¶¼g©ó¶l¥ó·s»D
:002301c24201$b28caf00$[EMAIL PROTECTED]
  [snip]
  I known i need to install a lot of staffs to get all the functions
works(GD
  Lib, FreeType Lib, libjpeg, libpng, zlibetc etc).
  But i only need a few of them, so if i just load the php_gd.dll, what
  functions included?? I canr found any information about that.
  And one more, does php_gd2.dll also a GD lib?
  [/snip]
 
  The DLL is a Windows library AFAIR, and contains the GD functions when
  included on a Windows server. You do not have to enable this extension on
an
  Apache server (unless it is Apache on Windows). You just have to make sure
  that PHP is compiled with all of the proper libraries for your use of GD.
 
  As for the second DLL, I am not sure. I haven't done a lot of Windows GD
  installations, it does not look familiar.
 
  HTH!
 
  Jay
 
 



--
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] Removing session id from url when using session_set_save_handler

2002-08-13 Thread Per

Hi

Does anybody know how to get rid of the session id in the url when using 
session_set_save_handler. There is a user note in the online manual 
saying that you have to set the cookie manual to accomplish this but it 
doesn't mention how! I've tested some combinations but I can't get it to 
work.

/Per


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




Re: [PHP] security login

2002-08-13 Thread Nicholas Mercier

At 04:12 PM 8/12/2002 +0100, Pag wrote:
Here is my humble, but relatively effective solution for a low security site.

Create a file called security.php and require it at the head of every 
secure page.  This is the one I use.

?
session_start();
if(!session_is_registered(userinfo))
{
 echo h1You are not logged in.  Please do so./h1BR;
 echo a href=\login.php\Login Here/a;
 exit;
}
else
{
 echo You are currently logged in as: $userinfo[name] BR;
 echo If you are not $userinfo[name] please a 
href=\logout.php\Logout/a.BR Thank you.BRBR;
}
?

All you need your log in script to do is check the user name and password 
against what is stored in the database and register a session.

You can store lots of useful information in the session as well.  I find it 
useful if you want to give different users different permission 
levels.  That way you can late check the session data to see if they have 
permission to update the news, or publish an article.

Nick


 Well, first off sory for a very basic question, but i really dont 
 know where else to look for the answer. Heres my dilemma:

 I need to code a backend for this site i am building, the backend 
 will manage the news for the front page. The database stuff is pretty 
 straight forward (so far!), but i need to validate who does the managing, 
 i mean, some sort of login for only a few people. I am thinking of using 
 username/pass from a table and all that but the thing is, how do i do the 
 validating itself? Sure i know how to check for valid user/pass, but then 
 what happens for the rest of the pages inside the backend, how do i keep 
 the user validated and make sure only he can browse inside that secure 
 mini site?
 Dont know if i am explaining things right, hmm, ok, any of you 
 guys are familiar with gryematter? It validates the user at the start and 
 then we can do whatever we want inside. I want to prevent users from 
 skipping the login and just typing the other page url and go on from there.
 I use sessions, cookies? what? can you provide me with some urls 
 for my research, or at least what to look for?
 Thanks a lot, really appreciate all the help.

 Pag



--
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] Help with output from system() or backticks

2002-08-13 Thread David Drewelow

I need to read (and parse) some text-list output from an executable, but 
the output to the PHP script is limited to the first couple of lines.  
Running from the command line works fine, and I get the complete output in 
Perl.

Essentially:
$output = array (system($executable $param));
print_r($output);

I've tried various functions (backticks, passthru, etc), and they all seem 
to have the same problem.  I also tried executing the app and piping it to 
a text file, but the text file ends at the same point (after the first 
couple of lines).  I'm wondering whether there is something in the PHP 
interpreter that thinks the app has finished before it has (there's no 
discernable lag-time), or if there's some trick to getting output using 
these functions.

Any help would be appreciated.

Thanks,

-David

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




[PHP] fruity arrays

2002-08-13 Thread Roger Thomas

i have these arrays:

$A_fruit_list = array('A1' = 'Fruit A1',
  'A2' = 'Fruit A2',
 );

$B_fruit_list = array('B1' = 'Fruit B1',
  'B2' = 'Fruit B2',
 );

then i do these:

$var = B;
$var_list = $var._fruit_list;

//Note: variable variable below
$fruit_array_of_choice = ${$var_list};
$FRUIT_code = array_keys($fruit_array),
$FRUIT_name = array_values($fruit_array),

which generates these warnings:
Warning: First argument to array_keys() should be an array in
/home/httpd/vhost/home/fruits.php on line 14

Warning: Argument to array_values() should be an array in
/home/httpd/vhost/home/ureg/fruits.php on line 15

how do i script around that ?

--
roger

__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

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




RE: [PHP] fruity arrays

2002-08-13 Thread Richard Black

snip
$A_fruit_list = array('A1' = 'Fruit A1',
  'A2' = 'Fruit A2',
 );

$B_fruit_list = array('B1' = 'Fruit B1',
  'B2' = 'Fruit B2',
 );

then i do these:

$var = B;
$var_list = $var._fruit_list;

//Note: variable variable below
$fruit_array_of_choice = ${$var_list};
$FRUIT_code = array_keys($fruit_array),
$FRUIT_name = array_values($fruit_array),
/snip

Shouldn't the parameter to array_keys (and obviously array_values too)
be $fruit_array_of_choice, and not just $fruit_array???

That might stop the warnings...

HTH,

Richy
==
Richard Black
Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com
Tel: 0141 435 3504
Email: [EMAIL PROTECTED] 


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




Re: [PHP] Scheduler, Staff Directory, Work tracker

2002-08-13 Thread Paul Dionne

Um yes, well the issue is not learning it is time.  I am on an assignment 
here for only 4 more months and I have another project to do.  There is no 
point in starting from scratch.

I will check the web sites you suggested.

Paul

Justin French wrote:

 on 12/08/02 5:59 PM, Paul Dionne ([EMAIL PROTECTED]) wrote:
 
 Good morning everyone!
 
 Our organization is in need of a Scheduling program for meeting rooms. 
 The program doesn't need to be very complicated...five or six rooms,
 outputs a
 list of rooms available for the time the user enters.  We would put it on
 our intranet.
 
 see below
 
 We could also use a basic staff directory program: Outputs Name,
 Extension,
 email, position... maybe even a picture.  We would put it on our web
 site.
 
 This is just a modification of a contact database.  Nearly every PHP 
 MySQL beginners tutorial starts with a simple contact database which you
 can modify to suit.
 
 I'd really advise actually learning a bit of this stuff, rather than
 grabbing something pre-built.  End of the day, nothing will have *exactly*
 the features you need (now, or the future), and learning a little about
 the two languages will help you build the meeting room program, which no
 harder to build than the contact database.
 
 I think phpbuilder.net, sitepoint.com, phpbeginner.com and a few others
 are bound to have something you should use as a starting point.
 
 
 Lastly, we could use something to keep track of our workflow program
 otherwise referred to as a strategic plan.
 
 Workflow IS a more complex application.
 
 
 Have a look around at places like sourceforge.net for simular
 applications. Again, having a little bit of knowledge from your work with
 contact database and meeting room schedules will help you to modify these
 apps to suit.


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




Re: [PHP] Php lib?

2002-08-13 Thread John Wards

Thanks for that rather handy!

Does anyone know what the function set_var() does in template.inc in phplib?
I persume it has something to do with the template system.but thats as
much as I have figured out!!

I am going to replace the phplib template system with Smarty there is not a
converter for this(wishful thinking! anything for an easy life)

My boss set me this task before he went on holiday...I am sure he is bloody
laghing his socks off right now! I wondered why he never bothered porting
this for PHP4!

Arrgh!

John
  Anyone got any handy hints on how to convert scripts running
  on PHP3 and
  PHPlib?

 1. Roughly speaking, page_open() goes to session_start():

 Old:
 page_open(array(sess = my_web_Session));

 New:
 session_start();

 2. page_close() goes away; if you don't have time to remove all those
calls,
 write your own page_close() function that simply returns true.

 3. Use functions instead of methods for managing the session variables.
For
 example, for the object $sess created in step 1 above:

 Old:
 $sess-register('firstName');

 New:
 session_register('firstName');

 Brings back fond memories - not! ;)

 Kirk

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


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




Re: [PHP] Php lib?

2002-08-13 Thread Andrey Hristov

Hi,
sets the value of the var to be parsed later.

HTH

Andrey

- Original Message -
From: John Wards [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 13, 2002 12:58 PM
Subject: Re: [PHP] Php lib?


 Thanks for that rather handy!

 Does anyone know what the function set_var() does in template.inc in
phplib?
 I persume it has something to do with the template system.but thats as
 much as I have figured out!!

 I am going to replace the phplib template system with Smarty there is not
a
 converter for this(wishful thinking! anything for an easy life)

 My boss set me this task before he went on holiday...I am sure he is
bloody
 laghing his socks off right now! I wondered why he never bothered porting
 this for PHP4!

 Arrgh!

 John
   Anyone got any handy hints on how to convert scripts running
   on PHP3 and
   PHPlib?
 
  1. Roughly speaking, page_open() goes to session_start():
 
  Old:
  page_open(array(sess = my_web_Session));
 
  New:
  session_start();
 
  2. page_close() goes away; if you don't have time to remove all those
 calls,
  write your own page_close() function that simply returns true.
 
  3. Use functions instead of methods for managing the session variables.
 For
  example, for the object $sess created in step 1 above:
 
  Old:
  $sess-register('firstName');
 
  New:
  session_register('firstName');
 
  Brings back fond memories - not! ;)
 
  Kirk
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php


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




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




RE: [PHP] Help with output from system() or backticks

2002-08-13 Thread Shawn Sellars

Have you tried it like this?

$output = `$executable $param`;
$output = explode(\n,$output);
print_r($output);

It works for me!  I get the same weird response as you when I try to
create the array directly off of the system call.

Good Luck,
Shawn Sellars

-Original Message-
 Essentially:
$output = array (system($executable $param));
print_r($output);


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




Re: [PHP] Php lib?

2002-08-13 Thread John Wards

Again ta!

I had sort of figured it out while waiting for someone to get back to
me.

Mental note..must learn objects.no argh

John

 Hi,
 sets the value of the var to be parsed later.

 HTH

 Andrey

 - Original Message -
 From: John Wards [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, August 13, 2002 12:58 PM
 Subject: Re: [PHP] Php lib?


  Thanks for that rather handy!
 
  Does anyone know what the function set_var() does in template.inc in
 phplib?
  I persume it has something to do with the template system.but thats
as
  much as I have figured out!!
 
  I am going to replace the phplib template system with Smarty there is
not
 a
  converter for this(wishful thinking! anything for an easy life)
 
  My boss set me this task before he went on holiday...I am sure he is
 bloody
  laghing his socks off right now! I wondered why he never bothered
porting
  this for PHP4!
 
  Arrgh!
 
  John
Anyone got any handy hints on how to convert scripts running
on PHP3 and
PHPlib?
  
   1. Roughly speaking, page_open() goes to session_start():
  
   Old:
   page_open(array(sess = my_web_Session));
  
   New:
   session_start();
  
   2. page_close() goes away; if you don't have time to remove all those
  calls,
   write your own page_close() function that simply returns true.
  
   3. Use functions instead of methods for managing the session
variables.
  For
   example, for the object $sess created in step 1 above:
  
   Old:
   $sess-register('firstName');
  
   New:
   session_register('firstName');
  
   Brings back fond memories - not! ;)
  
   Kirk
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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




RE: [PHP] HTML issue... spaces in between images

2002-08-13 Thread Ford, Mike [LSS]

 -Original Message-
 From: Michael Zornek [mailto:[EMAIL PROTECTED]]
 Sent: 13 August 2002 02:26
 
 Ok so in my HTML I have:
 
 img src=img/tab_1l.gif width=9 height=24
 img src=img/home_on.gif width=80 height=24
 img src=img/tab_10.gif width=15 height=24

[]

 anyone know of a way to tell  html to ignore these spaces?

Well, the obvious one is HTML comments, since that's the way to tell HTML to
ignore anything:

   img src=img/tab_1l.gif width=9 height=24!--
   --img src=img/home_on.gif width=80 height=24!--
   --img src=img/tab_10.gif width=15 height=24

Another technique I use quite a bit is newlines *inside* the HTML tags,
thus:

   img
src=img/tab_1l.gif width=9 height=24img
src=img/home_on.gif width=80 height=24img
src=img/tab_10.gif width=15 height=24

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




[PHP] controls list menu

2002-08-13 Thread kale

hy,
I have a list menu:

select name=select
option value=oneone/option
option value=twotwo/option
option value=threethree/option
  /select

I want when I select value two my page reloads and 
it prints You selected value TWO. 
How can I do this?

thx 
kale.



Re: [PHP] controls list menu

2002-08-13 Thread Justin French

It's a javascript thing.  Try the newsgroup comp.lang.javascript

Justin French



on 13/08/02 8:13 PM, kale ([EMAIL PROTECTED]) wrote:

 hy,
 I have a list menu:
 
 select name=select
 option value=oneone/option
 option value=twotwo/option
 option value=threethree/option
 /select
 
 I want when I select value two my page reloads and
 it prints You selected value TWO.
 How can I do this?
 
 thx 
 kale.
 


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




[PHP] Re: controls list menu

2002-08-13 Thread Peter Bottenberg

Hy,

Save this script as select.php

?PHP

if (!isset($action))
{
  $action = select;
}

if ($action == select )
{
  ?
  form method=post action=select.php
  select name=select onChange=this.form.submit()
option value=oneone/option
option value=twotwo/option
option value=threethree/option
  /select
  input type=hidden name=action value=display
  /form
  ?
}

if ($action == display)
{
  ?
  You selected value ?=$select?
  ?
}

?

Greetings
Peter

-



Kale [EMAIL PROTECTED] schreef in bericht
00aa01c242b2$1dc496b0$7800a8c0@leonard">news:00aa01c242b2$1dc496b0$7800a8c0@leonard...
hy,
I have a list menu:

select name=select
option value=oneone/option
option value=twotwo/option
option value=threethree/option
  /select

I want when I select value two my page reloads and
it prints You selected value TWO.
How can I do this?

thx
kale.




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




RE: [PHP] HTML issue... spaces in between images

2002-08-13 Thread James Green

On Tue, 2002-08-13 at 02:29, Matt Babineau wrote:
 TABLE
   TR
 TDIMG SRC=/images/image.gif/TD
 TDIMG SRC=/images/image.gif/TD
 TDIMG SRC=/images/image.gif/TD
 TDIMG SRC=/images/image.gif/TD
   /TR
 /TABLE

Which leads to other mysterious gaps (that are again part of the HTML
spec), the fix is provided here:

http://developer.netscape.com/evangelism/docs/articles/img-table/

James




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




Re: [PHP] include require directive

2002-08-13 Thread James Green

On Tue, 2002-08-13 at 02:55, Huy wrote:
 But I do...
 
 If I left out the require statement all is well.. or I copy the whole
 content of the included file.. it works fine. The problem is the require
 statement.

Check the file for whitespace, anything outside ?..?php or
spaces/blank lines above your first ?php in any of your files.

James.



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




Re: [PHP] N6: PHP files can't show source

2002-08-13 Thread James Green

On Tue, 2002-08-13 at 05:04, Jean-Christian Imbeault wrote:
 I'm using Netscape 6.2 and whenever I load one of my .php files I can't 
 get Netscape to show source. I don't have that problem with IE.
 
 Can anyone tell me how to configure Netscape so that I can view the HTML 
 output of my PHP files?

You may be seeing a problem that affected Mozilla prior to 1.0 release.
When it got a page as a result of a POST it wouldn't cache the result to
disk, which is where the View Source got it's data from. Something like
this may be affecting you.

Try it with Netscape 7 or Mozilla 1.0.

James




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




Re: [PHP] Re: controls list menu

2002-08-13 Thread James Green

On Tue, 2002-08-13 at 11:35, Peter Bottenberg wrote:
 Hy,
 
 Save this script as select.php
 
 ?PHP

- $action = $_POST[action];

 if (!isset($action))
 {
   $action = select;
 }

[ snip rest ]

Sorry, but the PHP irc channel is full of people asking why form
variables can't be seen by PHP for this reason.

James




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




[PHP] Session variable problem

2002-08-13 Thread Christian Ista

Hello,

I'd like to use session variable.

I do that (see below) but I receive an error. Other question, how can I do
to know if a session variable is already defined ?

?php session_start()?
?php$_SESSION[LG] = 'EN';?
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
head
 titletitle
/head
body
/body
/html

But I receive this error :
Parse error: parse error, unexpected T_VARIABLE in
d:\inetpub\wwwroot\test\index.php on line 2

thanks,
Christian,





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




[PHP] PHP lib again

2002-08-13 Thread John Wards

Sorry to bother folks again but I have a few phplib questions again.

set_file() what does this do and would this be display() in smarty?

set_block() this one is baffeling me...can't think what it woudl be in
smarty!

parse() now is this display in smarty...oh me head...

p() argh is this display()!!

Thanks for any help!

John







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




Re: [PHP] Session variable problem

2002-08-13 Thread Christian Ista

 Add a missing space.

ok thanks :)

How use this variable in a query (mysql_query) ?

Is it possible if a session variable is already defined ?

Bye



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




[PHP] PHP and Memory...

2002-08-13 Thread MyBox

Hello!

I have a question:

In my PHP-script i have created a function with many calculation and
variables in the function.

example:
function testfunc($var1,$var2)
{
...many calculation and variables
return $result;
}

When i call the function they will work correktly - no errors, no warnings.

Just when i call the function 15 times in serial

example:
echo testfunc(100,200);
echo testfunc(100,200);
echo testfunc(100,200);
.
.
.
echo testfunc(100,200);

then on call number 12 the script exits whith error-message:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 257 bytes) in /home/www/linkdir/oslib.php on line 203

And now my question:
When i call a function and the function come to an end - is PHP not
giving free the allocated memorie for this funktion?

Must i giving free the memory at hand?

When i in the function before its end give all vars free with unset(); then
the error also comes
on the same place.

How can i find out on which place i must modify my code that the error not
appear?

Can i unset() a complete function on his end?

What can i do?

Greethings Oliver Gehring
Germany
(please sorry for my bad english)




[PHP] Creating a zip file using php

2002-08-13 Thread Rahul

Hi

I want to create a zip file using php. Can this be done?

If anybody has a code snippet, for this, or any guidelines, please send it
to me.

Rahul




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




Re: [PHP] HTML issue... spaces in between images

2002-08-13 Thread Brent Baisley

Try adding border=0 to each one. Some browsers would render your code 
as is without spaces, some will not. They are all supposed render it 
without spaces, and I think all the latest versions of the browser do. 
It's the older ones you have to worry about.
Also, do you have a DOCTYPE declaration as your first line in all your 
documents? If you don't, then even the newer browsers will fall back 
into compatible mode, which usually means supporting the bugs that 
existed in older versions.

Check out www.alistapart.com, www.webmonkey.com, or www.webreference.com 
for info on DOCTYPE and style sheets. I do remember reading an article 
specifically discussing the problem you are experiencing.


On Monday, August 12, 2002, at 09:26 PM, Michael Zornek wrote:

 Ok so in my HTML I have:

 img src=img/tab_1l.gif width=9 height=24
 img src=img/home_on.gif width=80 height=24
 img src=img/tab_10.gif width=15 height=24

 but because they are on separate lines with spaces, I get spaces 
 rendered on
 the screen. If I write the code like:

 img src=img/tab_1l.gif width=9 height=24img 
 src=img/home_on.gif
 width=80 height=24img src=img/tab_10.gif width=15 height=24

 I get no spaces but it's harder to read 

 anyone know of a way to tell  html to ignore these spaces?

 I could in theory do something like this in PHP:

 $buffer .= '
 img src=img/tab_1l.gif width=9 height=24
 img src=img/home_on.gif width=80 height=24
 img src=img/tab_10.gif width=15 height=24
 ';

 $buffer = someFunction($buffer);
 // this function kills all spaces and new lines in between  and  
 chars

 but it seems like kind of a hassle for readability.

 Please help.

 ~ Mike
 --
 Mike Zornek | Project Leader
 Apple Student Developers
 The Insanely Great Site with the Insanely Long URL
 http://www.applestudentdevelopers.org

 Personal Site:
 http://www.mikezornek.com

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


--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


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




RE: [PHP] Creating a zip file using php

2002-08-13 Thread Matt Schroebel

 From: Rahul [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, August 13, 2002 8:41 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Creating a zip file using php
 
 
 Hi
 
 I want to create a zip file using php. Can this be done?
 
 If anybody has a code snippet, for this, or any guidelines, 
 please send it
 to me.

Try reading the manual about zip files, especially the user notes.

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




[PHP] radio value

2002-08-13 Thread adi

hi:
i have 2 file: file1.php, file2.php
in file2.php i have:

echo form name='popupform' 
echo input type=text name=cod value='$cod'nbsp;
echo Alege sistemul:  input type=button name=choice value='alege' 
onClick=window.open('file1.php','popuppage','width=450, 
height=400,top=100,left=100,scrollbars=yes');br;
echo /form;
.

in file1.php:
.
!-- Begin
function sendValue(s){
//var selvalue = s.options[s.selectedIndex].value;
var selvalue = s;
window.opener.document.popupform.cod.value = selvalue;
window.close();
}
//  End --
/script
/HEAD
BODY

center
form name=selectform
 echo input type='radio' value='1' name='selectmenu';
echo input type='radio' value='2' name='selectmenu';
echo input type='radio' value='3' name='selectmenu';
input type=button value=select onClick=sendValue(this.form.selectmenu.value);
/form
..

Problem is with radio group value. I select an item in radiogroup box, and when i 
click on select button, value passed to cod textbox is undefined.
How to make cod.value to take selected radio value?
tx in adv for any help
adi



RE: [PHP] Creating a zip file using php

2002-08-13 Thread Rudolf Visagie

The following zip creation class by Eric Mueller works well:

?php 

/* 

Zip file creation class 
makes zip files... 

use the functions add_dir() and add_file() to build the zip file; 
see example code below 


by Eric Mueller, [EMAIL PROTECTED], http://www.themepark.com 

BASED ON zip file creation class 
FOUND AT http://www.zend.com/codex.php?id=470single=1 
BY denis125 ([EMAIL PROTECTED]) 

*/ 

// official ZIP file format: http://www.pkware.com/appnote.txt 

class zipfile  
{  

var $datasec = array(); // array to store compressed data 
var $ctrl_dir = array(); // central directory   
var $eof_ctrl_dir = \x50\x4b\x05\x06\x00\x00\x00\x00; //end of Central
directory record 
var $old_offset = 0; 

function add_dir($name)   

// adds directory to archive - do this before putting any files in
directory! 
// $name - name of directory... like this: path/ 
// ...then you can add files using add_file with names like
path/file.txt 
{  
$name = str_replace(\\, /, $name);  

$fr = \x50\x4b\x03\x04; 
$fr .= \x0a\x00;// ver needed to extract 
$fr .= \x00\x00;// gen purpose bit flag 
$fr .= \x00\x00;// compression method 
$fr .= \x00\x00\x00\x00; // last mod time and date 

$fr .= pack(V,0); // crc32 
$fr .= pack(V,0); //compressed filesize 
$fr .= pack(V,0); //uncompressed filesize 
$fr .= pack(v, strlen($name) ); //length of pathname 
$fr .= pack(v, 0 ); //extra field length 
$fr .= $name;  
// end of local file header segment 

// no file data segment for path 

// data descriptor segment (optional but necessary if archive is
not served as file) 
$fr .= pack(V,$crc); //crc32 
$fr .= pack(V,$c_len); //compressed filesize 
$fr .= pack(V,$unc_len); //uncompressed filesize 

// add this entry to array 
$this - datasec[] = $fr; 

$new_offset = strlen(implode(, $this-datasec)); 

// ext. file attributes mirrors MS-DOS directory attr byte, detailed

// at http://support.microsoft.com/support/kb/articles/Q125/0/19.asp


// now add to central record 
$cdrec = \x50\x4b\x01\x02; 
$cdrec .=\x00\x00;// version made by 
$cdrec .=\x0a\x00;// version needed to extract 
$cdrec .=\x00\x00;// gen purpose bit flag 
$cdrec .=\x00\x00;// compression method 
$cdrec .=\x00\x00\x00\x00; // last mod time  date 
$cdrec .= pack(V,0); // crc32 
$cdrec .= pack(V,0); //compressed filesize 
$cdrec .= pack(V,0); //uncompressed filesize 
$cdrec .= pack(v, strlen($name) ); //length of filename 
$cdrec .= pack(v, 0 ); //extra field length   
$cdrec .= pack(v, 0 ); //file comment length 
$cdrec .= pack(v, 0 ); //disk number start 
$cdrec .= pack(v, 0 ); //internal file attributes 
$ext = \x00\x00\x10\x00; 
$ext = \xff\xff\xff\xff;  
$cdrec .= pack(V, 16 ); //external file attributes  - 'directory'
bit set 

$cdrec .= pack(V, $this - old_offset ); //relative offset of
local header 
$this - old_offset = $new_offset; 

$cdrec .= $name;  
// optional extra field, file comment goes here 
// save to array 
$this - ctrl_dir[] = $cdrec;  

 
} 


function add_file($data, $name)   

// adds file to archive   
// $data - file contents 
// $name - name of file in archive. Add path if your want 

{  
$name = str_replace(\\, /, $name);  
//$name = str_replace(\\, , $name); 

$fr = \x50\x4b\x03\x04; 
$fr .= \x14\x00;// ver needed to extract 
$fr .= \x00\x00;// gen purpose bit flag 
$fr .= \x08\x00;// compression method 
$fr .= \x00\x00\x00\x00; // last mod time and date 

$unc_len = strlen($data);  
$crc = crc32($data);  
$zdata = gzcompress($data);  
$zdata = substr( substr($zdata, 0, strlen($zdata) - 4), 2); // fix
crc bug 
$c_len = strlen($zdata);  
$fr .= pack(V,$crc); // crc32 
$fr .= pack(V,$c_len); //compressed filesize 
$fr .= pack(V,$unc_len); //uncompressed filesize 
$fr .= pack(v, strlen($name) ); //length of filename 
$fr .= pack(v, 0 ); //extra field length 
$fr .= $name;  
// end of local file header segment 
 
// file data segment 
$fr .= $zdata;  

// data descriptor segment (optional but necessary if archive is
not served as file) 
$fr .= pack(V,$crc); //crc32 
$fr .= pack(V,$c_len); //compressed filesize 
$fr .= pack(V,$unc_len); //uncompressed filesize 

// add this entry to array 
$this - datasec[] = $fr; 

$new_offset = strlen(implode(, $this-datasec)); 

// now add to central directory record 
$cdrec = 

[PHP] question concerning php parsing

2002-08-13 Thread Randy Johnson

if i have functions.php with 10 functions in it and include the file in my
main php file and call  1 of the 10 functions in my program does the whole
functions.php have to be parsed or does it just include the function that is
needed.

I am just curious as  I plan to use the phpa on my scripts and if I don't
need all those functions to be in memory just the function that i call.

Hope i did not confuse anybody.

Randy



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




Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION - cont.

2002-08-13 Thread Petre Agenbag

Rasmus
OK, I think I understand the principle now, yet, when I implement id, my
app still fails.
I have register_golbals = on, BUT, I want to find a way to code that I
know will always work, regardless of register_globals or cookies, so
that I am only dependant on the trans-sid ( but If I could rule that out
too, it would be even better)

How do you write your apps so you know that they will work on most
configurations? I have a bunch of older apps that will definately break
if I upgrade the server and turn register_globals off, and I want to
prevent it from happening with new apps I write now.


With what you said below, can I assume that:
1) If I know all the variables that I will need to be session variables,
I can session_register() them all on the first page, and then simply
give them values during the normal flow of the app?

I have tried to implement what you said below in my app as follow,
basically the route is:
Login form -- action page:
action page links to another form page
form page -- action page

All these pages are supposed to be part of the session, but between the
last two pages, the session disappears, and the form doesn't pass
variables...

I'm so utterly fed-up with myself for not being able to get this right. 
Can you see ANYTHING that might cause this?


index.php
?php
session_start();
?

form name=form1 method=post action=admin_select.php
  table border=0 cellspacing=0 cellpadding=0
tr bgcolor=#CFCFCF
  td colspan=2Admin Login
  /td
/tr
tr
  tdUsername:
  /td
  tdinput type=text name=user_name 
  /td
/tr
tr
  tdPassword:
  /td
  tdinput type=text name=pass_word 
  /td
/tr
tr
  td
input type=submit name=Submit4 value=Submit
  /td
/tr
  /table
/form

Then: 
admin_select.php

?php
session_start();
if ((!$HTTP_SESSION_VARS[username]) 
(!$HTTP_SESSION_VARS[password])) {
session_register(username,password);
}
if (($HTTP_POST_VARS[user_name])  ($HTTP_POST_VARS[pass_word])) {

$username =  $HTTP_POST_VARS[user_name];
$password =  $HTTP_POST_VARS[pass_word];

}
/* Not sure if my logic above works, trying to check if the person is
coming back via a link or from the from for the first time; I'm not sure
what could happen if you session_register a variable twice??? */

$link = mysql_connect(localhost,$username,$password) or die
('Could not connect!');
mysql_select_db(mafisa,$link);
$sql = select * from project_table order by id;
$result = mysql_query($sql);
?
 form action=admin_select_document.php method=POST
enctype=multipart/form-data
  table border=1
  tr
td colspan=2 bgcolor=CFCFCFAdmin Interface/td
  /tr
  tr
td colspan=2Please select Project to work with/td
  /tr
  tr
td colspan =2
?php
if (mysql_num_rows($result)) {
echo select name=\sess_id_project\;
while ($myrow = mysql_fetch_assoc($result)) {
$sess_project_name = $myrow[project_name];
$sess_project_id = $myrow[id];
echo 'option
value='.$sess_project_id.''.$sess_project_name;
}
echo '/select';
echo '/td';
echo '/tr';
echo 'tr';
echo 'td colspan=2input type=submit name=submit 
value=Go!/td';
echo '/tr';
echo '/form';
} else {
echo 'biThere are currently no Projects on the system,';
echo 'please use the section below to add one/i/b';
echo '/td';
echo '/tr';
echo '/form';
}


echo 'trtd colspan=2 bgcolor=00/td/tr

  tr
td colspan=2 bgcolor=CFCFCFa href=admin_add_project.phpAdd
a new Project/a/td
  /tr

/table';

?


This second page has two routes to go, either you select the document
from the drop_down, or you can add a new project, It is with the
second route that I pick up further problems:

admin_add_project.php

?php
 session_start();
echo '
form action=admin_add_project_do.php method=POST
enctype=multipart/form-data
  table
  tr
td colspan=2 bgcolor=CFCFCFMafisa Admin Interface/td
  /tr
  tr
tdNew Project Name/td
tdinput type=text name=project_name_add/td
  /tr
  tr
tdProject Descriptions/td
tdtextarea name=project_description_add/textarea/td
  /tr
  tr
td colspan=2input type=submit name=submit
value=Save/td
  /tr
/table
/form
';
?

Now, on this last page that is supposed to insert the form data into the
db, there is simply no form data, or session variables!

admin_add_project_do.php
?php
session_start();
$date = date('Y-m-d');
$link =
mysql_connect('localhost',$HTTP_SESSION_VARS[username],$HTTP_SESSION_VARS[password])
 or die ('Could not connect!');
mysql_select_db('mafisa',$link);
$project_name_db =
addslashes($HTTP_POST_VARS[project_name_add]);
$project_description_db =

[PHP] PHP 4.2.2 and Apache 2

2002-08-13 Thread MET

So how stable are they?  I'm not running a production server, but a
development server.  Everything coming off of this box goes directly to
a production server.

~ Matthew 

 
/**
 
  Matthew Metnetsky
 
  [EMAIL PROTECTED]
 
**/


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




[PHP] Variable naming standards???

2002-08-13 Thread Gerard Samuel

A philosophical question
Are there any standards to naming variables??
I was told that one should include a letter or combination of letters to 
describe a variable
i.e.
$sfoo = 'string';  // string
$bfoo = true;  // bool
$nfoo = 10;  // interger

etc

Thanks

-- 
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/



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




RE: [PHP] Variable naming standards???

2002-08-13 Thread Jay Blanchard

[snip]
A philosophical question
Are there any standards to naming variables??
I was told that one should include a letter or combination of letters to
describe a variable
i.e.
$sfoo = 'string';  // string
$bfoo = true;  // bool
$nfoo = 10;  // interger
[/snip]

http://ootips.org/hungarian-notation.html

Hungarian notation was conceived so that variable types would be easily
identifiable in code. YMMV

Jay



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




RE: Re[2]: [PHP] Credit Card suggestions

2002-08-13 Thread César Aracena

Mike,

I agree with the things that Geoff is telling you. What I have seen in
the past and even in some free PHP programs that I downloaded for
learning purposes, is the CC number stored in your database but not
entirely. I mean like 1234789 so the customer can verify that
the transaction will be made using the right CC and not an old one or
even someone else CC.

HTH, C.

 -Original Message-
 From: Geoff Caplan [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 13, 2002 5:20 AM
 To: Mike Mannakee; [EMAIL PROTECTED]
 Subject: Re[2]: [PHP] Credit Card suggestions
 
 Mike,
 
 Does anyone have any suggested method of scrambling a user's credit
card
 number before I stick it in a mysql database?
 
 With respect, if you have to ask the question, you don't have the
 technical skills to do this safely. In particular, there is no way to
 keep the numbers secure if you are storing them on a machine which can
 be accessed directly from the internet. Both your encryption keys and
 your card numbers would have to be stored on a back-end machine
 protected by a sophisticated firewall.
 
 Payment gateway providers have to meet challenging standards and
 undergo rigorous audits from the banks before they are allowed to
 store numbers. Much your best solution is to use one of these
 providers, who will store the card numbers for you. You can then do
 all the transactions you require, such as repeats, refunds etc without
 ever having to store the card number. Many providers offer the options
 of using forms on their servers, or using your own SSL forms and
 posting them the data using the SSL. With the CURL library, writing an
 interface for this is relatively trivial.
 
 Many countries (such as the UK where we operate) have laws about the
 storage of credit cards on computer networks, so what you are planning
 may even be illegal!
 
 --
 Geoff Caplan
 Advantae Ltd
 
 mailto:[EMAIL PROTECTED]
 http://www.advantae.com
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



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




[PHP] Sessions in a database?

2002-08-13 Thread Randy Johnson

When i started to learn php there was talk of storing session information in
a database rather than in a particular directory like /tmp

Is it better to store the session data in a database rather than a
directory?   Is it faster if it is stored in the database?

Randy



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




Re: [PHP] Re: controls list menu

2002-08-13 Thread kale

hy, I have next lines of code:
1.
  form method=post action=leadview.php
  select name=viewleads onChange=this.form.submit(viewleads)
option value=AOLAll Open Leads/option
option value=MULMy Unread Leads/option
option value=RVLRecently Viewed Leads/option
option value=TLToday's Leads/option
   /select
   /form
2.
form method=post action=?$PHP_SELF?
div align=rightfont face=Tahoma size=1Select
One:/font
  select name=keyleads onChange=this.form.submit()
option value=My Unread Leads?if($keyleads==My Unread
Leads){
print selected;}?My Unread Leads/option
option value=Recently Created?if($keyleads==Recently
Created){
print selected;}?Recently Created/option
option value=Recently Viewed?if($keyleads==Recently
Viewed){
print selected;}?Recently Viewed/option
  /select
/div
/form

both forms are in same page. second form it works fine without problems.
first form it works with one exception. If select All Open Leads don't
happend anything
For rest of values it works.
For example if select My Unread Leads I see page leadview.php.
What is it wrong?

kale

- Original Message -
From: Peter Bottenberg [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 13, 2002 1:35 PM
Subject: [PHP] Re: controls list menu


 Hy,

 Save this script as select.php

 ?PHP

 if (!isset($action))
 {
   $action = select;
 }

 if ($action == select )
 {
   ?
   form method=post action=select.php
   select name=select onChange=this.form.submit()
 option value=oneone/option
 option value=twotwo/option
 option value=threethree/option
   /select
   input type=hidden name=action value=display
   /form
   ?
 }

 if ($action == display)
 {
   ?
   You selected value ?=$select?
   ?
 }

 ?

 Greetings
 Peter




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




[PHP] parse URL good syntaxe please

2002-08-13 Thread Christian Ista

Hello,

Could you tell me why on PHP 4.2.2 this code work

?php
  switch ($_GET['fuseaction'])
 {
case 0:
print i equals 0;
break;
default:
print i is not equal to 0, 1 or 2;
 }
?

and this one not :

?php
  switch ($fuseaction)
 {
case 0:
print i equals 0;
break;
default:
print i is not equal to 0, 1 or 2;
 }
?

In both cases when fuseaction is not defined, I receive an error. Could you
tell me how to know if the variable is defined in the URL. In coldfusion you
can do cfif isDefined(URL.fuseaction)

but in php ?

Bye



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




[PHP] Re: A kind of array (hashtable)

2002-08-13 Thread lallous

Yes, PHP support indexing by strings and not only numbers/indexes.

$myarray['elias'] = 'PHP rulez!';

echo $myarray['elias'];

Christian Ista [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello,

 In some language (like Java, C#, ...) you can find a hashtable.

 I execute query, this query return some records, each records are composed
 by 2 fields. I'd like to put these records in a 2 dimensions array (or
 something like that) and find easily the records I want.

 An example, the query return (field1/field2):

 mytext1/ text for my text 1
 mytext2/ text for my text 2
 mytext3/ text for my text 3
 mytext4/ text for my text 4

 I'd like to put that in an array, but not find the text by myarray[2],
 myarray[4] but by myarray['mytext2'], ['mytext2'] have to return text for
 my text 2

 Possible to do that ?

 Bye






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




[PHP] Re: parse URL good syntaxe please

2002-08-13 Thread lallous

you can use isset()

better grab a PHP starter document or tutorial.

Elias

Christian Ista [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello,

 Could you tell me why on PHP 4.2.2 this code work

 ?php
   switch ($_GET['fuseaction'])
  {
 case 0:
 print i equals 0;
 break;
 default:
 print i is not equal to 0, 1 or 2;
  }
 ?

 and this one not :

 ?php
   switch ($fuseaction)
  {
 case 0:
 print i equals 0;
 break;
 default:
 print i is not equal to 0, 1 or 2;
  }
 ?

 In both cases when fuseaction is not defined, I receive an error. Could
you
 tell me how to know if the variable is defined in the URL. In coldfusion
you
 can do cfif isDefined(URL.fuseaction)

 but in php ?

 Bye





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




Re: [PHP] parse URL good syntaxe please

2002-08-13 Thread Jim Dam

First of all, you need to use the $_* superglobals if register_globals is
off.  That is, to access get variables, you use $_GET['variable_name']

To check if the variable is set, use the isset function.

if (IsSet($_GET['variable']) {
// code
}
else {
//error
}

- Original Message -
From: Christian Ista [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 13, 2002 10:16 AM
Subject: [PHP] parse URL good syntaxe please


 Hello,

 Could you tell me why on PHP 4.2.2 this code work

 ?php
   switch ($_GET['fuseaction'])
  {
 case 0:
 print i equals 0;
 break;
 default:
 print i is not equal to 0, 1 or 2;
  }
 ?

 and this one not :

 ?php
   switch ($fuseaction)
  {
 case 0:
 print i equals 0;
 break;
 default:
 print i is not equal to 0, 1 or 2;
  }
 ?

 In both cases when fuseaction is not defined, I receive an error. Could
you
 tell me how to know if the variable is defined in the URL. In coldfusion
you
 can do cfif isDefined(URL.fuseaction)

 but in php ?

 Bye



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



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




[PHP] Re: parse URL good syntaxe please

2002-08-13 Thread Christian Ista


 Could you tell me why on PHP 4.2.2 this code work

My previous mail it was for my development machine, IIS, windows 2000 and
PHP4.2.2.

My host use PHP4.2.2 on linux and that's work.

Could you tell me why this difference ?

Bye



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




Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION - cont.

2002-08-13 Thread Analysis Solutions

Petre:

On Tue, Aug 13, 2002 at 03:18:42PM +0200, Petre Agenbag wrote:

 I have register_golbals = on, BUT, I want to find a way to code that I
 know will always work, regardless of register_globals or cookies, so
 that I am only dependant on the trans-sid ( but If I could rule that out
 too, it would be even better)

This example assumes the machine is running PHP = 4.1.0 allowing use of
$_SESSION rather than $HTTP_SESSION_VARS.  Adjust as needed.

  session_start();

  if ( !isset($SessionID) ) {
 #  This likely means that register globals is off.
 #  So, loop through the session vars and create regular vars.
 while ( list($Key, $Val) = each($_SESSION) ) {
$$Key = $Val;
 }
  }

Enjoy,

--Dan

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

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




Re: [PHP] PHP, XML and HTML-Tags

2002-08-13 Thread Analysis Solutions

On Tue, Aug 13, 2002 at 03:22:03PM +0200, Bernard wrote:
 
 I am using successfully the PHP XML-parser. But I have one problem.
 I like to include html tags into the texts and I don't want them to be 
 interpreted by the parser.

Have you tried putting the XML in CDATA sections?  That's really where 
such things should be.

http://www.w3.org/TR/2000/REC-xml-20001006#sec-cdata-sect

--Dan

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

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




Re: [PHP] question concerning php parsing

2002-08-13 Thread Analysis Solutions

On Tue, Aug 13, 2002 at 09:22:47AM -0400, Randy Johnson wrote:
 if i have functions.php with 10 functions in it and include the file in my
 main php file and call  1 of the 10 functions in my program does the whole
 functions.php have to be parsed or does it just include the function that is
 needed.

The entire included file is parsed into memory.

--Dan

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

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




Re: [PHP] PHP 4.2.2 and Apache 2

2002-08-13 Thread Aaron Gould

We have been using PHP 4.2.1/4.2.2 with Apache 2.0.39 for a month on a
development server with absolutely no problems at all.

The PHP group has deemed Apache 2 support in 4.2.x as experimental, but
judging by its stability, a non-experimental release can't be more than a
couple months away.

--
Aaron Gould
[EMAIL PROTECTED]
Web Developer


- Original Message -
From: MET [EMAIL PROTECTED]
To: PHP-GENERAL [EMAIL PROTECTED]
Sent: Tuesday, August 13, 2002 9:55 AM
Subject: [PHP] PHP 4.2.2 and Apache 2


 So how stable are they?  I'm not running a production server, but a
 development server.  Everything coming off of this box goes directly to
 a production server.

 ~ Matthew


 /**

   Matthew Metnetsky

   [EMAIL PROTECTED]

 **/


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


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




RE: [PHP] parse URL good syntaxe please

2002-08-13 Thread Christian Ista

 First of all, you need to use the $_* superglobals if register_globals
is
 off.  That is, to access get variables, you use $_GET['variable_name']

What do you mean by that ? (I'm newbie in PHP)

Bye


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




Re: [PHP] parse URL good syntaxe please

2002-08-13 Thread Jim Dam

Try taking a look at this tutorial for PHP.
http://www.php.net/manual/en/tutorial.php
- Original Message - 
From: Christian Ista [EMAIL PROTECTED]
To: 'php list' [EMAIL PROTECTED]
Sent: Tuesday, August 13, 2002 10:32 AM
Subject: RE: [PHP] parse URL good syntaxe please 


  First of all, you need to use the $_* superglobals if register_globals
 is
  off.  That is, to access get variables, you use $_GET['variable_name']
 
 What do you mean by that ? (I'm newbie in PHP)
 
 Bye
 
 
 -- 
 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] Extensions?

2002-08-13 Thread Php

I'm trying to configure my php.ini file on my local Windows 2000 system so I
can use the extensions such as GD, etc. I have changed the line:

extension_dir = C:\php\extensions  ; (which is where php_gd.dll resides)

and uncommented:

extension=php_gd.dll

and when I restart the web service and hit a page, I get the error:

Unable to load dynamic library .  the specified procedure could not be
found.

Any ideas?

Thanks!



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




AW: [PHP] Performance of ZLib

2002-08-13 Thread Sascha Braun

Do you know another possibility to store multiple files in one package? -
And most users in the web can use it, without getting special programms. I
know tar can, but there either I don't know how fast it is. Maybe there is
an freeware programm for all plattforms wich can untar, but a i don't know?

But if you know?

Schura

-Ursprüngliche Nachricht-
Von: Jason Wong [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 13. August 2002 05:48
An: [EMAIL PROTECTED]
Betreff: Re: [PHP] Performance of ZLib


On Tuesday 13 August 2002 09:46, Sascha Braun wrote:

 The funktionality is:

 Customer puts an 300 DPI High quality JPEG image into his shopping cart,
 after he checks out the Image or the images are getting compressed via
Zlib
 Library.

Have you tried doing a few test runs to see

1) By how much the files are compressed -- jpegs are already compressed and
usually compressing again will only shave a few percent off the size. In
some
cases the file size can actually increase when compressed.

2) The average time taken to compress a file.

 So what about performance?

That is determined by your server -- CPU speed, amount of memory, speed of
HDDs.

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

/*
QOTD:
East is east... and let's keep it that way.
*/


--
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




AW: Re[2]: [PHP] Credit Card suggestions

2002-08-13 Thread Sascha Braun

If there is no secure way to store creditcards on webservers, please tell me
about how secure it is to encrypt passwords with md5 encryption.

I want a password secured area in my website where I store some company
concepts I invented. I'm searching for people who got enough money to make
these concepts happen in true life, but I don't want these people to look at
the concepts before I don't have there Personal Data.

If someone is interestet and German speaking you may look at
www.weitsicht.org, but the site isn't finished yet. some things don't work
on other browsers than IE.

Thanks

Schura



-Ursprungliche Nachricht-
Von: Geoff Caplan [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 13. August 2002 10:20
An: Mike Mannakee; [EMAIL PROTECTED]
Betreff: Re[2]: [PHP] Credit Card suggestions


Mike,

Does anyone have any suggested method of scrambling a user's credit card
number before I stick it in a mysql database?

With respect, if you have to ask the question, you don't have the
technical skills to do this safely. In particular, there is no way to
keep the numbers secure if you are storing them on a machine which can
be accessed directly from the internet. Both your encryption keys and
your card numbers would have to be stored on a back-end machine
protected by a sophisticated firewall.

Payment gateway providers have to meet challenging standards and
undergo rigorous audits from the banks before they are allowed to
store numbers. Much your best solution is to use one of these
providers, who will store the card numbers for you. You can then do
all the transactions you require, such as repeats, refunds etc without
ever having to store the card number. Many providers offer the options
of using forms on their servers, or using your own SSL forms and
posting them the data using the SSL. With the CURL library, writing an
interface for this is relatively trivial.

Many countries (such as the UK where we operate) have laws about the
storage of credit cards on computer networks, so what you are planning
may even be illegal!

--
Geoff Caplan
Advantae Ltd

mailto:[EMAIL PROTECTED]
http://www.advantae.com


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


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




AW: [PHP] image function

2002-08-13 Thread Sascha Braun

I believe the jpeg funnktions don't work on a windows system. The Gifs don't
do either because they aren't implemeted too.

Please look at this Library. It's very nice but I don't get it working and
the guy who made it don't know either, why it's not working on my system.
Must be something about jpeg librarys and so on.

Schura

PS.: Examples at the end of the file.

-Ursprüngliche Nachricht-
Von: Nicholas Mercier [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 13. August 2002 10:35
An: [EMAIL PROTECTED]
Betreff: Re: [PHP] image function


At 09:50 PM 8/12/2002 +0800, you wrote:
Jay,

I would recommend uncommenting the php_gd2.dll extension.

Gd2 contains some functions that GD lacks and is over all better in my
opinion.
However, they are correct that you do NOT need to recompile when running
PHP on a Windows Platform.  Simply change php.ini to include the added
extension and then restart your apache server.

Nick


Thank you Jay, Yup my apache is on Windows : )
Let's me try first.
Jay Blanchard [EMAIL PROTECTED] ¼¶¼g©ó¶l¥ó·s»D
:002301c24201$b28caf00$[EMAIL PROTECTED]
  [snip]
  I known i need to install a lot of staffs to get all the functions
works(GD
  Lib, FreeType Lib, libjpeg, libpng, zlibetc etc).
  But i only need a few of them, so if i just load the php_gd.dll, what
  functions included?? I canr found any information about that.
  And one more, does php_gd2.dll also a GD lib?
  [/snip]
 
  The DLL is a Windows library AFAIR, and contains the GD functions when
  included on a Windows server. You do not have to enable this extension
on
an
  Apache server (unless it is Apache on Windows). You just have to make
sure
  that PHP is compiled with all of the proper libraries for your use of
GD.
 
  As for the second DLL, I am not sure. I haven't done a lot of Windows GD
  installations, it does not look familiar.
 
  HTH!
 
  Jay
 
 



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


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



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


Re: [PHP] Extensions?

2002-08-13 Thread Neil Freeman

Try this instead...

extension_dir = C:/PHP/extensions/

and ensure that the GD section is present in phpinfo() output.

Neil

Php wrote:
 **
 This Message Was Virus Checked With : SAVI 3.60 May 2002 
 Last Updated 8th August 2002
 **
 
 I'm trying to configure my php.ini file on my local Windows 2000 system so I
 can use the extensions such as GD, etc. I have changed the line:
 
 extension_dir = C:\php\extensions  ; (which is where php_gd.dll resides)
 
 and uncommented:
 
 extension=php_gd.dll
 
 and when I restart the web service and hit a page, I get the error:
 
 Unable to load dynamic library .  the specified procedure could not be
 found.
 
 Any ideas?
 
 Thanks!
 
 
 


-- 
--
  www.curvedvision.com
--


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




Re: Re[2]: [PHP] Credit Card suggestions

2002-08-13 Thread Jim Dam

MD5 encryption of passwords is secure since you do not need to decrypt the
password ever (in fact you can't).  You just encrypt the password that the
user entered and check if the MD5 of each password is the same, then the
user most likely entered the correct password.

- Original Message -
From: Sascha Braun [EMAIL PROTECTED]
To: PHP Mailingliste [EMAIL PROTECTED]
Sent: Tuesday, August 13, 2002 10:52 AM
Subject: AW: Re[2]: [PHP] Credit Card suggestions


 If there is no secure way to store creditcards on webservers, please tell
me
 about how secure it is to encrypt passwords with md5 encryption.

 I want a password secured area in my website where I store some company
 concepts I invented. I'm searching for people who got enough money to make
 these concepts happen in true life, but I don't want these people to look
at
 the concepts before I don't have there Personal Data.

 If someone is interestet and German speaking you may look at
 www.weitsicht.org, but the site isn't finished yet. some things don't work
 on other browsers than IE.

 Thanks

 Schura



 -Ursprungliche Nachricht-
 Von: Geoff Caplan [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 13. August 2002 10:20
 An: Mike Mannakee; [EMAIL PROTECTED]
 Betreff: Re[2]: [PHP] Credit Card suggestions


 Mike,

 Does anyone have any suggested method of scrambling a user's credit card
 number before I stick it in a mysql database?

 With respect, if you have to ask the question, you don't have the
 technical skills to do this safely. In particular, there is no way to
 keep the numbers secure if you are storing them on a machine which can
 be accessed directly from the internet. Both your encryption keys and
 your card numbers would have to be stored on a back-end machine
 protected by a sophisticated firewall.

 Payment gateway providers have to meet challenging standards and
 undergo rigorous audits from the banks before they are allowed to
 store numbers. Much your best solution is to use one of these
 providers, who will store the card numbers for you. You can then do
 all the transactions you require, such as repeats, refunds etc without
 ever having to store the card number. Many providers offer the options
 of using forms on their servers, or using your own SSL forms and
 posting them the data using the SSL. With the CURL library, writing an
 interface for this is relatively trivial.

 Many countries (such as the UK where we operate) have laws about the
 storage of credit cards on computer networks, so what you are planning
 may even be illegal!

 --
 Geoff Caplan
 Advantae Ltd

 mailto:[EMAIL PROTECTED]
 http://www.advantae.com


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


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



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




Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION - cont.

2002-08-13 Thread Rasmus Lerdorf

No real reason to start the session in index.php.  You are not registering
any session vars, nor are you accessing any.

 index.php
 ?php
   session_start();
 ?

 form name=form1 method=post action=admin_select.php
   table border=0 cellspacing=0 cellpadding=0
 tr bgcolor=#CFCFCF
   td colspan=2Admin Login
   /td
 /tr
 tr
   tdUsername:
   /td
   tdinput type=text name=user_name 
   /td
 /tr
 tr
   tdPassword:
   /td
   tdinput type=text name=pass_word 
   /td
 /tr
 tr
   td
 input type=submit name=Submit4 value=Submit
   /td
 /tr
   /table
 /form

Ok, now that we are in admin_select.php you can start the session, which
you do.

 Then:
 admin_select.php

 ?php
 session_start();
 if ((!$HTTP_SESSION_VARS[username]) 
 (!$HTTP_SESSION_VARS[password])) {
 session_register(username,password);
 }
   if (($HTTP_POST_VARS[user_name])  ($HTTP_POST_VARS[pass_word])) {

 $username =  $HTTP_POST_VARS[user_name];
 $password =  $HTTP_POST_VARS[pass_word];
   }

Looks ok so far.  Although I am not sure session_register() was able to
take multiple args in 4.0.3.  But you don't need the check.  Nothing bad
happens if you session_register() the same var twice.

 $link = mysql_connect(localhost,$username,$password) or die
 ('Could not connect!');
 mysql_select_db(mafisa,$link);
 $sql = select * from project_table order by id;
 $result = mysql_query($sql);
 ?
  form action=admin_select_document.php method=POST
 enctype=multipart/form-data
   table border=1
   tr
 td colspan=2 bgcolor=CFCFCFAdmin Interface/td
   /tr
   tr
 td colspan=2Please select Project to work with/td
   /tr
   tr
 td colspan =2
 ?php
 if (mysql_num_rows($result)) {
   echo select name=\sess_id_project\;
   while ($myrow = mysql_fetch_assoc($result)) {
   $sess_project_name = $myrow[project_name];
   $sess_project_id = $myrow[id];
   echo 'option
 value='.$sess_project_id.''.$sess_project_name;
   }
 echo '/select';
 echo '/td';
 echo '/tr';
 echo 'tr';
 echo 'td colspan=2input type=submit name=submit
 value=Go!/td';
 echo '/tr';
 echo '/form';
 } else {
 echo 'biThere are currently no Projects on the system,';
   echo 'please use the section below to add one/i/b';
 echo '/td';
 echo '/tr';
 echo '/form';
 }


 echo 'trtd colspan=2 bgcolor=00/td/tr

   tr
 td colspan=2 bgcolor=CFCFCFa href=admin_add_project.phpAdd
 a new Project/a/td
   /tr

 /table';

 ?

ok

 This second page has two routes to go, either you select the document
 from the drop_down, or you can add a new project, It is with the
 second route that I pick up further problems:

 admin_add_project.php

 ?php
  session_start();
 echo '
 form action=admin_add_project_do.php method=POST
 enctype=multipart/form-data
   table
   tr
 td colspan=2 bgcolor=CFCFCFMafisa Admin Interface/td
   /tr
   tr
 tdNew Project Name/td
 tdinput type=text name=project_name_add/td
   /tr
   tr
 tdProject Descriptions/td
 tdtextarea name=project_description_add/textarea/td
   /tr
   tr
 td colspan=2input type=submit name=submit
 value=Save/td
   /tr
 /table
 /form
 ';
 ?

Again, you don't register nor do you use any session vars in
admin_add_project.php so there is no need to start the session.

 Now, on this last page that is supposed to insert the form data into the
 db, there is simply no form data, or session variables!

 admin_add_project_do.php
 ?php
 session_start();
 $date = date('Y-m-d');
 $link =
 
mysql_connect('localhost',$HTTP_SESSION_VARS[username],$HTTP_SESSION_VARS[password])
 or die ('Could not connect!');
 mysql_select_db('mafisa',$link);
 $project_name_db =
 addslashes($HTTP_POST_VARS[project_name_add]);
 $project_description_db =
 addslashes($HTTP_POST_VARS[project_description_add]);
 $sql = insert into project_table
 (project_name,project_description,date) values
 ('$project_name_db','$project_description_db','$date');
 $result = mysql_query($sql);
 echo 'Thank you, new project ::
 bi'.$project_name_db.'/i/b was added to the system. br
a href=admin_select.phpBack/abr';
 ?

Looks ok.  Is it only on 4.0.3 that this isn't working?

Why don't you do this instead at the top of each page where you want to
use the session vars:

 if(!ini_get('register_globals')) {
 extract($HTTP_SESSION_VARS);
 }

Then just use plain $username and $password.  See if that makes a
difference.  But you really should get your provider to upgrade to
something a lot more recent than 4.0.3.  Do you realize that 4.0.3 is
almost 2 years old now?  That's an eternity on the Web.

-Rasmus


-- 
PHP General Mailing List 

[PHP] mailing list managers

2002-08-13 Thread Justin French

Hi all,

Just a quick note to see if anyone has any experience with mailing list
managers.

I've currently got a DB of subscribers, and basic PHP scripts are not going
to be a good long-term solution.

I was hoping that maybe there's an opensource or commercial product out
there that I can install in my doc root (ie, PHP + MySQL support) which will
handle this in a more effective manner (ie, space the mailout across an hour
or so, etc etc).

Or alternatively, somebody might recommend a service such as sparklist.com
(but cheaper, since they're targeting a list with greater numbers  a
minimum of $50/month).

TIA,

Justin French


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




[PHP] image creation class

2002-08-13 Thread Sascha Braun

Maybe there went something wrong with the attachment in my last mail.

This is my second try bring the class for creating thumbs to you.

?
//Images Wrapper for thumbs and other stuffs, require GDLib
//Riccardo Pasquini, 04/04/2001, v0.1
[EMAIL PROTECTED]

/*
Finally the class review, 09/08/2002, v1.0a
this source is of course under GPL, and ill be glad if u notify me any
change

Documentation (im sorry for my english)

*public properties*
none

*public methods*
DynaPic(string pic, string format)  -  class constructor
***parameters
string pic  -  full pic name, including the path 
(absolute or relative)
string format   -  the format of the input file, be sure that 
GDLib handle
it!

destroy()   - 
 free the resources

bool create()   -  
initialize the handling of the pic, thats not
required after the constructor
   
 but could be required after some method calls like
setPicName($pic), i.e.

setPicName(string pic)  -  change the 
handled pic, the class require a
call to create() after this
***parameters
string pic  -  full pic name, including the path 
(absolute or relative)

string getPicName() -  
returns the name of the handled pic

setThumbDimension(float pctg)   -  initialize the 
dimensions of the default
thumbnail
***parameters
float pctg  -  float number (0pctg=1) which 
specifies the resize factor
of the default thumb, i.e. pctg=1 means that
the thumb is like the original 
picture, pctg=0.5 means that the thumb
is half of the original, and so on...

getThumbDimension(float w,float h)-  return as referenced 
parameters the
default dimension on the thumbnail

setPicFormat(string format) -  set a new 
output format for the loaded
pic, require a call to create() after this
***parameters
string format   -  the format of the input file, be sure that 
GDLib handle
it!

string getPicFormat()   -  returns the 
format of the output

thumb() - 
 output the default thumbnail

full()  - 
 output the original image

view(float width, float height) -  output a thumbnail, 
the dimension is
specified in the parameters of the methodù
***parameters
float width -  width of the output pic
float height-  height of the output pic
*/
class DynaPic
{
  var $m_sPicName;  //file name with path
  var $m_sFormat;   //file format, check m_asAllowedFormat
  var $m_hPic;  //image handle
  var $m_bHandled;  //flag to check if the pic is well loaded
  var $m_nThumbX;   //width of the thumbnail
  var $m_nThumbY;   //height of the thumbnail

  //possible pic formats
  var $m_asAllowedFormat= array(GIF,PNG,JPEG);
  //and related headers
  var $m_aHeaders   = array(GIF=Content-type:
image/gif,PNG=Content-type: image/png,JPEG=Content-type:
image/jpeg);

  function DynaPic()
  {
die(Constructor requires parameters: string pic_path, string );
  }

  function DynaPic($pic,$format)
  {
 $this-m_sFormat = strtoupper($format);
 //check if valid format
 if(!in_array($this-m_sFormat,$this-m_asAllowedFormat))
 {
  die(Invalid format:
.stripslashes(htmlentities($this-m_sFormat)));
 }

 //initialize
 $this-m_sPicName=$pic;

 //thumb default resize 50%
 $this-setThumbDimension(0.5);
 if(!$this-create())
die(Unable to create
.stripslashes(htmlentities($this-m_sPicName)). as
.stripslashes(htmlentities($this-m_sFormat)));
  }

  function destroy()
  {
 if($this-m_bHandled)
 {
 imagedestroy($this-m_hPic);
 $this-m_bHandled=false;
 }
  }

  function create()
  {
 $this-destroy();


eval(\$this-m_hPic=@imagecreatefrom.$this-m_sFormat.('.$this-m_sPicNa
me.'););

 //check if init succeded
 if(!$this-m_hPic)
 {
  $this-m_bHandled=false;
  return false;
 }
 else
 

[PHP] xls or csv files

2002-08-13 Thread M.E. Suliman

Hi

Once data is collected from a form is it possible for that to be emailed as
an xls or csv.  I have the form and email part but have no idea in getting
the result into xls or csv.

Any help would be appreciated.

Thanks

Mohamed


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




AW: AW: [PHP] Performance of ZLib

2002-08-13 Thread Sascha Braun

Thanks for the quick answer, but is tar scriptable via PHP?

Schura

-Ursprungliche Nachricht-
Von: Gareth Ardron [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 13. August 2002 17:10
An: Sascha Braun
Betreff: Re: AW: [PHP] Performance of ZLib


At 16:46 13/08/2002 +0200, you wrote:
Do you know another possibility to store multiple files in one package? -
And most users in the web can use it, without getting special programms. I
know tar can, but there either I don't know how fast it is. Maybe there is
an freeware programm for all plattforms wich can untar, but a i don't know?

But if you know?

stuffit expander will untar files on mac os9 and osX
tar will (obviously) untar on *nix boxes
winzip will untar files on windows machines

as for tar's speed, it's bloody fast.


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




Re: [PHP] PHP 4.2.2 and Apache 2

2002-08-13 Thread Rasmus Lerdorf

Which OS, which extensions and how much load have you put it under?  There
are known thread safety issues in various libraries that you can link PHP
against.  And some of them are subtle.

Did you know, for example, that libpq (the PostgreSQL client library) is
threadsafe except for the case where you use CRYPT() in an SQL query.
Good luck debugging that one.

Personally I would not touch Apache 2, at least not with a threaded mpm,
for quite a while.

-Rasmus

On Tue, 13 Aug 2002, Aaron Gould wrote:

 We have been using PHP 4.2.1/4.2.2 with Apache 2.0.39 for a month on a
 development server with absolutely no problems at all.

 The PHP group has deemed Apache 2 support in 4.2.x as experimental, but
 judging by its stability, a non-experimental release can't be more than a
 couple months away.

 --
 Aaron Gould
 [EMAIL PROTECTED]
 Web Developer


 - Original Message -
 From: MET [EMAIL PROTECTED]
 To: PHP-GENERAL [EMAIL PROTECTED]
 Sent: Tuesday, August 13, 2002 9:55 AM
 Subject: [PHP] PHP 4.2.2 and Apache 2


  So how stable are they?  I'm not running a production server, but a
  development server.  Everything coming off of this box goes directly to
  a production server.
 
  ~ Matthew
 
 
  /**
 
Matthew Metnetsky
 
[EMAIL PROTECTED]
 
  **/
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php


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



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




Re: [PHP] mailing list managers

2002-08-13 Thread Miles Thompson

Justin,

Have a look at PostMyMail, although it's designed to work with PostNuke. 
Have no idea if it can run stanadalone.

I also wrote a clunky one in Python - it grabbed the addresses from a 
database and sent each individually. Python has a very nice SMTP module. By 
clunky I mean it didn't have an interface, I edited the source for the 
script every time I sent a mail. No problem, as it was a proof of concept.

Mightn't there be something at Hotscripts?

HTH - Miles Thompson

At 01:09 AM 8/14/2002 +1000, Justin French wrote:
Hi all,

Just a quick note to see if anyone has any experience with mailing list
managers.

I've currently got a DB of subscribers, and basic PHP scripts are not going
to be a good long-term solution.

I was hoping that maybe there's an opensource or commercial product out
there that I can install in my doc root (ie, PHP + MySQL support) which will
handle this in a more effective manner (ie, space the mailout across an hour
or so, etc etc).

Or alternatively, somebody might recommend a service such as sparklist.com
(but cheaper, since they're targeting a list with greater numbers  a
minimum of $50/month).

TIA,

Justin French


--
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] include require directive

2002-08-13 Thread Huy

Thanks,

I thought I checked that already. Obviously, I use notepad in Win2000 to
edit the files, and save them as Unicode file, which Notepad put some
characters at the beginning of the file. Only when I use another editor was
I able to see those strange characters. After deleting them, the require
statement works fine. Again, thanks for the help. :)

James Green [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Tue, 2002-08-13 at 02:55, Huy wrote:
  But I do...
 
  If I left out the require statement all is well.. or I copy the
whole
  content of the included file.. it works fine. The problem is the require
  statement.

 Check the file for whitespace, anything outside ?..?php or
 spaces/blank lines above your first ?php in any of your files.

 James.





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




[PHP] DPHPEdit users - FORUM available

2002-08-13 Thread Davor Pleskina

Dear DPHPEdit users,

You can now report bugs, request features or discuss functionality of
DPHPEdit using a newly created forum.

The forum is accessible through DPHPEdit Home Page -
http://www.pleskina.com/dphped or directly:
http://www.pleskina.com/dphped/forum_login.php

Keep looking for new coming versions!


Greetings to all PHP coders,

Davor Pleskina





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




Re: [PHP] PHP 4.2.2 and Apache 2

2002-08-13 Thread Aaron Gould

These are the command line parameters I used when compiling Apache on our
development server:

  --prefix=/usr/local/apache
  --with-apxs2=/usr/local/apache/bin/apxs
  --with-mysql=/usr
  --with-mcrypt=../mcrypt-2.6.2
  --with-imap
  --with-imap-ssl
  --enable-ftp
  --with-gettext
  --with-xml
  --with-kerberos

Granted, this isn't as complex as many servers out there, but for our
purposes, it works.  We are a small company, and as such, will not get
nearly the traffic that Google gets.  We've only had a peak of about 10
simultaneous users on the server, each of them manipulating data in a MySQL
database of our products.

Obviously we can't say what the result of replacing our current production
server would be.  (Our production server runs Apache 1.3.26 + PHP 4.0.6, and
gets about 250,000 hits/month.)

--
Aaron Gould
[EMAIL PROTECTED]
Web Developer


- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Aaron Gould [EMAIL PROTECTED]
Cc: MET [EMAIL PROTECTED]; PHP-GENERAL [EMAIL PROTECTED]
Sent: Tuesday, August 13, 2002 11:32 AM
Subject: Re: [PHP] PHP 4.2.2 and Apache 2


 Which OS, which extensions and how much load have you put it under?  There
 are known thread safety issues in various libraries that you can link PHP
 against.  And some of them are subtle.

 Did you know, for example, that libpq (the PostgreSQL client library) is
 threadsafe except for the case where you use CRYPT() in an SQL query.
 Good luck debugging that one.

 Personally I would not touch Apache 2, at least not with a threaded mpm,
 for quite a while.

 -Rasmus

 On Tue, 13 Aug 2002, Aaron Gould wrote:

  We have been using PHP 4.2.1/4.2.2 with Apache 2.0.39 for a month on a
  development server with absolutely no problems at all.
 
  The PHP group has deemed Apache 2 support in 4.2.x as experimental,
but
  judging by its stability, a non-experimental release can't be more than
a
  couple months away.
 
  --
  Aaron Gould
  [EMAIL PROTECTED]
  Web Developer
 
 
  - Original Message -
  From: MET [EMAIL PROTECTED]
  To: PHP-GENERAL [EMAIL PROTECTED]
  Sent: Tuesday, August 13, 2002 9:55 AM
  Subject: [PHP] PHP 4.2.2 and Apache 2
 
 
   So how stable are they?  I'm not running a production server, but a
   development server.  Everything coming off of this box goes directly
to
   a production server.
  
   ~ Matthew
  
  
   /**
  
 Matthew Metnetsky
  
 [EMAIL PROTECTED]
  
   **/
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 


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




[PHP] switch statement question

2002-08-13 Thread Alexander Ross

Say i have a variable $string_var = Once upon a time;

is there a way to do this:

Switch($string_var)
{
  case(contains Once):
   doSomething();
   break;
  case(contains the end.)
   doOtherThing();
   break;
  case(contains time)
   doNothing();
   break;
  default:
echo ERROR
}

Thanks
Alex




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




[PHP] relocation

2002-08-13 Thread Christian Ista

Hello,

Is there a possibility to call (jump not include) with some parameters
(index.php?var1=var2=) a php page without click.

For example :
case todo:
 call here index.php?var1=var2=  --- jump to this page
break;

bye

Christian,


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




RE: [PHP] switch statement question

2002-08-13 Thread Jay Blanchard

[snip]
Say i have a variable $string_var = Once upon a time;

is there a way to do this:

Switch($string_var)
{
  case(contains Once):
   doSomething();
   break;
  case(contains the end.)
   doOtherThing();
   break;
  case(contains time)
   doNothing();
   break;
  default:
echo ERROR
}
[/snip]

http://www.php.net/manual/en/control-structures.switch.php

Yes Virginia, there is a PHP function :^]. You can explode your $string_var
into an array, loop through the array and test each word for a match.

HTH!

Jay



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




[PHP] PHP-Ebay Interface

2002-08-13 Thread Adam Voigt

Anyone have any idea how to easily
interface with the Ebay engine other
then with the expensive developer
subscription?

Adam Voigt
[EMAIL PROTECTED]


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




Re: [PHP] relocation

2002-08-13 Thread Justin French

header(Location: index.php?var1=var2=);

make sure you send this before outputting anything to the browser.

Justin French


on 14/08/02 1:49 AM, Christian Ista ([EMAIL PROTECTED]) wrote:

 Hello,
 
 Is there a possibility to call (jump not include) with some parameters
 (index.php?var1=var2=) a php page without click.
 
 For example :
 case todo:
 call here index.php?var1=var2=  --- jump to this page
 break;
 
 bye
 
 Christian,
 


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




RE: [PHP] relocation

2002-08-13 Thread Daniel Kushner

case todo:
header('Location: index.php?var1=var2=');
exit;
case 'aaa':
header('Location: index.php?var1=asddtvar2=ppapp');
exit;


Regards,
Daniel Kushner
[EMAIL PROTECTED]
__
Need hosting? http://www.thehostingcompany.us/



 -Original Message-
 From: Christian Ista [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 13, 2002 11:50 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] relocation
 
 
 Hello,
 
 Is there a possibility to call (jump not include) with some parameters
 (index.php?var1=var2=) a php page without click.
 
 For example :
 case todo:
  call here index.php?var1=var2=  --- jump to this page
 break;
 
 bye
 
 Christian,
 
 
 -- 
 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] relocation

2002-08-13 Thread [-^-!-%-


Perhaps with a HEADER statement.

i.e. headers(index.php?var=valuevar2=value2);



=P e p i e  D e s i g n s
 www.pepiedesigns.com
 Providing Solutions That Increase Productivity

 Web Developement. Database. Hosting. Multimedia.

On Tue, 13 Aug 2002, Christian Ista wrote:

 Hello,

 Is there a possibility to call (jump not include) with some parameters
 (index.php?var1=var2=) a php page without click.

 For example :
 case todo:
  call here index.php?var1=var2=  --- jump to this page
 break;

 bye

 Christian,


 --
 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] relocation

2002-08-13 Thread Richard Black

Or even

header(Location: index.php?var=valuevar2=value2);

And you would probably want to follow that with 

exit;

Rather than 

break;

HTH,

Richy
==
Richard Black
Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com
Tel: 0141 435 3504
Email: [EMAIL PROTECTED] 

-Original Message-
From: [-^-!-%- [mailto:[EMAIL PROTECTED]] 
Sent: 13 August 2002 16:55
To: Christian Ista
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] relocation



Perhaps with a HEADER statement.

i.e. headers(index.php?var=valuevar2=value2);



=P e p i e  D e s i g n s
 www.pepiedesigns.com
 Providing Solutions That Increase Productivity

 Web Developement. Database. Hosting. Multimedia.

On Tue, 13 Aug 2002, Christian Ista wrote:

 Hello,

 Is there a possibility to call (jump not include) with some parameters
 (index.php?var1=var2=) a php page without click.

 For example :
 case todo:
  call here index.php?var1=var2=  --- jump to this page 
 break;

 bye

 Christian,


 --
 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] Passing array to function

2002-08-13 Thread Bill Hudspeth

I am trying to write a function that builds a multiple-choice drop down
list. As such, I need to specify an array in the name attribute of the
select tag. I am trying to pass a parameter to the function which gets
used as this name attribute, but seem to be having problems with the square
brackets. In the example below, I would like to submit the $elementname
variable to a function, but can't get it to take the '[' and ']' characters.
My resultant $_POST[] variable is empty. Any hints?





HARD-CODED VERSION



echo select name='cgroup_1[]' multiple size='5';

echo option value = '$chon_group_a[1]'
selected$chon_group_a[1]/option;

echo option value = '$chon_group_a[2]'$chon_group_a[2]/option;

echo option value = '$chon_group_a[3]'$chon_group_a[3]/option;

echo option value = '$chon_group_a[4]'$chon_group_a[4]/option;

echo /select;



//the $chon_group_a is a locally defined array that does not seem to be
causing any problems



DESIRED FUNCTION VERSION



$elementname=cgroup_1[];

$elementsarray=$chon_group_a;

PrintOptionBox($elementname,$elementsarray);




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




Re: Re[2]: [PHP] Credit Card suggestions

2002-08-13 Thread Robert Parker

On Tuesday 13 August 2002 10:57 am, you wrote:
 MD5 encryption of passwords is secure since you do not need to decrypt the
 password ever (in fact you can't).  You just encrypt the password that the
 user entered and check if the MD5 of each password is the same, then the
 user most likely entered the correct password.

I don't remember where I read this but it only takes the crackers about 1 - 2 
seconds to crack your average MD5 encrypted password. This is quite logical
because all they had to do is make a database of all of the MD5 sums of all 
the passwords in the various dictionaries.
The only Linux distro in my (limited) experience that gave the option of MD5 
encryption of passwords was Debian 2. Even then you had the option of shadow 
password files instead. Debian 2 is quite old. Later distros such as Mandrake 
8.0 and up simply use shadow password files without other option.

Regards
Bob Parker

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




Re: Re[2]: [PHP] Credit Card suggestions

2002-08-13 Thread Adam Voigt

Makes sense, except if you use upper and lowercase characters,
numbers, and symbols (as you should for secure passwords). I
would think that with these kind of passwords, storing the sheer
number of posibilites would get slightly large. And I mean even
if it is easy to break, it's more secure then storing them clear
text.

Adam Voigt
[EMAIL PROTECTED]

On Wed, 2002-08-14 at 02:20, Robert Parker wrote:
 On Tuesday 13 August 2002 10:57 am, you wrote:
  MD5 encryption of passwords is secure since you do not need to decrypt the
  password ever (in fact you can't).  You just encrypt the password that the
  user entered and check if the MD5 of each password is the same, then the
  user most likely entered the correct password.
 
 I don't remember where I read this but it only takes the crackers about 1 - 2 
 seconds to crack your average MD5 encrypted password. This is quite logical
 because all they had to do is make a database of all of the MD5 sums of all 
 the passwords in the various dictionaries.
 The only Linux distro in my (limited) experience that gave the option of MD5 
 encryption of passwords was Debian 2. Even then you had the option of shadow 
 password files instead. Debian 2 is quite old. Later distros such as Mandrake 
 8.0 and up simply use shadow password files without other option.
 
 Regards
 Bob Parker
 
 -- 
 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] Passing array to function

2002-08-13 Thread Ford, Mike [LSS]

 -Original Message-
 From: Bill Hudspeth [mailto:[EMAIL PROTECTED]]
 Sent: 13 August 2002 17:10

[]

 DESIRED FUNCTION VERSION
 
 
 
 $elementname=cgroup_1[];
 
 $elementsarray=$chon_group_a;
 
 PrintOptionBox($elementname,$elementsarray);

Well, looks ok-ish so far -- what's in the PrintOptionBox function, and how
exactly does it fail (intended vs actual results)?

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




Re: [PHP] switch statement question

2002-08-13 Thread DL Neil

Alternatively Alexander,
take a look at the string functions eg strstr(), stristr(), and strpos() all
of which can be used to make a condition within the case() criteria.
Regards,
=dn


 [snip]
 Say i have a variable $string_var = Once upon a time;

 is there a way to do this:

 Switch($string_var)
 {
   case(contains Once):
doSomething();
break;
   case(contains the end.)
doOtherThing();
break;
   case(contains time)
doNothing();
break;
   default:
 echo ERROR
 }
 [/snip]

 http://www.php.net/manual/en/control-structures.switch.php

 Yes Virginia, there is a PHP function :^]. You can explode your
$string_var
 into an array, loop through the array and test each word for a match.

 HTH!

 Jay



 --
 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] requesting sites running OS X

2002-08-13 Thread Michael Geary

Hi All,

I have been asked by a rep at a large software dev company about any 
websites live-to-the-world running OS X. We are, but we're not exactly 
huge (max hits/day = approx. 1000, mostly internal).

So, what sites are you aware of? They don't even have to be running PHP. 
Please let me know.

-michael


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




Re: Re[2]: [PHP] Credit Card suggestions

2002-08-13 Thread Robert Parker

On Tuesday 13 August 2002 12:20 pm, you wrote:
 Makes sense, except if you use upper and lowercase characters,
 numbers, and symbols (as you should for secure passwords). I
 would think that with these kind of passwords, storing the sheer
 number of posibilites would get slightly large. And I mean even
 if it is easy to break, it's more secure then storing them clear
 text.

 Adam Voigt
 [EMAIL PROTECTED]

Thing that really scares me about MD5 being used anywhere that's easily
accessible is what happens if 'pussycat' maps on to the same hash as 
'H3ph!3s09Zw'. The crackers don't need the original password just something 
that generates the same hash.

Bob Parker

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




Re: [PHP] PHP-Ebay Interface

2002-08-13 Thread Andrew Brampton

Well not a legal idea no :)

Andrew
- Original Message - 
From: Adam Voigt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 13, 2002 4:52 PM
Subject: [PHP] PHP-Ebay Interface


 Anyone have any idea how to easily
 interface with the Ebay engine other
 then with the expensive developer
 subscription?
 
 Adam Voigt
 [EMAIL PROTECTED]
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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




Re: Re[2]: [PHP] Credit Card suggestions

2002-08-13 Thread Adam Voigt

If I could find the link I would send it, but I read about 6 months
back on RSA Data Security's website that a study was being done by
mathemetician's and at the time they were theorizing that they highly
doubted any overlap in keysums but if such did exist they believed that
the key you would have to MD5 to get the same sum would have to be
several chapters worth of characters. Point of the story is, it's
highly, highly, highly unlikely.

Adam Voigt
[EMAIL PROTECTED]

On Wed, 2002-08-14 at 02:36, Robert Parker wrote:
 On Tuesday 13 August 2002 12:20 pm, you wrote:
  Makes sense, except if you use upper and lowercase characters,
  numbers, and symbols (as you should for secure passwords). I
  would think that with these kind of passwords, storing the sheer
  number of posibilites would get slightly large. And I mean even
  if it is easy to break, it's more secure then storing them clear
  text.
 
  Adam Voigt
  [EMAIL PROTECTED]
 
 Thing that really scares me about MD5 being used anywhere that's easily
 accessible is what happens if 'pussycat' maps on to the same hash as 
 'H3ph!3s09Zw'. The crackers don't need the original password just something 
 that generates the same hash.
 
 Bob Parker



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




[PHP] MD5 and Password Security?

2002-08-13 Thread John S. Huggins

On Wed, 14 Aug 2002, Robert Parker wrote:

-On Tuesday 13 August 2002 10:57 am, you wrote:
- MD5 encryption of passwords is secure since you do not need to decrypt the
- password ever (in fact you can't).  You just encrypt the password that the
- user entered and check if the MD5 of each password is the same, then the
- user most likely entered the correct password.
-
-I don't remember where I read this but it only takes the crackers about 1 - 2 
-seconds to crack your average MD5 encrypted password. This is quite logical
-because all they had to do is make a database of all of the MD5 sums of all 
-the passwords in the various dictionaries.
-The only Linux distro in my (limited) experience that gave the option of MD5 
-encryption of passwords was Debian 2. Even then you had the option of shadow 
-password files instead. Debian 2 is quite old. Later distros such as Mandrake 
-8.0 and up simply use shadow password files without other option.
-
-Regards
-Bob Parker

Bob, this is an excellent point.

Your statement seems to assume the crackers have made off with the list of
MD5 hashes for the passwords.  One way to foil their attempts at
guessing the original strings from the MD5 hashes is to incorporate code
that prepends or appends a system string known only to the webmaster when
creating the MD5 hash.  Of cource if they have made their way into your
system deep enough to get the MD5 info, then they might also have the
system string.  Oh well.

MD5 is pretty much impractical to decrypt, but if the passwords that
create the MD5 sums are easy to guess, then dictionary attacks are still
useful are are a bigger problem that MD5, SHA or any other hash generator.

I see the only way around this is to regularly require your users to
reverify several answers to several questions on each login or, perhaps,
every month or so.

So instead of requesting:
username:
password:

One could ask:
username:
password:
pet's name:
mother maidenname:
etc.:
etc.:

As always, the question remains - How much security is too much security? 

John

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

**

John Huggins
VANet

[EMAIL PROTECTED]
http://www.va.net/

**


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




[PHP] Re: radio value

2002-08-13 Thread Mike Mannakee

Your problem is a JavaScript one, not php. Your variable - 'selvalue' is
only defined within the function.  Define it globally outside the function.
Trouble is it currently looks like the variable doesn't exist by the time
the function exits.  See if that works.

Mike


Adi [EMAIL PROTECTED] wrote in message
003001c242c7$d0df85b0$9600a8c0@adi">news:003001c242c7$d0df85b0$9600a8c0@adi...
hi:
i have 2 file: file1.php, file2.php
in file2.php i have:

echo form name='popupform' 
echo input type=text name=cod value='$cod'nbsp;
echo Alege sistemul:  input type=button name=choice value='alege'
onClick=window.open('file1.php','popuppage','width=450,
height=400,top=100,left=100,scrollbars=yes');br;
echo /form;
.

in file1.php:
.
!-- Begin
function sendValue(s){
file://var selvalue = s.options[s.selectedIndex].value;
var selvalue = s;
window.opener.document.popupform.cod.value = selvalue;
window.close();
}
//  End --
/script
/HEAD
BODY

center
form name=selectform
 echo input type='radio' value='1' name='selectmenu';
echo input type='radio' value='2' name='selectmenu';
echo input type='radio' value='3' name='selectmenu';
input type=button value=select
onClick=sendValue(this.form.selectmenu.value);
/form
..

Problem is with radio group value. I select an item in radiogroup box, and
when i click on select button, value passed to cod textbox is undefined.
How to make cod.value to take selected radio value?
tx in adv for any help
adi




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




[PHP] session.use_trans_sid question

2002-08-13 Thread Sean Brown

After reading other posts, I have found that there are two ways to disable
use_trans_sid at runtime.  I do NOT have the ability to change the php.ini
file, so I am stuck with handling this at runtime.

1.  in code:
ini_set(session.use_trans_sid,0);

2.  in an .htaccess file:
IfModule mod_php4.c
php_value session.use_trans_sid 0
/IfModule

I have found that using the htaccess method work very well, however it
affects an entire directory.  If I want to only disable use_trans_sid on
certain pages, I need to use the code method.  However, I have yet to be
able to get it to work.  Here's a sample of the code I'm using:

?php
$something = ini_set(session.use_trans_sid,0);

include...
?

and so on.  That code snippet is the first thing in my file, before any
other HTML or PHP code, yet I still get PHPSESSIONID in my URLs when cookies
are turn off.  Any ideas?

php4.2.1
apache1.3.22
linux

Thanks,

Sean


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




Re: [PHP] requesting sites running OS X

2002-08-13 Thread Andrew Brampton

A good reference I can point you to is Netcraft.com, they record what
OS/Webserver 1000s of sites are using, you can type in a website name and it
will tell you all sorts of stats... Usally it will also tell you other
similar sites running on the same OS and or Server... but for some reason it
doesn't show other MacOSX websites... But if you want to guess a few than
you can check...

I know that apple.com is MacOSX :)

Andrew
- Original Message -
From: Michael Geary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 13, 2002 5:28 PM
Subject: [PHP] requesting sites running OS X


 Hi All,

 I have been asked by a rep at a large software dev company about any
 websites live-to-the-world running OS X. We are, but we're not exactly
 huge (max hits/day = approx. 1000, mostly internal).

 So, what sites are you aware of? They don't even have to be running PHP.
 Please let me know.

 -michael


 --
 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] session.use_trans_sid question

2002-08-13 Thread Rasmus Lerdorf

You cannot do it inside the script as the trans-sid stuff happens before
your script is executed.  The setting is changed, so ini_set() is doing
its job, it's just that it sets it too late.

In your .htacess file, just do it per-location:

Location foo.php
php_value session.use_trans_sid 0
/Location

-Rasmus

On Tue, 13 Aug 2002, Sean Brown wrote:

 After reading other posts, I have found that there are two ways to disable
 use_trans_sid at runtime.  I do NOT have the ability to change the php.ini
 file, so I am stuck with handling this at runtime.

 1.  in code:
 ini_set(session.use_trans_sid,0);

 2.  in an .htaccess file:
 IfModule mod_php4.c
 php_value session.use_trans_sid 0
 /IfModule

 I have found that using the htaccess method work very well, however it
 affects an entire directory.  If I want to only disable use_trans_sid on
 certain pages, I need to use the code method.  However, I have yet to be
 able to get it to work.  Here's a sample of the code I'm using:

 ?php
 $something = ini_set(session.use_trans_sid,0);

 include...
 ?

 and so on.  That code snippet is the first thing in my file, before any
 other HTML or PHP code, yet I still get PHPSESSIONID in my URLs when cookies
 are turn off.  Any ideas?

 php4.2.1
 apache1.3.22
 linux

 Thanks,

 Sean


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



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




[PHP] Re: Passing array to function

2002-08-13 Thread Mike Mannakee

You'll find the values accessible in $_POST as $_POST['cgroup_1']['0'],
$_POST['cgroup_1']['1'], etc.

$_POST itself is an array, and so is your variable.

HTH

Mike


Bill Hudspeth [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am trying to write a function that builds a multiple-choice drop down
 list. As such, I need to specify an array in the name attribute of the
 select tag. I am trying to pass a parameter to the function which gets
 used as this name attribute, but seem to be having problems with the
square
 brackets. In the example below, I would like to submit the $elementname
 variable to a function, but can't get it to take the '[' and ']'
characters.
 My resultant $_POST[] variable is empty. Any hints?





 HARD-CODED VERSION



 echo select name='cgroup_1[]' multiple size='5';

 echo option value = '$chon_group_a[1]'
 selected$chon_group_a[1]/option;

 echo option value = '$chon_group_a[2]'$chon_group_a[2]/option;

 echo option value = '$chon_group_a[3]'$chon_group_a[3]/option;

 echo option value = '$chon_group_a[4]'$chon_group_a[4]/option;

 echo /select;



 file://the $chon_group_a is a locally defined array that does not seem to
be
 causing any problems



 DESIRED FUNCTION VERSION



 $elementname=cgroup_1[];

 $elementsarray=$chon_group_a;

 PrintOptionBox($elementname,$elementsarray);






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




Re: Re[2]: [PHP] Credit Card suggestions

2002-08-13 Thread John S. Huggins

On Wed, 14 Aug 2002, Robert Parker wrote:

-On Tuesday 13 August 2002 12:20 pm, you wrote:
- Makes sense, except if you use upper and lowercase characters,
- numbers, and symbols (as you should for secure passwords). I
- would think that with these kind of passwords, storing the sheer
- number of posibilites would get slightly large. And I mean even
- if it is easy to break, it's more secure then storing them clear
- text.
-
- Adam Voigt
- [EMAIL PROTECTED]
-
-Thing that really scares me about MD5 being used anywhere that's easily
-accessible is what happens if 'pussycat' maps on to the same hash as 
-'H3ph!3s09Zw'. The crackers don't need the original password just something 
-that generates the same hash.

Sure this is possible and I agree a concern.  With MD5 there is some
mathematically small chance this will happen.  With SHA even smaller.
However, where do we draw the line?

I suppose requiring users to use long passphrases instead of passwords and
MD5 that result would help with this issue.

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

**

John Huggins
VANet

[EMAIL PROTECTED]
http://www.va.net/

**


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




Re: Re[2]: [PHP] Credit Card suggestions

2002-08-13 Thread Adam Voigt

True, and there's always the MCRYPT library.

Adam Voigt
[EMAIL PROTECTED]

On Tue, 2002-08-13 at 12:48, John S. Huggins wrote:
 On Wed, 14 Aug 2002, Robert Parker wrote:
 
 -On Tuesday 13 August 2002 12:20 pm, you wrote:
 - Makes sense, except if you use upper and lowercase characters,
 - numbers, and symbols (as you should for secure passwords). I
 - would think that with these kind of passwords, storing the sheer
 - number of posibilites would get slightly large. And I mean even
 - if it is easy to break, it's more secure then storing them clear
 - text.
 -
 - Adam Voigt
 - [EMAIL PROTECTED]
 -
 -Thing that really scares me about MD5 being used anywhere that's easily
 -accessible is what happens if 'pussycat' maps on to the same hash as 
 -'H3ph!3s09Zw'. The crackers don't need the original password just something 
 -that generates the same hash.
 
 Sure this is possible and I agree a concern.  With MD5 there is some
 mathematically small chance this will happen.  With SHA even smaller.
 However, where do we draw the line?
 
 I suppose requiring users to use long passphrases instead of passwords and
 MD5 that result would help with this issue.
 
 -
 -Bob Parker
 -
 --- 
 -PHP General Mailing List (http://www.php.net/)
 -To unsubscribe, visit: http://www.php.net/unsub.php
 -
 
 **
 
 John Huggins
 VANet
 
 [EMAIL PROTECTED]
 http://www.va.net/
 
 **
 



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




RE: Re[2]: [PHP] Credit Card suggestions

2002-08-13 Thread Richard Black

Doesn't md5 generate a 128 bit binary number???

That means there are 3.4028236692093846346337460743177e+38 possible
combinations which can be generated. So surely the odds of 2 strings
producing the same md5 code are 1 in
3.4028236692093846346337460743177e+38???

Having said that, I guess dictionary based attacks could break in fairly
easily. That's why I always make my users have numbers and mixed case in
their passwords. 

-Original Message-
From: John S. Huggins [mailto:[EMAIL PROTECTED]] 
Sent: 13 August 2002 17:48
To: Robert Parker
Cc: [EMAIL PROTECTED]; Adam Voigt
Subject: Re: Re[2]: [PHP] Credit Card suggestions


On Wed, 14 Aug 2002, Robert Parker wrote:

-On Tuesday 13 August 2002 12:20 pm, you wrote:
- Makes sense, except if you use upper and lowercase characters, 
- numbers, and symbols (as you should for secure passwords). I would 
- think that with these kind of passwords, storing the sheer number of

- posibilites would get slightly large. And I mean even if it is easy 
- to break, it's more secure then storing them clear text.
-
- Adam Voigt
- [EMAIL PROTECTED]
-
-Thing that really scares me about MD5 being used anywhere that's 
easily -accessible is what happens if 'pussycat' maps on to the same 
hash as -'H3ph!3s09Zw'. The crackers don't need the original password 
just something -that generates the same hash.

Sure this is possible and I agree a concern.  With MD5 there is some
mathematically small chance this will happen.  With SHA even smaller.
However, where do we draw the line?

I suppose requiring users to use long passphrases instead of passwords
and MD5 that result would help with this issue.

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

**

John Huggins
VANet

[EMAIL PROTECTED]
http://www.va.net/

**


-- 
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: Re[2]: [PHP] Credit Card suggestions

2002-08-13 Thread John S. Huggins

On Wed, 14 Aug 2002, Robert Parker wrote:

-On Tuesday 13 August 2002 12:20 pm, you wrote:
- Makes sense, except if you use upper and lowercase characters,
- numbers, and symbols (as you should for secure passwords). I
- would think that with these kind of passwords, storing the sheer
- number of posibilites would get slightly large. And I mean even
- if it is easy to break, it's more secure then storing them clear
- text.
-
- Adam Voigt
- [EMAIL PROTECTED]
-
-Thing that really scares me about MD5 being used anywhere that's easily
-accessible is what happens if 'pussycat' maps on to the same hash as 
-'H3ph!3s09Zw'. The crackers don't need the original password just something 
-that generates the same hash.
-
-Bob Parker

Whoa, I thought Bob was saying he found two strings that generate the same
hash.

md5(pussycat) = fd316a211a7178c6fbf09c4c2ac6fa05
md5(H3ph!3s09Zw) = 4172a5caff5b7878144c8aae11f3de17

Guess not.  WHEW!




**

John Huggins
VANet

[EMAIL PROTECTED]
http://www.va.net/

**


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




Re: Re[2]: [PHP] Credit Card suggestions

2002-08-13 Thread Analysis Solutions

On Wed, Aug 14, 2002 at 02:20:07AM -0400, Robert Parker wrote:

 I don't remember where I read this but it only takes the crackers about 1 - 2 
 seconds to crack your average MD5 encrypted password. This is quite logical
 because all they had to do is make a database of all of the MD5 sums of all 
 the passwords in the various dictionaries.

Of course, that would necessitate access to the machine.  A brute force
dictionary attack is much more likely.  To thwart both, enforce strong
passwords.

--Dan

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

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




  1   2   3   >