[SOLVED] Filename issue on Document (database) and Document (Filename)

On Document (database) and Document (Filename), it doesn’t accept filename with spaces or multiple dots (ie apple.1.1.2.pdf)

Also in Document (database) , even though I have a mediumblob field (which i expect it can store a 16mb data), i can’t upload a file over 4mb.

I have the latest scriptcase version.

Dear Scriptcase please fix it asap, i am rushing for an online form contains some upload fields.

Max file size see here: http://stackoverflow.com/questions/2184513/php-change-the-maximum-upload-file-size that solves one issue.
The other one smells like a bug…

Dear rr and John, Thank you for your reply.

I spent a hour to figure out what is going on and finally know what causes the bug.

say 2 files, both with double-byte character filename:
file 1) 測試a . b . c.pdf
file 2) 測a . b . c試.pdf

while file 1 works on all document/image filename/database but file 2 failed all.
you can see that if the spaces or symbols appear between the 2 chinese words, that caused the problem.
This problem happens on both image/document filename/database fields.

I hope this can be fixed in the upcoming scriptcase update. Thank you very much.

Just found out the reason why I can’t upload large file, it’s the max_allowed_packet value limited to 4M.

It doesn’t have to be some complicated chinese multibyte character. A simple accented letter with a code above 128 is also enough to make a document (filename) upload fail. This wasn’t the case in earlier versions.

Probably on windows servers. Many uploaders fail on windows (e.g. jqueryupload) when strange characters are there. So are you on linux or on windows?
I guess this happens on your windows server, that would make sense. Does it happen on a deployed linux?

It happens on the deployed app on the linux webserver. Not on the development-server running windows. I get a Upload failed message/alert, when running the app on the linux server. Never saw that in earlier versions.

Under which filesystem is that linux running? And more important, which encoding does it have? I am not a pro in this area but I noticed filename encodings can go wrong on various filename encoding settings. Your linux filesystem is for example in UTF-8 but it may also be in a different. This may cause this…
See http://mindspill.net/computing/linux-notes/determine-and-change-file-character-encoding/ for details, there is more info on google if you search a bit.
Also (even more) important is to know on which characterset your mysql is and if you have your database connection set to the same characterset or not. My easy solution is always to set the database, the website and preferably (if possible, often this isnt needed) the filesystem, to the same characterset.
So now you do get back to John L Santos his reply. Please check the characterset settings.

The Linux server runs UTF8. With a previous version of SC it worked fine. After the latest update not. Charsets have not been changed. SC is an (extremely) buggy program.

Charsets only deal with the presentation. With what you see on the screen. Charsets do not cause error-messages to be shown on the screen. That’s been done by SC-magicians in Brazil.

I am running this on my local win7 pc. win 7 is unicode but im using traditional chinese as the default language. my mysql is using utf8 and same as the tables.

i wish i can upload a video to here.

Upload a video to youtube, vimeo or … and post the link …

I’ve spent another hour to play arround win7’s language options. I finally found out that under Control Panel > Regoin and Language > Administrative > Language for non-Unicode programs. I changed it to English and it solved the case.

and the other issue that about uploading large size file, i fixed it by changing the value of max_packet_allowed in mysql setting.


Very good! I was thinking about a remote access to check the problem, but I believe it was solved. (:


Now let me understand your problem. Are you not able to upload files after the last update?

We are aware of a problem, but is a bit unlikely to occur. If you are using an ISO database, and try to upload a file named with UTF-8 characters, the PHP will not allow uploading this file.
It also occurs when you try to insert files named with some characters restricted by the operating system itself. For example, in Windows you can not create file with some symbols \ / : * " < > and |, but Linux enables you to create them without problem.

Hi cant upload files,
I check the tmp folder “_lib/tmp” and i see that my files are stored there but SC dont move the file to the “_lib/file/img” or “_lib/file/doc”, any suggestion to fix this?

Is a linux server and using uf8 with regular characters ( A-Z ) in file names.
Thank you


I believe the problem is in the directory path used in the application. You need to make sure some points.

1 - Directory path is only used for upload fields (filename) and not to upload fields (database).
2 - Check the directory path applied to the application settings.
3 - Check the directory path used during deployment.
4 - Make sure that the configured directory path provider has the required permissions.

Can someone teach me how to solve this problem?
I use windows as my development environment and I can use both




without any problem.
After I deployed into my Debian 9 which I used Apche2 and run on google cloud platform.
I failed to use both the upload methods. The error messages I obtained are
“(field name of the FileName): upload failed”
“(field name of the Blob): upload failed”.
In my production environment I use php7.2 and my scriptcase version is 9.
I think my problem is not related to UTF-8 problem since I have tried to upload very simple name of a file and without success.

I am very grateful for anyone who can give a sign/ a hint since I got no clue which part went wrong.
I was thinking maybe my PHP missed some modules but I am not sure.

Thank you!