php-extension

Dynamically loading php exstension without dl() function?

僤鯓⒐⒋嵵緔 提交于 2020-01-11 06:28:06
问题 Is that possible and if it is, how to do that? I'm asking because dl() function is not available to me and because PHP team is abandoning this function from further versions. Please do not answer "Use the Extension Loading Directives instead" - that is exactly the part which I do not understand how and I would like to/I'm asking about. 回答1: The function has been removed from all SAPIs other than CLI and Embedded as of PHP 5.3. SAPIs are the interface between PHP and a web server / the CLI /

Calling extension function in zend_eval_string

三世轮回 提交于 2020-01-07 05:45:12
问题 When i try use zend_eval_string (i make mini php extension), there are no extensions functions avaliable. There are also no errors reporting (if php code have fatal error program exit). What i must do to enable extension and show errors when it executes? I also found interesting value EG(no_extensions)=1; in zend_execute_API.c, but when i change this value to 0 problem not solving. I am newer of c++ and please, tell me how to solve this problem with example. Sorry for my bad English. 回答1:

Mbstring extension installation on godaddy server

送分小仙女□ 提交于 2020-01-07 03:42:08
问题 Call to undefined function mb_convert_encoding(). How to install mbstring extension installation on godaddy server? 回答1: I have found the solution. We need to complete the following steps: 1.Login to your server WHM as root 2.Search EasyApache or go to Software menu after that EasyApache 3. you can see there are some profile. click on customize profile default profile. 4. click on continue to second step 5. On “Step 2,” click on “Exhaustive Options” 6. Under PHP, check the checkbox for

Mbstring extension installation on godaddy server

眉间皱痕 提交于 2020-01-07 03:41:24
问题 Call to undefined function mb_convert_encoding(). How to install mbstring extension installation on godaddy server? 回答1: I have found the solution. We need to complete the following steps: 1.Login to your server WHM as root 2.Search EasyApache or go to Software menu after that EasyApache 3. you can see there are some profile. click on customize profile default profile. 4. click on continue to second step 5. On “Step 2,” click on “Exhaustive Options” 6. Under PHP, check the checkbox for

Install php extension on AMPPS

帅比萌擦擦* 提交于 2020-01-06 03:57:22
问题 As the title says im trying to install a php extension (zip.so) that is missing from php7.1 version in ampps 3.8. I have searched for an answer but no luck so far. Also using php5.6 and going to the php extensions list im able to see the zip extension, but since the software that im trying to intstall requires php 7.X im unable to simply use php5.6. Thanks for the help in advance. 回答1: I finally found a way to do it: Go to (for example) https://pecl.php.net/ and download the extension that

How to disable/enable a PHP module with phpdismod?

风流意气都作罢 提交于 2020-01-05 04:09:15
问题 I want to be able to turn on/off Xdebug a simple and fast way. To disable it I tried out phpdismod , but only results in a warning: $ phpdismod xdebug WARNING: Module xdebug ini file doesn't exist under /etc/php/7.0/mods-available WARNING: Module xdebug ini file doesn't exist under /etc/php/7.0/mods-available How to get a PHP module disabled/enabled with phpdismod ? Environment: Ubuntu 14.04, nginx 1.4.6, PHP 7.0 FPM. $ ls -l /etc/php/mods-available/ | grep "xdebug" -rw-r--r-- 1 root root 743

Including Paragonie Halite in project doesn't find variables and functions

て烟熏妆下的殇ゞ 提交于 2020-01-04 06:12:36
问题 I've installed libsodium on Windows for PHP 7 and I'm developing my project with PHPStorm. I've also installed Halite from Paragonie which couldn't even be installable if the libsodium extension were not installed correctly. Also the IDE finds the used functions and when clicking on the variables and so on it opens up the fitting files of libsodium. But unfortunately in my setup I get the following error: Uncaught Error: Undefined constant 'Sodium\CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE' in C:

Including Paragonie Halite in project doesn't find variables and functions

折月煮酒 提交于 2020-01-04 06:10:38
问题 I've installed libsodium on Windows for PHP 7 and I'm developing my project with PHPStorm. I've also installed Halite from Paragonie which couldn't even be installable if the libsodium extension were not installed correctly. Also the IDE finds the used functions and when clicking on the variables and so on it opens up the fitting files of libsodium. But unfortunately in my setup I get the following error: Uncaught Error: Undefined constant 'Sodium\CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE' in C:

Compiling my own PHP extension on Windows with Visual Studio 2008

烈酒焚心 提交于 2020-01-04 05:08:34
问题 I wrote a PHP extension and it could be compiled and run under linux successfully. But on windows, I met some problems. I did the compiling on windows according to http://blog.slickedit.com/?p=128 with PHP source version 5.2.10, and after the compiling it generated the dll file. But when I tried to use the dll file, it reported me the memory problems when starting Apache(Wamp server). And then I started the debugging process, it seemed that REGISTER_INI_ENTRIES() had problems. Here is the PHP

PHP Linking to a shared library in an extension

故事扮演 提交于 2020-01-04 03:19:48
问题 I'm working on a native PHP extension which includes symbols from a shared library, but I can't get the config.m4 file to generate a build procedure that includes the necessary linker options to correctly link to the share library. This is what I have in my config.m4 file so far: PHP_ARG_ENABLE(myextension, whether to enable MyExtension support, [ --enable-myextension Enable MyExtension support]) if test "$PHP_MYEXTENSION" = "yes"; then LIBNAME=otherlibrary LIBSYMBOL=otherlib_some_function