Jump to content

Setting BASEDIR at runtime

- - - - -

  • Please log in to reply
3 replies to this topic

#1
rhossis

rhossis

    Learning Programmer

  • Members
  • PipPipPip
  • 46 posts
Hi,

My firm develops accounting application that is powered by PHP. Some modules require writing to particular folders on the filesystem. Does setting BASEDIR in a specific script using ini_set() during runtime apply to all scripts globally or only the specific php script running?

Regards,
Rhossis

#2
rhossis

rhossis

    Learning Programmer

  • Members
  • PipPipPip
  • 46 posts
Sorry I meant open_basedir :)

#3
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
Hi, Anything set in ini_set() will persist (globally or otherwise) only until the end of execution of the script, and will return to default value. I would recommend you modify this through php.ini to apply it globally persistant.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#4
rhossis

rhossis

    Learning Programmer

  • Members
  • PipPipPip
  • 46 posts
Thanks. I see you point given that it may affect the global settings during the period when the script is running.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users