php-extension

PHP extensions not loading in phpinfo

只谈情不闲聊 提交于 2019-12-06 00:43:50
问题 So I'm running MAMP on Mountain Lion and I've installed gmagick and imagick using pecl, both are relase candidates (mainly because gmagick doesn't have a stable release and imagick 3.0.0 doesn't install, it gives a make error). The modules appear when I run php -i in the terminal but not in phpinfo(), I have checked the php.ini it is the same for both so that is not the issue.However I have installed bitset(which is a stable release) and it appears in phpinfo() and php -i. So my question is

Activating PHP extensions in Bluemix

对着背影说爱祢 提交于 2019-12-05 15:08:24
This is a purely Bluemix question! I've got code running smoothly on a localhost but when I migrated it to Bluemix my DB connection failed me. Checking the logs I found the issue "Call to undefined function mysqli_init()" HTTP response 500. I have found out that extension have been disabled to make it smaller and have found some details about it: Buildpack options . Unfortunately I have tried that and failed. Maybe I have misunderstood the solution. Any Help would be greatly appreciated. EDIT: bgconfig --> bp-config solved the "undefined function error" It seems that some extension have been

Is the PHP Intl extension thread safe?

对着背影说爱祢 提交于 2019-12-05 14:12:03
I've been reading about locales in PHP and it seems setlocale() has problems with threads. (I'm not too familiar with threads - the docs mention it is not thread safe) I'd like to give my project the ability to deal with certain number formats and the Intl extension seems interesting. http://php.net/manual/en/book.intl.php Should I expect the same problems that setlocale() has using the Intl extension? Decent Dabbler Ok, I was curious about this myself as well, so I devised a test. First I tested setlocale() with these two files: <?php # locale1.php error_reporting( E_ALL | E_STRICT ); date

php: delete shared memory on windows

拟墨画扇 提交于 2019-12-05 14:01:57
This code: shmop_delete(); shmop_close(); doesn't delete shared memory. An experiment: $shmid = @shmop_open(1234, 'a', 0, 0); var_dump($shmid); yields bool(false) of course. But $shmid = shmop_open(5678, 'c', 0644, 10); ... shmop_delete($shmid); shmop_close($shmid); ... $shmid = @shmop_open(5678, 'a', 0, 0); var_dump($shmid); yields int(157) Why not deleted yet? How can I delete shared memory? I'm running apache on windows 7. SHM is not natively available in Windows, so PHP tries to emulate it in its "thread safe resource manager" (TSRM) by using Windows File Mappings internally, which is an

How to install php-mongo on CentOS 5.3?

送分小仙女□ 提交于 2019-12-05 07:11:36
I've already installed mongoDB on my VPS. It works well. Now I want to install php driver to make php work with mongoDB. I followed Mongo Installation but cannot find information I need. This manual contains only this notice: If you are using CentOS or Redhat, Csoke Arpad created » RPMs for these distributions ( PHP Mongo ). I'm not familiar with ssh commands on CentOS and distributions (what is it?). Can anyone help me install this php extension? Please provide all ssh commands needed to install it. Thank you. Try Justin's solution first with pecl (you'll want to use yum rather than aptitude

phpredis extension doesn't work, unable to load 'redis.so'

霸气de小男生 提交于 2019-12-05 06:21:19
I installed nginx, php, php-fpm, php-pecl-redis by yum. All of them work but the last one. When I run /usr/sbin/php-fpm , I got this: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/redis.so' - /usr/lib/php/modules/redis.so: undefined symbol: igbinary_unserialize in Unknown on line 0 I don't know what "igbnary_unserialize" means and how to fix it. I checked the redis.so file under right path. I add extension=redis.so to "php.ini" php version: 5.3.3 phpredis version: 2.2.7 I had the same issue. I'm on Ubuntu 16.04 LTS. Running sudo apt-get install php-igbinary

PHP Sql Server PDOException:could not find driver

旧街凉风 提交于 2019-12-05 05:31:41
My server is a Windows 2008 server. PHP Version 7.2.7 is installed and running. Sql Server 11 (64 bit) is installed and is working (there is a couple asp.net apps running and already using that database) I downloaded the PHP Sql Server Drivers from Microsofts website and placed the .dll files in the PHP ext directory. In my PHP.ini I added: extension=php_pdo_sqlsrv_7_nts_x64 In my .php file I am using to test my db connection I have: $SqlServer = "THISSERVER\SQLEXPRESS"; $SqlServerCon = new PDO("sqlsrv:server=$SqlServer;Database=TheDatabase", "DbUName", "DbPassword"); if (!$SqlServerCon) {die(

Passing a variable by reference into a PHP extension

99封情书 提交于 2019-12-05 03:43:12
I'm writing a PHP extension that takes a reference to a value and alters it. Example PHP: $someVal = "input value"; TestPassRef($someVal); // value now changed What's the right approach? Edit 2011-09-13 : The correct way to do this is to use the ZEND_BEGIN_ARG_INFO() family of macros - see Extending and Embedding PHP chapter 6 (Sara Golemon, Developer's Library) . This example function takes one string argument by value (due to the ZEND_ARG_PASS_INFO(0) call) and all others after that by reference (due to the second argument to ZEND_BEGIN_ARG_INFO being 1). const int pass_rest_by_reference = 1

Is it possible to create PHP extensions in Haskell?

荒凉一梦 提交于 2019-12-05 00:20:01
Is it possible to create PHP extensions with Haskell? Usually PHP extensions are written using C. Is using Haskell FFI to provide functionality for a stub C extension possible (or even a good idea)? What are the caveats to such an approach? Does Zend perform some magic in the background that would disrupt such a scheme? You can certainly do this, though I'm not sure anyone has tried. Haskell interoperates with C via its FFI mechanism , and you can certainly: Call Haskell from C so if you can call C from PHP, and that C calls Haskell, you're in business. Why would you want to do this? Faster,

Docker image build with PHP zip extension shows “bundled libzip is deprecated” warning

谁都会走 提交于 2019-12-04 23:15:23
I have a Dockerfile with a build command like this: #install some base extensions RUN apt-get install -y \ zlib1g-dev \ zip \ && docker-php-ext-install zip I get this warning from build output: WARNING: Use of bundled libzip is deprecated and will be removed. configure: WARNING: Some features such as encryption and bzip2 are not available. configure: WARNING: Use system library and --with-libzip is recommended. What is the correct way to install the zip extension without these warnings? My complete Dockerfile looks like: FROM php:7.2-apache RUN apt-get clean RUN apt-get update #install some