Solved

Can't mkdir with PHP on Apache server and code throws no errors....

Posted on 2009-07-13
3
378 Views
Last Modified: 2013-12-13
I have a fairly simple script that creates a directory depending on the text entered in a field. But the mkdir will not work. It works on our local test server and another server we have but it will not work on the Verio VPS server I am working on.

I can't mkdir or upoad a file using php.. it does not  throw any errors and enteres the information in the MySQL database just fine. It just won't mkdir or upload.. The script follows through just fine and gives no errors.

I have checked the php.ini and uploads are on and size is fine. Even when I dumb the script down to just

<?php
mkdir ("newdirectory");
?>

It wont work.

Any thing I may be missing?
$uploaddir = $_POST["room"];
$uploaddir2 = "'" . $_POST["room2"] . "'";
$pathway = ("'" . "/backoffice/rooms/" . $_POST["room2"] . "'");
$docsdir = $uploaddir . "/docs";
$projecto = $_POST["project"];
mkdir($uploaddir, 0775, true);
mkdir($docsdir, 0775, true);

Open in new window

0
Comment
Question by:rcimasi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
Ali Kayahan earned 500 total points
ID: 24840165
Did you try to set chmod 777 for the folder that you try to create folder in ?
0
 

Author Comment

by:rcimasi
ID: 24840219
What kind of security risk can I expect from a chmod 777?
0
 
LVL 14

Expert Comment

by:Ali Kayahan
ID: 24840426
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question