Punk Rock Geek Posted June 4, 2009 Share Posted June 4, 2009 I'm referring to an upload form on my website. It was working fine for me earlier today, but after my site was transferred to a new server, it has been giving me problems. Small files (less than 10 KB) upload, but any larger ones don't. It's almost like they set the php.ini file to 10 KB for max file uploads. I tried to find the php.ini file, and even tried to make a new one but have been unsuccessful at both. Can anyone help? Also, my larger PHP files no longer work once they reach a certain file size. They'll return errors like: Parse error: syntax error, unexpected ',' in .../forum/admin/applications/core/modules_public/global/register.php on line 1951 But then I'll just delete some blank space and they will work again. Quote Link to comment https://forums.phpfreaks.com/topic/160865-cant-upload-anything-larger-than-10-kb-yes-kilobytes/ Share on other sites More sharing options...
BobcatM Posted June 4, 2009 Share Posted June 4, 2009 change this value in php.ini upload_max_filesize = 30M Also depending on the method you use for the upload you might need to change the post_max_size option. post_max_size = 30M Quote Link to comment https://forums.phpfreaks.com/topic/160865-cant-upload-anything-larger-than-10-kb-yes-kilobytes/#findComment-848965 Share on other sites More sharing options...
Punk Rock Geek Posted June 4, 2009 Author Share Posted June 4, 2009 change this value in php.ini upload_max_filesize = 30M Also depending on the method you use for the upload you might need to change the post_max_size option. post_max_size = 30M Yes, I don't know how to access that file though. Quote Link to comment https://forums.phpfreaks.com/topic/160865-cant-upload-anything-larger-than-10-kb-yes-kilobytes/#findComment-848966 Share on other sites More sharing options...
PFMaBiSmAd Posted June 4, 2009 Share Posted June 4, 2009 What does a phpinfo(); statement show for - upload_max_filesize post_max_size And ask your web host what method is available in their server for setting those values (it depends on if php is running as a server module or as a GCI application and if the web host has enabled you to override the settings.) Quote Link to comment https://forums.phpfreaks.com/topic/160865-cant-upload-anything-larger-than-10-kb-yes-kilobytes/#findComment-848968 Share on other sites More sharing options...
Punk Rock Geek Posted June 4, 2009 Author Share Posted June 4, 2009 What does a phpinfo(); statement show for - upload_max_filesize post_max_size And ask your web host what method is available in their server for setting those values (it depends on if php is running as a server module or as a GCI application and if the web host has enabled you to override the settings.) post_max_size 8M for both local and master value upload_max_filesize 8M for local and 2M for master Yet I can't upload anything larger than 10 KB... I should note that I don't get any errors when I try to upload something larger than 10 KB. Just a blank white screen. Quote Link to comment https://forums.phpfreaks.com/topic/160865-cant-upload-anything-larger-than-10-kb-yes-kilobytes/#findComment-848969 Share on other sites More sharing options...
PFMaBiSmAd Posted June 4, 2009 Share Posted June 4, 2009 Add the following lines immediately after your first opening <?php tag - ini_set("display_startup_errors", "1"); ini_set("display_errors", "1"); error_reporting(E_ALL); And post your code. Quote Link to comment https://forums.phpfreaks.com/topic/160865-cant-upload-anything-larger-than-10-kb-yes-kilobytes/#findComment-848971 Share on other sites More sharing options...
Punk Rock Geek Posted June 4, 2009 Author Share Posted June 4, 2009 I get more errors when it actually uploads, strangely... Notice: Undefined index: queryKey in .../public_html/forum/ips_kernel/classDb.php on line 872 Notice: Undefined index: calcRows in .../public_html/forum/ips_kernel/classDb.php on line 883 Notice: Undefined index: queryKey in .../public_html/forum/ips_kernel/classDb.php on line 872 Notice: Undefined index: calcRows in .../public_html/forum/ips_kernel/classDb.php on line 883 Notice: Undefined index: queryKey in .../public_html/forum/ips_kernel/classDb.php on line 872 Notice: Undefined index: calcRows in .../public_html/forum/ips_kernel/classDb.php on line 883 Notice: Undefined property: usercpForms_members::$do_url in .../public_html/forum/admin/applications/core/modules_public/usercp/manualResolver.php on line 232 Notice: Undefined index: 3e5f4c916b9204579d70445293025481 in .../public_html/forum/admin/sources/classes/session/publicSessions.php on line 1522 And here's the errors when it doesn't upload: Notice: Undefined index: queryKey in .../public_html/forum/ips_kernel/classDb.php on line 872 Notice: Undefined index: calcRows in .../public_html/forum/ips_kernel/classDb.php on line 883 Notice: Undefined index: queryKey in .../public_html/forum/ips_kernel/classDb.php on line 872 Notice: Undefined index: calcRows in .../public_html/forum/ips_kernel/classDb.php on line 883 Quote Link to comment https://forums.phpfreaks.com/topic/160865-cant-upload-anything-larger-than-10-kb-yes-kilobytes/#findComment-848985 Share on other sites More sharing options...
Punk Rock Geek Posted June 4, 2009 Author Share Posted June 4, 2009 Okay, please ignore my previous post, as I am about 100% confident that the error is not within my code. Not only did this module work on my server before the upgrade, but I also set up a new server today and tested it there. It works there. It does not work on the server it is currently on. I wonder, are there any buggy versions of mysql or php out right now? My current server is: PHP version 5.2.8 MySQL version 5.0.77-community Quote Link to comment https://forums.phpfreaks.com/topic/160865-cant-upload-anything-larger-than-10-kb-yes-kilobytes/#findComment-849078 Share on other sites More sharing options...
PFMaBiSmAd Posted June 4, 2009 Share Posted June 4, 2009 I just reviewed this thread and you apparently edited the first post with the following additional information (which was at or after the first few replies) - Also, my larger PHP files no longer work once they reach a certain file size. They'll return errors like: Parse error: syntax error, unexpected ',' in .../forum/admin/applications/core/modules_public/global/register.php on line 1951 But then I'll just delete some blank space and they will work again. The only php related setting that I have ever seen that causes a problem with the amount of output is the output_buffering setting. What does a phpinfo(); statement show for it on both a system that works and on the one that does not? Beyond that, you probably have a broken web server/php installation that is cutting off content greater than a certain size. I think there is a web server setting that can cause this (I don't know what the setting is called) and there are patched versions of php that attempt to make it more secure but only cause problems for legitimate users. In any case, you need to be contacting the web host to solve this type of problem. Quote Link to comment https://forums.phpfreaks.com/topic/160865-cant-upload-anything-larger-than-10-kb-yes-kilobytes/#findComment-849247 Share on other sites More sharing options...
Punk Rock Geek Posted June 4, 2009 Author Share Posted June 4, 2009 I just reviewed this thread and you apparently edited the first post with the following additional information (which was at or after the first few replies) - Also, my larger PHP files no longer work once they reach a certain file size. They'll return errors like: Parse error: syntax error, unexpected ',' in .../forum/admin/applications/core/modules_public/global/register.php on line 1951 But then I'll just delete some blank space and they will work again. The only php related setting that I have ever seen that causes a problem with the amount of output is the output_buffering setting. What does a phpinfo(); statement show for it on both a system that works and on the one that does not? Beyond that, you probably have a broken web server/php installation that is cutting off content greater than a certain size. I think there is a web server setting that can cause this (I don't know what the setting is called) and there are patched versions of php that attempt to make it more secure but only cause problems for legitimate users. In any case, you need to be contacting the web host to solve this type of problem. Hmm, you may be on to something. On my server that works, output_buffering is set at 4096. On my server that doesn't work, it is set at no value. Quote Link to comment https://forums.phpfreaks.com/topic/160865-cant-upload-anything-larger-than-10-kb-yes-kilobytes/#findComment-849268 Share on other sites More sharing options...
Punk Rock Geek Posted June 4, 2009 Author Share Posted June 4, 2009 Darn, changed it, but it didn't work. Are these difference important? Working server: Registered PHP Streams php, file, data, http, ftp, compress.zlib, https, ftps Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls Non-working server: Registered PHP Streams php, file, data, http, ftp, compress.zlib Registered Stream Socket Transports tcp, udp, unix, udg Quote Link to comment https://forums.phpfreaks.com/topic/160865-cant-upload-anything-larger-than-10-kb-yes-kilobytes/#findComment-849315 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.