File uploading error
This is an open discussion with 9 replies, filed under Troubleshooting.
Search
What version of symphony are you using?
Version: 2.0.8RC3
As a temporary fix, you can replace:
$meta['creation'] = DateTimeObj::get('c', filemtime($file));
on line 469 of symphony/lib/toolkit/fields/field.upload.php
with:
$meta['creation'] = DateTimeObj::get('c', @filemtime($file));
I’ve changed the pice of code as you told me, but now I get this error:
Column 'size' cannot be null An error occurred while attempting to execute the following query * INSERT INTO `sym_entries_data_182` (`entry_id`, `file`, `mimetype`, `size`, `meta`) VALUES ('186', 'Test CV.doc', 'unknown', NULL, 'a:1:{s:8:"creation";s:25:"2010-08-20T18:02:44+00:00";}') Backtrace: * [/var/www/g33026/psy-match.nl/HTML/symphony/lib/toolkit/class.mysql.php:267] MySQL->__error(); * [/var/www/g33026/psy-match.nl/HTML/symphony/lib/toolkit/class.mysql.php:211] MySQL->query(); * [/var/www/g33026/psy-match.nl/HTML/symphony/lib/toolkit/class.entrymanager.php:147] MySQL->insert(); * [/var/www/g33026/psy-match.nl/HTML/symphony/lib/toolkit/class.entry.php:197] EntryManager->edit(); * [/var/www/g33026/psy-match.nl/HTML/symphony/lib/toolkit/events/event.section.php:125] Entry->commit(); * [/var/www/g33026/psy-match.nl/HTML/symphony/lib/toolkit/events/event.section.php:310] __doit(); * [/var/www/g33026/psy-match.nl/HTML/workspace/events/event.formulieren.php:145] include(); * [/var/www/g33026/psy-match.nl/HTML/workspace/events/event.formulieren.php:141] eventformulieren->__trigger(); * [/var/www/g33026/psy-match.nl/HTML/symphony/lib/toolkit/class.frontendpage.php:549] eventformulieren->load(); * [/var/www/g33026/psy-match.nl/HTML/symphony/lib/toolkit/class.frontendpage.php:233] FrontendPage->processEvents(); * [/var/www/g33026/psy-match.nl/HTML/symphony/lib/toolkit/class.frontendpage.php:63] FrontendPage->__buildPage(); * [/var/www/g33026/psy-match.nl/HTML/symphony/lib/core/class.frontend.php:50] FrontendPage->generate(); * [/var/www/g33026/psy-match.nl/HTML/index.php:25] Frontend->display();
I’d just comment out the entire line, it’ll most likely work then…
No, the line indicates the database is set too strict for the commented out line to work.
If you open up phpmyadmin, and allow the size field of table sym_entries_data_182
to be null, everything should work again.
Inside the phpmyadmin I only have these fields inside the table sym_entries_data_182
- id
- entry_id
- handle
- value
Well, I’ve commented out the line before and it worked… It was another extension and the exact same function and error…
Inside the phpmyadmin I only have these fields inside the table symentriesdata_182
* id * entry_id * handle * value
That’s odd. What you could try is to set every size field in every table that contains one to allow null.
Create an account or sign in to comment.
When I try to upload a document like txt or rtf with the frontend I’ll get this error.
Backtrace
This is a piece of my source:
Who is the guy can help me?