Phizinza Posted January 9, 2010 Share Posted January 9, 2010 I need ot increase my max upload size using the php.ini. I don't have any php.ini files on the hosting so I have been told to make one. But I don't know what code it has to have along with the max_upload code to make the setting work. Can someone send me to some instructions or help me out with this one please? Thank you Quote Link to comment https://forums.phpfreaks.com/topic/187816-phpini-increase-upload-size/ Share on other sites More sharing options...
cags Posted January 9, 2010 Share Posted January 9, 2010 Who told you to make one? To my knowledge PHP wouldn't work correctly without a php.ini. Quote Link to comment https://forums.phpfreaks.com/topic/187816-phpini-increase-upload-size/#findComment-991636 Share on other sites More sharing options...
Phizinza Posted January 9, 2010 Author Share Posted January 9, 2010 Someone on SMF website. I ran the phpinfo thingo and it says its in "/web/conf/php.ini " but there is no folder called that and I even tried looking for hidden files. I then asked my host provider ( I am using "shared linux" hosting with dedicated IP address ). They said and I quote "If you do not have a php.ini file in your domain's root directory, then you will need to write and upload one to the account. Unfortunately, we do not provide technical support with third-party scripting issues. " So its like it has one but cannot be accessed or changed by me and by making another it will use the original with the new ones updated settings maybe? I don't really know. I just am going on what this guy on SMF forum said and what my host provider is telling me to do. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/187816-phpini-increase-upload-size/#findComment-991639 Share on other sites More sharing options...
cags Posted January 9, 2010 Share Posted January 9, 2010 I've been reliably informed it's common on shared hosting to allow you to have an individual php.ini. That being the case all you should need to do is create a php.ini file in any text editor, add the settings you want and upload it to your root directory. In your case you will need at least... upload_max_filesize = 64M post_max_size = 64M Obviously you change the 64M to what ever value you require. I'd imagine there are certain settings that the host won't allow you to change, but I guess you'll come up against those as you try. Quote Link to comment https://forums.phpfreaks.com/topic/187816-phpini-increase-upload-size/#findComment-991663 Share on other sites More sharing options...
Phizinza Posted January 10, 2010 Author Share Posted January 10, 2010 Hi. Thanks, this has worked. Well sort of. The gallery I'm running still says the php.ini is limited to 8M but the phpinfo() says its limit is 100M. Does it need time to reset or something? Or does the gallery need updating? Or did this change not really effect anything? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/187816-phpini-increase-upload-size/#findComment-992187 Share on other sites More sharing options...
RaythMistwalker Posted January 10, 2010 Share Posted January 10, 2010 changed to php.ini usually require webserver restarts. Quote Link to comment https://forums.phpfreaks.com/topic/187816-phpini-increase-upload-size/#findComment-992196 Share on other sites More sharing options...
PFMaBiSmAd Posted January 10, 2010 Share Posted January 10, 2010 Some web server configurations require that you put a local php.ini in each folder that you need the changed settings to affect. What did your web host (or his FAQ documents) state about using a local php.ini? Quote Link to comment https://forums.phpfreaks.com/topic/187816-phpini-increase-upload-size/#findComment-992224 Share on other sites More sharing options...
Daniel0 Posted January 10, 2010 Share Posted January 10, 2010 To my knowledge PHP wouldn't work correctly without a php.ini. It'll work fine. It will just revert to the default values. Quote Link to comment https://forums.phpfreaks.com/topic/187816-phpini-increase-upload-size/#findComment-992236 Share on other sites More sharing options...
cags Posted January 10, 2010 Share Posted January 10, 2010 [ot] To my knowledge PHP wouldn't work correctly without a php.ini. It'll work fine. It will just revert to the default values. Indeed, Salathe informed me on IRC, but thanks.[/ot] Quote Link to comment https://forums.phpfreaks.com/topic/187816-phpini-increase-upload-size/#findComment-992244 Share on other sites More sharing options...
Phizinza Posted January 10, 2010 Author Share Posted January 10, 2010 Still no reply from my host provider about how to restart the webserver. I read something about restarting httpd. But it seems I need SSH, and to enable that on my hosting I have to delete all my databases. hmmm Quote Link to comment https://forums.phpfreaks.com/topic/187816-phpini-increase-upload-size/#findComment-992423 Share on other sites More sharing options...
droid17 Posted January 10, 2010 Share Posted January 10, 2010 I just ran into this problem with GDaddy. I had to edit my php.ini file and add it to my root dir with this in it memory_limit = 50M post_max_size = 32M file_uploads = On upload_max_filesize = 192M At first it didn't seem to be picking it up. After about an hour it took effect. If you run phpinfo you should see that the upload max changed. Thanks, Droid Quote Link to comment https://forums.phpfreaks.com/topic/187816-phpini-increase-upload-size/#findComment-992463 Share on other sites More sharing options...
Phizinza Posted January 11, 2010 Author Share Posted January 11, 2010 I just ran into this problem with GDaddy. I had to edit my php.ini file and add it to my root dir with this in it memory_limit = 50M post_max_size = 32M file_uploads = On upload_max_filesize = 192M At first it didn't seem to be picking it up. After about an hour it took effect. If you run phpinfo you should see that the upload max changed. Thanks, Droid I've done just that, my phpinfo shows the change, but the app doesn't show it or let me upload anything over 8mb. I've waited over 24 and still nothing. The maker of the gallery app told me if the php.ini is changed the app should recognize it and take effect and I shouldn't need to do anything on the app side.. So I'm not sure what to do, as I can't restart the server and I can't get it to work. But the phpinfo shows it as working... Quote Link to comment https://forums.phpfreaks.com/topic/187816-phpini-increase-upload-size/#findComment-992520 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.