PECL

Problems with PHP YAML within Travis CI

 ̄綄美尐妖づ 提交于 2019-12-23 20:07:17
问题 Edit: I believe the problem is that YAML doesn't work on 5.4/5.5. I have a library that is setup in Travis CI and that uses the PHP YAML PECL extension. However, I am unable to get the YAML extension to work in Travis & PHP 5.4, and I'm curious if anyone else has? No amount of Googling has solved my problem. Here is the output of Travis: $ git clone --depth=50 --branch="master" git://github.com/titon/IO.git titon/IO Cloning into 'titon/IO'... remote: Counting objects: 531, done. remote:

Printing directly from PHP using printer_write() function

笑着哭i 提交于 2019-12-23 19:03:17
问题 I found a code printing directly from PHP: $printer = "cups-pdf"; $ph = printer_open($printer); if ($ph) { $content = "Hello World..."; printer_set_option($ph, PRINTER_MODE, "RAW"); printer_write($ph, $content); printer_close($ph); } else { echo "Couldn't connect..."; } I'm trying to test it using XAMPP on Ubuntu 14.04 LTS. But it gives me an error: Fatal error: Call to undefined function printer_open() in /opt/lampp/htdocs/test/test.php on line 4` How do I fix it? 回答1: Currently, there is no

Is it possible to use PECL extensions in HipHop?

走远了吗. 提交于 2019-12-23 09:58:55
问题 I have an application which uses rabbit mq broker and I have consumers written on php and use this extension http://pecl.php.net/package/amqp. I would like to compile these consumers using hiphop but amqp extension is not supported in hiphop. So the question is could I compile PECL extensions into hiphop? Thanks in advance 回答1: You would have to manually write a HipHop extension in C++ to interface with the extension's functionality. Most likely the original PHP extension is of little use, if

Renaming Functions during runtime in PHP

空扰寡人 提交于 2019-12-23 08:05:13
问题 In PHP 5.3 is there a way to rename a function or "hook" a function. There is the rename_function() within "APD" which has been broken since ~2004. If you try and build it on PHP 5.3 you'll get this error: 'struct _zend_compiler_globals' has no member named 'extended_info' This is a really easy error to fix, just change this line: GC(extended_info) = 1; to CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO; I modified my php.ini and the APD shows up in my phpinfo() as it should. However when

Can't get http to work in php

陌路散爱 提交于 2019-12-23 08:03:10
问题 I keep getting this error: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/http.so' - /usr/lib64/php/modules/http.so: undefined symbol: php_persistent_handle_abandon in Unknown on line 0 PHP Fatal error: Class 'HttpResponse' not found in /var/www/api/init.php on line 4 I've reinstalled http through pecl a few times, even tried installing it from the tar.gz. I'm running an EC2 instance. I HAVE put extension=http.so in my php.ini. 回答1: You probably got version 2

Persistent connection or connection pooling in PHP54+ Nginx + PHPFPM + MongoDB

。_饼干妹妹 提交于 2019-12-23 05:07:08
问题 I am using pecl mongo 1.4.x driver(http://pecl.php.net/package/mongo/1.4.1), with the setup mentioned in the title on a moderate traffic services (5K - 10K request per min). And I've found that, in mongoDB the Auth command is taking a large chunck of traffic, and connection request rate is like 30-50 per second. This impacts the performance seriously(lock ratio up, memory management doesn't cops nicely) And if I do netstat in a box(which I have 5-8 boxes in total), I see 2-3K mongo

PHP mailparse.so error - undefined symbol mbfl_convert_filter_flush

前提是你 提交于 2019-12-21 09:04:00
问题 sudo pecl install mailparse ends with: Build process completed successfully Installing '/usr/lib64/php/5.5/modules/mailparse.so' install ok: channel://pecl.php.net/mailparse-2.1.6 configuration option "php_ini" is not set to php.ini location You should add "extension=mailparse.so" to php.ini After adding extension=mailparse.so to the Dynamic Extensions section of php.ini , running php prints this: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/5.5/modules/mailparse

PHP mailparse.so error - undefined symbol mbfl_convert_filter_flush

限于喜欢 提交于 2019-12-21 09:03:53
问题 sudo pecl install mailparse ends with: Build process completed successfully Installing '/usr/lib64/php/5.5/modules/mailparse.so' install ok: channel://pecl.php.net/mailparse-2.1.6 configuration option "php_ini" is not set to php.ini location You should add "extension=mailparse.so" to php.ini After adding extension=mailparse.so to the Dynamic Extensions section of php.ini , running php prints this: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/5.5/modules/mailparse

Install oAuth PECL error: Cannot install, php_dir for channel “pecl.php.net” is not writeable by the current user

痞子三分冷 提交于 2019-12-21 03:48:18
问题 I'm trying to instal oAuth on OS X, but I am getting this error in the Terminal: Cannot install, php_dir for channel "pecl.php.net" is not writeable by the current user How do I allow it to be writable? 回答1: First find out where the php_dir is. You can do this by using the 'config-get' command: pecl config-get php_dir After this you can either: Change the ownership of that folder (and any needed child folders) sudo chown <username> <php_dir> or Set the php_dir to a different folder pecl

Adding functions to PHP core

时光怂恿深爱的人放手 提交于 2019-12-20 03:51:26
问题 I have several functions that I wrote and I use regularly on my servers, is there a way I can add them to the core so I don't have to include them from external files? I am running PHP5 回答1: You could add your libraries as a PEAR extension. Then you could add it to your local PEAR repository. Pear is added to the default include path in php.ini. Then you can just use "pear install myextension" on your machines. If these are C functions you interface with in php (php extensions) then you can