Jump to content

Recommended Posts

i am currently with godaddy, i called them and asked what the upload file size limit was and they said that there is no limit, but, php sets the limit to 8 by default. what do i need to do to change that to 30? also, is there anything else in the .ini file that needs to be changed(memory, etc) to work with the change of the upload size limit? if anyone is familar with this, I would really appreciate your input, thanks. 

 

maybe there is way to change the size limit on the fly in the upload script?

i found this thread on this site

http://www.phpfreaks.com/forums/index.php/topic,212307.msg967307.html#msg967307

but it says nothing about what exactly should be on the php5.ini file

someone told me that I should have the corrent tags on the ini file (kinda like php tags)

 

so i would just create a file called 'php5.ini'

 

inside that file i would just have 'upload_max_filesize = 20M'

 

save it, upload to my root directory and that is it? of course without the quotes

i don't want to doubt your knowledge, but have you personally done this without any problems?

 

so i would just create a file called 'php5.ini'

 

inside that file i would just have 'upload_max_filesize = 20M'

 

save it, upload to my root directory and that is it? of course without the quotes

i don't want to doubt your knowledge, but have you personally done this without any problems?

 

No, you would change the configuration file used by PHP. For a quick fix, use ini_set();.

 

ini_set('upload_max_filesize', 20);

The following had no effect. I still get the internal error 500

<?php
set_time_limit(300);
ini_set('upload_max_filesize', 20);
ini_set('post_max_size', 20);
ini_set('memory_limit', 100);
ini_set('max_execution_time', 300);

session_start();
include "connection.php";

blah blah blah, etc.

i uploaded a file called php5.ini to the root directory containing

 

upload_max_filesize = 30M

post_max_size = 30M

memory_limit = 100M

max_execution_time = 300

 

then i checked my phpinfo, and it was changed. but then when i go to my site, it tells me that i cannot connect to mysql. what does the above info have to do with mysql? any other ideas. somebody has had to come across this. i read a lot on google, others have this problem, but i can't find the solution.

Edit: Upon examining the godaddy faq information, their IIS7 hosting does support php.

 

What exact type of hosting (shared, VPS, dedicated...) do you have, because the best available information is that shared Windows hosting at godaddy does not support php (even though they have installed php on their Windows servers and some php code will run.)

 

When you contacted godaddy support about this, did you mention to them that your hosting was using Windoes/IIS?

The link you posted Yesterday at 06:01:04 PM that contains a link to a godaddy article mentions that the information is for 'Linux Shared Hosting'.

 

You also cannot set the two upload size settings using ini_set() statements in your code. And for the settings you can set that way, like 'memory_limit', the number supplied is in bytes unless you include an M or G to specify a larger value (you most likely were getting a runtime error because ini_set('memory_limit', 100); means 100 bytes.)

As to your post in the freelance section (normal members cannot post replies in that section), you should try to get godaddy to post their default Windows/iis7 php.ini in their FAQ section as a starting point.

 

Assuming you are developing your php code on a Windows based system, you could use your php.ini from your development system (make sure to set things like display_errors, register_globals, magic_quotes_gpc, magic_quotes_runtime, allow_url_include ... to OFF.)

 

You would also need to set extension_dir, SMTP, smtp_port, session.save_path ... to the correct values (from your existing phpinfo() output) and enable any extensions that you are using (mysql, GD,...)

i added the extensions that i needed. and everything in my php5.ini file is the same as my default settings except,

 

upload_max_filesize = 30M

post_max_size = 30M

memory_limit = 128M

max_execution_time = 300

 

i still get the 500 internal server error.

 

there must be something that I am missing.

i tried to upload a 2.86mb file and it worked. then i tried a 7.88 and it did not work. and right now it is set for 5 minute timeout, but I am not even coming close to 5 minutes before the error

i put

 

error_reporting = E_ALL

display_errors = ON

 

in my php5.ini file and this is all i get for an error

 

500 -  Internal Server Error

There is a problem with the resource you are looking for, and it cannot be displayed.

You have got to be joking. I am extremely upset. I called godaddy, again. (5th time in 2 weeks) This time a woman anwered. i asked her about the upload file size, she put me on hold, and when she came back, she said that my shared hosting plan only alows uploads up to 10mb. I can't believe no one else told me this. I guess it is time to move to a virtual dedicated server.(30 bucks a month)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.