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 552525
In Process

The Archive Base Latest Questions

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

Alright, so I have a problem. I need to create a folder to store

  • 0

Alright, so I have a problem. I need to create a folder to store compiled templates in php. I have an install script that tries to mkdir() an appropriate directory (compiled_templates).

Invariably it returns this warning.

Warning: mkdir() [function.mkdir]: Permission denied in /home/tchalvak/sites/quotesite/quotes/install.php on line 92

Running changing the mode of the folder that the compiled_template folder will be created within also errors out on the same permissions problem.

Is there no way to assure that you can create what amounts to a storage folder via php? You have to use an outside-php program just to ensure that a folder is created? How do other php developers deal with this issue?

Edit: This is an installable script, so the overall objective is to allow 10 different random people to install the script on their server. This is why “making sure that php has all these great necessary write permissions to the compiled_templates directory” isn’t practical as a manual process, unfortunately.

Edit: Damn, same permission error when just trying to create a temp directory as well. Lame.

  • 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:30:33+00:00Added an answer on May 13, 2026 at 11:30 am

    If it’s a temporary directory, create the directory in the system temp dir.

    mkdir(sys_get_temp_dir() . 'example');
    

    The general approach though is to simply ensure the user PHP is run as (e.g. apache) has write permissions where necessary.

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

Sidebar

Related Questions

Alright, so I have a table that I need to store in a database.
Alright, so heres my problem: I have an application I am working with that
Alright, I have a script that takes a few arguments, runs data, and then
Alright, this problem is a little complicated, so bear with me. I have a
Alright i have a for loop in php and it generates a group of
Alright so I have a task, that I have to let the client try
Alright simple question I have integriters like 5 188 4634 And they all need
I've a problem with setting cookies in php. I've to say that I'm not
Alright, so heres my problem, i need my user to be able to upload
We have an existing java-based heavyweight project that needed an interactive script interpreter. After

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.