php-extension

Installing PHP Zip Extension

眉间皱痕 提交于 2019-11-28 06:15:41
I'm attempting to install the PHP Zip extension. My server does not have external internet access, so I downloaded it myself from PECL: http://pecl.php.net/package/zip . I chose 1.10.2, the latest "stable" release, and transferred it to my server. I ran: pear install zip-1.10.2.tgz and added extension=zip.so to php.ini as instructed. I can see that zip.so was created and placed in the right extension_dir folder as well. I restarted apache and then checked to see if it was loaded by running: php -m Despite all of this, "zip" is still not in that list. Am I missing a step or doing something

Install/activate PHP “intl” extension running MAMP

北城余情 提交于 2019-11-28 06:02:17
Ok, I'm running MAMP 1.9.5, which includes PHP 5.3.5, on my MacBook Pro. The "intl" extension isn't included/activated and I've tried a lot of different ways to install it ("./pecl install intl" doesn't seem to do it), but can't make it work. I've also "googled my ass of" but can't find any hints. Anyone of you that know how to do it? Or, alternatively, have and advice on how to install my own MySQL+Apache+PHP (and include "intl")? I'm trying to do this to be able to run Symfony2. So if you have any advice on how to install MySQL+Apache+PHP+Symfony2 on Mac, thats also welcome :) I just

Memory usage of current process in C

不问归期 提交于 2019-11-28 05:55:06
I need to get the memory usage of the current process in C. Can someone offer a code sample of how to do this on a Linux platform? I'm aware of the cat /proc/<your pid>/status method of getting memory usage, but I have no idea how to capture that in C. BTW, it's for a PHP extension I'm modifying (granted, I'm a C newbie). If there are shortcuts available within the PHP extension API, that would be even more helpful. You can always just open the 'files' in the /proc system as you would a regular file (using the 'self' symlink so you don't have to look up your own pid): FILE* status = fopen( "

Using Hiphop for PHP extension development

我的未来我决定 提交于 2019-11-28 05:51:02
问题 Hiphop converts PHP into C++ code, did anyone used it for PHP extension development? I have found following link to write PHP extensions using C++ http://devzone.zend.com/article/4486-Wrapping-C-Classes-in-a-PHP-Extension I want to write some PHP classes and convert them into C++ and use it in PHP extension. Please let me know if anyone did that and also any thoughts are welcomed. 回答1: As far as I know, the point of HipHop is to bypass PHP's Virtual Machine known as Zend Engine. In order to

How to check which PHP extensions have been enabled/disabled in Ubuntu Linux 12.04 LTS?

自闭症网瘾萝莉.ら 提交于 2019-11-28 03:05:52
I'm using Ubuntu Linux 12.04 LTS on my local machine. I've installed LAMP long ago on my machine. Now I want to enable following PHP extensions: php_zip php_xml php_gd2 For it first I want to check whether these PHP extensions are enabled or not. I searched a lot about how to check the installed/enabled PHP extensions but every time I found how to install these extensions on Ubuntu Linux. So can someone please let me know how should I check the enabled/disabled PHP extensions in Ubuntu Linux 12.04 LTS? Thanks in advance. Checking for installed php modules and packages In addition to running

How can i install gearman php extension on Windows OS?

回眸只為那壹抹淺笑 提交于 2019-11-28 01:26:44
Please anybody help me out in installing gearman php extension on windows xp. I have xampp 1.7.7 installed on my system and i have installed Cygwin, libevent-1.4.14b-stable and gearmand on my system. Please let me know what more is needed to install gearman-1.0.2 php extension. As when i run the gearman-1.0.2 on cygwin terminal throwing error of command not found. RafaSashi to install Gearman with PHP Extension in CentOS or Debian see How to install Gearman with PHP Extension Installing and Updating Cygwin Package from: https://cygwin.com/install.html Install the Latest GCC and make via Cygwin

Phpize under Windows

纵然是瞬间 提交于 2019-11-28 01:22:50
问题 I'm trying to follow the instructions here: https://code.google.com/p/php-sweph/wiki/build to compile a PHP extension. My OS is Windows XP. I'm unable to find "phpize" to do the command. However, I've installed Pear for PHP. is it something only for Linux or is there a way to compile with phpsize with Windows? 回答1: In windows compile script design to compile php itself and should add your extension to compile with php ... On Windows, you don't call phpize but instead you call buildconf.bat.

How to develop C extensions for PHP apps?

夙愿已清 提交于 2019-11-27 16:59:15
问题 My PHP app has a number-crunching part that is just to slow for PHP, so I was thinking of building a custom C extension, but it is impossible to find any good reference to start with :( Is there a guide on how to do something like this? 回答1: The best resource, although outdated in several aspects (it only covers PHP until version 5.1) is Extending and Embedding PHP by Sara Golemon. Even more outdated is the PHP documentation. On the other hand, the content on the PHP wiki is very up-to-date,

How to enable php extension using `phpize`?

混江龙づ霸主 提交于 2019-11-27 16:56:19
问题 I tried these steps on different extensions but I don't know why that doesn't work. Shouldn't I see a change in phpinfo() output after that? The steps: Decompress the php source code and change directory to ext/ext_name phpize configure make move manually the "ext_name.so" file from "../.lib" directory to "extension_dir" specified in "php.ini" file. (or do make install ) restart web service Is there something missing? I need to enable a certain extension in php and there's no way to recompile

PHP http_build_url() and PECL Install

风格不统一 提交于 2019-11-27 15:11:52
问题 I downloaded an API that uses this php function http_build_url(). Everytime I run my application it says: Fatal error: Call to undefined function http_build_url() I made a research and found out that I should install pecl_http to run that function. Now, I installed it into my system, by the way, I used Windows XP . I install this one via CMD by goint to my xampp/php folder and running this command: pecl install pecl_http Unfortunately, I can't install this one because it says: ERROR: The DSP