[PHP-DEV] a simple question about PHP extension: using user function in my own extension

2012-12-05 Thread Amir
ZEND_FETCH_RESOURCE_NO_RETURN(retval); if(&retval) { php_printf("selected"); } else { zend_error(E_ERROR, "failed to select database!"); } zval_ptr_dtor(&args_selectDB[0]); }

Re: [PHP-DEV] a simple question about PHP extension: using user function in my own extension

2012-12-07 Thread Amir
it is no mater using mysql function or other function. I want to use both as function in my extension. I used PHP 5.2.9 so i have lib mysql instead of mysqlnd. Is there any way to use lib mysql in c-Level API? Regards *Amir Ghazavi* *Web Developer IT Manager of ECDC2013

Re: [PHP-DEV] a simple question about PHP extension: using user function in my own extension

2012-12-11 Thread Amir
hannes Schlüter wrote: > > > Amir wrote: > > >it is no mater using mysql function or other function. I want to use > >both > >as function in my extension. > > It matters as calling userspace functions is in at least 90% of the cases > the wrong approach a

[PHP-DEV] compile php extension on visual c++ 2005

2012-12-12 Thread Amir
Hi Im compiling my c++ php extension on php 5.3 and visual c++ 2008 everything is ok and work fine, but I have to (and I force) to using php 5.2.9 and compile it via vc++ 2005. I got this error during compile: *zend\zend_config.w32.h(38) : fatal error C1083: Cannot open include file: 'winsock2.h'

[PHP-DEV] php 5.3.14 nts source code for windows

2012-12-12 Thread Amir
Hi I searched in php.net and did not find any link that contain php none thread safe source code for windows. I have a php source that encoded with Zend Guard 5.5 and have to decode with Zend Guard Loader. note: Zend Guard Loader is NTS and didn't read TS code.

Re: [PHP-DEV] php 5.3.14 nts source code for windows

2012-12-12 Thread Amir
Hi I just want php NTS source code not compiled version, to compile my own extension that used in Zend Guard Loader. On Wed, Dec 12, 2012 at 8:33 PM, Ángel González wrote: > On 12/12/12 17:29, Amir wrote: > > Hi > > I searched in php.net and did not find any link that c

Re: [PHP-DEV] php 5.3.14 nts source code for windows

2012-12-12 Thread Amir
leases/ . To compile NTS use > --disable-zts configure option. > > Regards > > Anatoliy > > On Wed, 2012-12-12 at 19:59 +0330, Amir wrote: > > Hi > > I searched in php.net and did not find any link that contain php none > > thread safe source code for windows. &

[PHP-DEV] error when compiling php 5.3.x with vc++ 2008

2012-12-15 Thread Amir
Hi here is my error: error LNK2001: unresolved external symbol __imp__executor_globals_id when I compiling my c++ php extension. My setting is: I use php5.lib as additional library my processor: WIN32;NDEBUG;_WINDOWS;_USRDLL;PHP_WIN32;ZEND_WIN32;ZTS=0;ZEND_DEBUG=0 and include directories: C:\p

Re: [PHP-DEV] error when compiling php 5.3.x with vc++ 2008

2012-12-15 Thread Amir
red&built for another mode. > > On Sat, Dec 15, 2012 at 9:43 AM, Amir wrote: > > Hi > > > > here is my error: > > error LNK2001: unresolved external symbol __imp__executor_globals_id > > > > when I compiling my c++ php extension. > > > > My

Re: [PHP-DEV] error when compiling php 5.3.x with vc++ 2008

2012-12-15 Thread Amir
) != FAILURE) { script_name = Z_STRVAL_PP(val); } } } when I removed last two functions, it compiled successfully. my full error: 1>php_my_function.obj : error LNK2001: unresolved external symbol __imp__executor_globals_id 1>php_my_function.obj : error LNK2001: unresolved external symb

Re: [PHP-DEV] error when compiling php 5.3.x with vc++ 2008

2012-12-15 Thread Amir
t; On Sat, Dec 15, 2012 at 10:51 AM, Amir wrote: > > I did it but have error still > > note: I compile none thread safe and got error when using some user > function > > in my c++ code. > > Not sure what you do in your code but this is typically the error > while trying

Re: [PHP-DEV] error when compiling php 5.3.x with vc++ 2008

2012-12-15 Thread Amir
I hope you help me to solve this problem. Exactly I don't underestand what should I do! I have config.w32.h in. ..main/ folder. so, what you mean? On Sat, Dec 15, 2012 at 4:15 PM, Pierre Joye wrote: > Yes,use config.w32 only to avoid wasting time :) > On Dec 15, 2012 1:43 PM, &q

RE: [PHP-DEV] Re: Exceptions instead of Fatal Error when calling non existent method?

2007-12-31 Thread Amir Abiri
Also, it will allow PHP applications to recover more gracefully from this sort of error. A properly designed PHP application that already has global catch blocks and some 500 error pages will have this sort of error come under that same error handling process rather then give an ugly blank page

RE: [PHP-DEV] RE: Optional scalar type hinting

2008-01-03 Thread Amir Abiri
The question that pops to my mind by reading this thread is "what's wrong with the following code": function add(int $a, int $b) { return $a + $b; } add($_REQUEST['a'], $_REQUEST['b']); // Assume $_REQUEST['a'] == '1' and $_REQUEST['b'] == '2'. And the truth is that if I was forced to explic

[PHP-DEV] Array objects & array functions

2008-01-05 Thread Amir Abiri
Hi, I was wondering if there are any plans to introduce the ability of array functions to work with "array objects". More specifically I was thinking of starting with adding an SPL interface called ArraySearchable, and modifying php_search_array in ext/standard/array.c to accept an object that

[PHP-DEV] lstat call on each directory level

2008-07-15 Thread Amir Hardon
zing performance improvement! So my questions are: What is the reason for doing these lstat calls? How can it be disabled? if not by configuration, maybe by patching php (can you direct me to where is this being done in php's source?) Thanks! -Amir.

Re: [PHP-DEV] lstat call on each directory level

2008-07-15 Thread Amir Hardon
On Tue, 2008-07-15 at 11:40 -0700, Rasmus Lerdorf wrote: > Amir Hardon wrote: > > I've noticed a weird behavior when doing file access from PHP: > > PHP seems to make an lstat call on each of the parent directories of the > > accessed file, for example see this script: &

Re: [PHP-DEV] lstat call on each directory level

2008-07-15 Thread Amir Hardon
On Tue, 2008-07-15 at 12:25 -0700, Rasmus Lerdorf wrote: > Amir Hardon wrote: > > On Tue, 2008-07-15 at 11:40 -0700, Rasmus Lerdorf wrote: > >> Amir Hardon wrote: > >> > I've noticed a weird behavior when doing file access from PHP: > >> > PHP se

Re: [PHP-DEV] lstat call on each directory level

2008-07-16 Thread Amir Hardon
f my company policies allow me to expose exactly what is considered slow), after moving it ~20% of the page requests were slow! this is significant. And there are still many lstat calls made inside our portal's directory tree. So I think that a php.ini directive for switching off these lstats which will be off by default, will be a great thing. -Amir.

[PHP-DEV] CVS Account Request: amir

2006-03-05 Thread Amir Mohammad Saied
PEAR XML_XUL package Now lead is Stephan Schmidt [http://pear.php.net/user/schst] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] CVS Account Request: amir

2006-03-05 Thread Amir Mohammad Saied
Pierre wrote: Can you please provide valid credentials? A mail from Stephan for example. On 3/5/06, Amir Mohammad Saied <[EMAIL PROTECTED]> wrote: PEAR XML_XUL package Now lead is Stephan Schmidt [http://pear.php.net/user/schst] -- PHP Internals - PHP Runtime Development Mailing L