OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Can't upload files

Are you responsible for making OMP work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, asmecher

Forum rules
What to do if you have a technical problem with OMP:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OMP Discussion subforum; if you have a development question, try the OMP Development subforum.

Can't upload files

Postby coreysh » Fri Oct 26, 2012 1:46 pm

I can't upload any file to OMP. When I try to modify appearance of the website (Management --> Settings --> Website --> Appearance tab). It indicates that the file was uploaded but when I click on OJ button, I get the following error message: "No file uploaded or invalid file type"

I check the folder permission.
coreysh
 
Posts: 17
Joined: Tue May 10, 2011 12:19 pm

Re: Can't upload files

Postby jmacgreg » Sun Oct 28, 2012 10:29 pm

Hi Coreysh,

How does the interface indicate that the file was uploaded? Did you Click the Start Upload button, and did it give you an indication that the file uploaded entirely? Are you running into problems uploading files elsewhere?

Cheers,
James
jmacgreg
 
Posts: 4181
Joined: Tue Feb 14, 2006 10:50 am

Re: Can't upload files

Postby coreysh » Mon Oct 29, 2012 7:05 am

jmacgreg wrote:Hi Coreysh,

How does the interface indicate that the file was uploaded? Did you Click the Start Upload button, and did it give you an indication that the file uploaded entirely? Are you running into problems uploading files elsewhere?

Cheers,
James


Yes, I did click on the Start Upload button and it said it's been uploaded but when I clicked on the OK button, I got an error message. However, I was able to upload a file to to a different location: Publication --> Submission Documents.

Here are the screenshots where the error occurs:
Attachments
Screen Shot 2012-10-29 at 9.57.11 AM.png
Screen Shot 2012-10-29 at 9.57.11 AM.png (80.43 KiB) Viewed 3111 times
Screen Shot 2012-10-29 at 9.57.02 AM.png
Screen Shot 2012-10-29 at 9.57.02 AM.png (28.02 KiB) Viewed 3111 times
coreysh
 
Posts: 17
Joined: Tue May 10, 2011 12:19 pm

Re: Can't upload files

Postby coreysh » Wed Oct 31, 2012 6:03 am

Any suggestions? Anyone?
coreysh
 
Posts: 17
Joined: Tue May 10, 2011 12:19 pm

Re: Can't upload files

Postby jmacgreg » Wed Nov 07, 2012 3:43 pm

Hi coreysh,

Apologies in the delay in getting back to you. I suspect that this is a filetype/mimetype issue -- that your server isn't establishing the correct file type (in this case, .png) for the uploaded file. That image upload area where you are having problems is one of the few places that OMP checks file types -- it doesn't check in Publication -> Submission Documents, for example. You may find this FAQ entry to be of help. Let us know if you have any further questions.

Cheers,
James
jmacgreg
 
Posts: 4181
Joined: Tue Feb 14, 2006 10:50 am

Re: Can't upload files

Postby thanasis » Tue Dec 18, 2012 3:30 am

Hi everyone,
I get the same error message when trying to upload images at the management submenus.When i tried to track the source of the error message i got this :

omp has produced an error Message: WARNING: assert(): Assertion failed In file: /var/www/omp-1.0b/lib/pkp/classes/core/PKPRequest.inc.php At line: 772 Stacktrace: Server info: OS: Linux PHP Version: 5.3.10-1ubuntu3.4 Apache Version: Apache/2.2.22 (Ubuntu) DB Driver: mysql DB server version: 5.5.28-0ubuntu0.12.04.3
##installer.installFilesDirError##


Any suggestions on what is going on?
Thanks in advance for any advice.

Regards,
Thanasis Kordas
University of Patras
thanasis
 
Posts: 21
Joined: Mon Oct 15, 2012 3:44 am

Re: Can't upload files

Postby asmecher » Tue Dec 18, 2012 12:34 pm

Hi Thanasis,

Are you able to upload files e.g. in the submission process? There are two likely causes: permissions problems in the public/ subdirectory, and MIME type identification problems. If your file permissions on public/ (and everything it contains) are sufficient, then you can check for potential MIME issues by uploading the image to a submission and checking what MIME type is identified by looking in the file_type column of the monograph_files table. (I don't think the error message you included is related -- it looks like that is from a previous install attempt.)

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8315
Joined: Wed Aug 10, 2005 12:56 pm

Re: Can't upload files

Postby thanasis » Thu Dec 20, 2012 2:07 am

Hi all,

It was a permissions issue with the public folder after all.I had changed its permissions and forgot about it.It works fine now.
Thanks for the help Alec.

Regards

Thanasis Kordas
University of Patras
thanasis
 
Posts: 21
Joined: Mon Oct 15, 2012 3:44 am

Re: Can't upload files

Postby chenbing » Thu Apr 18, 2013 9:53 am

I also meet the problem.
when I upload .jpg logo image to server. I also meet the warning:
ccc.jpg
ccc.jpg (42.5 KiB) Viewed 2116 times

I don't konw how to resolve it.
I find the temp imge file has been upload to the files/temp
未命名.jpg
未命名.jpg (17.73 KiB) Viewed 2116 times

Can you tell me how to do?

There are some my configuration as follows:
php.ini----->
; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = "D:/phpwindwamp/files/temp"


config.inc.php------>
files_dir = "D:/phpwindwamp/files"

I also try to use OJS, I find i can upload logo successifully in the OJS.

Please help me, Thank you!~
chenbing
 
Posts: 3
Joined: Tue Apr 16, 2013 6:41 pm

Re: Can't upload files

Postby asmecher » Thu Apr 18, 2013 10:31 am

Hi chenbing,

Can you double-check the file permissions in the "public" subdirectory of your OMP installation and any subdirectories you see there? PHP scripts need to be able to create/modify that directory and its contents.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8315
Joined: Wed Aug 10, 2005 12:56 pm

Re: Can't upload files

Postby chenbing » Thu Apr 18, 2013 6:27 pm

I have set the priviledge. add "everyone" and "users" on the file folders, then grant all the rights to them, but can't resolve the problem.
I suggest use the OJS's image upLoad code replace.
I hope OMP team can write detailed install setp and related configuration.
Thank you!~
chenbing
 
Posts: 3
Joined: Tue Apr 16, 2013 6:41 pm

Re: Can't upload files

Postby chenbing » Thu Apr 18, 2013 6:41 pm

chenbing wrote:I have set the priviledge. add "everyone" and "users" on the file folders, then grant all the rights to them, but can't resolve the problem.
I suggest use the OJS's image upLoad code replace.
I hope OMP team can write detailed install setp and related configuration.
Thank you!~


My "public" file folder contains as following:
顶顶顶顶顶.jpg
顶顶顶顶顶.jpg (20.86 KiB) Viewed 2105 times
chenbing
 
Posts: 3
Joined: Tue Apr 16, 2013 6:41 pm

Re: Can't upload files

Postby sunday » Thu Apr 18, 2013 11:36 pm

This problem is caused by the function mime_content_type($filename) { } in file \omp\lib\pkp\classes\core\String.inc.php
if you're using Windows and your php version >=5.3
1. you should edit your php.ini as follow:
replace
;extension=php_fileinfo.dll
by
extension=php_fileinfo.dll
Please don't forget to restart your phpwind or wamp!
If it works then you don't need to do anything anymore. Otherwise proceed to step 2.
2. edit your omp\lib\pkp\classes\core\String.inc.php as follow:
replace
$fi = finfo_open(FILEINFO_MIME, Config::getVar('finfo', 'mime_database_path'));
by
$fi = finfo_open(FILEINFO_MIME, null);

For more help, you can send email to 13362999@qq.com to contact me.

chenbing wrote:I also meet the problem.
when I upload .jpg logo image to server. I also meet the warning:
ccc.jpg

I don't konw how to resolve it.
I find the temp imge file has been upload to the files/temp
未命名.jpg

Can you tell me how to do?

There are some my configuration as follows:
php.ini----->
; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = "D:/phpwindwamp/files/temp"


config.inc.php------>
files_dir = "D:/phpwindwamp/files"

I also try to use OJS, I find i can upload logo successifully in the OJS.

Please help me, Thank you!~
Last edited by sunday on Fri Apr 19, 2013 6:59 pm, edited 9 times in total.
sunday
 
Posts: 1
Joined: Thu Apr 18, 2013 11:18 pm

Re: Can't upload files

Postby coreysh » Fri Apr 19, 2013 11:07 am

I had a similar issue on my dev server. Folder permission is usually the suspect for the uploading error but if you have verified the permission setting is correct then try reinstalling PHP again. I reinstalled PHP to 5.3 and everything was working again. Hope this helps.
coreysh
 
Posts: 17
Joined: Tue May 10, 2011 12:19 pm

Can't upload files since upgade OMP

Postby tabber » Wed May 15, 2013 6:30 am

Hi, I've updated OMP to 1.0. (OPM 1.0b was working fine). The problem is: I can upload a file but it's not possible to continue. In the apache log file I get a DB error: Unknown column 'sales_type' in 'field list'.
I have (temporarily) changed the directory files in /public to 777 but no differences.
I have a Linux based server and PHP 5.3.6
Any suggestions?
Kind regards, Marion
Attachments
test.jpg
test.jpg (26.41 KiB) Viewed 1931 times
tabber
 
Posts: 6
Joined: Mon Mar 11, 2013 8:21 am

Next

Return to OMP Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests