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 9260137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:49:09+00:00 2026-06-18T12:49:09+00:00

I’m trying to upload a file to the apache public_html directory. Well I believe

  • 0

I’m trying to upload a file to the apache public_html directory.
Well I believe it deserves to mention that I’m on a virtual hosting environment running on a VPS with a few domains and sub-domains.

Usually on my XAMPP server I wouldn’t have any problems loading files to temporary folder but on the new server It’s impossible it gives me an error when trying to upload.

I’ve checked the superglobal $_FILES and I get this error:

array(1) { ["file"]=> array(5) { ["name"]=> string(9) "test.gif" ["type"]=> string(0) "" ["tmp_name"]=> string(0) "" ["error"]=> int(1) ["size"]=> int(0) } }

I’ve tried to set a tmp folder on the server with get_init(‘/tmp’) without any success.

Thank you very much for your kind attention.

  • 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-06-18T12:49:10+00:00Added an answer on June 18, 2026 at 12:49 pm

    Apparently I couldn’t set a new temporary folder for uploading files on my VPS.

    What have I tried:

    Set a new temporary folder with ini_set(‘upload_tmp_dir’, ‘/tmp’); without any success!
    What was the reason for that? Answer: lack of permission.

    So before using ini_set() make sure you have permissions to make it or else it will not affect the php engine behavior.

    Anyway, it seems that if you don’t set a temporary folder, PHP will use /tmp by default.
    In conclusion if you don’t set a new temporary folder won’t be a problem to upload files.
    You probably have some other problem related with the size of the file. Check php info for file_uploads -> ON, upload_max_filesize, max_file_uploads and you can set a new temporary folder at upload_tmp_dir but won’t be a problem for sure.

    If you still can’t upload files you probably are having some problem with library dependencies. My advise is make sure that all of the functions you’re using are installed on the server such as GD library particularly if you’re trying to manipulating images.

    you can check php info by creating a new file with php extension and use between the php tags the function: phpinfo();

    NOTE: you can make all of the above changes in php.ini or with the ini_set() function.

    My server problem was the GD library!!!

    There it goes my ten cents contribution.
    I hope it helps someone 🙂

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

Sidebar

Related Questions

I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to create an if statement in PHP that prevents a single post
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.