Welcome Guest ( Log In | Register )

3 Pages V  1 2 3 >  
Reply to this topicStart new topic
> Finding your absolute path, If you're having trouble...
ywingempress
post Mar 8 2004, 02:12 AM
Post #1


Unregistered









If you're not sure what to put as your $MOVE_TO_PATH in config.php, or you're getting errors similar to the following:
CODE
Warning: move_uploaded_file(___): failed to open stream: No such file or directory in ___ on line 81

Warning: move_uploaded_file(): Unable to move '/tmp/phpkBCC5w' to '___' in ___ on line 81
You did not upload a file or the file could not be moved to ___
when you try to upload an image into flinx or flinx collective, keep reading.

The following code will write to your screen the path you should put in config.php. Paste this into a new file, call it temp.php, and upload it to your flinx directory (NOT your images directory, your root flinx directory with the rest of the php files!).
CODE
<?php
  $arr = explode("/",$_SERVER["PATH_TRANSLATED"]);
  $file = $arr[count($arr)-1];
  $dir = substr($_SERVER["PATH_TRANSLATED"],0,strlen($_SERVER["PATH_TRANSLATED"])-strlen($file));
  echo $dir . "images/";
?>


Now point your browser to the temp.php file, and copy the screen contents into your config.php file. smile.gif

PS: I'm pretty sure this'll work on most if not all Apache servers (this is the most common type of webserver), but if it doesn't work for you, please let me know. And if anyone feels like testing this out, even if you already know your absolute path, I'd appreciate that too! biggrin.gif
Go to the top of the page
+Quote Post
eNZeder
post Mar 8 2004, 02:37 AM
Post #2


Rank #2: Member
**

Group: Members
Posts: 49
Joined: 14-September 03
From: New Zealand
Member No.: 417



I've tested it and just letting you know that it worked for me.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Heather
post Mar 10 2004, 02:48 AM
Post #3


Unregistered









Works for me, too! Thank you for that little code, it's very helpful smile.gif
Go to the top of the page
+Quote Post
Riitta
post Mar 27 2004, 07:23 PM
Post #4


Unregistered









Yay, thanks so much for this piece of advice. Working like a dream now, I <3 Flinx! smile.gif
Go to the top of the page
+Quote Post
MidnightzStorm
post Mar 30 2004, 10:37 PM
Post #5


Unregistered









I tried that however mine still says:


CODE
Warning: move_uploaded_file(/home/eden27/public_html/flinx/images/frwav.jpg): failed to open stream: Permission denied in /home/eden27/public_html/flinx/post.php on line 81

Warning: move_uploaded_file(): Unable to move '/tmp/phplxiQkQ' to '/home/eden27/public_html/flinx/images/frwav.jpg' in /home/eden27/public_html/flinx/post.php on line 81
You did not upload a file or the file could not be moved to /home/eden27/public_html/flinx/images/frwav.jpg


I have no idea what is wrong.
Go to the top of the page
+Quote Post
ywingempress
post Apr 3 2004, 03:29 AM
Post #6


Unregistered









This looks like a permissions error. You need to CHMOD your folder to 777.
FAQ: http://codegrrl.com/faq/index.php?qid=32&catid=10
Go to the top of the page
+Quote Post
MidnightzStorm
post Apr 3 2004, 04:01 AM
Post #7


Unregistered









Thank you so much Amy! I completely went pass that in the FAQ.
Go to the top of the page
+Quote Post
Allen
post Apr 8 2004, 07:58 AM
Post #8


Unregistered









biggrin.gif Ty very very much!!!!!!!! cool.gif
Go to the top of the page
+Quote Post
Guest_Tara-Marie
post Apr 17 2004, 11:00 PM
Post #9


Unregistered









Thanks so much!! I was taking forever trying to figure that thing out. rolleyes.gif <3
Go to the top of the page
+Quote Post
Sean
post Apr 19 2004, 12:27 AM
Post #10


Unregistered









i think i love you for that.
yes, i most definitely do.
Go to the top of the page
+Quote Post
Guest_Chrissy
post Apr 28 2004, 12:37 AM
Post #11


Unregistered









OMG THANK YOU SO MUCH! It worked for me! biggrin.gif
Go to the top of the page
+Quote Post
o0katz0o
post Apr 29 2004, 10:17 AM
Post #12


Rank #2: Member
**

Group: Members
Posts: 42
Joined: 8-April 04
Member No.: 971



Or another way would be:

CODE

<?php
echo getcwd() . "/images/";
?>


--------------------
Katie <3 Art (my passion), Jon (my boyfriend) and Sasha (my lab)
Personal & WakScripts -> GUACHEE.COM
Art/design portfolio -> CREATEDIGITAL.NET
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Chivahn
post May 30 2004, 06:43 PM
Post #13


Unregistered









I tried that, and I CHMODed the images folder to 777, and I still get this:

Warning: move_uploaded_file(home2/violenc/public_html/flinx/images/1.jpg): failed to open stream: No such file or directory in /home2/violenc/public_html/flinx/post.php on line 81

Warning: move_uploaded_file(): Unable to move '/tmp/php7VwvWv' to 'home2/violenc/public_html/flinx/images/1.jpg' in /home2/violenc/public_html/flinx/post.php on line 81
You did not upload a file or the file could not be moved to home2/violenc/public_html/flinx/images/1.jpg

sad.gif
Go to the top of the page
+Quote Post
liquidsugar
post May 30 2004, 09:20 PM
Post #14


Rank #3: Frequent
***

Group: Members
Posts: 56
Joined: 24-April 04
Member No.: 1,026



oh my goodness!! thank you so much!! i can never get these things to work on the first try... I was afraid I'd have to go searching for the answer but I found it right away!! w00t! haha. THANK YOU!!!!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
violence&lace
post May 31 2004, 12:11 AM
Post #15


Unregistered









QUOTE(Chivahn @ May 30 2004, 06:43 PM)
I tried that, and I CHMODed the images folder to 777, and I still get this:

Warning: move_uploaded_file(home2/violenc/public_html/flinx/images/1.jpg): failed to open stream: No such file or directory in /home2/violenc/public_html/flinx/post.php on line 81

Warning: move_uploaded_file(): Unable to move '/tmp/php7VwvWv' to 'home2/violenc/public_html/flinx/images/1.jpg' in /home2/violenc/public_html/flinx/post.php on line 81
You did not upload a file or the file could not be moved to home2/violenc/public_html/flinx/images/1.jpg

sad.gif

Nevermind, I figured it out. I forgot the beginning slash ::hits head::
Go to the top of the page
+Quote Post
Amy
post Jun 3 2004, 04:43 AM
Post #16


Unregistered









I want to scream here! PHP hates me. blink.gif

I've got the error on line 81, same as everyone else. The problem is that I'm still getting it even though I've got the path that I got from the code thingy to find my path, I've CHMOD'd to 777 and I have the begining and ending slash but I still get this

CODE
Warning: move_uploaded_file(/home/amyforet/public_html/flinx/images/vin.jpg): failed to open stream: Permission denied in /home/amyforet/public_html/flinx/post.php on line 81

Warning: move_uploaded_file(): Unable to move '/tmp/php7rOWNp' to '/home/amyforet/public_html/flinx/images/vin.jpg' in /home/amyforet/public_html/flinx/post.php on line 81
You did not upload a file or the file could not be moved to /home/amyforet/public_html/flinx/images/vin.jpg


HELP!
Go to the top of the page
+Quote Post
Guest
post Jun 3 2004, 05:06 AM
Post #17


Unregistered









Nevermind, nevermind. The problem was that I had CHMOD'd my flinx folder to 777, not the images folder in the flinx folder. DOH! rolleyes.gif
Go to the top of the page
+Quote Post
Becky
post Jun 12 2004, 06:04 PM
Post #18


Unregistered









I did it too, and it worked!! Thank you SO much for that handy little script. At first I thought it was something I was doing wrong, but now it uploaded. Thank you again, it all work! Flinx is awesome biggrin.gif
Go to the top of the page
+Quote Post
Ztar
post Jun 26 2004, 08:07 PM
Post #19


Unregistered









Thank You thank You thank You!!!!
Go to the top of the page
+Quote Post
Jaime
post Jun 29 2004, 03:53 AM
Post #20


Unregistered









Just wanted to say thanks for this. I thought I already had, but reading back, I hadn't. This thread was a great help to me when I first installed Flinx.
Go to the top of the page
+Quote Post

3 Pages V  1 2 3 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

- Lo-Fi Version Time is now: 10th September 2010 - 08:35 AM