php-extension

PDO_SQLITE driver not present.. what to do?

╄→尐↘猪︶ㄣ 提交于 2019-11-29 10:37:52
问题 I see everywhere (including on the official docs) that the PDO_SQLITE driver is/should be included by default in PHP. However, when I look at my extension_directory , I see only these files: gd.so mcrypt.so mysqli.so mysql.so pdo_mysql.so pdo.so And, as a result, a framework I'm trying to install (Symfony) tells me I need to install either the PDO_SQLITE or the SQLite3 .so extensions... Can anyone help? Can I just try and find the needed .so file somewhere on the web, place it in my

Phpize under Windows

好久不见. 提交于 2019-11-29 08:21:29
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? 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. Open a Visual Studio developer command prompt (either 64 or 32 bit), and run cd C:\php-src buildconf.bat -

how to write PHP module in C

放肆的年华 提交于 2019-11-29 06:24:22
问题 how can i write my own module in C ? is it possible ? 回答1: Yes, it is possible. Here's an old article that I used when I wrote my first extension: http://web.archive.org/web/20110222035803/http://devzone.zend.com/article/1021 Things may have changed since then, so you may want to search for similar tutorials for additional references. Oh, and this should be useful: http://www.php.net/manual/en/internals2.php 来源: https://stackoverflow.com/questions/5631231/how-to-write-php-module-in-c

PHP GD bundled extension without recompiling PHP - solution

社会主义新天地 提交于 2019-11-29 02:45:55
The bundled extension offer a lot of functionality. I have spent a lot of time how to compile extension for my version of PHP. So there are instructions. 0, Install PHP development package. Also You should have installed PHP with GD extension (but not bundled) sudo apt-get install php5-dev 1, Download source code of used PHP (for me 5.6.18) wget http://cz2.php.net/get/php-5.6.18.tar.gz/from/this/mirror -O php-5.6.18.tar.gz 2, Extract archive tar -xzf php-5.6.18.tar.gz 3, Go to the source code of GD extension cd php-5.6.18/ext/gd/ 4, Prepare the extension (run phpize in that directory) phpize 5

How to enable php extension using `phpize`?

大城市里の小女人 提交于 2019-11-29 02:36:30
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 the whole php version.. If the .so is properly compiled etc, and it's in your extension dir, then you

Startup: Unable to load dynamic library '/usr/lib/php/modules/module.so'

℡╲_俬逩灬. 提交于 2019-11-29 02:24:05
问题 When I run the command php -v this error comes up PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/module.so' - /usr/lib/php/modules/module.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP 5.3.3 (cli) (built: Feb 22 2013 02:37:06) 回答1: This is cause by mcrypt extension. Edit /etc/php.d/mcrypt.ini and change ; Enable mcrypt extension module extension=module.so to this ; Enable mcrypt extension module extension=mcrypt.so Edit:

PHP http_build_url() and PECL Install

删除回忆录丶 提交于 2019-11-29 00:04:31
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 pecl_http.dsp does not exist. Is there a work around for this one? or any idea that I would make the

How to start writing a PHP5 extension in C++

删除回忆录丶 提交于 2019-11-28 16:53:50
I'm writing a PHP5 extension, and while I could write it in C, it would be easier to use C++ and take advantage of the STL and Boost. Trouble is, the tutorials I've seen only deal with C, and I'm looking for a basic example which uses C++ Here's what I've tried so far: config.m4 [ --enable-hello Enable Hello World support]) if test "$PHP_HELLO" = "yes"; then AC_DEFINE(HAVE_HELLO, 1, [Whether you have Hello World]) PHP_NEW_EXTENSION(hello, hello.cpp, $ext_shared) fi php_hello.h Note my attempt to declare the bits that PHP interfaces with as extern "C" #ifndef PHP_HELLO_H #define PHP_HELLO_H 1

Can't phpize or configure an extension in OS X 10.9 Mavericks

自古美人都是妖i 提交于 2019-11-28 16:27:57
问题 I am trying to build the memcached extension on OS X 10.9 Mavericks for use with the built in PHP 5.4, initially I tried pecl install memcached but that threw the following. checking for zlib location... configure: error: memcached support requires ZLIB. Use --with-zlib-dir=<DIR> to specify the prefix where ZLIB headers and library are located ERROR: `/private/tmp/pear/install/memcached/configure' failed So I created a tmp directory and executed pecl download memcached , unzipped the code and

How to install PHP 7 extension “memcache” on Windows

被刻印的时光 ゝ 提交于 2019-11-28 09:01:40
问题 I'm having huge problems installing memcached extension for php. Currently using: OS: Windows 10 x64 PHP: 7.0.1 via XAMPP Apache: 2.4.18 (Win32) I have successfully installed memcached in C:/memcached the service is running. But the problem starts when trying to add the memcache php extension. I've tried numerous versions of php_memcache.dll and non seem to be working. I did include the extension in php.ini extension=php_memcache.dll When i run php -m memcache is not listed and at the top i