Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 551993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:27:10+00:00 2026-05-13T11:27:10+00:00

As you know. You have to write open_basedir = ‘/var/home’ etc I want to

  • 0

As you know. You have to write open_basedir = '/var/home' etc

I want to write like this: open_basedir = '/var/home/*/'

Which i want is php should restrict every directory which is in home directory, for every different directories.

Short question: How can i write open_basedir like this: open_basedir = 'var/home/*/'?

Thank you very much.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:27:10+00:00Added an answer on May 13, 2026 at 11:27 am

    If you want to restrict PHP to each user’s own home directory you need a PHP setup in which:

    1. PHP runs with the user credentials
    2. PHP accepts a per-user configuration

    A typical case is a CGI (or FastCGI) setup, rather than running PHP as Apache module. Then you can provide a custom php.ini file for each user.

    BTW, I haven’t tested it but perhaps open_basedir = "~" works as expected…

    ====== EDIT ======

    Some clarifications that arise from the OP’s comment:

    1. In Unix shells, “~” is a synonym for “current user’s home directory” so it’s “/var/home/john” if you are john and it’s “/var/home/michael” if you are michael. “var/home/~/” has no special meaning: it’s just a directory that’s called ~.

    2. Many programs use this shell convention. I don’t know if PHP does so.

    3. CGI allows to execute arbitrary programs on the server so it is less secure than static HTML the same way that a skateboard is less secure than a space shuttle. But we are not talking about executing arbitrary programs: we are talking about executing the PHP interpreter. It’ll be as as secure as PHP and your environment are.

    4. If you are interested in the subject, Google for FastCGI (a CGI implementation with enhanced performance). Many hosting providers use it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this so far but I don't know how to write over the
I have a text area where user can write his SMS. You all know
I know there have been some similar questions to this, but they haven't helped
I know there have been a million questions asking this, but mine is different.
I have a classifieds website, which uses PHP and MYSQL. I have several pages
In C# I have two blocks of code which open and write to processes
I know this sounds like something I can google, but the truth is that
I have the below question, and would like to know if I have interpreted
I'm working this programming task for college where we have to write a c++
I have an iframe with designMode=on (Yeah - I know this is bad thing)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.