mujecks | 1 Oct 03:02 2003
Picon

[PHP-DEV] CVS Account Request: mujecks

how to use it and how to create it

--

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Frank M. Kromann | 1 Oct 07:18 2003

[PHP-DEV] zend_object_handlers.h

Hi,

This is a patch for ZendEngine2 that will allow the use of object handlers
in shared objects (PHP-GTK2). Would is be possible to get this change
committed ?

- Frank

cvs diff -u zend_object_handlers.h (in directory C:\PHP\php5\Zend\)
Index: zend_object_handlers.h
===================================================================
RCS file: /repository/ZendEngine2/zend_object_handlers.h,v
retrieving revision 1.24
diff -u -r1.24 zend_object_handlers.h
--- zend_object_handlers.h	18 Sep 2003 11:38:33 -0000	1.24
+++ zend_object_handlers.h	1 Oct 2003 05:16:16 -0000
 <at>  <at>  -113,7 +113,7  <at>  <at> 
 	zend_object_cast_t						cast_object;
 } zend_object_handlers;

-extern zend_object_handlers std_object_handlers;
+ZEND_API extern zend_object_handlers std_object_handlers;
 union _zend_function *zend_std_get_static_method(zend_class_entry *ce,
char *function_name_strval, int function_name_strlen TSRMLS_DC);
 zval **zend_std_get_static_property(zend_class_entry *ce, char
*property_name, int property_name_len, zend_bool silent TSRMLS_DC);
 zend_bool zend_std_unset_static_property(zend_class_entry *ce, char
*property_name, int property_name_len TSRMLS_DC);

--

-- 
(Continue reading)

Hartmut Holzgraefe | 1 Oct 10:00 2003
Picon
Picon

Re: [PHP-DEV] file_exists and array_merge_clobber

Justin Hannus wrote:
> I agree with Wez, what if you are searching for a file with a relative file
> path, e.g:
> 
> <?php
> if (file_exists("somefile.php"))
> // ...
> 
> would return true if "somefile.php" is not in the current directory but is
> in your include path, not what you expected. Besides, you can easily
> implement this functionality in php.

its going to be optional, not mandatory ... but that has already been answered

the whole point about this additional feature is that you can use it to check
for include file existance before the actual include:

if (file_exists("somefile.php", true)) {
   include "somefile.php";
}

IMHO this case is common enough so that it deserves a native C implementation
either as an option to file_exists() or as a seperate function like
file_exists_in_path()

-- 
Hartmut Holzgraefe  <hartmut <at> php.net>

--

-- 
PHP Internals - PHP Runtime Development Mailing List
(Continue reading)

Jon Parise | 1 Oct 10:06 2003
Picon
Picon

Re: [PHP-DEV] file_exists and array_merge_clobber

On Wed, Oct 01, 2003 at 10:00:23AM +0200, Hartmut Holzgraefe wrote:

> the whole point about this additional feature is that you can use it to 
> check
> for include file existance before the actual include:
> 
> if (file_exists("somefile.php", true)) {
>   include "somefile.php";
> }
> 
> IMHO this case is common enough so that it deserves a native C 
> implementation
> either as an option to file_exists() or as a seperate function like
> file_exists_in_path()

If we're really going to go down this road, why not implement it in a
more generic, reusable way:

    file_exists("somefile.php", ini_get('include_path'))

That would give us some additional mileage out of the change.

For the record, I'm -0 on this.  I'd be -1 if it wasn't so obviously
optional.

-- 
Jon Parise (jon <at> php.net) :: The PHP Project (http://www.php.net/)

--

-- 
PHP Internals - PHP Runtime Development Mailing List
(Continue reading)

Lukas Smith | 1 Oct 10:14 2003

RE: [PHP-DEV] file_exists and array_merge_clobber

> From: Jon Parise [mailto:jon <at> php.net]
> Sent: Wednesday, October 01, 2003 10:07 AM

> On Wed, Oct 01, 2003 at 10:00:23AM +0200, Hartmut Holzgraefe wrote:
> 
> > the whole point about this additional feature is that you can use it
to
> > check
> > for include file existance before the actual include:
> >
> > if (file_exists("somefile.php", true)) {
> >   include "somefile.php";
> > }
> >
> > IMHO this case is common enough so that it deserves a native C
> > implementation
> > either as an option to file_exists() or as a seperate function like
> > file_exists_in_path()
> 
> If we're really going to go down this road, why not implement it in a
> more generic, reusable way:
> 
>     file_exists("somefile.php", ini_get('include_path'))
> 
> That would give us some additional mileage out of the change.
> 
> For the record, I'm -0 on this.  I'd be -1 if it wasn't so obviously
> optional.

Yeah that is what I suggested yesterday.
(Continue reading)

Tvrtko Ursulin | 1 Oct 10:34 2003

[PHP-DEV] About Bug #14049 and more


Hello,

I see that in 4.3.4RC1 this bug is fixed. Can someone please give me a hint
where to find the patch only for that one?

I investigated a little because some time ago I made a patch that solves the
following problem.

Explanation:

When open_basedir is in effect the following operation fails because of
open_basedir restriction which I think is wrong:

fopen("path/exists/file_doesnt","w");

It should not fail, or maybe with EACCESS if appropriate.

So my patch (attached) makes sure that realpath successfully resolves
non-existent paths. It does so by checking errno after realpath call, and
in case it is ENOENT, it ignores the error.

Can anybody comment on this?
--

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Tvrtko Ursulin | 1 Oct 10:35 2003

[PHP-DEV] PATCH: disable_functions perdir


Hello again,

Some time ago I posted this patch but nobody commented.

Anyone?
--

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Dennis Sterzenbach | 1 Oct 11:26 2003
Picon

[PHP-DEV] retrieving information about state of a function

Hi,

I recognized there isn't any built-in function which
tells the disabled/enabled state of some function.
I think of something like:

if (function_enabled("shell_exec")) {
   $info = shell_exec("dig myname.com");
}

telling if shell_exec is disabled by php.ini setting
or not.

I already implemented a check which uses an ini_get() to
retrieve the list of disabled functions, but I think it
would be more smooth having a function provided by PHP
for that purpose, because there are functions for all the
other kinds of checks: included files, declared classes,
defined constants/variables, defined functions, etc.

Why not having a function which gives information about
disabled/enabled state of a function?

I think if the function was provided by PHP makes it
faster. -Think of having to explode() and in_array() check
for the function. The PHP engine could simply have the
list of disabled functions to hand a true/false directly
from C code. Which seems to be the more consequent and
ideal solution.

(Continue reading)

Derick Rethans | 1 Oct 11:30 2003
Picon
Picon

Re: [PHP-DEV] retrieving information about state of a function

On Wed, 1 Oct 2003, Dennis Sterzenbach wrote:

> Hi,
> 
> I recognized there isn't any built-in function which
> tells the disabled/enabled state of some function.
> I think of something like:
> 
> if (function_enabled("shell_exec")) {
>    $info = shell_exec("dig myname.com");
> }
> 
> telling if shell_exec is disabled by php.ini setting
> or not.

You can either use function_exists() to check if a function is 
available, or use "ini_get('disabled_functions')".

Derick

-- 
"Interpreting what the GPL actually means is a job best left to those
                    that read the future by examining animal entrails."
-------------------------------------------------------------------------
 Derick Rethans                                 http://derickrethans.nl/ 
 International PHP Magazine                          http://php-mag.net/
-------------------------------------------------------------------------

--

-- 
PHP Internals - PHP Runtime Development Mailing List
(Continue reading)

Dennis Sterzenbach | 1 Oct 11:42 2003
Picon

RE: [PHP-DEV] retrieving information about state of a function

>
> You can either use function_exists() to check if a function is
> available, or use "ini_get('disabled_functions')".
>
> Derick
>
function_exists() NEVER informs about the function  being
disabled or not it does inform about (I cite the manual here:)
"if the given function has been defined".

So it does NOT tell me anything about state.

If you had read my post, you knew I already do like you telling
me, but do not agree with this solution, as it is better
in performance etc. (see my post) to let PHP do so.
Also it isn't consequent to have info about existance of a func
but not about its disabled/enabled state.

Regards
  Dennis

--

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Gmane