Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
open_basedir does not seem to set the base path

On my Synology (linux) server I have set-up three Apache2.4 / PHP web environment with the roots being:

/volume1/web
/volume1/webDevZone
/volume1/webTstZone

I would like to have a mechanism where I can call something like echo $_SERVER [DOCUMENT_ROOT] and get / regardless what environment I am running on. This way when I can call includes or require without needing to change things as I move my application from one environment to the other.

Unfortunately, _ DIR _ does not do the trick as it does not returns / (the desired result). Instead it returns the full path of a file. So if the file is nested a few levels, then _ DIR _ returns all levels.

I'm thinking that the solution would not be a PHP one, but rather an Apache one.

I was hoping that open_basedir do it, but it doesn't seem so.

Any idea?

Thanks

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!