php-extension

How to start writing a PHP5 extension in C++

心不动则不痛 提交于 2019-12-17 21:54:04
问题 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

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

Deadly 提交于 2019-12-17 17:28:54
问题 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

Getting Started with PHP Extension-Development [closed]

雨燕双飞 提交于 2019-12-17 07:15:17
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Please suggest help articles or tutorials about PHP "low" level С-modules programming interface. 回答1: Searching through my bookmarks, only links I found are those : Extension Writing Part I: Introduction to PHP and Zend Extension Writing Part II: Parameters, Arrays, and ZVALs Extension Writing Part II:

Getting Started with PHP Extension-Development [closed]

余生长醉 提交于 2019-12-17 07:15:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Please suggest help articles or tutorials about PHP "low" level С-modules programming interface. 回答1: Searching through my bookmarks, only links I found are those : Extension Writing Part I: Introduction to PHP and Zend Extension Writing Part II: Parameters, Arrays, and ZVALs Extension Writing Part II:

Installing one PHP extension for a program on Windows

此生再无相见时 提交于 2019-12-13 20:08:12
问题 sorry if I seem like an absolute beginner at these things. I wanted to get the PHP extension for GEOS. I already have PHP (though XAMPP) and GEOS installed. Now, trying out the instructions on GitHub, I soon realize that these are instructions for Linux. I've been googling instructions for getting PHP extensions in Windows, but I've learned that it's not quite simple. Based on what I've found I would either need to Use Visual Studio (which I would have to download first) Find a dll (there is

PHP extension loading from script using dl()

萝らか妹 提交于 2019-12-13 18:16:42
问题 I'm going to buy a (cheap) hosting space with apache/php 5/mysql. Because it's cheap i have no direct control over php.ini and extension loading. My question is: can i load an extension putting the .dll file into my space and than using dl() php function? Can the host disable this feature thus avoid loading custom extension this way? 回答1: Yes, it can be disabled through the enable_dl and safe_mode php.ini settings (which would almost certainly be the case, as otherwise you could e.g. load

php: delete shared memory on windows

强颜欢笑 提交于 2019-12-13 12:28:16
问题 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. 回答1: SHM is not natively available in Windows, so PHP tries to

Anyone can provide uploadprogress.dll extension for php 5.3.0?

て烟熏妆下的殇ゞ 提交于 2019-12-13 07:11:40
问题 I need uploadprogress extension for php on windows. I downloaded dlls from here, but the version doesn't match with my php. I have php 5.3.0 build 20090626 VC++6. And I couldn't find a compatible uploadprogress.dll. I can't build it because I don't have php source of my version. Also I don't want to use APC extension. can anyone provide this dll for me? 回答1: Have you considered using the JavaScript APIs for upload progress? They're much more accurate and allow you to report progress without a

zend_call_method_with_N_params

試著忘記壹切 提交于 2019-12-12 15:06:15
问题 There are zend_call_method_with_0_params , zend_call_method_with_1_params and zend_call_method_with_2_params in PHP extension development. But how to call method with more than 2 params? 回答1: My previous answer was wrong. You have to use zend_call_function directly . See the body of zend_call_method. Basically you have to prepare a zend_fcall_info object first. The number of arguments should be stored in the fci.param_count field and fci.params should have an array with fci.param_count

configure: error: Cannot find OpenSSL's <evp.h>

时光毁灭记忆、已成空白 提交于 2019-12-12 14:15:12
问题 I've installed the php7 on my redhat server,while i want to use the mysql extension.I cd the php7 source ext dir,and configured many times but all result that "configure: error: Cannot find OpenSSL's ".It's awfal! 1.I had the openssl there. [root@xx mysqlnd]# rpm -qa|grep -i openssl pyOpenSSL-0.10-2.el6.x86_64 openssl-1.0.0-20.el6.x86_64 openssl-devel-1.0.0-20.el6.x86_64 libcurl-openssl-7.33.0-2.2.x86_64 libcurl-openssl-devel-7.33.0-2.2.x86_64 2. I had tried amost all of the methods such as