Skip to main content

All Questions

Tagged with
2 votes
1 answer
265 views

Getting function argument value from PHP extension in c++

I have created php extension in c++.In version php 5.6 can able to get currently executed function details. I was getting the arguments value as follows, if (real_execute_data->function_state....
Durai's user avatar
  • 87
0 votes
0 answers
54 views

Reads the Value from zval* in separate thread - PHP extension c++

I am using Centos 7 (PHP - 5.6.36 Thread safety - disabled) i have created PHP extension in c++ to store the function call stack traces. Storing the information starts from PHP_RINIT_FUNCTION and end ...
Durai's user avatar
  • 87
1 vote
1 answer
75 views

File write not working in PHP extension c/c++ (linux)

I have created my own PHP extension in c++ (linux). when zend engine compiles the PHP code am getting the active user functions and internal functions name. To debug this php extension am using ...
Durai's user avatar
  • 87
3 votes
1 answer
393 views

Call object constructor (__construct) from a php extension

I'm just experimenting with a PHP extension and I would like to know what is the suggested/preferred way to call an object constructor within the extension. I've read that, by calling the ...
Carlo Pastorino's user avatar
0 votes
1 answer
527 views

Create PHP extension

Trying to create simple Hello World PHP extension according manual. config.m4 PHP_ARG_ENABLE(hello, whether to enable Hello World support, [ --enable-hello Enable Hello World support]) if test "$...
vico's user avatar
  • 17.8k
1 vote
0 answers
46 views

Tracking PHP object lifetimes from C/C++

We're using PHP to access our custom C++ objects. Some of those C++ objects are fairly large so we'd like to keep them around until the last PHP object that references them is destroyed. We've been ...
Howard Rubin's user avatar
6 votes
1 answer
1k views

how to convert zval to vector for php extension?

i'm writing a php extension for my c++ library which is defined something like this: bool getPids(map<string,string> pidsMap, vector<string> ids); now, i'm writing a php wrapper for ...
Prod Tester's user avatar
0 votes
1 answer
495 views

php extension method not returned why?

Here is the php_ex.cc . When I compile my .so library the retur() method is not working. WHY? I have no errors, but It should print "test" and it doesn;t . need some help.THX [php_ex.cc] #include "...
sunset's user avatar
  • 1,389
1 vote
1 answer
2k views

php extension how to return a string from a method?

I have in [example.cc] a method : std::string Car::accelerate (std::string n) { cout<<n<<endl; return n; } I would like to call this method from a php extension I wrote this in my [...
sunset's user avatar
  • 1,389
2 votes
2 answers
719 views

how to access a variable from a class using php extension?

I am working in c++ under ubuntu. I have the following example: [car.h] #ifndef VEHICLES_CAR_H #define VEHICLES_CAR_H // A very simple car class class Car { public: Car(); void shift(int ...
sunset's user avatar
  • 1,389
8 votes
3 answers
4k views

How do I compile a PHP extension with Microsoft Visual C++ 2008?

I created a PHP Hello World extension DLL with Microsoft Visual C++ 2008. I have the right php.ini (I know because when I enable and disable the gd2 extension, there is an effect), but when I load ...
Mark Lalor's user avatar
  • 7,899
2 votes
2 answers
902 views

Missing symbol after compiling swig interface

Im trying to compile a php interface for my linux shared object and i have managed to get it to compile all right using the output from swig, however when i try and load the so it complains of a ...
Lodle's user avatar
  • 31.9k