Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Badges? We don't need no stinking badges.


devel / comp.lang.php / problem with php api

SubjectAuthor
* problem with php apiaotto1968
`- Re: problem with php apiJerry Stuckle

1
problem with php api

<u5703t$2bhnn$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=881&group=comp.lang.php#881

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.php
Subject: problem with php api
Date: Wed, 31 May 2023 10:22:21 +0200
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <u5703t$2bhnn$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 31 May 2023 08:22:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c71ca534ff60f531e4441251873ed6f2";
logging-data="2475767"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19zd9A7Xa4gsW/smEwRKfO8l5bN/TLp4E8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.2
Cancel-Lock: sha1:2Utw/+S5xxctvVe+lUk68u9Log8=
Content-Language: en-US
 by: aotto1968 - Wed, 31 May 2023 08:22 UTC

Hi,

the following code fails if shared library is loaded with dl()

>>>>>
....
PHP_MINIT_FUNCTION(phpmkkernel)
{ #if defined(ZTS) && defined(COMPILE_DL_PHPMKKERNEL)
ZEND_TSRMLS_CACHE_UPDATE();
#endif

#if defined(ZTS)
....
#endif

/* If you have INI entries, uncomment these lines
REGISTER_INI_ENTRIES();
*/

return LibMkKernel_MInit (INIT_FUNC_ARGS_PASSTHRU) ;
}

static ZEND_RESULT_CODE LibMkKernel_MInit (INIT_FUNC_ARGS) {
....
MK(MkErrorE) = zend_register_internal_enum("PhpMsgque\\MkKernel\\MkErrorE", IS_LONG, NULL);
zend_enum_add_case_cstr(MK(MkErrorE), "OK", OT_TMP_INT_OBJ(0));
zend_enum_add_case_cstr(MK(MkErrorE), "CONTINUE", OT_TMP_INT_OBJ(1));
zend_enum_add_case_cstr(MK(MkErrorE), "ERROR", OT_TMP_INT_OBJ(2));
....
return SUCCESS;
} <<<<<

the problem is an assert in create_enum_case_ast

ZEND_ASSERT(ZSTR_IS_INTERNED(class_name));

if shared library is loaded with "extension" in php.ini than it is fine

extension="..."

question: what I have to do ?

mfg ao

Re: problem with php api

<u57qop$2ekdn$1@jstuckle.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=882&group=comp.lang.php#882

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!jstuckle.eternal-september.org!.POSTED!not-for-mail
From: stuckle.jerry@gmail.com (Jerry Stuckle)
Newsgroups: comp.lang.php
Subject: Re: problem with php api
Date: Wed, 31 May 2023 11:56:32 -0400
Organization: A noiseless patient Spider
Lines: 61
Message-ID: <u57qop$2ekdn$1@jstuckle.eternal-september.org>
References: <u5703t$2bhnn$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 31 May 2023 15:57:13 -0000 (UTC)
Injection-Info: jstuckle.eternal-september.org; posting-host="13132095fe8b749659dc3cb931c6b727";
logging-data="2576823"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX183S5hAfczuJixzaC858w+fByoTQ5affR0="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.2
Cancel-Lock: sha1:K2WH04wYW/GlWMuPhL7mRCeJrgQ=
In-Reply-To: <u5703t$2bhnn$1@dont-email.me>
Content-Language: en-US
 by: Jerry Stuckle - Wed, 31 May 2023 15:56 UTC

On 5/31/2023 4:22 AM, aotto1968 wrote:
> Hi,
>
> the following code fails if shared library is loaded with dl()
>
> >>>>>
> ...
> PHP_MINIT_FUNCTION(phpmkkernel)
> {
> #if defined(ZTS) && defined(COMPILE_DL_PHPMKKERNEL)
>   ZEND_TSRMLS_CACHE_UPDATE();
> #endif
>
> #if defined(ZTS)
> ...
> #endif
>
>   /* If you have INI entries, uncomment these lines
>   REGISTER_INI_ENTRIES();
>   */
>
>   return LibMkKernel_MInit     (INIT_FUNC_ARGS_PASSTHRU)  ;
> }
>
>
> static ZEND_RESULT_CODE LibMkKernel_MInit (INIT_FUNC_ARGS) {
> ...
>   MK(MkErrorE) =
> zend_register_internal_enum("PhpMsgque\\MkKernel\\MkErrorE", IS_LONG,
> NULL);
>   zend_enum_add_case_cstr(MK(MkErrorE), "OK", OT_TMP_INT_OBJ(0));
>   zend_enum_add_case_cstr(MK(MkErrorE), "CONTINUE", OT_TMP_INT_OBJ(1));
>   zend_enum_add_case_cstr(MK(MkErrorE), "ERROR", OT_TMP_INT_OBJ(2));
> ...
>   return SUCCESS;
> }
> <<<<<
>
> the problem is an assert in create_enum_case_ast
>
>    ZEND_ASSERT(ZSTR_IS_INTERNED(class_name));
>
> if shared library is loaded with "extension" in php.ini than it is fine
>
>    extension="..."
>
>
> question: what I have to do ?
>
> mfg ao

Well, to start with, you could show us the code you're using to load the
library. What is the return value from dl()? Which OS are you using?

--
==================
Remove the "x"'s from my email address
Jerry Stuckle
stucklex.jerryx@gmail.com
==================

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor