Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 899379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:12:28+00:00 2026-05-15T15:12:28+00:00

I created a controller which handles file posts, moves uploaded files to a folder

  • 0

I created a controller which handles file posts, moves uploaded files to a folder beside the index.php file (not in the application folder, because I want to reach the files directly through http).

The upload works perfectly on Windows based servers but not on Linux. PHP version is still the same on every server, and my local machine.

The code:

    $config['upload_path'] = 'files/pictures/';
    $config['allowed_types'] = 'gif|jpg|png';
    $config['max_size'] = '10240';
    $config['encrypt_name'] = true;

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

    if ( ! $this->upload->do_upload('Filedata'))
    {
        //error handling
    }   
    else
    {
        $data = array('upload_data' => $this->upload->data());
        imageResize($data['upload_data']['full_path'],600);
    }

As you can see it’s nothing special, it’s an ordinary image uploader based on CI.
Why do I get an error on Linux?

I tried several ways with the upload path, but none of them work. Folder has chmod 777.

    $config['upload_path'] = './files/pictures/';
    $config['upload_path'] = './files/pictures';
    $config['upload_path'] = 'files/pictures/';
    $config['upload_path'] = 'files/pictures';

None of these work under Linux.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T15:12:29+00:00Added an answer on May 15, 2026 at 3:12 pm

    The temporary directory is missing. The uploaded file is first moved to a temporary directory, before being moved to its destination. The directory name is probably configured somewhere, or you can find it in the documentation. This directory does not exist on the Linux server, and does exist on the Windows server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a controller file which handles redirecting users to the proper url, I
I have a controller action which handles multiple photo uploads (which are uploaded using
I created a Tab Bar Controller which has 5 tab bar items. I am
I have a module in which I created a custom page with controller and
I have a controller that handles file uploads. Ultimately I would like to be
I am trying to create a workaround in my controller which handles a bug
I'm trying to create a controller which retrieves certain blogposts from the blog. I
I have a controller called articles , which creates the articles model which gets
I have created Controller Attribute and would like to read SessionId but get error
I have tab controller created through storyboards with a custom implementation (simple buttons and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.