Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Max File Upload 2097152
Still can’t get textpattern pereferences to allow more than 2097152 for files…even after updating php.ini
values as follows:
post_max_size = 110M
upload_max_filesize = 100M
memory_limit = 80M
Using 4.0.2
Any ideas? Help would be appreciated.
Thanks
—
Tom
Last edited by renobird (2005-11-19 20:31:49)
Offline
#2 2005-11-19 20:46:23
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: Max File Upload 2097152
Maybe a default picked up from:
<code>
function file_upload_form($label,$pophelp,$step,$id=’‘)
{
global $file_max_upload_size;
if (!$file_max_upload_size || intval($file_max_upload_size)==0) $file_max_upload_size = 2*(1024*1024);
</code>
in <code> include/txp_file.php</code>. I really haven’t taken the time to check all the details, but the number catches the eye.
Last edited by rsilletti (2005-11-19 20:47:31)
Offline
Re: Max File Upload 2097152
I tried to change that, but no luck. I was under the impression that 4.0.2 would get the value for upload_max_filesize from the php.ini file. I have checked that several times and all the values in php.ini are as I stated in the post above. Somehow it’s still inserting the 2097152 value. if I set it to “empty” I just get an upload error.
Any other ideas? ; )
Thanks,
Tom
Last edited by renobird (2005-11-19 21:45:27)
Offline
#4 2005-11-20 02:15:00
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: Max File Upload 2097152
I see a preference set in the database txp_pref table, I set mine to 4000000 in the database and it reflects this value inside Textpattern. My local install is still bouncing anything over 2000000, it could be that it takes both, but I don’t really know what to say from here ;~(
Offline
Re: Max File Upload 2097152
The preference in the database, is available via advanced preferences. I believe that’s what renobird means, when he says it doesn’t accept anything larger.
http://rpc.textpattern.com/help/?item=file_max_upload_size&lang=en
If you want to debug what’s happening, open textpattern/includes/txp_prefs.php and find
function real_max_upload_size($user_max)
Replace: $real_max = null;
with the following var_dump($candidates);$real_max = null;
That will help us see what values are being read from php’s configuration.
Offline
Re: Max File Upload 2097152
Sencer,
Here’s what came back.
<code> array(4) { [0]=> string(8) “10000000” [1]=> string(2) “8M” [2]=> string(2) “2M” [3]=> string(2) “8M” }</code>
Looks like those might all be default values. I doubled checked the php.ini. Not sure what’s going on
Thanks for the help.
Cheers,
—
Tom
Last edited by renobird (2005-11-21 03:50:41)
Offline
Re: Max File Upload 2097152
Maybe you are editing the wrong php.ini.
Take a look at the output from phpinfo(). It should have sth. like:
<code>Configuration File (php.ini) Path /users/home/name/etc/php.ini
Scan this dir for additional .ini files /usr/local/etc/php
additional .ini files parsed /usr/local/etc/php/extensions.ini</code>
Offline
Re: Max File Upload 2097152
Sencer,
So I contacted the hosting provider…turns out they had to enabled “power mode” for the account. TXP is now populating the preference with the updated value. Thanks so much for the help.
One other question. Is there a way to allow the “images” upload to accept images larger than 1MB? I have a site that needs to have thumbnails that link to print quality jpgs. I’m using 4.0.2.
Thanks!
—
Tom
Offline
Re: Max File Upload 2097152
Hey Tom,
glad it’s working. Personally, I would use the image upload for thumbnails, and offer the print-quality images as file-downloads. However if there are plenty of them, things might get confusing. So if you want to change the allowed image-size directly, you’ll have to edit the code:
In textpattern/lib/txplib_html.php replace
function upload_form($label, $pophelp, $step, $event, $id='', $max_file_size = '1000000')
with (for example):
function upload_form($label, $pophelp, $step, $event, $id='', $max_file_size = '4000000')
Offline
Pages: 1