Re: [PHP] .inc over .php

2002-04-19 Thread Meir Kriheli

On Friday 19 April 2002 15:58, Erik Price wrote:
 On Friday, April 19, 2002, at 04:10  AM, Jacob Wyke wrote:
  Why use .inc as a file extenstion when you can use .php ??
  What are the advantages/disadvantages to using .inc?
  Is one more secure?
  Which is faster?
  Which is consider a better pratice?

 It's just to help me organize which files I use as included files (.inc)
 and which files are actual PHP scripts that can be requested with a URI
 (.php).

 Also, I set an Apache directive to refuse requests for any file with the
 .inc extension, so my database connection info, password, etc is
 (theoretically) safe from being served directly.


 Erik

Those files should be placed outside DocumentRoot (if you control the server). 
Then set include_path in php.ini to include that dir, and you're done. No 
need to rely on apache for this.
-- 
Meir Kriheli


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




Re: [PHP] Send output before header location

2002-01-13 Thread Meir Kriheli

On Wednesday 09 January 2002 11:55, Alawi wrote:
 How can I output before send header
 I see some site some output and after that it Jump to other site !!
 Is that maked by header localtion ??

No, they're using a meta tag in the head section. Quoted from 
wdg-html-reference:

META HTTP-EQUIV=Refresh CONTENT=10; URL=../

tells the browser to load ../ 10 seconds after the current document has 
finished loading. Not all browsers support this, so authors should provide an 
alternate means of moving to the new page where necessary. The Refresh header 
is sometimes used for splash screens or when a page has moved, but the 
technique is not very effective since users may not even be looking at the 
window that is to be refreshed and since it messes up the user's history on 
many browsers. Some search engines penalize pages that use a Refresh of a few 
seconds or less.
-- 
Meir Kriheli

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




Re: [PHP] jukebox

2002-01-05 Thread Meir Kriheli

On Friday 04 January 2002 22:20, Scott wrote:
 Has anyone experimented with controlling an mp3 player like mpg123 from
 php?  I want to build a radio automation system using a web interface, but
 not sure how I want to handle the actual playing of music.

 Basically I would have a mysql database that rotates the music based on
 categories and it would move down the list resetting every hour.

 If you have done an exec to mpg123 before, how did you control the output?
 I want the output to be on the local machine and not streamed across a
 network.

 Thanks in advance.

 -Scott
Hi Scott,

A quick search at freshmeat shows several projects doing the same thing 
already, you might want to check them out for reference:

http://freshmeat.net/search/?q=jukebox%20php
-- 
Meir Kriheli

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




Re: [PHP] session

2001-12-11 Thread Meir Kriheli

On Tuesday 11 December 2001 10:37, Jordan wrote:
 is there anyway to drag session variables to another server or are they
 server specific?  If you can't drag a session can you do an include for a
 page on a different server giving it's URL?  Just curious.

 -Jordan

That depends, 

You can store session data in a DB instead of files.

All servers sharing session vars should use this DB for session storage. This 
works if the servers are on the same site.

If the server is in some other place that is problem. Allowing access to your 
DB via the 'net is asking for trouble.
-- 
Meir Kriheli

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




Re: [PHP] Where is my php.ini?

2001-11-01 Thread Meir Kriheli

On Friday 02 November 2001 01:16, Gaylen Fraley wrote:
 Ok.  I've installed php on linux and all is well!  Been running for weeks
 now.  Problem is, I never had to set up my php.ini .  Got curious and am
 wondering where it is.  Locate php.ini yields one in the pear/tests
 directory, but that's not it.  Suggestions?

If you don't have one, PHP will use defaults. In PHP's source directory 
there's a file called php.ini-dist (or something similar) you can copy it to 
where PHP expects to find it and rename it to php.ini.

To find out where you should copy it create a php file containing phpinfo() 
in it and access it with your browser. Examine the output to see where the 
ini is expected (you can define this while running configure during the build 
process)

-- 
Meir Kriheli

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




Re: [PHP] 2 decimal places

2001-09-25 Thread Meir Kriheli

On Tuesday 25 September 2001 18:48, Jason Bell wrote:
 What if I want to pad a number with zeros in the other direction?  I.E:


 524 becomes 00524


printf('%05d',$the_number);

Prints the number padded to 5 chars with 0.

I suggest you read the manual about printf() and sprintf() functions (there 
are good examples about formatting in sprintf()'s documentation).

--
Meir Kriheli


 - Original Message -
 From: Christian Dechery [EMAIL PROTECTED]
 To: Kurth Bemis [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, September 25, 2001 9:41 AM
 Subject: Re: [PHP] 2 decimal places

  At 22:22 19/09/01 -0400, Kurth Bemis wrote:
  i'm looking for a php function to add 2 decimal place sto a number.  if
  the number already have one decimal place then one more zero should be
  added to make it two decimal placesanyone know of a quick way to do

 this?

  $number=32.5;
 
  echo number_format($number,2);
 
  outputs:
  32.50
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




Re: [PHP] 2 decimal places

2001-09-25 Thread Meir Kriheli

On Tuesday 25 September 2001 19:38, Evan Nemerson wrote:
 Yeah, but what if they don't JUST want to print it...

 /*untested*/
 $i=524;
 $n=5-strlen($i);
 $outnum=;
 for($x=1;$x=$n;$x++){
   $outnum.=0;
 };
 $outnum.=$i;

$outnum = sprintf('%05d' , 524);

--
Meir Kriheli

 On Tuesday 25 September 2001 09:56, you wrote:
   What if I want to pad a number with zeros in the other
   direction?  I.E:
   524 becomes 00524
 
  printf() / sprintf() is your friend.
 
  Chris

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




Re: [PHP] DB.php, and how to use?

2001-09-25 Thread Meir Kriheli

On Tuesday 25 September 2001 20:40, Matthew Walker wrote:
 I've searched the whole PHP website for any reference to this lib that
 comes standard with my distro of PHP4. No luck.

 Can someone provide me with an address I can go to, to read about DB.php
 and it's modules? (Specifically, the DB/mysql.php module)

 If there is no website, can someone provide a quick set of examples for
 how to use the class functions? I haven't done OO programming in a long
 time, and I've never done it in PHP.

Do you mean PEAR's DB class ? if so, you can check out the tutorial at 
phpbuilder.com:
 
http://www.phpbuilder.com/columns/allan20010115.php3

The best way to know what the class does and its method is reading the source.

-- 
Meir Kriheli

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




Re: [PHP] Any Free Web Hosts that still support the mail( ) function out there?

2001-09-22 Thread Meir Kriheli

On Friday 21 September 2001 23:51, Salty Marine wrote:
 Greetings to Felix and All:

 I must agree that http://coolfreepages.com/ is a really good free hosting
 service that supports PHP.  However, soon as you use mail( ), it generates
 an error message:
 Fatal error: Call to undefined function: mail() in ...

 Regards,
 Salty

You can use some SMTP class to send mail without the mail() function if you 
have a mail account to use. You can search for it on 

http://phpclasses.upperdesign.com

And the SMTP class is found at

http://phpclasses.upperdesign.com/browse.html/package/14
-- 
Meir Kriheli


 -Original Message-
 From: Felix [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 21, 2001 4:58 PM
 To: Salty Marine; [EMAIL PROTECTED]
 Subject: Re: [PHP] Any Free Web Hosts that still support the mail( )
 function out there?


 Try coolfreepages.com

 Felix
 - Original Message -
 From: Salty Marine [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, September 21, 2001 2:20 PM
 Subject: [PHP] Any Free Web Hosts that still support the mail( ) function
 out there?

  Greetings to You:
 
  Any Free Web Hosts that still support the mail( ) function out there?
 
  Regards,
  Salty

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




Re: [PHP] creating ZIP files

2001-09-21 Thread Meir Kriheli

On Friday 21 September 2001 00:31, Raphael Pirker wrote:
 this link refers to a function READING zip files, not actually creating
 one...

There's an article on creating zip files with pure PHP (other libraries not 
needed) on zend's site.

Actually this is the 1st article in a series of them.

See:

http://www.zend.com/zend/spotlight/creating-zip-files1.php


-- 
Meir Kriheli

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




Re: [PHP] creating ZIP files

2001-09-21 Thread Meir Kriheli

On Friday 21 September 2001 00:31, Raphael Pirker wrote:
 this link refers to a function READING zip files, not actually creating
 one...

Sorry, forgot to send the link to the zip creation class, 

http://www.zend.com/codex.php?id=535single=1

Have fun

-- 
Meir Kriheli

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




Re: [PHP] form handling problem

2001-09-19 Thread Meir Kriheli

On Monday 17 September 2001 06:01, Nikola Veber wrote:
 Hi !

 I have a form
 form target = ?php echo $PHP_SELF ?; METHOD = get
 Is there a way to open PHP_SELF in the same window, not in the new one ?

It should be

form action = ?php echo $PHP_SELF; ? METHOD = get

target is used as the name of the frame or window used for the submission.

see:
http://www.w3.org/TR/REC-html40/interact/forms.html#edef-FORM

BTW,
You've misplaced the semicolon, it should be inside the PHP statement.


 Thanks
 Nikola

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




Re: [PHP] Flex...

2001-09-15 Thread Meir Kriheli

On Saturday 15 September 2001 17:08, Joaquin wrote:
 Hello, i ask to the listo for a problem.. and they say me that i havent
 flex.. yhe error is this.. when i put ./configure  to install PHP it says
 ...

 checking lex output file root... ./configure: lex: command not found
 configure: error: cannot find output from lex; giving up

 i go to www.gnu.com and i download   flex 
 i descompres it and put ./configure and then make.. but e=when i went to
 put make install .. it say that the file doesnt exist.. y put dir
 and there wa a files call  install  if anybody can help me.. please..
 help...
 mi english is very bad... im from argentina..
 Bye..and thank you

What distro are you using ? You can get the compiled version for it.


-- 
Kriheli Meir

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




Re: [PHP] Site Layouts/Designs

2001-09-09 Thread Meir Kriheli

On Monday 10 September 2001 05:51, ReDucTor wrote:
 Ok, this isn't exactly PHP, more HTML, but I am not on any other mailing
 lists that contain Web Developers, but what I am after is Designs/Layouts
 for websites...So if anyone has some, or knows some good sites to get
 some..

 BTW, I am after free ones, i don't want to have to pay for them..


   - James ReDucTor Mitchell

Hi,

See http://www.oswd.org

-- 
Meir Kriheli

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




Re: [PHP] POST from the script

2001-08-14 Thread Meir Kriheli

On Tuesday 14 August 2001 23:52, Marc Hanlon wrote:
 I was wondering if anyone knows how to make a script that is capable of
 doing it's own POST to a page without needing a form to be filled in.
 Basically it needs to perform the same sort of action as:

 www.anyplace.com/script.php?action=saytext=hello

 Unfortunately I cant change the script at the other end to take GET
 variables instead of POST values so I need a way for the PHP script to send
 POST values.

 Thanks,

 Marc.

Use the curl extension, or if you don't want to compile it (or can't) you can 
always use Manuel Lemos's HTTP class at:

http://phpclasses.upperdesign.com/browse.html/package/3

-- 
Kriheli Meir

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




Re: [PHP] project management scripts?

2001-08-05 Thread Meir Kriheli

On Thursday 02 August 2001 23:12, Daniel Goldin \(E-mail\) wrote:
 Anybody know of any good project management scripts? Nothing too bloated.
 Just a good simple way to organize projects and groups remotely. I've found
 phpGroupware to be unwieldy and slow.

From a quick search at freshmeat.net (searched for php project) 

http://udpviper.com/project.php?project=ipm
http://www.awtrey.com/support/phppm/
http://www.phprojekt.com/

I haven't tested them, so no recommendations for you..:-(

I'm sure you can find more searching sourceforge.net

-- 
Kriheli Meir

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




Re: [PHP] Re: Trying to avoid code exploits..

2001-08-01 Thread Meir Kriheli

On Wednesday 01 August 2001 02:02, Yasuo Ohgaki wrote:
 Meir Kriheli [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

  Hi,
  I need another pair of eyes to see if I've overlooked something.

 SNIP

  so
  '{pass1}=={pass2}'
 
  is converted to
  '$GLOBALS['pass1']==$GLOBALS['pass2']'
 
  When to form is validated I'm running eval() to evaluate the

 expression. I'm

  concerned that there's an exploit somewhere, maybe a user entering

 some

  malicious data (I don't like using eval that often). But I'm not

 using eval()

  directly on user entered data, and I can't see where it is possible.

 Where pass1,pass2,etc came from? I guess from user and you set

They come from the form.

 register_globals=on in your php.ini. If this is the case, your script
 is exploitable probably.
 register_globals=off in your php.ini and use $HTTP_*_VARS.

 If you want to protect values set by PHP also, I've posted sample
 function at zend.com recently.
 http://www.zend.com/codex.php?id=626single=1
 (Protect values (GET/POST/COOKIE) set by PHP)

 Regards,
 --
 Yasuo Ohgaki

I don't think this is much of a problem. I unset() all the global session 
variables before I use them so this should be no problem.

Even if an attacker tries to set some value for a script variable, this var 
will be unset() and then read from the session, so no harm is done.

On the other hand there should be no probelem to change GLOBALS to 
HTTP_XXX_VARS.

But as i've said this isn't a problem. Can you see some way to exploit the 
eval() function ?

Thank you
-- 
Kriheli Meir

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




Re: [PHP] Re: Trying to avoid code exploits..

2001-08-01 Thread Meir Kriheli

On Wednesday 01 August 2001 10:20, Richard Lynch wrote:
  But I'm not
  using eval()
  directly on user entered data, and I can't see where it is possible.

 Yes, you are.

 pass1 is coming from the user, is it not?

 You are using eval() to decide if pass1 and pass2 are equal, are you not?

 You are therefore directly eval-ing user code.

  register_globals=off in your php.ini and use $HTTP_*_VARS.

 Sigh.  This does *NOT* provide *ANY* protection *WHATSOEVER*.

 The user can *STILL* POST malicious data, and you are *STILL* going to
 eval() it.

Aactually the eval()ed string would be:

eval('$a = $GLOBALS[pass1]==$GLOBALS[pass2]')

So there is no direct eval on the user data. I'm also using single quotes so 
no special meaning chars would be expanded.


 I REPEAT:

 register_globals off and HTTP_xxx_VARS being more secure is a gross
 exaggeration.

 It will only trip the dumbest of the dumb trying to crack your site --
 We're talking lower than script-kiddies.  Think Joe Sixpack and Betsy Buick
 here. Normal users who have noticed those funky things in URLs and decided
 to play around with them on FORMs to see what they can do.

 A *REAL* script-kiddie (did I just say that?) would take your HTML FORM,
 edit it in NotePad, and then POST their malicious data and your
 HTTP_POST_VARS have *bad* things in it.

Yes and I agree with you (see the answer to Yauso). The only concern is GPC 
vars overwriting script vars, and as mentioned I unset those var before 
assigning them a value or before using session register to get their values.


-- 
Kriheli Meir

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




Re: [PHP] Re: Trying to avoid code exploits..

2001-08-01 Thread Meir Kriheli

On Wednesday 01 August 2001 10:20, Richard Lynch wrote:
  But I'm not
  using eval()
  directly on user entered data, and I can't see where it is possible.

 Yes, you are.

 pass1 is coming from the user, is it not?

 You are using eval() to decide if pass1 and pass2 are equal, are you not?

 You are therefore directly eval-ing user code.

  register_globals=off in your php.ini and use $HTTP_*_VARS.

 Sigh.  This does *NOT* provide *ANY* protection *WHATSOEVER*.

 The user can *STILL* POST malicious data, and you are *STILL* going to
 eval() it.


Aactually the eval()ed string would be:

eval('$a = $GLOBALS[pass1]==$GLOBALS[pass2]')

So there is no direct eval on the user data. I'm also using single quotes so 
no special meaning chars would be expanded.


 I REPEAT:

 register_globals off and HTTP_xxx_VARS being more secure is a gross
 exaggeration.

 It will only trip the dumbest of the dumb trying to crack your site --
 We're talking lower than script-kiddies.  Think Joe Sixpack and Betsy Buick
 here. Normal users who have noticed those funky things in URLs and decided
 to play around with them on FORMs to see what they can do.

 A *REAL* script-kiddie (did I just say that?) would take your HTML FORM,
 edit it in NotePad, and then POST their malicious data and your
 HTTP_POST_VARS have *bad* things in it.


Yes and I agree with you (see the answer to Yauso). The only concern is GPC 
vars overwriting script vars, and as mentioned I unset those var before 
assigning them a value or before using session register to get their values.


-- 
Kriheli Meir

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




Re: [PHP] Re: Trying to avoid code exploits..

2001-08-01 Thread Meir Kriheli

On Wednesday 01 August 2001 13:54, Yasuo Ohgaki wrote:
  I don't think this is much of a problem. I unset() all the global

 session

  variables before I use them so this should be no problem.

 All inputs (GET/POST/COOKIE) from users must be checked if you worriy
 about security. You might done already.

  Even if an attacker tries to set some value for a script variable,

 this var

  will be unset() and then read from the session, so no harm is done.
 
  On the other hand there should be no probelem to change GLOBALS to
  HTTP_XXX_VARS.

 The reason why I recommend to set register_globals=off, is it's a lot
 easier to write secure code with register_globals=off.

Yes I know, but if those scripts are going to be used on different servers, 
with differnet type of php coders, you can't be sure what is the value of 
register_globals (actually, some scripts need it to be on). So it is a little 
work, but you can be sure that your script will work everywhere.

Basically it is a good idea not to write scripts that depent on php's 
settings to make sure that they'll work everywhere.

Take for example the value of magic_quote_gpc. To be sure that your script 
will work correctly, don't assume that it is alywas on (or off). So
you can write 


if (!get_magic_qoute_gpc()) addslashes($var);

or write a function myaddslashes that does the same thing.

 I also recommend you use error_reporting=E_ALL, since it seems you
 care about security. Scripts that I write will catch all
 error/warning/notice as fatal error and displays a page telling There
 is critical error. Details are sent to system administrator. They
 catch most of errors including malformed user inputs, system errors
 like cannot open connections, etc and display appropriate error page.
 They never raise any PHP error/warning/notice unless there is
 something really wrong.

Thanks of this tip :-)

 By the way, my codes posted at zend.com will not catch all errors. I
 didn't put complete sources there. It will be too long for an example

 :)
 :
  But as i've said this isn't a problem. Can you see some way to

 exploit the

  eval() function ?

 I cannot tell if your script is exploitable or not.
 Just too little info to tell that.


Is this staement safe ? 

eval('$a = $GLOBALS[pass1]==$GLOBALS[pass2]');

I've tried different kind of inputs to execute arbitrary php code, but found 
no such exploit. Maybe you can see something that I can't.

 Refer to another my reply, I guess you'll get my point.

 Regards,
 --
 Yasuo Ohgaki


Thanks
-- 
Kriheli Meir

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




Re: [PHP] Re: Trying to avoid code exploits..

2001-08-01 Thread Meir Kriheli

On Wednesday 01 August 2001 15:46, Phil Driscoll wrote:
  Is this staement safe ?
 
  eval('$a = $GLOBALS[pass1]==$GLOBALS[pass2]');

 Maybe I'm missing the point, but why not just go:
 $a = $GLOBALS[pass1]==$GLOBALS[pass2];

I'm writing a form class which can also validate the form and I want to 
define the rules for validating the forms, so when defining the form I can add

$form-AddRule('{pass1}=={pass2}','The 2 passowrd must be equal');

And this rule will be expanded to

$a = $GLOBALS[pass1]==$GLOBALS[pass2]

and validated through eval.

When I call the 

$form-validate();

The class iterates through the rules array and in case of unmet condition 
(!$a) will return the error string associate with the rule.

This method gives a great flexibility, ans as a result I can define any rule 
as long as it is a valid php code.

Hope you get the idea
-- 
Kriheli Meir

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




Re: [PHP] Filtering out \ when a ' is user entered?

2001-06-27 Thread Meir Kriheli - MKsoft

- Original Message - 
From: Marcus James Christian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 6:18 AM
Subject: [PHP] Filtering out \ when a ' is user entered?


 Hello,
 
 I'm pretty new to PHP but all I've seen of it so far I pretty much love!
 
 I've built a web log but when the user enters their data and they use '
 or   (and you know they will)   php always shows it from the included
 web log as
 
 \'  How can I filter out these backslashes so they don't appear on the
 final public viewable page?
 
 Thanks,
 Marcus
 
 --
 Marcus James Christian - UNLIMITED -
 Multimedia Internet Design
 http://mjchristianunlimited.com


You can use stripslashes($yourvar) for this.

You can this behavior off by setting magic_quote_gpc to 
off in php.ini. Please not that  if you'll try to insert this values to 
a database without the slashes, your queries will break, and they'll
become security breaches.

Think about this:

$query = select * from users where username='$u_name';

and the user enters into the $u_name field:
' and '1'='1

Ouch...

However, if those dashes were escaped with slashes, the query 
will execute and return no values.


Never trust input from users, always check it.
--
Meir Kriheli
MKsoft computer systems

  'There's someone in my head but it's not me - Pink Floyd


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




Re: [PHP] simulate form submission

2001-06-19 Thread Meir kriheli

On Tuesday 19 June 2001 11:35, Pascal Polleunus wrote:
 Hi,

 Does someone know how to simulate a form submission?
 I guess I need to do something like
   header(Location: http://www.mysite.com;);
   header($PostVarsData);
 where $PostVarsData must contains the header informations to send the post
 vars

 but what are these header informations?
 how can I handle that?

 Thanks,
 Pascal

You can use the http class from Manuel Lemos, see:

http://phpclasses.upperdesign.com/browse.html/package/3

-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd



Re: [PHP] ANN: Visual PHP Studio 1.0 Field Test 1

2001-05-07 Thread Meir kriheli

On Tuesday 08 May 2001 00:39, elias wrote:

Is it a windows app (I hope it isn't)?

-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd

 Hello.

 Good work!

 Hope it beats DreamWeaver4+EditPlus2

 -elias.

 José León Serna [EMAIL PROTECTED] wrote in message
 002001c0d6e3$35f765a0$469610ac@JLeon">news:002001c0d6e3$35f765a0$469610ac@JLeon...

  Hello:
 I'm proud to announce Visual PHP Studio 1.0 Field Test 1, a tool that
  combines the component technology with the web design, JavaScript and
  PHP. You can download it for free at http://www.visualphpstudio.f2s.com
  in the downloads section. Feel free to vote on the survey and post your
  comments

 on

  the forums to let me know your opinion/ideas. Also download the
  readme.doc from the downloads section to know what works on this Field
  Test 1 and

 what

  are the things are going to come.
 
  Best Regards
  ---
  Visual PHP Studio, RAD development with PHP
  http://www.visualphpstudio.f2s.com

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




Re: [PHP] File Transfer over HTTPS

2001-04-25 Thread Meir kriheli

On Wednesday 25 April 2001 01:15, Rasmus Lerdorf wrote:
  If I wanted to use this utility to copy a file from a users (Windows)
  workstation to my (Linux) webserver, how would I do this?  The program on
  the users workstation will create a file called info.txt and place it
  in c:\wow.  I want it to go to my server upload.mydomain.com.  How do I
  get the file c:\wow\info.txt from the user to my web server over https?

 You'll need the user to run some program that sends it.  Like the curl
 thing if it actually works on Windows.

 -Rasmus

If you're running ssh on the server you can try the scp (secure copy ?) 
protocol. For windows there's is a freeware called winscp (loop it up in 
google). But this has nothing to do with php.

-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd

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




Re: [PHP] user login names/values

2001-04-25 Thread Meir kriheli

On Wednesday 25 April 2001 13:43, Thimo von Rauchhaupt wrote:
 Just to mention security, look at this page:

 http://www.livin4.com/jhacker/jh1.htm

 A simple login isn?t that easy,

If you have magic quotes turned on or use the addslashes function, this 
should be no problem.

Always validate user data 

-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd

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




Re: [PHP] Anyone got the new Postgres 7.1 .rpms working?

2001-04-24 Thread Meir Kriheli - MKsoft


- Original Message - 
From: Geoff Caplan [EMAIL PROTECTED]
To: PHP General List [EMAIL PROTECTED]
Sent: Tuesday, April 24, 2001 12:33 PM
Subject: [PHP] Anyone got the new Postgres 7.1 .rpms working?


 Hi
 
 I am trying to compile the latest version of PHP to work with the new
 Postgres 7.1 on RedHat 6.2
 
 I have installed the Postgres library, client and server .rpms without
 any problems.
 
 Then in the php file /ext/pgsql/php_pgsql.h I have changed the
 #include from postgres.h to postgres_fe.h as recommended.
 
 But my make is failing with the following error:
 
 php_pgsql.h:32: postgres_fe.h: No such file or directory
 php_pgsql.h:33: libpq-fe.h: No such file or directory
 php_pgsql.h:39: libpq/libpq-fs.h: No such file or directory
 
 So far as I can see, none of these files exist in my /usr tree.
 
 Is this a bug with the rpm or am I doing something dumb? My linux
 skills are basic so any help would be much appreciated
 
 Geoff Caplan

I had the same problem, and solved it by creating a symlink name postgres.h
to fostgres-fe.h, and it is working great.

In ypur postgres include dir do:

ln -s postgres-fe.h postgres.h

Meir Kriheli
MKsoft computer systems

  'There's someone in my head but it's not me - Pink Floyd


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




Re: [PHP] About sessions !!

2001-04-24 Thread Meir kriheli

On Tuesday 24 April 2001 17:00, Hassan Arteaga wrote:
 Hi !!

 I just begin with PHP( but is the same as ASP ) and testing some
 examples...

 loock at the code:

 Page 1- Session.php

 ?php
 session_start();
 $myvar = 1;
 session_register(myvar);
 ?
 html
 head
 meta http-equiv=Content-Type content=text/html; charset=windows-1252
 meta name=GENERATOR content=Microsoft FrontPage 4.0
 meta name=ProgId content=FrontPage.Editor.Document
 titleNew Page 1/title
 /head
 body
 Hello visitor, you have seen this page ? echo $myvar; ? times.p
 To continue, A HREF=session1.phpclick here/A
 /body
 /html

 ___


 Page 2- Session1.php
 ?php
 session_start();
 ?
 html
 head
 meta http-equiv=Content-Type content=text/html; charset=windows-1252
 meta name=GENERATOR content=Microsoft FrontPage 4.0
 meta name=ProgId content=FrontPage.Editor.Document
 titleNew Page 1/title
 /head
 body
 Hello visitor, you have seen this page ?php echo $myvar; ? times.p
 Your SID is:  ?php echo SID; ? p
 /body
 /html


 Page 1 is ok..but when I click to go to page 2  I receive this results..

 Hello visitor, you have seen this page times.
 Your SID is: SID

 Who can tell me what happend !!

 Thank you in advanced !!!

 --
 M. Sc. Hassan Arteaga Rodríguez
 Microsoft Certified System Engineer
 Network Admin, WEB Programmer
 FUNDYCS, Ltd
 [EMAIL PROTECTED]

It should be echo $SID (I think) as this is a variable.
As for echo $myvar, You should register it again to use it,
so use session_register(myvar) before echoing it (You should 
increment it as well).
-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd

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




Re: [PHP] Site Structure

2001-04-23 Thread Meir kriheli

On Monday 23 April 2001 22:47, Jaxon wrote:
 Hmm...

 Is there any way to set something like include_path on the fly, so you just
 define all your possible direcories at once in what is essential a 'site
 environment' variable, and then you can include/require your files without
 putting any path info in?

 regards,
 jaxon

Sure you can, set the include_path in your php.ini file.


-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd


  -Original Message-
  From: Toby Miller [mailto:[EMAIL PROTECTED]]
  Sent: Monday, April 23, 2001 3:44 PM
  To: indrek siitan
  Cc: PHP General Mailing List
  Subject: Re: [PHP] Site Structure
 
 
  While it is true that you don't have to put your files in the web
  directory
  at all and it is a more secure option there is still one very large
  inconvenience that prevents me from going with that option. You lose the
  usefulness of just including
  $DOCUMENT_ROOT/yourfolder/yourfilename. This
  is the main reason that I do put my files in the root web
  directory. So how
  do you tell all of your files where your included content is? Do you hard
  code the path in every page? If so, do you also have development,
  stage, and
  live environments that mimic the exact same directory structures?
  If not, do
  you always change the include strings by hand every time you move from
  one environment to another? Do you run into these problems? What kind of
  solutions/workarounds have you implemented?
 
  I have always used this style of including documents because it enables
  me to do my mockup ideas on my Windows machine with PWS. Then I can move
  onto my Linux test box and try the site in my home account. Then I can
  push the exact same code to the dev server which uses www as the root web
  directory.
  Then I can push the exact same code to the staging server for
  clients to see
  which has wwwroot as the root web directory and the live
  environment mimics
  the stage environment so that move makes little to no difference. Now if
  someone else was working on the same project and checked the files out of
  CVS they would have to tweak their copy to work in their special
  environment
  instead of just running and developing the files. This just seems like a
  whole lot of extra work to me. Correct me if I'm wrong, but the only way
  anyone can see the source code of a php file if the extension is
  associated
  with the PHP interpreter is if you provide a phps file that they
  can see or
  if someone uninstalls the PHP interpreter (which bypasses the situation
  because the first condition is no longer being met).
 
  I'm really curious to see how other developers handle these kind of
  development situations.
 
  - Original Message -
  From: indrek siitan [EMAIL PROTECTED]
  To: Toby Miller [EMAIL PROTECTED]; Jordan Elver
  [EMAIL PROTECTED]
  Cc: PHP General Mailing List [EMAIL PROTECTED]
  Sent: Monday, April 23, 2001 1:22 PM
  Subject: RE: [PHP] Site Structure
 
   Hi,
  
Also, it's not a good idea to use the .inc extension unless you've
associated it with PHP. The reason is if I type the URL directly to
/includes/header.inc I will get the source code for that file in text
format.
  
   you don't have to keep your .inc files in the web server document
   root folder at all...
  
  
   Rgds,
 Tfr
  
--== [EMAIL PROTECTED] == MySQL development team == Tallinn / Estonia
  ==--

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




Re: [PHP] PHP standalone script

2001-03-16 Thread Meir kriheli

On Friday 16 March 2001 19:31, Don Pro wrote:
 Hi,

 I've used PHP scripts in my HTML to provide dynamic content but I was
 wondering if I can also use PHP to create standalone scripts on my UNIX
 box.  If so, where is the PHP interpreter and how do I invoke it?

You should configure and compile PHP as a standalone executeable (without 
--with-apxs or without --with-apache) and in the top of your script you 
should put

#!/usr/bin/php -q

or whatever the path to PHP is (check the output of phpinfo() ).

the -q flag is to supress headers.

-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd

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




Re: [PHP] NETSCAPE Screws QUERY STRING!!!!!!

2001-03-04 Thread Meir Kriheli - MKsoft

You should use the urlencode() function.

See

http://www.php.net/manual/en/function.urlencode.php

--
Meir Kriheli
MKsoft computer systems

  'There's someone in my head but it's not me" - Pink Floyd
- Original Message - 
From: "Thomas Edison Jr." [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 04, 2001 2:20 PM
Subject: [PHP] NETSCAPE Screws QUERY STRING!!


 I'm passing variables in a query string to my php
 pages. The variables whose values contain spaces due
 to multiple words are being passed correctly to the
 Internet Explorer browser and are working perfectly
 there. However, they are not working at al in NETSCAPE
 browser. What should i do?
 
 The Internet Explorer converts the spaces in a query
 string into it's hexadecimal value of "%20"
 automatically, but netscape is not doing so. It's not
 reading the space and thus not displaying the page at
 all and giving the HTTP error 400. 
 
 This the link i make :
 a href="add_pro_over.php3?title=? echo $title ?"
 
 if $title contains "Project", it goes.
 But if it contains "Project One" ... it doesn't work
 in NETSCAPE. 
 
 When on to the next page, this $title also has to be
 sent into the Database. 
 
 what do i do?
 
 regards,
 T. Edison jr.



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




Re: [PHP] PostgreSQL vs InterBase

2001-03-02 Thread Meir kriheli

On Friday 02 March 2001 00:23, Shaun Thomas wrote:
 On Thu, 1 Mar 2001, Meir kriheli wrote:
  I use both of the databases (Interbase 6.01 and PostgreSQL 7.1beta4).
 
  PostgreSQL has more features comapared to Interbase (the procedureal
  language is very robust and there are many datatyps to choose from. Also
  you can have some kind of object support in it to inherit tables for
  example), but it's windows implemenation is very hard (at least for me, I
  like to compile it).

 Postgres also has a nasty show-stopping bug they don't seem to want to
 fix.  Try making a stored procedure with many parameters, and send
 a single null to it.  I dare you.  I so love having all of my other
 parameters, and the return value of the function turned into null because
 postgres can't tell where a null occoured.

I don't like stored procedures, or functions in any programming language that 
accepts many parameters, and I avoid the as much as I can. Those things are 
hard to debug and write (hmm, what paraemeters should go here ? :-( ) and 
they hinder the readability of the code.

As for null values, I don't use them as well, I work with different databases 
and each one has their quirks about null. Basiclly null is undefined and 
should stay that way. Usually I decide on an invalid value (such as -1) and 
pass it to the function.

 I also love the fact that you can't drop foreign keys, modify columns,
 drop columns without rebuilding the entire table, etc.  We use it here,
 but it makes me want to pull my hair out.  If someone would just combine
 postgres and mysql, we'd have the best database in the universe.  Fast and
 stable, with all of the RDBMS anyone could want.

Well I can do all of this in mysql because there's no referential integrity. 
You can't drop or modify a column which is reference by a foreign key, 
beacuse  that would break the integrity. You don't need to rebuld the table,
just drop the foriegn key and off you go.

 But as it stands, postgres is still a bit player with an incomplete
 feature set.  But I don't want to start a holy war here, so I'll drop it.

OK.

  As for speed both are very fast (even when compared to commerical DB, in
  my tests the deafult install of Interbase outperfomed the default install
  of Oracle 8i about 10X, tested on P166 with 96MB and PII400 with 192MB).

 This only occours if you don't know how to optimize Oracle.  Oracle is
 *very* picky about *everything*.  You need index tablespaces on separate
 disks from the data tablespaces, and yet another one for system
 tablespaces.  You should also have one for archive logs, redo logs, and of
 course your temporary tables.  Setting it to threading mode is also nice
 for connection pooling and to stop killing your machine under heavy load.

 That, and the machines you've quoted are in no way powerful enough for
 production Oracle databases, period.  You should also run oracle on some
 kind of Solaris/Sun combo.  Raw mount points direct to the actual disks is
 ideal, but loopback filesystems work just as well. Remember to cluster
 your raid into 4 - 6 arrays of 3+ disks, too.  There is no such thing as a
 default Oracle install, because installing oracle on a single user machine
 with one disk and only a little ram (yes, anything under 512 is very
 little for Oracle) will make Oracle look like a piece of crap.

 The point about Oracle is that it *lets* you do all of those
 optimizations, and if you're good at it, it will outperform almost any
 other database you throw at it.  Trust me on this one.

Well let me see,

1. I have several databases to choose from, Which give me the performance I 
need.

2. I don't have to be a DBA to manage them, I don't have to use raids to get 
performance and I don't have to split indexes between hard disks to get 
adaquete preformence.

3. I don't a supercomputer and I can use them in moderate hardware for my 
needs, and I don't have to dedicate plenty of RAM to them.

4. This databases are open-source and don't have linking problems. Anyone 
tried to install Oracle 8.0.5 on Linux (patch-O-rama for Glibc). 8i is a 
resource hog (JVM in the database, are they nuts ?) and i won;t touch it with 
a stick,

5. I can expect this databases to work for me out of the box (out of the 
install in this case)

6. All this databases are free and I can choose the one I want according to 
the task I'm facing, without paying outrages licensing fee to Oracle, and 
spending lots of money on unnedded hardware.

Isn't the choice obvious ? Why would anyone touch Oracle - I guess it is only 
because of their hype and spin - much like some other company I won't mention.

BTW, I was in Oracle's OPP program for quite a while, but left it when 8i 
came out, it was an overkill. (But I sure miss those Oracle parties, They 
were outrages, or as one of their representives said to me, they had lots of 
money the needed to spend).

OK, I'll stop now, I'm running out of air, I think I'm turning blue, Help !! 
Help !! someone

Re: [PHP] Hebrew websites transition with php3 ..

2001-03-01 Thread Meir kriheli

On Thursday 01 March 2001 09:17, Boaz Yahav wrote:

I think that Aviv should stick to logical hebrew (which is the standart, as 
mentioned by Boaz).

I don't use IE (I'm using Linux) and I can access all the logical sites with 
no problem, including the "html dir=rtl" tag and the 'direction: rtl' style (thank 
god for konqueror).

Netsacpe 6/Mozilla should support logical Hebrew pretty soon so no trouble 
there, and if Opera wants to gain market share they shold support the 
standart (logical) in here to.

Altough the 3% estimate seems wrong (as noted by Manuel Lemos - Hi :-) ,  the 
majority of users in Israel are using IE.

One more problem you'll have with visaul hebrew is the ugly line breaks which 
cause the end of the sentence to appear before the start of it.

I had a long discussion of this subject with Manuel off this mailing list. I 
can send you a digest of it if you wish.

-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd

 Hi Manuel,

 All is great, working hard to make WeberDev.com a better place
 for the community and trying to make people understand we don't
 make $$$ from it :)

 The IE / NN war was one that left no chance for NN in Israel.
 While MS spent millions in making all of their products in Hebrew,
 including the free IE, NN refused to support Hebrew.

 While the 3% is correct for Israel, it's far from being true on an
 international basis.

 There are 3 large portals in Israel, 1 supports only IE (MSN),
 and the other two that supported NN, until not long ago, started
 to develop for IE only about 4-6 months ago.

 This is why there is no reason to support anything other than
 IE in Israel.

 With all due respect to people that like other browsers, developing
 for all browsers costs lots of $$$ and as long as portals are free
 and loosing lots of $$$ it's not profitable to develop for all.

 Bottom line, as the CTO of one of those portals I say go
 with Logical Hebrew and dump Netscape (In Israel Only).

 and don't forget to add the HTML DIR="rtl" tag at the
 beginning of each page.

 Sincerely

   berber

 Visit http://www.weberdev.com Today!!!
 To see where PHP might take you tomorrow.


 -Original Message-
 From: Manuel Lemos [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 28, 2001 10:51 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] Hebrew websites transition with php3 ..


 Hello Boaz,

 How are you doing these days? :-)

 On 28-Feb-01 16:39:35, you wrote:
 The figures I'm giving you are from one of the two biggest portals in
 Israel.
 it's less than 3%.

 Mind me for jumping in, but I think Aviv question about the truth of the 3%
 figure ie very pertinent.

 The way I see it it is a gross mistake to assume that the audience of a
 large portal is necessary a reflex of the potential audience of that
 portal.

 I also work for a large portal company (not for the Hebrew audience though)
 and I found people making the same large mistake.  They looked at the sites
 audience and figure that there is over 90% of Internet Explorer users in a
 site that used IE specific DHTML.  Needless to say that it didn't show
 right in Netscape.

 Given that sites do not show right in certain browsers, it looks obvious
 that almost nobody using those browsers would show in the browser audience
 rates.

 I even wonder why there are still 3% of users of browsers that do not
 support logical Hebrew display that go to your portal.  Same for the 10% of
 Netscape users that go to that other site in my company portal.  Maybe
 those are just lurkers that went there and gave up on the site and did not
 return because they could not see right what was in there.

 The reality is that it turns out that there is still about 30% os Netscape
 users, meaning that if you force a certain type of display that they don't
 see right, you loose their audience.

 Just my .02 EUR. :-)

 Manuel Lemos

 I'm not sure about Opera, if you are developing for an Israeli
 audience, you can simply develop for IE 4.x and up.
 
 anyone with any other browser can go and get IE :)
 
 -Original Message-

 From: Aviv Revach [mailto:[EMAIL PROTECTED]]

 Sent: Tuesday, February 27, 2001 4:03 PM
 To: Boaz Yahav; [EMAIL PROTECTED]
 Subject: RE: [PHP] Hebrew websites transition with php3 ..
 
 
 Hey!
 
 Thank you for the quick reply.
 
 I do have some questions regarding your answer.
 
  From what I know and have seen so far, there are more than just 3%
 Internet users in Israel which use Netscape 4.x (I use it myself...).
 Are you sure that I should just ignore these people, and just use logical
 Hebrew?
 
 Also, quite a lot of people started using Opera lately.. (ain't speaking
 about Israeli users).
 Does Opera supports Logical Hebrew? If so, from which version?
 
 
 Best Regards -
 
Aviv Revach
 
 At 15:20 28/02/01 +0200, Boaz Yahav wrote:
 Hi Aviv
 
 Let me give you a small tip about Hebrew on the net.
 
 The proper Hebrew code which was adopted by t

Re: [PHP] PostgreSQL vs InterBase

2001-03-01 Thread Meir kriheli

On Wednesday 28 February 2001 06:19, [EMAIL PROTECTED] wrote:
 Arnold Gamboa wrote:
  I hve heard a great deal about InterBase.  Please comment on which is
  better:
 
  1.  Speed
  2.  Data Reliability
  3.  Compatibility with PHP
 
  Thanks for your comments.
 
  --

 1. I think Postgresql
 2 and 3 I can't say which is better. Both seem to work ok - you might
 want to search for postgresql and persistent connections in the archives
 - seems they aren't perfect yet.

I use both of the databases (Interbase 6.01 and PostgreSQL 7.1beta4).

PostgreSQL has more features comapared to Interbase (the procedureal language 
is very robust and there are many datatyps to choose from. Also you can have 
some kind of object support in it to inherit tables for example), but it's 
windows implemenation is very hard (at least for me, I like to compile it).

As for speed both are very fast (even when compared to commerical DB, in my 
tests the deafult install of Interbase outperfomed the default install of 
Oracle 8i about 10X, tested on P166 with 96MB and PII400 with 192MB).

-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd

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




Re: [PHP] Hebrew websites transition with php3 ..

2001-03-01 Thread Meir kriheli

As Boaz suggested look into hebrev and hebrevc functions. They are the only 
ones I can think about right now.

check 
http://php.net/hebrev
http://php.net/hebrevc

the manual states that this functions are defined in PHP3 and PHP4.

HTH
-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd


On Wednesday 28 February 2001 17:00, Aviv Revach wrote:
 Hey!

 Ok, I think that I will stick to logical Hebrew as most of you suggested.

 But still, I'm interested in knowing how could I take a HTML document which
 contains
 HTML tags, Hebrew words and English words, and reveres only the Hebrew
 words (making
 them Visual Hebrew) using only php3 functions (the server I'm using doesn't
 support php4).

 It would be great if anyone could point of a solution for doing that.
 By writing a script that will do that, I will both options - show the
 Hebrew in my website as Logical or use a script to translate it into visual
 Hebrew for browsers who do not support it.

 Thank you in advance -

Aviv Revach

 At 16:45 01/03/01 +0200, Meir kriheli wrote:
 On Thursday 01 March 2001 09:17, Boaz Yahav wrote:
 
 I think that Aviv should stick to logical hebrew (which is the standart,
  as mentioned by Boaz).
 
 I don't use IE (I'm using Linux) and I can access all the logical sites
  with no problem, including the "html dir=rtl" tag and the 'direction:
  rtl' style (thank
 god for konqueror).
 
 Netsacpe 6/Mozilla should support logical Hebrew pretty soon so no trouble
 there, and if Opera wants to gain market share they shold support the
 standart (logical) in here to.
 
 Altough the 3% estimate seems wrong (as noted by Manuel Lemos - Hi :-) , 
  the majority of users in Israel are using IE.
 
 One more problem you'll have with visaul hebrew is the ugly line breaks
  which cause the end of the sentence to appear before the start of it.
 
 I had a long discussion of this subject with Manuel off this mailing list.
  I can send you a digest of it if you wish.
 
 --
 Meir Kriheli
 
There's someone in my head, but it's not me - Pink Floyd
 
   Hi Manuel,
  
   All is great, working hard to make WeberDev.com a better place
   for the community and trying to make people understand we don't
   make $$$ from it :)
  
   The IE / NN war was one that left no chance for NN in Israel.
   While MS spent millions in making all of their products in Hebrew,
   including the free IE, NN refused to support Hebrew.
  
   While the 3% is correct for Israel, it's far from being true on an
   international basis.
  
   There are 3 large portals in Israel, 1 supports only IE (MSN),
   and the other two that supported NN, until not long ago, started
   to develop for IE only about 4-6 months ago.
  
   This is why there is no reason to support anything other than
   IE in Israel.
  
   With all due respect to people that like other browsers, developing
   for all browsers costs lots of $$$ and as long as portals are free
   and loosing lots of $$$ it's not profitable to develop for all.
  
   Bottom line, as the CTO of one of those portals I say go
   with Logical Hebrew and dump Netscape (In Israel Only).
  
   and don't forget to add the HTML DIR="rtl" tag at the
   beginning of each page.
  
   Sincerely
  
 berber
  
   Visit http://www.weberdev.com Today!!!
   To see where PHP might take you tomorrow.
  
  
   -Original Message-
   From: Manuel Lemos [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, February 28, 2001 10:51 PM
   To: [EMAIL PROTECTED]
   Subject: RE: [PHP] Hebrew websites transition with php3 ..
  
  
   Hello Boaz,
  
   How are you doing these days? :-)
  
   On 28-Feb-01 16:39:35, you wrote:
   The figures I'm giving you are from one of the two biggest portals in
   Israel.
   it's less than 3%.
  
   Mind me for jumping in, but I think Aviv question about the truth of
   the 3% figure ie very pertinent.
  
   The way I see it it is a gross mistake to assume that the audience of a
   large portal is necessary a reflex of the potential audience of that
   portal.
  
   I also work for a large portal company (not for the Hebrew audience
   though) and I found people making the same large mistake.  They looked
   at the sites audience and figure that there is over 90% of Internet
   Explorer users in a site that used IE specific DHTML.  Needless to say
   that it didn't show right in Netscape.
  
   Given that sites do not show right in certain browsers, it looks
   obvious that almost nobody using those browsers would show in the
   browser audience rates.
  
   I even wonder why there are still 3% of users of browsers that do not
   support logical Hebrew display that go to your portal.  Same for the
   10% of Netscape users that go to that other site in my company portal. 
   Maybe those are just lurkers that went there and gave up on the site
   and did not return because they could not see right what was in there.
  
   The reality 

Re: [PHP] Forms

2001-02-15 Thread Meir kriheli

Hi,

You can also try Manuel Lemos's form class, which can handle all this and 
many more. Check:

http://phpclasses.upperdesign.com/browse.html/package/1

From the class description:
snip
Class that generates HTML forms supporting:
- XHTML compliant output.
- Keyboard navigation support:
* Attachment of labels with activation keys to each form field.
* Tab navigation order index.
- Built-in server side (PHP based) and client side (Javascript 1.0 or better) 
field validation for:
* E-mail address
* Credit card numbers (Visa, Mastercard, American Express, Discover, Diners 
Club, Carte Blanche, enRoute, JCB, any of these or even determined by a 
select field).
* Regular expressions.
* Field not empty.
* Field equal to another (useful for password confirmation fields).
* Field different from another (useful for reminder fields that must not be 
equal to the actual password).
* As set (for check boxes and radio buttons).
* As integer number (with range limitation).
* As floating point number (with range limitation).
* Programmer defined client and server validation functions.
- Ability to stop the user from submiting a form more than once inadvertdly.
- Sub form validation (validate only smaller set of field depending on the 
submit button that was used).
- Composition and generation of the form HTML output with fields displayed as 
fully accessible or in read-only mode.
- Generation of Javascript functions (useful to set to the page ONLOAD event):
* Set the input focus to a field.
* Select the text of a field.
* Set the input focus and select the text of a field.
* Enable and disable input fields
- Automatic capitalization of the text of a field:
* Upper case.
* Lower case.
* Word initials
- Etc.
/snip

HTH
-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd


On Thursday 15 February 2001 01:01, Augusto Cesar Castoldi wrote:
 with the password you can use the funcio srtlen:

 $number_of_chars=strlen($password);

 Where are the right password? On a database??

 In the site http://www.hotscripts.com you'll find a lot of script exemplos
 in PHP and JavaScript to verify if a e-mail typed is right.

 Augusto Cesar Castoldi

 On Wed, 14 Feb 2001, Brandon Feldhahn wrote:
  how can i make somthing that nows if there are 6-12 chars in a password
  field. Also how do you make somthing the know is the password, and the
  password confermation is the same. And finnally i need a script that
  know if they filled all the form fields, and one that know if they put
  and "@" in there e - mial
 
  sorry for all the request but i just cant find it anywere and i need a
  little help to get my buissness going
 
  -Thank you for you time
  Brandon


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




Re: [PHP] Re:What version of Linux?

2001-02-02 Thread Meir kriheli

On Friday 02 February 2001 17:09, Christian Reiniger wrote:
 On Friday 02 February 2001 05:32, John Hinsley wrote:
   I want to install my personal server on a old Intel 486 machine, 36
   Mb RAM, 2 Gb HardDisk, VGA, to develop in PHP. What version of Linux
   do I need to install?

You can also try the LinuxFromScratch project, there you can install the
minimum needed stuff, and tweak it to your liking.

It will take you a few days but IMHO it's worth the trouble (and you'll learn
much more about linux that way).

check

 http://www.linuxfromscratch.org

-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd

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




Re: [PHP] looking for a PHP editor

2001-01-11 Thread Meir Kriheli - MKsoft

 hi..

 ..i am curious if theres anny linux (x, KDE, Gnome) php editor with syntax
 highliting and this things...

 markus


You can also try quanta+ for the KDE desktop,

http://quanta.sourceforge.net

Meir Kriheli
MKsoft computer systems

  'There's someone in my head but it's not me" - Pink Floyd


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




Re: [PHP] ibase (firebird) localhost login ?

2001-01-11 Thread Meir Kriheli - MKsoft

use

localhist:path_to_your_db/your_db.gdb

example :

on *nix:

localhost:/opt/interbase/db/my_db.gdb

on win*

localhost:c:\ib_db\my_db.gdb

Meir Kriheli
MKsoft computer systems

  'There's someone in my head but it's not me" - Pink Floyd
- Original Message -
From: "Richard Lynch" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 11, 2001 9:03 AM
Subject: Re: [PHP] ibase (firebird) localhost login ?


 Most dbs use "localhost" for that, and the database username/password that
 is configured into the database software/tables...

 I know nothing of Interbase, but that's how all the others work...

 If "localhost" doesn't work for the host, try "127.0.0.1"

 - Original Message -
 From: "Chris Hayes" [EMAIL PROTECTED]
 Newsgroups: php.general
 Sent: Wednesday, January 10, 2001 5:21 PM
 Subject: [PHP] ibase (firebird) localhost login ?


  hi,
  I know it's slightly off topic but i hope you;ll forgive me.
  i'm testing interbase because someone on this list mentioned it would be
 a
  good offline database.
 
  Interbase ('firebird') wants to connect to the local server (i'm running
  WAMP - Windows, Apache, MySQL, PHP), and interbase needs a username.
 
  But its all local, not connected. So what should i tell interbase??
 
  Chris
 
  PS i AM currently downloading the manual but that will take another hour
 (10
  MB, bad line, was interrupted several times )
 
 
 
  
  --  C.Hayes  Droevendaal 35  6708 PB Wageningen  the Netherlands  --
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


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




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