Re: [PHP-DEV] [PATCH] Repost: html_errors more readable

2003-08-14 Thread Jani Taskinen
Why don't you just use the existing ini options: ; String to output before an error message. ;error_prepend_string = "" ; String to output after an error message. ;error_append_string = "" ?? --Jani On Tue, 5 Aug 2003, Stefan Walk wrote: >

Re: [PHP-DEV] [PECL-PROPOSAL] stats

2003-08-14 Thread Andrey Hristov
Moriyoshi, I forgot to say that examples most probably will be available soon written by Ed Luschei. He uses GD for visualisation. Andrey - Original Message - From: "Moriyoshi Koizumi" <[EMAIL PROTECTED]> To: "Andrey Hristov" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, Aug

RE: [PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-14 Thread Wez Furlong
No :) If you are really worried about these kind of attacks, I suggest you read one of the many articles that explains how to write a secure PHP application. You can also take it further and write a "user input" filter using the framework that Rasmus added for this purpose (mostly from a XSS poin

Re: [PHP-DEV] [Review] Route stat() family of calls via wrapper ops.

2003-08-14 Thread Melvyn Sopacua
On Wednesday 13 August 2003 20:13, Moriyoshi Koizumi wrote: > 304 Not Modified > > "r--" Since we're looking at "simple http access" I don't think this should return readable. Normally you would not be able to set headers when using fopen('http://') (right?), so technically, you would not be ab

Re: [PHP-DEV] win32 questions - try 2

2003-08-14 Thread Ilia Alshanetsky
As far as I can tell your patch would not have any affect on existing *nix based code. So, the only possibility is either a working pspell extension for windows or a broken one. The latter would not be an issue since we didn't have such an extension before anyway. I'll talk to Edin who is our w

Re: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-14 Thread Cristiano Duarte
Hi all, SK> Maybe it will be better to have this method in all classes and define SK> default behavior such as existing ( string )$object cast? I guess that using an interface is better. But if the guys here think different I would revert to the patch with no interfaces. AK> According to the curr

Re: [PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-14 Thread Mark J . Hershenson
On Thursday, Aug 14, 2003, at 00:45 US/Pacific, Steven Brown wrote: On Thu, 14 Aug 2003, moshe doron wrote: What about hacking somehow the sqlite library to disallow chained queries (or at least do it optionally)? This behavior is *huge* security hole, allow to the cracker drop ur database using s

Re: [PHP-DEV] shutdown_memory_manager and resource handling

2003-08-14 Thread Justin Hannus
> do you use any shared php extensions by any chance? Yes, I'm developing an extension to wrap Apple's OpenDirectory API (reffer to my first post). Thats the only shared extension that I'm using. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php

Re: [PHP-DEV] Re: Extension building problems

2003-08-14 Thread Brian J. France
Here is a patch, it is actually two lines that need changed. Thanks, Brian On Thu, 14 Aug 2003 00:17:11 +0200 (CEST), Sascha Schumann wrote: >> Did something change recently to cause this? If nobody sees a >> problem with the change I am going to check it in. > > There are some translit i

Re: [PHP-DEV] win32 questions - try 2

2003-08-14 Thread Ilia Alshanetsky
Vald, If you want it to be part of the 4.3.3 release, you need to backport your changed to PHP_4_3 branch. Ilia On August 13, 2003 03:19 pm, Vlad Krupin wrote: > Ok, looks like all win32 experts are on vacation, or have no opinion. > I've implemented win32 build to the best of my knowledge, and

[PHP-DEV] New COM (and .Net) extension for php5

2003-08-14 Thread Wez Furlong
Just FYI, I've committed the new COM and .Net extension for php5. Although it doesn't yet have all the features of the php4 extension, it should be as usable (perhaps better than?) what you have been used to with php4. The .Net support requires the mscoree.h header file from the .Net SDK to be p

Re: [PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-14 Thread Mark J . Hershenson
Sorry: That code should have been: $id = some_escape_string_function( intval( "0; drop bar" ) ); if( $id > 0 ) { lamesql_query( "select foo from bar where id = '$id'" ) ); } else { // Error? } Just wa

[PHP-DEV] Extension building problems

2003-08-14 Thread Brian J. France
I am having problem building extension with long names. As an example say my extension name is f_name_bar and F_NAME_BAR_SHARED_LIBADD is used to link libraries. The problem is when the Makefile is generated I get F_NAME_BAR_SHARED_LIBADD at the top of the M

Re: [PHP-DEV] variable_exists() patch

2003-08-14 Thread walt boring
Ilia Alshanetsky wrote: Do we really need this function? I see 2 ways of 'implementing' this functionality in PHP without having to add another function. For example: (isset($var) || is_null($var)) or gettype($var). Ilia I for one would like to see something like variable_exists(), as I am v

Re: [PHP-DEV] win32 questions - try 2

2003-08-14 Thread Vlad Krupin
I wasn't really intending for it to be there since it is in RC stage, and this is technically "new functionality". I thought it is "too late", but, if not, I'll do that. There are only a few lines of code to backport. My big question is how to get the code to be in win32 snapshots and ultimatel

Re: [PHP-DEV] shutdown_memory_manager and resource handling

2003-08-14 Thread Thies C. Arntzen
On Thu, Aug 14, 2003 at 08:35:47AM -0400, Justin Hannus wrote: > > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Can't you get a line number and the actual address being accessed to cause > > that crash? > > Here is a more detailed backtrace. In my original po

Re: [PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-14 Thread Hartmut Holzgraefe
Ard Biesheuvel wrote: Disallowing chained queries will prevent *every* developer from ever using it. thats why i suggested earlier to maybe make it a runtime configurable feature that defaults to 'off' -- Hartmut Holzgraefe <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing Lis

Re: [PHP-DEV] [Review] Route stat() family of calls via wrapper ops.

2003-08-14 Thread Moriyoshi Koizumi
"Sara Golemon" <[EMAIL PROTECTED]> wrote: > http:// wrapper: > is_writable() would always return false. > is_readable() would return true *IF* a HEAD request returned 2xx or 3xx > is_executable() would always return false. > file_exists() would return true if a HEAD request returned 2xx, 3

[PHP-DEV] Custom PHP session handler (MS SQL) and register_shutdown_function()?]

2003-08-14 Thread Tony Bibbs
Original Message Subject: RE: Custom PHP session handler (MS SQL) and register_shutdown_function()? Date: Thu, 14 Aug 2003 17:12:41 +0100 From: James Cox To: 'Tony Bibbs' The list is now [EMAIL PROTECTED] ... -Original Message- From: Tony Bibbs [mailto:[EMAIL PR

[PHP-DEV] weird behaviour with ext/tokenizer and heredoc

2003-08-14 Thread Patrick Preuster
Hello, when playing around with ext/tokenizer, I found a weird behaviour with the T_END_HEREDOC token. I got "FOO;;" instead of the expected "FOO" as token. As a consequence I wrote a patch for the Zend Engine that should fix ext/tokenizer and makes the special stuff for T_END_HEREDOC in zend_high

Re: [PHP-DEV] PHP archive

2003-08-14 Thread Simeon Koptelov
Hello Cristiano, Wednesday, August 6, 2003, 9:00:41 AM, you wrote: CD> What was proposed is something like this: CD> File: application.php CD> include_once ("classes/MyClass.inc.php"); CD> $f = fopen("files/test.txt", "r"); CD> ... ?>> CD> The archive my_application.par (could be an .zip, etc)

[PHP-DEV] Re: PHP compiler

2003-08-14 Thread DvDmanDT
Checkout binaryphp at sourceforge... It's quite cool really... -- // DvDmanDT MSN: [EMAIL PROTECTED] Mail: [EMAIL PROTECTED] "Jeremy S. Johnstone" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > After seeing the conversation on the PHP archive idea (having a PHP > equivalent of a

[PHP-DEV] CVS Account Request: neufeind

2003-08-14 Thread Stefan Neufeind
working on pear-package Validate; already have the okay for my contributions from package-lead -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] CVS Account Request: luckyguy354

2003-08-14 Thread LuckyGuy354
Translate PHP Manual to Bahasa Indonesia -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re[2]: [PHP-DEV] PHP compiler

2003-08-14 Thread Antony Dovgal
On Wed, 6 Aug 2003 21:37:26 +0600 Simeon Koptelov <[EMAIL PROTECTED]> wrote: > Then the jar-like archives is all that we really need :) And in web apps > this will be very handy too. > > There's no need in PHP code compilation in this case -- you simply > pack all package files and dirs in one ar

[PHP-DEV] MySQL Problem retrieving errno, when connect fails + solution

2003-08-14 Thread Michael Bretterklieber
Hi, There is a problem in the MySQL extension when trying to get the errno, if the connection failed, if a prior mysql_connect() call already succeeded: mysql_connect('host', 'user', 'pw'); mysql_connect('host2', 'user2', 'pw2'); echo mysql_errno(); echo mysql_error(); Assuming the first call su

Re: [PHP-DEV] win32 questions - try 2

2003-08-14 Thread Vlad Krupin
Edin Kadribasic wrote: Hi Vlad, 1. Where can I get includes and libs for MSVC++? http://aspell.net/win32/files/aspell-dev-0-50-3-3.zip It has both the headers and the library. Just uncompress it into the same directory where 'php-src' is located, and then rename the directory to 'aspell' (I foll

[PHP-DEV] Weird in the HEAD

2003-08-14 Thread Sebastian Bergmann
Something weird is going on in HEAD. While running the PHPUnit testsuite I get a lot of these warnings "Invokation of 's constructor failed in on line " After that a "Debug Assertion Failed!" popup window opens. Backtrace is as follows _free_dbg_lk(void * 0x00ade2a0, int 1) line 10

Re: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-14 Thread Cristiano Duarte
Simeon Koptelov wrote: Hello Cristiano, Here's why i think that interface is not good solution. We need the toString method like java's one to safely assume that _every_ object has the string representation. This means we can say $obj1->toString() and $obj2->toString() and don't care if $obj1 and

Re: [PHP-DEV] variable_exists() patch

2003-08-14 Thread Stefan Walk
On Thu, Aug 14, 2003 at 11:15:51AM -0700, walt boring wrote: > I for one would like to see something like variable_exists(), as I am > very annoyed with > the logic of isset() returning false if the variable exists and has a > value of null. [snip] > I for one would much rather do > if ( vari

[PHP-DEV] PHP regular expressions

2003-08-14 Thread Vesselin Atanasov
Hello. In regex/utils.h there is a definition for DUPMAX: #ifdef _POSIX2_RE_DUP_MAX #define DUPMAX _POSIX2_RE_DUP_MAX #else #define DUPMAX 255 #endif On Linux with glibc this effectively sets the DUPMAX count to 255. But I think that this number is too low, so there is no way to use a regex lik

Re: [PHP-DEV] Patch for Zend engine linker error

2003-08-14 Thread Zeev Suraski
Thanks, it's fixed now... Zeev At 02:43 06/08/2003, Vesselin Atanasov wrote: Hello. The lastest CVS fails to compile under Linux. An error occurs because the linker cannot find the "empty_fcall_info_cache" symbol. diff -ruN php5-200308051930.orig/Zend/zend_execute_API.c php5-200308051930/Zend/zen

[PHP-DEV] STDOUT, STDERR not defined in CLI mode

2003-08-14 Thread Alex Kiesel
Hi, sometimes STDIN, STDOUT and STDERR are not defined in cli mode: ~/cvs/php/php-src# ./sapi/cli/php -r 'var_dump (STDERR);' resource(3) of type (stream) ~/cvs/php/php-src# echo ' ' | ./sapi/cli/php string(6) "STDERR" The attached patch removes the check for the scripts filename and always re

Re: [PHP-DEV] [Proposal] Idea for Application level variables

2003-08-14 Thread Davey
Ilia Alshanetsky wrote: On August 7, 2003 04:35 pm, Davey wrote: You've hit the nail on the head! By literally copying and pasting the $_SESSION code over, s/_SESSION/_APPLICATION and forcing the SID to be a certain thing, you pretty much implement what I want. The reasons you cannot just wrap $_

Re: [PHP-DEV] [Proposal] Idea for Application level variables

2003-08-14 Thread Ken Tossell
Justin Hannus wrote: So it seems like to get the same functionality, in userland, why not just: $_APPLICATION = &$_SESSION Or if (!isSet($_SESSION['myApplication'])) { $_SESSION['myApplication'] = array(); } $_APPLICATION =& $_SESSION['myApplication']; -Justin "Davey" <[EMAIL PROTECTED]>

Re: [PHP-DEV] Patch for Zend engine linker error

2003-08-14 Thread Jani Taskinen
Fixed, thanks for the patch. --Jani On Wed, 6 Aug 2003, Vesselin Atanasov wrote: >Hello. >The lastest CVS fails to compile under Linux. An error occurs because the >linker cannot find the "empty_fcall_info_cache" symbol. > >diff -ruN php5-200308051930.orig/Zend/zend_execute_API

[PHP-DEV] shutdown_memory_manager and resource handling

2003-08-14 Thread Justin Hannus
I'm writing an ext for Apples OpenDirectory (directory services) API and it makes heavy use of registering resources in the zend internal list. I'm also new to the Zend API. As of now I have about 4 resource types so far. In Short, my resource life span goes like: 1. zend_register_list_destructor

Re: [PHP-DEV] [PECL-PROPOSAL] stats

2003-08-14 Thread Moriyoshi Koizumi
As I can imagine some examples that demonstrate dynamic graph drawing with ming or gd, I think it'd be cool to have. However, I looked at dcdflib.c and only found it was coded not in C but in pseudo Fortran. That's worth a glance :) So the last concern is its stability, since it simply uses sta

Re[4]: [PHP-DEV] PHP compiler

2003-08-14 Thread Simeon Koptelov
Hello Antony, Wednesday, August 6, 2003, 8:43:13 PM, you wrote: AD> If archive is all what you want to get, then what prevents you to write your own class to load files from such package? The performance. Such class in PHP will be much, much slower than language-level support of archives. If s

Re: [PHP-DEV] Re: variable_exists() patch

2003-08-14 Thread Timm Friebe
On Thu, 2003-08-14 at 13:18, [EMAIL PROTECTED] wrote: [...] > Hmm, I thought a variable is set even if its value is NULL? Unfortunately it is not: [EMAIL PROTECTED]:~ > php -r '$a= NULL; var_dump(isset($a));' bool(false) - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubs

[PHP-DEV] Patch for command-line version of PHP

2003-08-14 Thread Vesselin Atanasov
Hello. Here is a patch for the command-line version of PHP which makes it chdir() to the script directory just like the web version of PHP does. It also implements the -C option which has been a NOOP up to now. diff -ruN php5-200308051930.orig/sapi/cli/php_cli.c php5-200308051930/sapi/cli/php_cli.

[PHP-DEV] PHP compiler

2003-08-14 Thread Jeremy S. Johnstone
After seeing the conversation on the PHP archive idea (having a PHP equivalent of a jar file), it reminded me of an idea I had a long time ago. Has anyone ever thought of writing a PHP compiler which would compile a PHP script into native machine code? If you have thought of it, what stopped you fr

Re: [PHP-DEV] shutdown_memory_manager and resource handling

2003-08-14 Thread Rasmus Lerdorf
Can't you get a line number and the actual address being accessed to cause that crash? On Mon, 11 Aug 2003, Justin Hannus wrote: > I'm writing an ext for Apples OpenDirectory (directory services) API and it > makes heavy use of registering resources in the zend internal list. I'm also > new to th

RE: [PHP-DEV] [Proposal] Idea for Application level variables

2003-08-14 Thread Lukas Smith
> From: Andrey Hristov [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 07, 2003 6:35 PM > Nope, > the data should be shared amongst all running processes of > the application disregarding the web user who invokes them. This may partly do what you need? http://pwee.sourceforge.net/ never use

RE: Re[4]: [PHP-DEV] PHP compiler

2003-08-14 Thread Jeremy S. Johnstone
>PS: I am one of the last people you should be complaining at about "php isn't intended for that"; perhaps you should study your PHP >history before you make your next post. That is why I apologized if I came off rude. I snapped back without realizing who had actually made the post I was respondin

Re: [PHP-DEV] try/catch/FINALLY

2003-08-14 Thread Simeon Koptelov
Hello Cristiano, Wednesday, August 6, 2003, 6:15:39 AM, you wrote: It would be much better if user will have to put method's throws in method's declaration imho( see my reply to Marcus ). -- Best regards, Simeonmailto:[EMAIL PROTECTED] -- PHP Internals - PHP Runt

Re: Re[4]: [PHP-DEV] PHP compiler

2003-08-14 Thread George Schlossnagle
On Wednesday, August 6, 2003, at 11:54 AM, Jeremy S. Johnstone wrote: I apologize if I sounded rude at all, it's just that I am sick of people telling me "php isn't intended for that", when I come up with new ideas. I ask those same people what they think PHP is for, and inevitably I get some

Re: [PHP-DEV] [Proposal] Idea for Application level variables

2003-08-14 Thread Ilia Alshanetsky
On August 7, 2003 04:35 pm, Davey wrote: > You've hit the nail on the head! By literally copying and pasting the > $_SESSION code over, s/_SESSION/_APPLICATION and forcing the SID to be a > certain thing, you pretty much implement what I want. The reasons you > cannot just wrap $_SESSION and force

Re: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-14 Thread Cristiano Duarte
"Alan Knowles" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > > >What about __construct, __destruct and __clone ? AK> these are built in. - and done to avoid conflicts. All right. > >Shouldn't it be named > >__to_string() or __tostring() ? > > AK> since you implicitly make this

Re: [PHP-DEV] [Review] Route stat() family of calls via wrapper ops.

2003-08-14 Thread Sara Golemon
>> http:// wrapper: >> is_writable() would always return false. >> is_readable() would return true *IF* a HEAD request returned 2xx or >> 3xx is_executable() would always return false. >> file_exists() would return true if a HEAD request returned 2xx, 3xx, >> or >> 4xx (not including 404) > >

Re: [PHP-DEV] Re: variable_exists() patch

2003-08-14 Thread walt boring
Timm Friebe wrote: On Thu, 2003-08-14 at 13:18, [EMAIL PROTECTED] wrote: [...] Hmm, I thought a variable is set even if its value is NULL? Unfortunately it is not: [EMAIL PROTECTED]:~ > php -r '$a= NULL; var_dump(isset($a));' bool(false) - Timm exactly why isset() is either 1) a bad n

Re: [PHP-DEV] [PECL-PROPOSAL] stats

2003-08-14 Thread Andrey Hristov
Moriyoshi, so maybe I should modify the libs and make them not to use static vars in the functions? Andrey - Original Message - From: "Moriyoshi Koizumi" <[EMAIL PROTECTED]> To: "Andrey Hristov" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, August 11, 2003 10:08 PM Subject:

Re: [PHP-DEV] Bugfix #21918

2003-08-14 Thread Ilia Alshanetsky
On August 12, 2003 02:27 am, Zeev Suraski wrote: > At 05:16 11/08/2003, Ilia Alshanetsky wrote: > >+1 > > > >This patch not only fixes the above mentioned bugs, but also serveral > >backwards compatibility issues that occured due to the fix for bug #18140. > > Can you provide an example? Original

Re: [PHP-DEV] shutdown_memory_manager and resource handling

2003-08-14 Thread Justin Hannus
"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Can't you get a line number and the actual address being accessed to cause > that crash? > > Sorry about that, I'll have to recompile a version with --enable-debug which I might not get a chance to until later tonight.

RE: [PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-14 Thread Derick Rethans
On Thu, 14 Aug 2003, Steven Brown wrote: > E.g., > > $id = "0; drop bar"; > lamesql_query("select foo from bar where id = $id"); Well Do'h, how is this a security problem? Derick -- "Interpreting what the GPL actually means is a job best left to those that read the future

Re[2]: [PHP-DEV] try/catch/FINALLY

2003-08-14 Thread Simeon Koptelov
Hello Marcus, Wednesday, August 6, 2003, 1:14:10 PM, you wrote: CD>> What about finally ? MB> There's absolute no need for finally: MB> try { MB> } MB> catch (...) { MB> } MB> // here's you're finally code try { $this->allocateSomeResources(); throw new SomeException(); } catch( AnotherE

Re: [PHP-DEV] shutdown_memory_manager and resource handling

2003-08-14 Thread Thies C. Arntzen
On Thu, Aug 14, 2003 at 09:03:05AM -0400, Justin Hannus wrote: > > do you use any shared php extensions by any chance? > > Yes, I'm developing an extension to wrap Apple's OpenDirectory API (reffer > to my first post). Thats the only shared extension that I'm using. > > if you have a mem

Re: [PHP-DEV] try/catch/FINALLY

2003-08-14 Thread Wez Furlong
The most important thing missing from this is that you cannot rethrow the exception from the point where you suggest to place the finally code :-) --Wez. > There's absolute no need for finally: > > try { > } > catch (...) { > } > // here's you're finally code -- PHP Internals - PHP Runtime De

Re: Re[2]: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-14 Thread Cristiano Duarte
Hello Marcus, Did you think of a better interface name instead of "Printable" ? Do you think Zeev or Andi will accept this patch ? Cristiano. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] php_imlib module

2003-08-14 Thread Gareth Ardron
Ok, I've been using the php_imlib module for some time now (it's nice and fast), the only problem is, nobody can seem to get it to work with php-4.3.x. This is a *nix only extension as far as I'm concerned, and I'm happy to chuck it into PEAR or wherever when it's a bit more stable. We seem to

Re: [PHP-DEV] PHP compiler

2003-08-14 Thread Sebastian Bergmann
Wez Furlong wrote: > more technical issues actually related to the internals of PHP ? :-) Like how to use the Streams API to implement the JAR-like functionality? SCNR, Sebastian -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP

[PHP-DEV] [Review] Route stat() family of calls via wrapper ops.

2003-08-14 Thread pollita
The streams API has, since early in its introduction had the capacity to perform stat() family calls on files under any wrapper. In theory. What's preventing wrapper->wops->url_stat from being useful is that the code in ext/standard/filestat.c has never been routed through this layer. I've put t

Re: [PHP-DEV] variable_exists() patch

2003-08-14 Thread Ilia Alshanetsky
Correct, it appears my php work around may not work as a undefined variable would gain a NULL value as soon as it's used, making is_null() always return true. That said, I still do not see a situation where such a function would be useful. Ilia -- PHP Internals - PHP Runtime Development Mai

Re: [PHP-DEV] try/catch/FINALLY

2003-08-14 Thread Marcus Börger
Hello Cristiano, Wednesday, August 6, 2003, 2:15:39 AM, you wrote: CD> Hi all, CD> I know there was a lot of discussion about try/catch, but I will bring it up CD> again: CD> What about finally ? There's absolute no need for finally: try { } catch (...) { } // here's you're finally code --

Re: [PHP-DEV] Re: variable_exists() patch

2003-08-14 Thread Robert Cummings
Actually isset() doesn't behave as it should: $foo = null; echo isset( $foo ); In the above it should return true, but doesn't because it considers null to be not set. Thus it is flawed since I explicitly set it to null. Understandably this is documented; however, the issue here is whethe

[PHP-DEV] [Proposal] Idea for Application level variables

2003-08-14 Thread Davey
Hey, I'm quite new to this, so please don't shoot this down too harshly. If I don't explain something clearly enough, please ask me. Because Application variables are pretty much shared session variables, I wonder if perhaps the session code can be modified to handle these variables. In userland,

[PHP-DEV] variable_exists() patch

2003-08-14 Thread Lars Torben Wilson
Hi out there, A few weeks ago I submitted a patch in the bug db for a variable_exists() construct, which parallels the function_exists() one but for variables. In short, it returns TRUE if a variable exists, regardless of its value. In other words, it's an isset() which doesn't care if the varia

Re: [PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-14 Thread moshe doron
"Hartmut Holzgraefe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Steven Brown wrote: > >>How is this a security hole? > > > > > > E.g., > > > > $id = "0; drop bar"; > > lamesql_query("select foo from bar where id = $id"); > > this is also possible with oracle, oci8 and other data

Re: [PHP-DEV] hash table question

2003-08-14 Thread Zeev Suraski
At 18:15 13/08/2003, Ard Biesheuvel wrote: For my upcoming improvement of interbase.c, which features asynchronous handling of events posted in the database, I need to maintain a per-link list of event names (string) and callbacks (zval). Would using zend_hash tables be the right way to do this ? I

Re: [PHP-DEV] Re: variable_exists() patch

2003-08-14 Thread walt boring
Ilia Alshanetsky wrote: On August 14, 2003 03:11 pm, walt boring wrote: exactly why isset() is either 1) a bad name for the function or 2) 'broken' Wrong. isset() has a very proper name "is-set", which to me and other people says that it will see if a variable is set (has a value). It doe

Re: [PHP-DEV] Re: variable_exists() patch

2003-08-14 Thread Derick Rethans
On Thu, 14 Aug 2003, walt boring wrote: > Then please explain the logic of why > $var = null > > isset($var) returns false. > > In your words "it will see if a variable is set (has a value)". > > $var IS set and DOES have a value, it just happens to be a value of null. I've done a fair deal of

[PHP-DEV] call_user_func, static calls, and $this

2003-08-14 Thread Brad Bulger
this is old subject everyone is tired of i'm sure. but since large changes have been made to call_user_func[_array] recently, i want to confirm: if an object calls one of its methods ($thing->foo()), any static-type method calls made inside there - self::a(), parent::a(), fezbar::a() - will have $

Re: [PHP-DEV] call_user_func, static calls, and $this

2003-08-14 Thread Brad Bulger
semi-related: __call is somewhat reversed. it will catch call_user_func(array('self','fake')), but not self::fake() (same for parent vs parent:: or randomclass vs randomclass::) the visibility of $this is not changed, so you end up with no $this inside __call. it can be a surprise. -- PHP Interna

RE: [PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-14 Thread Marc Boeren
> that's the point. if the cracker can change only the end of > the query, it's not so usefull for him (he can maximum get other id) How about a form of dos: '...where id = '.$id with $id = '23129 or 1' this will select all entries in the table which could result in DoS... So, ultimately t

RE: [PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-14 Thread Steven Brown
> -Original Message- > From: Marc Boeren [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 14, 2003 1:08 AM > To: [EMAIL PROTECTED] > Subject: RE: [PHP-DEV] Re: PHP 4.3.3RC3 Released > > > > > that's the point. if the cracker can change only the end of > > the query, it's not so usef

[PHP-DEV] hash table question

2003-08-14 Thread Ard Biesheuvel
For my upcoming improvement of interbase.c, which features asynchronous handling of events posted in the database, I need to maintain a per-link list of event names (string) and callbacks (zval). Would using zend_hash tables be the right way to do this ? Ard -- PHP Internals - PHP Runtime Dev

Re: [PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-14 Thread Derick Rethans
On Thu, 14 Aug 2003, moshe doron wrote: > > "Marcus BöRger" <[EMAIL PROTECTED]> wrote in message > > md> http://www.phpbuilder.com/mail/php-developer-list/2003022/0062.php > > > > Bullshit. > > > > If the cracker can change one of your sql statements he already has access to > > your machine. In

Re: [PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-14 Thread Marcus Börger
Hello moshe, Thursday, August 14, 2003, 10:41:16 AM, you wrote: md> "Derick Rethans" <[EMAIL PROTECTED]> wrote in message md> news:[EMAIL PROTECTED] >> On Thu, 14 Aug 2003, moshe doron wrote: >> >> > What about hacking somehow the sqlite library to disallow chained md> queries >> > (or at least

Re: [PHP-DEV] Re: variable_exists() patch

2003-08-14 Thread Lars Torben Wilson
On Thu, 2003-08-14 at 08:42, Andi Gutmans wrote: > I am not really convinced either that variable_exists() is > function_exists() parallel. > Under what circumstances is this needed? > > Andi The followup I sent to Ilia gives examples of how this patch can be used to determine whether, for insta

Re: [PHP-DEV] Re: variable_exists() patch

2003-08-14 Thread Lars Torben Wilson
On Thu, 2003-08-14 at 12:59, Ilia Alshanetsky wrote: > On August 14, 2003 03:33 pm, Robert Cummings wrote: > > Actually isset() doesn't behave as it should: > > > > $foo = null; > > echo isset( $foo ); > > Not quite. To understand the nature of NULL you must consider the following. > Supp

Re: [PHP-DEV] win32 questions - try 2

2003-08-14 Thread Edin Kadribasic
Hi Vlad, 1. Where can I get includes and libs for MSVC++? 2. Snap builder compiles everything it can automatically :) 3. We'll do that once we get the extension building on the snaps box. Edin - Original Message - From: "Vlad Krupin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wedn

Re: [PHP-DEV] call_user_func, static calls, and $this

2003-08-14 Thread Brad Bulger
Marcus Börger wrote: It is very simple: uh oh. :) If this is defined in a static method it is a language error. However when mentioning this problem the acronym BC often gets used for what ever reason. I mean the idea of the new OO model was to have OO in php at least, wasn't it ? i can't say. yo

[PHP-DEV] Re: variable_exists() patch

2003-08-14 Thread nicos
"Lars Torben Wilson" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Hi out there, > > A few weeks ago I submitted a patch in the bug db for a > variable_exists() construct, which parallels the function_exists() > one but for variables. In short, it returns TRUE if a variab

[PHP-DEV] karma deadline

2003-08-14 Thread Greg Beaver
Hi, I've done extensive work on fixing some bugs in PEAR, and have received permission from the core PEAR developers to commit them myself. Could someone please add cellog to the list of users with karma in php-src/pear? PEAR 1.2 will be released by Tomas by the end of this week, and these b

Re: [PHP-DEV] variable_exists() patch

2003-08-14 Thread nicos
"Ilia Alshanetsky" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Do we really need this function? I see 2 ways of 'implementing' this > functionality in PHP without having to add another function. For example: > (isset($var) || is_null($var)) or gettype($var). Sure its r

Re: [PHP-DEV] Little question for the protos

2003-08-14 Thread Derick Rethans
On Fri, 8 Aug 2003, Mehdi Achour wrote: > Hi there, > > What should I do when I find bad protos in the php-src files while I'm > looking at them for documentation purpose ? Should I throw a mail here, > an unified diff to the source files correcting protos, or should I just > cose my eyes and

Re: [PHP-DEV] [PATCH] Resend: Fix for bug #17414 (PHP_4_3)

2003-08-14 Thread Ilia Alshanetsky
The patch was applied, thanks. ilia -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Setting PHP module values in C

2003-08-14 Thread Mark Morley
> zend_alter_ini_entry("open_basedir", sizeof("open_basedir"), newvalue, > strlen(newvalue), PHP_INI_USER, PHP_INI_STAGE_RUNTIME) Ah, perfect. Thanks! Mark -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] try/catch/FINALLY

2003-08-14 Thread Jeff Moore
On Wednesday, August 6, 2003, at 03:14 AM, Marcus Börger wrote: There's absolute no need for finally: PHP doesn't necessarily control every resources you might want to deallocate. mysql_query('LOCK ...'); try { ... do stuff } finally { mysql_query('UNLOCK...'); } .. do more stuf

Re: [PHP-DEV] PHP archive

2003-08-14 Thread Zeev Suraski
At 19:31 06/08/2003, Cristiano Duarte wrote: Wez Furlong wrote: Please, take it off this list. Excuse me? What's the matter? This discussion simply doesn't belong on internals@, that's all, so Wez asked you to take it off the list. Zeev -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] variable_exists() patch

2003-08-14 Thread Robert Cummings
Utility is in the eye of the beholder... you may not see where it would be useful, but I'd argue that many others do. Cheers, Rob. On Thu, 2003-08-14 at 15:42, Ilia Alshanetsky wrote: > Correct, it appears my php work around may not work as a undefined variable > would gain a NULL value as soon

[PHP-DEV] implementing a JDBC like api in PHP

2003-08-14 Thread Daniel Penning
Hi PHP5 should support a standardized oo way to access databases of any type. I heard that mysqli will include a oo way to access the database. This api should be the standard for all other database extensions. All future extensions should have their native functions as it is now and have to imple

Re: [PHP-DEV] [Proposal] Idea for Application level variables

2003-08-14 Thread Davey
The storage, just like $_SESSION can be any of the pre-defined settings (mm, files or SQLite (php5)) or "user" and can then be stored in a database or whatever system the user wants. (This would indeed mean that an application_set_save_handler() will also need to be there) I think that the $_A

Re: [PHP-DEV] Re: variable_exists() patch

2003-08-14 Thread walt boring
Not quite. To understand the nature of NULL you must consider the following. Suppose you have a variable $foo you wish to 'destroy' you can do so by doing unset($foo) or $foo = NULL;. In both cases the value of $foo will be destroyed, however the variable will remain, it's value will become NU

Re: [PHP-DEV] Re: variable_exists() patch

2003-08-14 Thread Lars Torben Wilson
On Thu, 2003-08-14 at 13:17, Mårten Gustafson wrote: > Lars Torben Wilson ([EMAIL PROTECTED]) wrote: > > unset($foo) is not the same as $foo = NULL, which is one way this > > According to the manual, it is. > http://www.php.net/manual/en/language.types.null.php > > /mårten. According to the behav

[PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-14 Thread moshe doron
"Ilia Alshanetsky" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > I would like to ask that all developers refrain from making commits to > the 4_3 tree until 4.3.3 final is released, unless a patch addresses a > critical issue. Critical issues are defined as the following: >

Re: [PHP-DEV] PHP archive

2003-08-14 Thread Cristiano Duarte
Wez Furlong wrote: Please, take it off this list. Excuse me? What's the matter? Cristiano Duarte. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] variable_exists() patch

2003-08-14 Thread walt boring
Stefan Walk wrote: On Thu, Aug 14, 2003 at 11:15:51AM -0700, walt boring wrote: I for one would like to see something like variable_exists(), as I am very annoyed with the logic of isset() returning false if the variable exists and has a value of null. [snip] I for one would much ra

Re: [PHP-DEV] call_user_func, static calls, and $this

2003-08-14 Thread Marcus Börger
Hello Brad, Wednesday, August 13, 2003, 8:40:37 AM, you wrote: BB> this is old subject everyone is tired of i'm sure. but since large changes BB> have been made to call_user_func[_array] recently, i want to confirm: BB> if an object calls one of its methods ($thing->foo()), any static-type BB>

Re: [PHP-DEV] Re: variable_exists() patch

2003-08-14 Thread Ilia Alshanetsky
On August 14, 2003 03:33 pm, Robert Cummings wrote: > Actually isset() doesn't behave as it should: > > $foo = null; > echo isset( $foo ); Not quite. To understand the nature of NULL you must consider the following. Suppose you have a variable $foo you wish to 'destroy' you can do so by d

  1   2   >