-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
phpinfo() give me segmentation fault #1
Comments
Hello Justin. I just checked PHP 5.4.38 with turbo_realpath v1.3 and it is working fine for me.
|
Hi, Thomas Sent from Acompli
From: Thomas D. [email protected] Hello Justin. I just checked PHP 5.4.38 with turbo_realpath v1.3 and it is working fine for me. Is your installation really working and only crashing when you add extension=turbo_realpath.so (=not crashing without this line)? You are using realpath_turbo v1.3, aren't you? — |
Hi, Thomas my /etc/php.d/turbo_realpath.ini extension=turbo_realpath.so when i run php -i Turbo Real Path => enabled i think RealPath basedir security is giving me the problem. i want set open_basedir to none. Thank you very much. Jusitn |
OK, I was able to reproduce your problem: Will see if I can fix that... |
Hi, Thomas I set it to 0 and it works nicely. one more issue, i checked my realpath cache with this php function, var_dump(realpath_cache_size()); var_dump(realpath_cache_get()); the 1st time output looks good. it give me a list of cached directory links. However, here is the 2nd time and next time output from my php-fpm dedicated server, int(221) array(3) { ["/etc"]=> array(4) { ["key"]=> float(1.6714350287265E+19) ["is_dir"]=> bool(true) ["realpath"]=> string(4) "/etc" ["expires"]=> int(1424647280) } ["/etc/php.d"]=> array(4) { ["key"]=> float(1.6027146195387E+19) ["is_dir"]=> bool(true) ["realpath"]=> string(10) "/etc/php.d" ["expires"]=> int(1424647280) } ["/etc/php.d/opcache-default.blacklist"]=> array(4) { ["key"]=> int(3088552834067437318) ["is_dir"]=> bool(false) ["realpath"]=> string(36) "/etc/php.d/opcache-default.blacklist" ["expires"]=> int(1424647280) } } the cached directory are no longer there. Looks like it works only the 1st time and then the realpath cache disappeared somehow. Is my output normal? Thank you very much. Justin |
Hard to tell... First, remember what the extension is doing: While patching https://bugs.php.net/bug.php?id=52312 the PHP team decided to set realpath_turbo just uses the fact that the check happens before the extension loads. That's why you should unset If you keep this in mind it is more likely that you are running a PHP application which clears the cache (i.e. with If you want to use php_admin_value[open_basedir] = ""
php_admin_value[realpath_cache_basedir] = "/home/example.org/htdocs:/usr/share/php" in the used PHP fpm pool. This will make sure turbo_realpath will prevent PHP from disabling the realpath cache and Now if no script is clearing your cache your realpath cache should grow and stay. Just tested on my servers. |
HI, Thomas I run magento on this dedicated php-fpm server. I don’t know if magento will clear the realpath cache. I set the following in my php-fpm pool setting, php_admin_value[open_basedir] = none Here are the 3 functions that I used to check the cache, I put it in a test.php file. var_dump(realpath_cache_size()); Thank you very much Justin From: Thomas D. Hard to tell... First, remember what the extension is doing: While patching https://bugs.php.net/bug.php?id=52312 the PHP team decided to set realpath_cache_size_limit = 0 (which disables the realpath cache) when safe_mode or open_basedir restriction is active. realpath_turbo just uses the fact that the check happens before the extension loads. That's why you should unset open_basedir when using realpath_turbo, so that PHP won't disable the realpath cache. When the extension finally load, it will enable open_basedir like PHP would have done but without running through the check which would disable the realpath cache. If you keep this in mind it is more likely that you are running a PHP application which clears the cache (i.e. with clearstatcache(true)). If you want to use open_basedir restriction for /home/example.org/htdocs make sure to load realpath_turbo and set php_admin_value[open_basedir] = "" This will make sure turbo_realpath will prevent PHP from disabling the realpath cache and open_basedir restrictions are still working. Now if no script is clearing your cache your realpath cache should grow and stay. Just tested on my servers. — |
Justin, I don't understand why you are using realpath_turbo when you don't set Now you are basically not using this extension. In other words: Any problems you maybe experience have nothing to do with this extension. PS: Also make sure that your application doesn't disable realpath_cache. |
Hi, Thomas
Thank you very much for your help.
It worked. I tested it again this morning. the real path cache array is a big list now.
Justin
From: Thomas D.
Sent: Monday, February 23, 2015 7:05 AM
To: Whissi/realpath_turbo
Cc: jjone
Subject: Re: [realpath_turbo] phpinfo() give me segmentation fault (#1)
Justin, I don't understand why you are using realpath_turbo when you don't set open_basedir at all. If you don't want open_basedir restriction you don't need this extension.
If you want open_basedir restriction use this extension to set the restriction with realpath_cache_basedir instead of open_basedir.
Now you are basically not using this extension. In other words: Any problems you maybe experience have nothing to do with this extension.
PS: Also make sure that your application doesn't disable realpath_cache.
—
Reply to this email directly or view it on GitHub.
|
Hi Whissi, I would suggest to remove the feature if it causes crashes. Thanks |
HI, Whissi
After installing turbo_realpath, phpinfo() gives me segmentation fault
my system is centos 7, php 5.4.16. Is this compatible with centos 7, php 5.4.16 ?
thank you very much for your help.
Justin
The text was updated successfully, but these errors were encountered: