Whissi / realpath_turbo

When PHP's open_basedir restriction is set, PHP disables the realpath cache for security reasons. This may hurt your application performance. The realpath_turbo PHP extension re-enables the realpath cache. Warning: This could be a security problem in your environment! Please read the README for further information.
BSD 2-Clause "Simplified" License
45 stars 13 forks source link

Doesn't work in PHP 7.3 #15

Closed azurit closed 4 years ago

azurit commented 4 years ago

Trying this on PHP 7.3.13 but it seems to not work at all:

It is supposed to work in PHP 7.3?

szepeviktor commented 4 years ago

was removed from CI in https://github.com/Whissi/realpath_turbo/commit/1479909728339e30f2715db9df4cdb41c17064a7#diff-354f30a63fb0907d4ad57269548329e3L19

azurit commented 4 years ago

Sorry but i don't understand: Was is CI? What was removed?

azurit commented 4 years ago

I'm running PHP as FPM.

azurit commented 4 years ago

If i understand that commit ok, you have dropped support for PHP 7.3. Can i ask why? 7.2 and 7.4 are both supported. Thanks for info.

szepeviktor commented 4 years ago

"CI" is continuous integration. This project uses TravisCI https://travis-ci.org/Whissi/realpath_turbo/builds/618366170

PHP 7.3 was removed: so tests do not run on PHP 7.3 See Travis for tested PHP versions.

szepeviktor commented 4 years ago

If i understand that commit ok, you have dropped support for PHP 7.3

It wasn't I, it was @Whissi

azurit commented 4 years ago

Sorry, didn't notice you are not a developer of realpath_turbo.

@Whissi, can i ask why you have dropped support for PHP 7.3? Thank you.

szepeviktor commented 4 years ago

Only the tests do not run on 7.3. It does not necessarily mean that support is dropped.

azurit commented 4 years ago

I was able to resolve this. The main problem is that the whole compilation and installation process ignores 'phpize' command used if there are multiple PHP versions in the system - it simply takes the newest version (in my case, i did 'phpize7.3' but everything was compiled and installed for 7.4). The switch '--with-php-config' for 'configure' commad must be used. Is this a bug?

Whissi commented 4 years ago

Like @szepeviktor said, only test coverage was dropped. Thanks for noticing, should be fixed now.

If realpath_turbo doesn't show up in phpinfo() it's just not loaded, that simple :)

The main problem is that the whole compilation and installation process ignores 'phpize' command used if there are multiple PHP versions in the system - it simply takes the newest version (in my case, i did 'phpize7.3' but everything was compiled and installed for 7.4). The switch '--with-php-config' for 'configure' commad must be used. Is this a bug?

No, not a bug and nothing I can do about. That's how the PHP PECL system works. If you have multiple PHP versions installed, it's your responsibility to mange them. Most distributions have own solutions for that (like update-alternatives on Debian-based systems). But you can always make sure that phpsize from version you want is first in path, e.g. do export PATH=/path/to/phpsize/you/want/to/use:$PATH first...

azurit commented 4 years ago

Thank you!