Solved

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

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

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do I update select listbox after search 2 48
Dump data from mysql to xls php 10 52
how can I see the time difference in only seconds? 4 37
Insert PHP into HTML page. 7 43
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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…
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 …

739 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