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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:51:12+00:00 2026-06-15T04:51:12+00:00

The following works in windows: mkdir(‘../my/folder/somewhere/on/the/server’, 0777, true); I am talking about PHP mkdir

  • 0

The following works in windows:

mkdir('../my/folder/somewhere/on/the/server', 0777, true);

I am talking about PHP mkdir.

It works perfectly, and creates the subfolders recursively. However, if I run the same command on a linux server, the folders aren’t created.

Previously I solved this by breaking up the path and creating each folder one by one. But I don’t want to do that because it should work with the “resurive” flag set to true. Why isn’t it working?

  • 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-06-15T04:51:13+00:00Added an answer on June 15, 2026 at 4:51 am

    Sorry, but there must be some problem apart from the mkdir command itself.

    This tiny example works as expected and recursively creates the directories for me when executed on Linux:

    #!/usr/bin/php
    <?php
    mkdir ('testdir/testdir2/testdir3',0777,TRUE);
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following query works on Oracle 10.2.0.1.0 on windows,but doesn't work on Oracle 10.2.0.2.0
The following code: <input style=height: 80px; width: 200px; value=test button> Works fine on Windows,
The following code is for authenticating to a windows AD server using Java+Kerberos and
I have a database that encrypted with windows CAPICOM library with RC4. Following PHP
I have a symlink on my Windows server which was made like this: F:\>mkdir
The following code works in Windows 7 x86, but not x64. What's the difference
The following code works fine in Windows: subprocess.Popen([PATH_TO_G++]/g++ file.cpp -o file.exe) However in Linux
The following code works on Window 7, but when I run it on Windows
The following code works on Windows XP and Windows 7: var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
The following line works fine from my java application on Windows XP: Process p

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.