Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2009-07-13
3
Medium Priority
?
380 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 2000 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

This article discusses how to implement server side field validation and display customized error messages to the client.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

609 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