PHP-CPP extension not loaded

Hi guys, I have recently installed php-cpp and compiled an extension. The thing is that the extension is created correctly (*.so) but the extension seems not to be loaded correctly as I cannot access any method from this ext.
I am using:
Centos 7.0.1406 64bits
nginx 1.6.2
php 5.4.16
g++ 4.8.2
Ludwig DiehlSystems ArchitectAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
Did you create the 'ini' file in the extension directory to load it?  I believe they're in /etc/php.d/*.ini
Ludwig DiehlSystems ArchitectAuthor Commented:
Yes, I created the ini file and also copied the *.so to the extension dir
Do the log files shed in any light?
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

By default selinux will kill your module unless you label it correctly
see ls -z ; audit2allow ; semanage fcontext (respective manuals)
Ludwig DiehlSystems ArchitectAuthor Commented:
What do you mean by labeling it? Where should it be labeled?
Ludwig DiehlSystems ArchitectAuthor Commented:
By the way. SELinux is disabled in my server
Did you restart php-fpm after adding module? nginx does not load any php modules.
Threaded php module loaded by nginx will not load any additional modules.
Ludwig DiehlSystems ArchitectAuthor Commented:
I already tried restarting nginx and php-fpm but even after restarting both none of the modules I created using PHP-CPP load.
evilrixSenior Software Engineer (Avast)Commented:
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
Ludwig DiehlSystems ArchitectAuthor Commented:
I think enough information was given. I am still waiting for someone to help me solve this.
do you have a module loading directive in php.ini.d/*.ini ?
php-cpp module is broken, namely with php 5.4 (exact way you build with system compiler and system php-devel)
produces WRONG MODULE with missing symbols
namely here is a bug report:
Which apparently is fixed for v1.3.3 or whatever follows 1.3.2
Ludwig DiehlSystems ArchitectAuthor Commented:
Thanks for answering. I tried compiling with latest version (1.4)  with not success. My Configuration is:

Zend Engine/2.4.0

The extension is created (*.so) but it is not loaded
So try last known working release according to bug report
Ludwig DiehlSystems ArchitectAuthor Commented:
I get this warning
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php5/extensions/' - cannot open shared object file: No such file or directory in Unknown on line 0

Open in new window

Run ldd command against ""
Then "locate" all missing libraries, and add their path to  /etc/
Then run ldconfig
Ludwig DiehlSystems ArchitectAuthor Commented:
I found the cause of this problem. It was so simple!. I had to change the line

Open in new window


Open in new window

Then I compiled and installed phpcpp and bualá!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ludwig DiehlSystems ArchitectAuthor Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for Ludwig Diehl's comment #a40800824

for the following reason:

It was clear that the problem had something to do with the file location so digging into paths gave me the answer
That was the last invented problem.... Initial problem was solved completely http:#40784050
Ludwig DiehlSystems ArchitectAuthor Commented:
Excuse me. Invented? What do you mean?. As you see the MAIN and ONLY problem was
PHP-CPP extension not loaded
By running "" included in phpcpp path I discovered this ID: 40800775 so I looked into Makefile and noticed and did this ID: 40800824
I don't know what do you mean by
Initial problem was solved completely
You can post a fix to php-cpp project (as a bug report)
They dont look like testing on exact system in bug report....
Ludwig DiehlSystems ArchitectAuthor Commented:
Yes, that would be useful.
For suse it is /usr/lib64/php5... They must change ./configure script...
As much as I am concerned you can pick your points back...
Ludwig DiehlSystems ArchitectAuthor Commented:
Thanks for your concern either way.
Ludwig DiehlSystems ArchitectAuthor Commented:
It worked!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.