33 questions
1
vote
0
answers
124
views
XAMPP Unable to load dynamic library (/opt/lampp/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found
I am using XAMPP for my PHP project to run it locally. It utilizes PHP extensions written with PHP-CPP library.
I am having this error when I check for my /opt/lampp/bin/php -m
PHP Warning: PHP ...
0
votes
1
answer
130
views
Linking phpcpp fails when building PHP extension
Environment:
I am trying to develop a PHP-CPP extension and have downloaded the the empty extension file from https://www.php-cpp.com/documentation/your-first-extension to start. I have also modified ...
0
votes
2
answers
111
views
PHP-CPP returning a string results in the strlen instead of plain string
So i wrote a little extension with the help of php-cpp. In this function, i just simply calculate the pow, which works perfectly fine. After calculating the result, i return the string from the ...
1
vote
2
answers
138
views
Having extreme difficulty with determining the correct value type for std::map
Addendum:
Let me simplify my question, to try this one step at a time, because I feel I've created too much confusion about what I'm trying to achieve.
Mind you, I'm using C++11 and I think I'm ...
0
votes
0
answers
112
views
how to install and configure phpcpp legacy module with phpv5.3.3 over centos 6.9
Getting the error after installation and compiling phpcpp legacy version module with phpv5.3.3
php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/libphpcpp....
0
votes
1
answer
289
views
Linking PHP-CPP library to a Linux project in Visual Studio 2017
I have a small C++ test project which should result in a .so-library on Windows Subsystem for Linux (WSL, more or less = Ubuntu 14.x). In order to get a PHP extension the current version of the PHP-...
0
votes
0
answers
1k
views
use php-cpp error: undefined symbol: executor_globals in Unknown on line 0
I successfully compiled the EmptyExtension and got salamander_php.so(my extension name).
Then I copied it to the php extension_dir and added the row to the php.ini
extension=salamander_php.so
when I ...
0
votes
1
answer
131
views
how to add an static array in php class with php-cpp
I want to add a static member like below
class BaseYii{
public static $map = [1,2,3]//sutff
}
this is my c++ code ,
class BaseYii : public Php::Base {
public:
Php::Array hehe;
BaseYii() = ...
0
votes
1
answer
700
views
How to convert C++ map<string,map<string>> to Php::Value in PHPCPP library?
I'm am creating PHP extension using PHP library, and I am having difficulties converting C++ map variable to PHPCPP Php::Value returned by a function. The reason I'm doing this is to get ...
0
votes
1
answer
507
views
How to pass Array of Objects using PHPCPP, loop through each object and return associative array
I have recently started learning PHPCPP - A C++ library for developing PHP extensions and trying to understand:
how to pass an Array of objects from php to C++ through PHPCPP
library as examples give ...
2
votes
1
answer
789
views
why phpcpp extension function written in C++ is slower then function written in php
I have recently created a php extension with PHPCPP - C++ library for developing PHP extensions and was expecting a performance boost, however instead of seeing a boost i m only seeing degradation in ...
-2
votes
1
answer
126
views
Print PHP-CPP results in browser
I am developing a PHP-CPP extension with c++. My extension is working perfectly when i run it through the command line. But when i try to run it in browser then the browser shows the error that class ...
0
votes
1
answer
166
views
no matching function for call to ‘Php::Extension::add()
I am using PHP-CPP for creating PHP extension to call c++ function.
I have resolved many error after integrating my cpp to example code of cpp by PHP-CPP. But I am stuck at following error,
...
1
vote
0
answers
101
views
How to call my extension method to detect written annotation?
Hi i'm tring to write an extension for php in zephir or php-cpp to call my customMethod from my extention when comment block like code below added to php file any suggestion note will be appreciate
&...
0
votes
0
answers
130
views
How can i compiking sn extension with phpcpp using mac osx yosemite
I am creating my first extension but i have found this error compiling "ld library not found for -lphpcpp" how can i solve it? I am using mac osx yosemite
0
votes
2
answers
300
views
How can i compile program in static library?
I used php-cpp
and create program and worked fine in shared library and Makefile is Here
but i want compile with static library
So i used this command:
/opt/rh/devtool/opt/rh/devtoolset-3/root/usr/...
1
vote
0
answers
120
views
Tracking PHP function calls using php-cpp
I am writing a PHP extension using php-cpp to help me profile my code.
Is there any way in php-cpp to track all calls to a specific function without modifying my php?
e.g. track all calls to ...
1
vote
1
answer
405
views
Type attributes ignored or undefined reference to phpExtension errors while compiling php-cpp main.cpp file
I'm using php-cpp to create an extension for my php codes and when I try to compile just the simple structure of main.cpp file, I get some weird errors.
this is the compile errors:
g++ -std=gnu++...
1
vote
1
answer
195
views
Error while compiling php-cpp main.cpp file
I'm using php-cpp to create an extension for my php codes and when I try to compile just the simple structure of main.cpp file,
I get this error.this is the compile errors:
main.cpp:15:5: error: ‘...
1
vote
2
answers
602
views
Compile PHP-CPP on Windows Machine
I`m trying develop a extension to PHP with PHP-CPP on Windows. I build the .a and .so of PHP-CPP with MingW, but, when i go build the extension the compiler not found the phpcpp.h.
My file Makefile:
...
1
vote
1
answer
410
views
create a extension for php with php-cpp
i want create a extension for php
and i want install php-cpp
http://www.php-cpp.com/documentation/install
show error:
................
zend/constantimpl.h:185:38: error: ‘zend_constant’ has no ...
0
votes
0
answers
134
views
PHP-CPP : How to stop current request without using exit(0)
I am creating a simple PHP module with PHP-CPP library.
I make this to limit process per IP address per php script file. I have found a solution for everything I needed, except 1 thing : I cant stop ...
1
vote
1
answer
630
views
Convert a Php::Object back to a C++ object in PHP-CPP?
I was trying to make a Bencode extension for PHP by PHP-CPP, so there were several classes like:
class BItem : public Php::Base {
public:
virtual std::string getType() const {
return "BItem";
}
};...
2
votes
2
answers
2k
views
How to compile PHP-CPP on Windows?
I'm compiling PHP-CPP source but i getting error in Windows 7.But, in Linux (for .so extension) it works fine. The error given by the compiler is:
collect2.exe [Error] ld returned 1 exit status
Note: ...
3
votes
2
answers
899
views
Simple Hello World PHP extension could not be executed
I am trying to run simple Hello World PHP extension, but after make & install extension and when I want to run test script I am experiencing following issue:
P Warning: PHP Startup: Unable to ...
1
vote
0
answers
288
views
php-cpp extension class arrayaccess return self reference
I have trouble with a custom extension in php.
I am extening Php::ArrayAccess for a self made object and I am able to use my object in PHP juste like a native array. BUT I can not chain the operators [...
6
votes
1
answer
28k
views
cc1plus: error: unrecognized command line option "-std=c++11"
i am trying install php-cpp on centos 6,5.
when i run command make, i am getting error:
make: Warning: File `Makefile' has modification time 5.1e+05 s in the future
mkdir -p shared/common
mkdir -p ...
-1
votes
1
answer
101
views
Adding a syntax for extending php rather than a library with php-cpp [closed]
I was interested in adding some feature to the php syntax, and definitly it's obvious for me it's different from writing modules for the language.
I was wondering this requires to edit the resource in ...
0
votes
1
answer
339
views
PHP-CPP C++ Extension Can't Find Regex [duplicate]
I'm writing a C++ extension for PHP and I'm using regex in my code. Here is a snippet
#include <phpcpp.h>
#include <regex>
#include <iterator>
#include <iostream>
#include <...
0
votes
1
answer
600
views
PHP-CPP new extension works on cli 'php' command but not in browser
I am using PHP-CPP to create a php extension which contains a function that will parse a table from mysql.
extension.cpp
#include <phpcpp.h>
#include <iostream>
#include <mysql.h>...
3
votes
2
answers
3k
views
php-cpp zend/php.h not found
I wanted to test the php-cpp possibilities but while using "make" it throughs "php.h" missing at me:
g++ -Wall -c -g -std=c++11 -fpic `php-config --includes` -o zend/base.o zend/base.cpp
In file ...
0
votes
2
answers
360
views
How can I make my PHP extension programmed in C++ remember global variables?
I am using the PHP-CPP library to develop PHP extensions.
When I try the following in C++:
#include <phpcpp.h>
static int number=0;
Php::Value get_num()
{
number++;
return number;
}
...
5
votes
1
answer
263
views
Retrieve class name from a Php::Value at PHP-CPP
Working on a small extension for PHP using PHP-CPP, I receive at C++ side, an array with objects and I need retrieve the class name of it. The object Php::Value didn't looks like have any method for ...