Welcome Guest, Not a member yet? Register   Sign In
Windows + Apache File Upload Directory Permissions - Upload Path
#1

[eluser]Jay Turley[/eluser]
After a good bit of time and energy spent, I finally figured out how to get file uploads working in CI when running Apache on Windows. This allowed me to stop seeing the "The upload path does not appear to be valid" error message over and over and over again.

The key is that the upload_path in the upload library config needs to include the document root so that Windows will play nicely.

Like so:

Code:
$config['upload_path'] = $_SERVER['DOCUMENT_ROOT'].'/full/path/to/uploads/';

By adding the $_SERVER['DOCUMENT_ROOT'], I was able to make the file uploads example in the user guide work without any other changes or special considerations.

Hopefully this will help another struggling CI developer working in the hell that is windows+apache.




Theme © iAndrew 2016 - Forum software by © MyBB