CodeIgniter Forums
"The upload path does not appear to be valid" (PULLING MY HAIR OUT !!!!) [SOLVED] - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: "The upload path does not appear to be valid" (PULLING MY HAIR OUT !!!!) [SOLVED] (/showthread.php?tid=8974)

Pages: 1 2 3


"The upload path does not appear to be valid" (PULLING MY HAIR OUT !!!!) [SOLVED] - El Forum - 06-07-2008

[eluser]KeyStroke[/eluser]
I don't understand why this stupid thing won't work. The application works perfectly fine on my local server, but once I upload it to the actual site I get the "The upload path does not appear to be valid" error when I attempt to upload an image.

- The path of the image is at the root of both servers (local and remote), so I've set the path like this: $config['upload_path'] = '/uploads/';

- I've already changed the mode of the file to 777

- I used an absolute path and it didn't work. I even tried using '../../../../uploads', but that doesn't work either.

Is there anything else I could check? this is driving me crazy..


"The upload path does not appear to be valid" (PULLING MY HAIR OUT !!!!) [SOLVED] - El Forum - 06-07-2008

[eluser]MaDe[/eluser]
Have your tried to
Code:
var_dump(is_dir('/upload/'));
to see, if PHP can access the directory on the server?

Is this a shared server, then I don't think that '/upload/' is the correct path. Using
Code:
var_dump($_SERVER['SCRIPT_FILENAME']);
you can find out the "real" path to your script - and thus to your "upload"-dir.


"The upload path does not appear to be valid" (PULLING MY HAIR OUT !!!!) [SOLVED] - El Forum - 06-07-2008

[eluser]KeyStroke[/eluser]
If you were a girl, I'd make love to you.

Thanks man !! Big Grin


"The upload path does not appear to be valid" (PULLING MY HAIR OUT !!!!) [SOLVED] - El Forum - 06-07-2008

[eluser]MaDe[/eluser]
Glad I'm not Smile


"The upload path does not appear to be valid" (PULLING MY HAIR OUT !!!!) [SOLVED] - El Forum - 11-07-2009

[eluser]tison[/eluser]
All, i was having this issue on a local windows installation. After some debugging, i found that although i was passing the config variables when loading the library, they were not being read properly.

In any case - to fix it, I simply called the initialization script right after i loaded the library, like so:

Code:
$config['upload_path'] = 'uploads';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '2048';
$config['max_width'] = '1024';
$config['max_height'] = '768';

$this->load->library('upload', $config);
$this->upload->initialize($config);



"The upload path does not appear to be valid" (PULLING MY HAIR OUT !!!!) [SOLVED] - El Forum - 08-27-2010

[eluser]wardprod[/eluser]
[quote author="MaDe" date="1212848024"]Have your tried to
Code:
var_dump(is_dir('/upload/'));
to see, if PHP can access the directory on the server?[/quote]
You saved me too bro, cheers!


"The upload path does not appear to be valid" (PULLING MY HAIR OUT !!!!) [SOLVED] - El Forum - 02-25-2011

[eluser]Mohammad Rashidi[/eluser]
hi everybody,

var_dump(is_dir('/upload/'));

return true, but the file did not uploaded!

i have this error: The upload path does not appear to be valid

ci is in this directory:

/var/www/ci/admin/

and i have used this directory for file uploading:

/var/www/ci/images/

regards


"The upload path does not appear to be valid" (PULLING MY HAIR OUT !!!!) [SOLVED] - El Forum - 03-02-2011

[eluser]Mohammad Rashidi[/eluser]
I found what was the problem!

with this line of code, the issue solved!

$this->upload->initialize($config);

regards


"The upload path does not appear to be valid" (PULLING MY HAIR OUT !!!!) [SOLVED] - El Forum - 05-07-2011

[eluser]Christoph Rumpel[/eluser]
thx a alot!

I've tried for hours to set the path. Really annoying!=)

$this->upload->initialize($config);

This saved me! Thx a lot!


"The upload path does not appear to be valid" (PULLING MY HAIR OUT !!!!) [SOLVED] - El Forum - 05-07-2011

[eluser]InsiteFX[/eluser]
Why does everyone miss the period?
Code:
$config['upload_path'] = './uploads/';

./ up one directory!

InsiteFX