Solved

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

Posted on 2009-07-13
3
369 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
  • 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now