http://calcg.org/newlogo2.png Not Logged in.
Login | Register

General Discussion Board \ Computer Programming \ Why doesn't this work?

Click here to log in (you must be logged in to post comments).

AuthorComment
Zachary940
Wraith
avatar
Posted: 6 Jun 2007
22:20 GMT
Total Posts: 714
mkdir("bla","0777");

I'm using PHP 4.
CHMOD is 777 for the dir that I want bla to be.
When the file itself is 777 I get a 500 erorr. So it's set to 755.


---
It is much easier to suggest solutions when you know nothing about the problem.
haveacalc
Guardian
avatar
Posted: 6 Jun 2007
23:16 GMT
Total Posts: 1111
Should "0777" be in quotes?

---
-quoted directly from most movies that don't exist (and some that do).
Zachary940
Wraith
avatar
Posted: 6 Jun 2007
23:20 GMT
Total Posts: 714
If I do take them out it still does not work.

<?php
if(mkdir("/Zachary940/blabgf", 0755)){
echo"Good";
}else{
echo"no good";
}
?>

The above will echo No good


---
It is much easier to suggest solutions when you know nothing about the problem.
Zachary940
Wraith
avatar
Posted: 7 Jun 2007
12:53 GMT
Total Posts: 714
I got it. I did some more resarch and this command is messed up.

mkdir(\blabla,0755)

The above will work.
The bellow will not.

mkdir(/blabla,0755)


---
It is much easier to suggest solutions when you know nothing about the problem.
haveacalc
Guardian
avatar
Posted: 7 Jun 2007
13:30 GMT
Total Posts: 1111


No, I've actually never touched a line of PHP in my life. I don't plan to, either.

---
-quoted directly from most movies that don't exist (and some that do).
Zachary940
Wraith
avatar
Posted: 7 Jun 2007
15:30 GMT
Total Posts: 714
It would be easier if everthing followed that rule.

---
It is much easier to suggest solutions when you know nothing about the problem.
threefingeredguy
Ghost
avatar
Posted: 7 Jun 2007
19:11 GMT
Total Posts: 1189
Directories are always \ except in a webbrowser.

---
Someone call for an exterminator?
Zachary940
Wraith
avatar
Posted: 7 Jun 2007
23:52 GMT
Total Posts: 714
not when using include

---
It is much easier to suggest solutions when you know nothing about the problem.
banjo2E
Wraith
avatar
Posted: 9 Jun 2007
08:26 GMT
Total Posts: 689
Wow, haveacalc, you're using almost exactly the same keyboard as I am! Which brand name is yours? </weirdcommarandomcommapointlessquestion>

---
http://uncyclopedia.org/wiki/User:Administrator <------ WOOOOO!!!!!
haveacalc
Guardian
avatar
Posted: 9 Jun 2007
09:45 GMT
Total Posts: 1111
<common sense>

http://images.google.com/images?hl=en&q=backslash&btnG=Search+Images&gbv=2

---
-quoted directly from most movies that don't exist (and some that do).
banjo2E
Wraith
avatar
Posted: 13 Jun 2007
13:16 GMT
Total Posts: 689
Of course, you could always be a Google-holic...

---
http://uncyclopedia.org/wiki/User:Administrator <------ WOOOOO!!!!!
haveacalc
Guardian
avatar
Posted: 13 Jun 2007
13:39 GMT
Total Posts: 1111
Oh, I am one.

---
-quoted directly from most movies that don't exist (and some that do).
Zachary940
Wraith
avatar
Posted: 14 Jun 2007
17:52 GMT
Total Posts: 714
If you have a question, google it first. That is my motto.
Zach's rules of uncertainty:
1. Try to figure it out on own.
2. Google it.
3. Ask here at CG
3.5 Google it again and again until question is answered or I figure it out.
4. Learn what I did wrong and why the correct way works.




---
It is much easier to suggest solutions when you know nothing about the problem.
ryantmer
Wraith
avatar
Posted: 16 Jun 2007
10:49 GMT
Total Posts: 692
5. Smash problem thing to bits and start again.
banjo2E
Wraith
avatar
Posted: 17 Jun 2007
13:48 GMT
Total Posts: 689
6. Kill numbers 5 and 7. 5 because it causes RSOD. As for the other one... let's just say that 7 is a cannibal.

---
http://uncyclopedia.org/wiki/User:Administrator <------ WOOOOO!!!!!
Master Jc
Dragoon
avatar
Posted: 12 Jul 2007
05:32 GMT
Total Posts: 54
>>>Directories are always \ except in a webbrowser.<<<

Unless you're in UNIX. :P

---
--Note to self: Warranties are NOT a challenge.
threefingeredguy
Ghost
avatar
Posted: 12 Jul 2007
16:13 GMT
Total Posts: 1189
True, but it's statistically negligible because nobody cares about Unix.

---
Someone call for an exterminator?
ryantmer
Wraith
avatar
Posted: 12 Jul 2007
16:32 GMT
Total Posts: 692
Saying "directories are always \" is kind of single-minded, no? As far as I can remember, only Windows uses for directories, doesn't it [and the associated programs]?
Master Jc
Dragoon
avatar
Posted: 12 Jul 2007
17:38 GMT
Total Posts: 54
Now now, 3FG, I use my UNIX storage account a lot, and it's not too difficult to use. I also greatly prefer using UNIX webhosting to Windows based hosting.

---
--Note to self: Warranties are NOT a challenge.
banjo2E
Wraith
avatar
Posted: 13 Jul 2007
09:21 GMT
Total Posts: 689
Actually, given a choice, I'd use iMac stuff for that.

Because I actually know how to use a Mac.

And not Unix.



(Um...I hope that "iMac" is the current model...I'd look stupid if not...)

(Actually, I'd look stupid if I cared; Steve Jobs wants an iWorld, after all.)

---
http://uncyclopedia.org/wiki/User:Administrator <------ WOOOOO!!!!!
threefingeredguy
Ghost
avatar
Posted: 13 Jul 2007
10:14 GMT
Total Posts: 1189
iMac is a very dated model. Plus using a mac for webhosting is like using Unix but devoting half the resources to the GUI. I love OSX but it's to resource-hungry to be a good dedicated server.

---
Someone call for an exterminator?





Portal | My Account | Register | Lost Password or Username | TOS | Disclaimer | Help | Site Search | File Archives Copyright © 2002-2019 CalcG.org