[PECL-DEV] Two questions regarding PHP extensions: include/require + PIE
[email protected] (Elmar Klausmeier) Mon, 16 Dec 2024 21:55:56 +0100
| Newsgroups | php.pecl.dev |
|---|---|
| Message-ID | <CAEY4Z_AH5gT-Xa=6Xp0Ss9Uc4pKP4NeC5is5sbDhpKQaaHpoMg@mail.gmail.com> |
--000000000000d5422e0629696830
Content-Type: text/plain; charset="UTF-8"
Hello,
I have two questions regarding PHP extensions:
1. Is there a way to call require or include with a string as input in an
extension? Golemon's book only mentions zend_eval_string(), but this is
like eval(), i.e., the string must not contain any HTML or must not contain
<?php and ?> tags. The reason for this is that allow_url_include is now
offensively marked as deprecated. I previously used
require 'data:text/plain;base64,'.base64_encode($s);
to accomplish the same. Now I think I have to write an extension to create
something like require_str() or include_str().
2. What are the plans to include the current PECL libs in PIE (PHP
Installer for Extensions)? Is every PECL maintainer supposed to include his
extension separately as a separate vendor?
Thanks.
Elmar Klausmeier.
--000000000000d5422e0629696830
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Hello,</div><div><br></div><div>I have two questions =
regarding PHP extensions:</div><div><br></div><div>1. Is there a way to cal=
l require or include with a string as input in an extension? Golemon's =
book only mentions zend_eval_string(), but this is like eval(), i.e., the s=
tring must not contain any HTML or must not contain <?php and ?> tags=
. The reason for this is that allow_url_include is now offensively marked a=
s deprecated. I previously used</div><div>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 require 'data:text/plain;base64,'.base64_encode($s);</div=
><div>to accomplish the same. Now I think I have to write an extension to c=
reate something like require_str() or include_str().<br></div><div>2. What =
are the plans to include the current PECL libs in PIE (PHP Installer for Ex=
tensions)? Is every PECL maintainer supposed to include his extension separ=
ately as a separate vendor?</div><div><br></div><div>Thanks.</div><div><br>=
</div><div>Elmar Klausmeier.<br></div><div><pre class=3D"gmail-line-numbers=
gmail-language-bash" tabindex=3D"0"><code class=3D"gmail-language-bash"><s=
pan class=3D"gmail-token gmail-string"><br></span></code></pre></div></div>
--000000000000d5422e0629696830--