We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

File

Development and Programming

fogcity's avatar
fogcity
260 posts
15 years ago
fogcity's avatar fogcity

I’m seeing this error:

File – The file size of ‘yourfile.mp3’ is larger than what is allowed in your php.ini.

But the file is only 4M and these are my php.ini settings:

upload_max_filesize=64M;
post_max_size=64M;
memory_limit=128M;

Any suggestions?

       
jducka1's avatar
jducka1
12 posts
15 years ago
jducka1's avatar jducka1

I just discovered an error on a site I built in 2007. The site uses Huot’s File version 2.1.2 and I just updated to EE 1.6.6. The error occurs when I remove the LAST file in a custom field of type “File,” (it is set to allow multiple files per field). When I remove the LAST file, I end up with a blank line at the end of the field in the database (like a carriage return), which EE thinks is a line I guess indicating a file that has no name?

My template looks like this:

{if photos_after} 
     {photos_afters} 
      <a href="http://{photos_after}">"]_      http://chrisdavisdesign.com/phpThumb/phpThumb.php?src={photos_after}&w=78&h=78&zc=1&new;</a> 
     {/photos_afters}
{/if}

If I start with, say, 6 files in this field, when I remove the sixth file, the file itself is removed from the server, and the file name is removed from the database, but when the template runs EE returns 6 lines for the field, where the sixth one just has a blank file name (so it ends up being a link to the parent folder):

“]http://chrisdavisdesign.com/phpThumb/phpThumb.php?src=/images/uploads/&w=78&h=78&zc=1&new;.

Looking in phpMyAdmin, I see a sort of carriage return at the end of the database field where the sixth entry was. When I remove this, EE returns the 5 correct entries, and the weird sixth entry no longer appears.

I know this extension is no longer in development, but since everything else on this site is working fine I would prefer the fast solution over the best solution.

Help?

       
housingworks's avatar
housingworks
5 posts
15 years ago
housingworks's avatar housingworks

Hey Mark, I dont know if you or anyone here can help us with this but we seem to be having an issue with items added using file… for some reason the field_XX_ft cell is filling in as null instead of “xhtml” or anything like that which is causing templates not to render at all.,.

Seems very strange..

We had to do some upgrades and we had sort of panic few days where we were enabling and disablign all sorts of things across the site. We think we put everything back together, this is the one remaining piece

Any help would be amazing

thanks everyone!

       
sagebrown's avatar
sagebrown
13 posts
15 years ago
sagebrown's avatar sagebrown

edit- nevermind!

       
vladyn's avatar
vladyn
176 posts
15 years ago
vladyn's avatar vladyn

Hello there, sorry maybe this was discussed here - i tried to find but with no sucess. I’m trying to get the total number of uploaded files with this extension by:

{custom_field}
   {total_results}
{/custom_field}

but this outputs me the paths of the images (+ the total number) Is there some way to get rod of the paths and get only the number outputted ?

       
vladyn's avatar
vladyn
176 posts
15 years ago
vladyn's avatar vladyn

bump? playing with file field trying to use SWITCH to place output images in two columns

{my_custom_field}
<div class="{switch='img-left|img-right|clear'}">
<a href="http://{file_url}">{exp:imgsizer:size src="{file_url}" width="400" alt="{title}"}</a>
</div>
{/my_custom_field}

…but my output is only …div class=”img-left” and nothing else any ideas ?

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
15 years ago
Matt Weinberg's avatar Matt Weinberg

Try using PHP, or try using the far more new nGen File Field: http://www.ngenworks.com/software/ee/ngen-file-field/

       
vladyn's avatar
vladyn
176 posts
15 years ago
vladyn's avatar vladyn

nGen requires FF Matrix, which requires php5. I have php 4.x on my host that’s the reason that I’m trying with this file field

       
vladyn's avatar
vladyn
176 posts
15 years ago
vladyn's avatar vladyn

I’m really sorry but I have to go back a couple of pages and again try returning the total results of uploaded images JUST ONCE:

{exp:weblog:entries weblog="{wb}" disable="pagination|trackbacks|member_data" show_expired="yes"}

Total Images: {event_pictures}{total_results}{/event_pictures}
This is my Image URL: {event_pictures}{file_url}{/event_pictures}

{/exp:weblog:entries}

this way and all ways on page 49 and 50 always returning me a loop through all the uploaded files - 9 9 9 9 9 9 9 9 9 for nine files Can anyone did this counting with PHP and how?

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
15 years ago
Matt Weinberg's avatar Matt Weinberg

Have you tried using {if count = total_results}{total_results}{/if} to just output it on the last page? Or to use PHP do something like:

<?php $count = 0; ?>
{event_pictures}
"Output the pictures however"
<?php $count++; ?>
{/event_pictures}
<?php echo $count; ?>
       
vladyn's avatar
vladyn
176 posts
15 years ago
vladyn's avatar vladyn

hmm - this sounds interesting - No I haven;t tried with if count… I will ! Otherwise I think the php will do the job, just wanted to avoid it. many thanks

       
vladyn's avatar
vladyn
176 posts
15 years ago
vladyn's avatar vladyn
Have you tried using {if count = total_results}{total_results}{/if} to just output it on the last page? Or to use PHP do something like:
<?php $count = 0; ?>
{event_pictures}
"Output the pictures however"
<?php $count++; ?>
{/event_pictures}
<?php echo $count; ?>

This works in both ways - many many thanks!

       
4georgy's avatar
4georgy
14 posts
15 years ago
4georgy's avatar 4georgy

Hello!

I have not run as downloading a few pictures. Item “Allow Multiple” is turned on and allows you to add multiple files. But after saving the recording I get only the first image in the quantities that I downloaded and the same number of thumbnails.

If you upload one picture at a time - everything works fine. What I can not work properly?

       
jdgraffam's avatar
jdgraffam
11 posts
15 years ago
jdgraffam's avatar jdgraffam

Hi. When I installed this extension and enabled extensions on my EE Core installation, I get a nasty error that will not let me access my CP any more. I followed your instructions explicitly for installing then enabling extensions. Your extension is the only one I have on this site.

The errors I get are:

Warning: Missing argument 1 for edit_upload_prefs() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 326

Warning: Missing argument 1 for edit_field_groups() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 183

I also get the following errors when I load the site itself:

Warning: Missing argument 1 for modify_template() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 1109

Warning: Missing argument 2 for modify_template() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 1109

Warning: Missing argument 1 for modify_template() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 1109

Warning: Missing argument 2 for modify_template() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 1109

Warning: Missing argument 1 for modify_template() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 1109

Warning: Missing argument 2 for modify_template() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 1109

Any ideas here?

       
jdgraffam's avatar
jdgraffam
11 posts
15 years ago
jdgraffam's avatar jdgraffam
Hi. When I installed this extension and enabled extensions on my EE Core installation

I upgraded to full EE 1.6.7 and still get the same errors. So it isn’t related to it being Core version I don’t think.

       
First 61 62 63 64

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.