Recent Change with Godaddy, PHP, File Uploads

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Apparently Godaddy changed something with filesystem permissions, PHP configuration, etc over the weekend because I just had to change one of the default INI settings to get a script which works with uploaded files back up and running just now. The script was working fine before I left for the weekend.

My main symptom was that the getimagesize function was returning a boolean false all of a sudden. I tried the filesize function to see if it was a reading error and sure enough, zero filesize.

It ended up tracing back to the following setting in php.ini, and as I have it here is how they've had it for quite awhile now.

Code: [ Select ]
upload_tmp_dir = /tmp


When you look at where that's pointing, it really doesn't look right. I wonder if they were getting conflicts or security breaches in the form of filename guessing considering it's shared hosting. :scratchhead:

Anywho, pointing that to a writable directory within my web-root immediately cleared up the problem. I used the default "php_uploads" folder that's there when an account is setup a-new for debugging, it's probably a good idea to create your own directory with a randomized directory name though. Just don't forget the "./" relative path at the beginning.

Code: [ Select ]
upload_tmp_dir = ./php_uploads


And remember, on Godaddy you alter "php.ini" for PHP4 and "php5.ini" for PHP5.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • the master06
  • Beginner
  • Beginner
  • User avatar
  • Posts: 54
  • Loc: pits

Post 3+ Months Ago

This is an interesting change. Could be just one of the start of the many big changes in Google's index in the coming year 2009. I just hope there'll be nothing worse for many of us.
  • magis
  • Born
  • Born
  • magis
  • Posts: 2

Post 3+ Months Ago

Yes ! I think so .
  • arterus
  • Born
  • Born
  • arterus
  • Posts: 1

Post 3+ Months Ago

Where or how do you find the php.ini file in godaddy? I want to change the upload limit but I am having the hardest time. Thanks.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

arterus wrote:
Where or how do you find the php.ini file in godaddy? I want to change the upload limit but I am having the hardest time. Thanks.


There should be a "php.ini" in your root directory (where your main "index.php" or "index.html" file is) for PHP4
For PHP5 the file is in the same place and is named "php5.ini", also I don't believe that file exists by default. You may have to create a php5.ini file yourself if you've already got "php.ini" in there.
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6252
  • Loc: Seattle, WA

Post 3+ Months Ago

the master06 wrote:
This is an interesting change. Could be just one of the start of the many big changes in Google's index in the coming year 2009. I just hope there'll be nothing worse for many of us.

What?

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 110 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.