well in another thread someone asked about installing a PHP extention and this brought up some ideas in my head.
well, i wanted to know a few things.
i'm a C/C++ programmer as well and i know the interpreter/parser for PHP is written in C and i would love to make my own extentions for PHP and set them wherever. well, the problem with this is that the website application that i'm creating should be able to be used on as many servers as possible. granted alot will be enterprise so theycan do thier own but i want to make it as easy as possible for everyone and anyone to set up so that it's almost like windows. less screwing around and more work.
that being said i know that there are some functions called ini_get/set() and i was wondering if those actually temporarilly set/get the php.ini and then i can do whatever with them. is this the case? would i be able to do that?
i want to be able to set it in code and look for the php.ini, temporarilly set the variables as to where the extention is (some hosts might not allow you to use extentions and such) and then i can use it.
what do you think? is it possible? can i do it? or am i barking up a wall?
php.ini and extentions
Moderator: General Moderators
- MrPotatoes
- Forum Regular
- Posts: 617
- Joined: Wed May 24, 2006 6:42 am
ok sorry. i think i might have figured it out.
http://www.zend.com/manual/function.dl.php
are there any tutorials on this? and are there any tutorials on writing extension?
oh and one more thing that i touched on before, would i be able to set the extension in whichever folder i want? that would be frikkin' SUPERB! this way i can have all the files on the webserver app and this thing would rule all kinds of ass. you don't even know
http://www.zend.com/manual/function.dl.php
are there any tutorials on this? and are there any tutorials on writing extension?
oh and one more thing that i touched on before, would i be able to set the extension in whichever folder i want? that would be frikkin' SUPERB! this way i can have all the files on the webserver app and this thing would rule all kinds of ass. you don't even know
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Writing extensions is probalby the most poorly documented feature of PHP
I imagine once you figure out how the extension hooks into PHP Zend core...it'd be pretty straight forward...
But getting that far might be tricky...I haven't found any *good* articles yet...a few exist...but this is a complicated subject (thus the lack of quality articles) so you likely need to read more than a few articles to get up to speed quickly...otherwise your stuck thumb through existing extensions, etc...trying to peice everything togather
Good luck, have fun...and document what you did and write an article yourself of your experiences...
I imagine once you figure out how the extension hooks into PHP Zend core...it'd be pretty straight forward...
But getting that far might be tricky...I haven't found any *good* articles yet...a few exist...but this is a complicated subject (thus the lack of quality articles) so you likely need to read more than a few articles to get up to speed quickly...otherwise your stuck thumb through existing extensions, etc...trying to peice everything togather
Good luck, have fun...and document what you did and write an article yourself of your experiences...
- MrPotatoes
- Forum Regular
- Posts: 617
- Joined: Wed May 24, 2006 6:42 am
wll do
i'm honestly used to working with code that is barely documented. most programmers are. which sucks because most of my peers refuse to write frikkin' docs. even if the articles aren't too great it's ok, there is existing code out there that i could use to start off with. and then there is the full PHP core that i can use as well. with .NET i could see the funcions easilly

either way i'll make sure to write a tutorial and put it up somewhere for people to see. this way i'm not the only person that makes a useful extention.
i might even make an extention that loads only the classes that i need from php. *giggle*
thank god i have help. otherwise this part would never get done lol
cheers
i'm honestly used to working with code that is barely documented. most programmers are. which sucks because most of my peers refuse to write frikkin' docs. even if the articles aren't too great it's ok, there is existing code out there that i could use to start off with. and then there is the full PHP core that i can use as well. with .NET i could see the funcions easilly
either way i'll make sure to write a tutorial and put it up somewhere for people to see. this way i'm not the only person that makes a useful extention.
i might even make an extention that loads only the classes that i need from php. *giggle*
thank god i have help. otherwise this part would never get done lol
cheers