0 users online. Create an account or sign in to join them.Users

Announcement

Symphony's issue tracker has been moved to Github.

Issues are displayed here for reference only and cannot be created or edited.

Browse

Closed#292: [2.0.8 RC1] filesize() failed for upload field in data source

Yo! Found this issue when I tried to get a upload field with a Data Source in frontend.

filesize() [function.filesize]: stat failed for D:xampphtdocsbernardocruz/workspace/uploads/templates/right_column.gif
D:xampphtdocsbernardocruzsymphonylibtoolkitfieldsfield.upload.php line 182

177
178     function appendFormattedElement(&$wrapper, $data){
179         $item = new XMLElement($this->get('element_name'));
180         
181         $item->setAttributeArray(array(
182             'size' => General::formatFilesize(filesize(WORKSPACE . $data['file'])),
183             'path' => str_replace(WORKSPACE, NULL, dirname(WORKSPACE . $data['file'])),
184             'type' => $data['mimetype'],
185         ));
186         

germchaos, does the filesize() function work normally for you, outside of the Symphony environment? If you create a small one-line PHP file and use the filesize function does it work? Just trying to establish whether this could be some sort of dependency/problem with your XAMPP setup.

Hopefully this fixes the problem by handling a non-readable or non-existent file. http://github.com/symphony/symphony-2/commit/3cd27e6ec5f52b39f6365aca08fde6e5c4baa4bd

This issue is closed.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.1
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details