Bug #77968 [Opn->Fbk]: extension name must not include funny characters

From: Date: Sun, 12 May 2019 18:24:35 +0000
Subject: Bug #77968 [Opn->Fbk]: extension name must not include funny characters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220829@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77968&edit=1

 ID:                 77968
 Updated by:         petk@php.net
 Reported by:        dallas at ekkysoftware dot com
 Summary:            extension name must not include funny characters
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            *Compile Issues
 Operating System:   linux
 PHP Version:        7.1.29
 Block user comment: N
 Private report:     N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[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)

« previous php.bugs (#220829) next »