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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 490k
  • Answers 490k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer First of all, it's a really bad idea to use… May 16, 2026 at 9:17 am
  • Editorial Team
    Editorial Team added an answer If you are not dead set on using a listbox,… May 16, 2026 at 9:17 am
  • Editorial Team
    Editorial Team added an answer killproc will terminate programs in the process list which match… May 16, 2026 at 9:17 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a controller that handles file uploads. Ultimately I would like to be
I have been experimenting with the lightweight NiceDog PHP routing framework, which routes like
I'm working on creating a simple MCV application, in order to understand MVC better.
I am trying to upload a file from a flash widget to my rails
I created a custom RouteHandler for images that I want protected. My RouteHandler simply
I have multiple views which make the same NSURLRequest/NSURLConnection request . Ideally, in order
I am trying to create a utility in C# using the MVC framework where
I was expecting the below scenario common, but couldn't find much help online. I
I want to upload an image using a groovy on grails. My gsp page

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.