Attachements not showing after saving


after I save an invoice, the attachement won’t be displayed on the invoice anymore.

Version of IP: 1.4.3

EDIT: On the testserver I’ve set-up I get the following errors:

GET 500 (Internal Server Error)m.ajaxTransport.send @ jquery-1.11.2.min.js:4m.extend.ajax @ jquery-1.11.2.min.js:4m.each.m.(anonymous function) @ jquery-1.11.2.min.js:4m.extend.getJSON @ jquery-1.11.2.min.js:4Dropzone.init @ 23:2315Dropzone.init @ dropzone.js:670Dropzone @ dropzone.js:461(anonymous function) @ 23:2303

POST 500 (Internal Server Error)

What filetypes/filesize are you trying to upload/uploading? I just tried a zip and it worked as expected.

With larger files it fails due to php.ini limits, but the file is displayed like a file that uploaded correctly

I created a bug report for the error that failed files are displayed like everything went fine. I just tested this in 2 clean setups of InvoicePlane but i can’t figure out how you get the error 500 there. What does a simple call to give you as response?

Tried an image and a zip. Both result in 500 errors. A simple call also results in a 500 error. Checked the FTP, all folders were there and up running.

Is there anything about that error in your webservers logfile?

Nope. :frowning:

Can you replace the content of application/modules/upload/controllers/upload.php with and just open in your browser again?

There should be a blank page with only [] on it, because arguments are missing.

You can also remove the second ; at line 53 (echo lang('error_dublicate_file');;) maybe this causes your error 500

Still getting a white page though and a 500 Error when trying to upload. This is only on the development server. On local it works without any errors.

EDIT: The upload itself is saved under /uploads/customer_files/

Is there anything in codeigniters logfiles (application/logs)? You can enable logging in application/config/config.php by setting $config['log_threshold'] = 0; from 0 to 4

Are you trying different files? If you try to upload a file in the same invoice again, an error (404) will be triggered but not yet displayed.

The only thing that gets logged:

ERROR - 2015-07-09 21:21:29 --> Could not find the language line ""
ERROR - 2015-07-09 21:21:29 --> Could not find the language line ""

The thing now is, that I can upload, without a 500 error to be shown, but after I hit save the file hides and it’s not in customer_files. The CHMOD for these folders are already at 777.

OK, how large is the file and what are the values of upload_max_filesize and post_max_size from php.ini?

Okay, found the bug. Servers were running PHP 5.3.0 and the Wiki also said that IP is compatible with PHP 5.3.0, but I guess thats obsolete.

Thanks for the hint. I’ll take a look into the compatibility with php 5.3 then, maybe you could upload your php.ini and mysql.cnf you used when the error appeared.

I finally found the problem. File upload uses a short array syntax which was introduced in PHP 5.4

I hope you upgrade the server as fast as possible! 5.3 is not supported anymore since Dec 2014… :frowning:

Ye, told my PM he should upgrade the PHP versions ASAP. It’s quite horrible that PHP 5.3 still exists on some servers. :smiley: