Elxis CMS Forum

Support => Technical support => Topic started by: apkoutsou on November 17, 2010, 19:55:16

Title: PHP dl() function requirements
Post by: apkoutsou on November 17, 2010, 19:55:16
I'm going to write my first extension for PHP (for the needs of a new component), that will be loaded dynamically, thus I'm going to use the php dl() function.

In order this function to successfully load any extension, enable_dl must be on and safe mode must be disabled in the php.ini.

So, my question is this: Is these options configured as above in most servers or not? And if not are providers willing to enable dl() function and disable safe mode??
In other words I just need your experience...  ;)
Title: Re: PHP dl() function requirements
Post by: Ivan Trebješanin on November 17, 2010, 21:51:30
I think a lot of servers have dl function disabled due to security reasons. I know I have disabled it on my  server, and wouldn't like to enable it.  :P
Title: Re: PHP dl() function requirements
Post by: apkoutsou on November 18, 2010, 17:53:11
I'd rather to read a different anwser ::) as this complicates my plans, but that's ok...  :)

Nevertheless, if someone else has the same  >:( or another  ;D answer, I'd like to hear it...
Title: Re: PHP dl() function requirements
Post by: webgift on November 19, 2010, 08:09:22
Sorry apostole ... I have relative - same answer with Ivan.
Title: Re: PHP dl() function requirements
Post by: datahell on November 19, 2010, 09:19:05
Safe_mode has been deprecated in PHP, so you don't have to worry about that. If someone has safe_mode ON then the whole Elxis will be dysfunctional, not just your extension.

About the dl function on massive distribution software
Never create applications that require additional PHP extensions than those available in the default PHP distribution.
You must find a way your extension to work without it. If you wish tell us what you want to do and we might have a solution for you.
Title: Re: PHP dl() function requirements
Post by: apkoutsou on November 19, 2010, 10:17:23
Never create applications that require additional special PHP extensions than those available in the default PHP distribution.

I agree to that! That's why I asked whether the dl() function is enabled on most servers...   ;)

You must find a way your extension to work without it. If you wish tell us what you want to do and we might have a solution for you.

My goal is to protect 3 functions of my code. I have some other methods in mind, but I was keen to the fact that the extension is compiled to binary. I'll try them and check if they can serve my goal.

Any other suggestion though would be nice...  ;D