Bug #77968 [Com]: extension name must not include funny characters
Edit report at https://bugs.php.net/bug.php?id=77968&edit=1
ID: 77968
Comment by: petk@php.net
Reported by: dallas at ekkysoftware dot com
Summary: extension name must not include funny characters
Status: Open
Type: Bug
Package: *Compile Issues
Operating System: linux
PHP Version: 7.1.29
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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)