OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Can't upload images

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
This forum is meant for general questions about the usability of OJS from an everyday user's perspective: journal managers, authors, and editors are welcome to post questions here, as are librarians and other support staff. We welcome general questions about the role of OJS and how the workflow works, as well as specific function- or user-related questions.

What to do if you have general, workflow or usability questions about OJS:

1. Read the documentation. We've written documentation to cover from OJS basics to system administration and code development, and we encourage you to read it.

2. take a look at the tutorials. We will continue to add tutorials covering OJS basics as time goes on.

3. Post a question. Questions are always welcome here, but if it's a technical question you should probably post to the OJS Technical Support subforum; if you have a development question, try the OJS Development subforum.

Can't upload images

Postby lutfullah » Thu Apr 13, 2006 10:18 pm

Hi,

I have a linux system with php 5, mysql 4 and Apache 2 with a fresh install of OJS
I can't upload .gif , .jpg or .png images as admin in Journal Management>Setup>The Look.
I get the invalid format error despite the fact that the files are of correct format.
Where do these files reside?
Any help would be much appreciated.

Lutfullah
lutfullah
 
Posts: 6
Joined: Sun Apr 09, 2006 1:07 pm

Postby asmecher » Fri Apr 14, 2006 12:23 pm

Hi Lutfullah,

These files reside in the "public" files directory (as configured in config.inc.php) and its subdirectories. These must be writable by the user OJS runs as (typically "www-data" or "nobody").

Alternately, sometimes the file type detection isn't properly configured; see http://pkp.sfu.ca/support/forum/viewtopic.php?t=654 for a discussion of this.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8426
Joined: Wed Aug 10, 2005 12:56 pm

Failed to upload images

Postby lutfullah » Wed Apr 19, 2006 1:55 am

Dear Alec Smecher,

I am sorry to report but all my efforts to upload images in step 5 failed on a Fedora Core 4 system with
php-5.0.4-10
mysql-4.1.11-2
httpd-2.0.54-10
I did write in php.ini what was given in the links as:
[mime_magic]
mime_magic.magicfile = "/usr/share/file/magic.mime"
I found the path from phpinfo() as ' '--with-mime-magic=/usr/share/file/magic.mime' '-
No success after reboot.
Just for checking, I installed ojs on a nearby system with
RedHat 9
php-4.3.4-11
MySql-3.23.58-9
and it worked on first attempt. The images uploaded without the above lines in php.ini
I also found that the RedHat 9 system had register_global=On. I tried that on the Fedora core 4 system but it did not work.
I am still busy to work it out on the orignal upgraded system. It looks like php5 is giving me this problem.
I have also noticed that during creation of an instance of a journal in admin, when I give a 'path' it gives me an error message that this path is already in use by another jounal but the journal is in fact created.
I have the 'files' directory with permissions forced to 777, one step back to public_html and I have the 'public' directory also forced to 777 inside the /ojs.
I chmoded configuration file and cache directory also to 777.
I don't know what am I missing.

Regards,

Lutfullah
lutfullah
 
Posts: 6
Joined: Sun Apr 09, 2006 1:07 pm

Postby asmecher » Wed Apr 19, 2006 10:09 am

Hi Lutfullah,

Have you checked your server log for error messages? I've encountered odd behaviors like this in certain configurations when the php.ini memory_limit directive was set too low; the default 8M often isn't enough. Use 12M or 16M. If this doesn't correct the problem, and you don't see anything in your server log that might indicate the problem, post back here and I'll suggest a few more things to check.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8426
Joined: Wed Aug 10, 2005 12:56 pm

Postby lutfullah » Sat Apr 22, 2006 1:47 am

Dear Alec Smecher


This is all I could find in the log.
The last line with "/favicon.ico ... 404 293" does not appear in the working system. I don't know if it has anything to do with the problem.

202.83.173.214 - - [22/Apr/2006:13:43:42 +0500] "POST /ojs/index.php/physchem/ma nager/saveSetup/5 HTTP/1.1" 200 16104 "http://ncepc.upesh.edu.pk/ojs/index.php/p hyschem/manager/setup/5" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Geck o/20050524 Fedora/1.0.4-4 Firefox/1.0.4"
202.83.173.214 - - [22/Apr/2006:13:43:42 +0500] "GET /favicon.ico HTTP/1.1" 404 293 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050524 Fedora /1.0.4-4 Firefox/1.0.4"

Regards,

lutfullah
lutfullah
 
Posts: 6
Joined: Sun Apr 09, 2006 1:07 pm

Postby lutfullah » Sat Apr 22, 2006 10:50 am

Sorry I forgot to mention that I increased the memory directive in php.ini to 16M but it did not help. The system that is working has the default 8M memory. Images can be uploaded without any problem with 8M memory.

lutfullah
lutfullah
 
Posts: 6
Joined: Sun Apr 09, 2006 1:07 pm

Postby asmecher » Mon May 08, 2006 11:26 am

Hi lutfullah,

You'll have to investigate this a little more closely to determine which of several things is happening; try adding some debugging output to classes/manager/form/setup/JournalSetupStep5Form.inc.php in the uploadImage function. If you're able to determine which of the several steps is failing, post back here and I'll provide some suggestions for correcting the problem.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8426
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Editorial Support and Discussion

Who is online

Users browsing this forum: No registered users and 1 guest