Bug #77968 [Fbk->NoF]: extension name must not include funny characters
Edit report at https://bugs.php.net/bug.php?id=77968&edit=1
ID: 77968
Updated by: php-bugs@lists.php.net
Reported by: dallas at ekkysoftware dot com
Summary: extension name must not include funny characters
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: *Compile Issues
Operating System: linux
PHP Version: 7.1.29
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2019-05-12 18:24:34] petk@php.net
Hello, I've tested this again with the latest PHP-7.4 branch (and its ext_skel.php script) and
it seems to work ok. If I've missed something, can you please try again with this script and
its belonging skeleton:
https://github.com/php/php-src/blob/PHP-7.4/ext/ext_skel.php
https://github.com/php/php-src/tree/PHP-7.4/ext/skeleton
Valid extension name characters are:
- starting with a lowercase letter
- following any number of lowercase letters, numbers, or underscores
Thanks.
------------------------------------------------------------------------
[2019-05-04 13:33:07] petk@php.net
Hello, there probably is some step in between those. Do you maybe have the step where this happens?
Maybe when trying to use the extension or something?
On PHP 7.1 up to master branches I cannot reproduce this and I think it all works the same. On PHP
7.3 there is now also the ext/ext_skel.php script. Maybe try starting a new extension with that (the
script is a bit lacky in features and functionality but it might server as an initial starting
point)...
Thank you.
------------------------------------------------------------------------
[2019-05-04 12:54:39] dallas at ekkysoftware dot com
Description:
------------
Hello PHP,
I created an extension with ./ext_skel --extname=texas_api and this little script was able to create
the extension skeleton, but used the name 'texas_api'. After successfully developing and
running on Windows, I then tried to port to Linux. On Linux, the phpize gave an error and then the
./configure also erred and the make created a library that was rejected by the system, as 'not
a php library'.
After testing and testing, I finally retired creating the extension but with the name texasapi
instead. This worked without a problem.
Can you please update ./ext_skel to make sure that the all illegal characters are removed from the
extension name, as this can cause unpredictable results.
Test script:
---------------
Only on Linux:-
./ext_skel --extname=texas_api
phpize
./configure
make
make test
./ext_skel --extname=texasapi
phpize
./configure
make
make test
Expected result:
----------------
no error
Actual result:
--------------
NOTICE: PHP message: PHP Warning: PHP Startup: Invalid library (maybe not a PHP library)
'texas_api.so' in Unknown on line 0
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77968&edit=1
Thread (4 messages)