[Weird problem] - Upload config not loading |
[eluser]Mauricio de Abreu Antunes[/eluser]
My config/upload.php is not working anymore. Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); This is my upload.php Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
[eluser]Mauricio de Abreu Antunes[/eluser]
Well, i can echo upload_path and i can access that but my directory does not appear to be valid. What's wrong?
[eluser]Silviu[/eluser]
Hello, First, after you define the config array, how do you pass it to the upload library? If you use Code: $this->load->library('upload',$config) Code: $this->upload->initialize($config) Second, it's not necessary to use FCPATH as the current path is always the one where CI's index.php file resides in. So you can simply use Code: $config['upload_path'] = './upload/'; Third, there are some keys into your config array that are not native to the upload library. I haven't checked if they could mess something in the upload library, but you should try commenting them out. Fourth, have you double checked the path and the permissions? Try 777 on the directory as last resort.
[eluser]Mauricio de Abreu Antunes[/eluser]
[quote author="Silviu" date="1334130904"]Hello, First, after you define the config array, how do you pass it to the upload library? If you use Code: $this->load->library('upload',$config) Code: $this->upload->initialize($config) How i said, i have a config file. Following codeigniter manual, it loads when load upload library. Am i right? http://ellislab.com/codeigniter/user-gui...ading.html [Setting preferences in a config file] Second, it's not necessary to use FCPATH as the current path is always the one where CI's index.php file resides in. So you can simply use Code: $config['upload_path'] = './upload/'; I'm using FCPATH because my 'upload' directory is in 127.0.0.1/percutz/upload Third, there are some keys into your config array that are not native to the upload library. I haven't checked if they could mess something in the upload library, but you should try commenting them out. Yes, those keys are valids. Just 'thumbnail' config are not valids. Is it messing? Maybe. I'll try comment them out: Follow the manual link again: http://ellislab.com/codeigniter/user-gui...ading.html [Explanation] Fourth, have you double checked the path and the permissions? Try 777 on the directory as last resort. It's ok. [/quote] Thanks for the reply!
[eluser]Mauricio de Abreu Antunes[/eluser]
Wow, i commented them out and stills not working. Another idea? |
Welcome Guest, Not a member yet? Register Sign In |