[PHP] Some questions on PHPUnit

2001-04-25 Thread Steven Haryanto
Does anyone here use PHPUnit? 1. If a test script needs some external input to do testing (notably, database connect info), is it a good idea to present an HTML form to ask input from user? Or should it also be able to prompt the user for these in case the test script is run by the PHP binary.

[PHP] safe uploading with PHP

2001-04-25 Thread Steven Haryanto
I am sorry if this is one of the FAQ. Last time I checked (well, a few months ago), PHP has the vulnerability that the user who submitted the form can manipulate the global namespace to let PHP pick up arbitrary file in the system. Can we now do safe file uploading without turning off registe

Re: [PHP] maximum length of email address

2001-04-25 Thread Steven Haryanto
At 4/26/2001 01:08 AM, Dennis Gearon wrote: >I've gone through the archives and through a bunch of RFC's, but have >had no luck in finding for email addresses. Anybody >know if there is one and what it is? Perhaps it's one of those undefined values (like the maximum length of an URL)? The usern

Re: [PHP] OOP and Future of PHP

2001-04-25 Thread Steven Haryanto
At 4/25/2001 09:02 PM, Reuben D Budiardja wrote: >The only thing that I feel lack of in PHP is the real Object >Oriented stuff, such as information hiding in the object in >classes i.e. private and public variables, methods/functions. > >This in a sene make it really difficult for developer to

Re: [PHP] Globalness of variables? Functions & subs

2001-04-26 Thread Steven Haryanto
At 4/25/2001 08:11 AM, Dexter wrote: >I see functions , are there subroutine calls. I guess >not. A function acts as a sub when it returns no value . A >sub that returns a value is a function. You probably came from Pascal or something similar, which formally separate 'function' from 'proce

RE: [PHP] translating a function from Perl to PHP

2001-04-26 Thread Steven Haryanto
At 4/26/2001 05:33 AM, ..s.c.o.t.t.. [gts] wrote: >i tried to do it myself and nearly fell off >my chair becuase PHP makes you jump through >hoops to do such a simple thing > >print preg_replace('/<%([a-zA-Z]*)%>/e', "\$mioArray['$1']", $testo); > >i never could understand why other languages

Re: [PHP] OOP and Future of PHP

2001-04-26 Thread Steven Haryanto
At 4/26/2001 12:10 PM, Yasuo Ohgaki wrote: > > What I *really* like to see in PHP is: > > > > - NAMESPACE > > - TRACEBACK INFO > > - exception (try-except block) > > - $obj->method()->anotherMethod() > > - real destructor would be nice, but not extremely important for > >the time being, due to

Re: [PHP] What's wrong with Apache + php + mysql on Windows?

2001-04-27 Thread Steven Haryanto
Are you referring to delay in executing PHP scripts? If you run PHP as a CGI binary, that would give significant slowdown. CGI's are much slower in Windows than in Linux. Or perhaps you are running out of RAM? That really slows the whole thing down. Steve At 4/27/2001 06:14 AM, Mig wrote: >Hell

Re: [PHP] Sorry, wrong sebject :)

2001-04-27 Thread Steven Haryanto
At 4/27/2001 07:35 PM, Manesh wrote: >I need a free web server that gives me 1 Myslq accound and php hoasting! if >soneone know of any please tell me. > >thx search php knowlegde base at www.faqts.com, you'll find a bunch of such links there. -- sh -- PHP General Mailing List (http://www

Re: [PHP] Where is php.ini located by default?

2001-04-28 Thread Steven Haryanto
btw, i found that the configure option: --with-config-file-path=PATH is slightly misleading, as "PATH" to usually refers to a file location. moreoever, php does not report if it fails to read a php.ini. perhaps the text should be rewritten as: --with-config-file-path=DIR Steve At 4/28/20

[PHP] Please review our coding standards

2001-04-28 Thread Steven Haryanto
rary codes should probably assume magic_quotes_gpc is off, so it does not bother with stripslashing. 10. References -- - PHP coding standards - PEAR documentation - PEAR coding standards - phpunit documentation 12. Comments, suggestions? -- If you do

[PHP] template solutions?

2001-04-29 Thread Steven Haryanto
Does anyone know a rather advanced template solution in PHP? At least one that supports loop and if (like HTML::Template), and directives/commands would be nice (like Perl's Template Toolkit). I am currently rolling my own, but still not happy with the result of the design. I'd be happy to use on

Re: [PHP] MySQL capabilities

2001-04-29 Thread Steven Haryanto
This is perhaps more suited on mysql mailing list, but anyway... On 4/29/2001 06:18 PM, José León Serna wrote: > Hello: > Since no one asks my question about access to InterBase from PHP, I'm > considering MySQL ;-) > I would like to know more about the reliability and functionality from

Re: [PHP] integer checking problem from query string

2001-04-29 Thread Steven Haryanto
Because it's a string. You can use regex matching or test whether floor($var) == $var, for example. Steve At 4/29/2001 04:25 AM, Jamie Saunders wrote: >Hi, > >I'm submitting a phone number from an HTML form to a PHP page >that examines it to see if it's an integer: > >form.html: > >validate.ph

Re: [PHP] template solutions?

2001-04-30 Thread Steven Haryanto
as made for. > >On Sun, 29 Apr 2001, Steven Haryanto wrote: > > > Does anyone know a rather advanced template solution in PHP? > > At least one that supports loop and if (like HTML::Template), > > and directives/commands would be nice (like Perl's Template > > To

Re: [PHP] template solutions?

2001-04-30 Thread Steven Haryanto
, Michael Kimsal wrote: >No, you're asking for something with loops and IFs. That's a programming >language. > > >On Tue, 1 May 2001, Steven Haryanto wrote: > > > Actually, not using a programming language is the point of template, > > since I do not want to

Re: [PHP] template solutions?

2001-04-30 Thread Steven Haryanto
At 5/1/2001 01:43 AM, Michael Kimsal wrote: >I understand completely what you're getting at already, but PHP is >designed to do what you're asking to do. > >I know there are valid reaons for stripped down implementations, but can't >think of too many. Clean separation of content and presentation?

Re: [PHP] template solutions?

2001-04-30 Thread Steven Haryanto
At 5/1/2001 01:43 AM, Fabian Raygosa wrote: >Maybe this is what you are looking for >http://www.thewebmasters.net/php/FastTemplate.phtml Nope. I was looking for a template that supports loops and IFs. Someone pointed me to php dreamtime: http://www.phptemplates.org/ which is a cool project, b

Re: [PHP] template solutions?

2001-04-30 Thread Steven Haryanto
#x27;ed by my PHP script. Just letting a user modify a template and changing the look of a page is sufficient for me, since that is all the user is supposed to gain access to. Regards, Steve At 5/1/2001 02:23 AM, Dave Goodrich wrote: >On Monday, April 30, 2001, at 12:02 PM, Steven Haryanto wr

Re: [PHP] template solutions?

2001-04-30 Thread Steven Haryanto
At 5/1/2001 03:05 AM, Dave Goodrich wrote: >>In PHP, if I have my database password in a global var $dbpass, >>I cannot prevent this code: >> >> eval('echo $dbpass'); >Never put your DBPass into a GLOBAL ;^) Hm, perhaps creating a function do_connect('hostname','user','pass') is safer? Good idea

RE: [PHP] template solutions?

2001-05-01 Thread Steven Haryanto
Cool. I didn't know that. Does FastTemplate support nested loop and ifs? Steve At 5/1/2001 10:33 PM, Henning Kilset Pedersen wrote: >Fasttemplate supports loops and if's. > >You set a dynamic block like so: > > > > {ROWCONTENT} > > > >And then in the PHP code that parses this html template (.t

Re: [PHP] template solutions?

2001-05-01 Thread Steven Haryanto
At 5/1/2001 06:49 PM, Michael Kimsal wrote: >The 'security' angle is the only one I consider terribly valid, an was >what I had in mind when I said I can't think of too many reasons why a >packaged' template' solution is in order. Obviously it is for you. > >I still believe that in most cases it

Re: [PHP] Please review our coding standards

2001-05-02 Thread Steven Haryanto
At 5/2/2001 12:46 PM, Anuradha Ratnaweera wrote: >Most of your guidelines match with our practices. Here are some comments. Thanks for the comments. > > 1.4 Whitespaces > > > > - No whitespace after function or method name. Example: > > > > exit() > >We also use this. But I have s

[PHP] class (not class instance) variables

2001-05-05 Thread Steven Haryanto
Am I correct that PHP does not support class variables? That is, variables that belong to a class and not copied into every object. I need to put several arrays for information about a class, and I do not want to bloat every object with this data (since potentially I will create many instances of

[PHP] hosting "closed" web application for multiple users

2001-05-19 Thread Steven Haryanto
I have a requirement like this: - the php script should be runnable by httpd user only. - the php script will include other files. - the php script should run as the user. - the user must not be able to access the source code of the scripts. What I can think of so far: Put the script in a di

RE: [PHP] hosting "closed" web application for multiple users

2001-05-19 Thread Steven Haryanto
Actually, We _are_ considering of buying Zend Encoder, but in the middle of thinking for alternatives... :-) However, sometimes vendors do not want user to have access to the _binary also_ (and then run it somewhere else), so that needs some extra protection other than the Encoder too. Regards,

RE: [PHP] hosting "closed" web application for multiple users

2001-05-19 Thread Steven Haryanto
cache file and distribute it? does the file need to be run with apc also? or can the plain zend engine handle it? steve At 19/05/2001 22:45, Matthias Winkelmann wrote: > > -Original Message- > > From: Steven Haryanto [mailto:[EMAIL PROTECTED]] > > > > > >

Re: [PHP] is mod_php4 faster than mod_perl?

2001-05-19 Thread Steven Haryanto
apples & oranges. :) but mod_php without cache (e.g., zend cache) still suffers from an overhead of recompiling scripts in every request (serious overhead if the site is complex). -- sh On 19/07/2001 11:03, Christopher Leigh wrote: >i'm wondering if mod_php4 is faster than mod_perl. > >thank yo

Re: [PHP] ok, are servlets/jsp faster than php4?

2001-05-20 Thread Steven Haryanto
yes, i have discovered recently that php is not as fast as it is hyped to be. don't get me wrong. php is fast, but it depends on how you arrange your scripts. if you include a lot of library code (PEAR, etc etc), the overhead would increase and increase. i thought php has always cached compiled sc

[PHP] Cache-Control: no-cache and browser back button problem

2002-02-10 Thread Steven Haryanto
why does the cache control header generated by php (under session_cache_limiter = nocache) needs to have no-store? It makes pressing Back in the browser requests a new version of the page (which is unwanted in some situations, e.g. while filling form and needs to edit a few fields before re-su

Re: [PHP] php not run as cgi.

2001-07-01 Thread Steven Haryanto
On 01/07/2001 02:49, Jack wrote: >hi everyone, > Does anyone know the best way to secure php source code so it is not >group/world readable? >I can read other users' php source code by writing a simple php script. >I do not prefer to run php as cgi because all user's php file need to >add the hea

[PHP] POST data is lost on PHP CGI after shmat() failed. [4.0.5, Linux]

2001-07-13 Thread Steven Haryanto
I have two CGI PHP installation on my Linux system. One of them is a vanilla build (all defaults except --prefix and --with-config-file-path, and the other is built with the .spec file from rpms.arvin.dk). POST method does not work with the arvin PHP CGI binary, while it works ok with the vanilla