PHP plugins

Questions, comments, and news on the server side plug-ins and it's API
Post Reply
myrk
Private
Private
Posts: 2
Joined: Mon Mar 01, 2010 1:48 am

PHP plugins

Post by myrk » Wed Jun 23, 2010 8:22 pm

Hello people,
You might already know that I have been asking around if it is possible to write PHP plugins.
Most of the people I asked told me "Not that I know of". Well I thought they were right, but then I got this crazy idea: "What if I write a PHP extension that gets the bzfs_API.h library and creates easy-to-use functions?"
lol
So I looked up thousands of tutorials and now I'm trying to write the extension, although many of you know that I'm a plugin and c++ noob. XD
I'm not very sure if BZFS will allow someone to run a .php plugin, even if it starts with the "#!/usr/bin/php5".
Right now I'm having difficulties compiling BZFS with --enable-plugins to test my new plugin . :P
So, what do you think?

lol

User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5193
Joined: Fri Dec 13, 2002 4:11 am
Location: https://github.com/OmniTanks
Contact:

Re: PHP plugins

Post by JeffM » Fri Jun 25, 2010 2:54 am

bzfs doesn't know what php is. it only knows how to load compiled dynamic libraries (.dll or .so)
a php extension won't do anything for bzfs. you would have to write a C++ plugin that wrapped up a php parser/executor that then mapped all the bzfs api calls into php.

Take a look at the python plugin, it does something similar to what you would need to do for php.

V3 will be able to read lua plugins but that won't help you much either.
ImageJeffM

Post Reply