OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



File upload error

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

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

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

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 OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

File upload error

Postby abhiram » Wed Oct 04, 2006 6:06 am

I am Abhiram from kerala Agricultural University. I just installed ojs on our server ( http://www.jtropag.in ), but some problem exists. When i tried to upload an article by logging as an author some error occured

The error is given below



Warning: mkdir(): SAFE MODE Restriction in effect. The script whose uid is 32156 is not allowed to access /home/ejtropag/public_html/files/journals owned by uid 99 in /home/ejtropag/public_html/classes/file/FileManager.inc.php on line 234

Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 32156 is not allowed to access /home/ejtropag/public_html/files/journals owned by uid 99 in /home/ejtropag/public_html/classes/file/FileManager.inc.php on line 95

Warning: Cannot modify header information - headers already sent by (output started at /home/ejtropag/public_html/classes/file/FileManager.inc.php:234) in /home/ejtropag/public_html/classes/template/TemplateManager.inc.php on line 187


Looking forward your reply

Thanks and Regards
Abhiram
abhiram
 
Posts: 30
Joined: Thu Aug 03, 2006 7:31 am
Location: India

Postby asmecher » Wed Oct 04, 2006 7:31 am

Hi Abhiram,

See http://pkp.sfu.ca/support/forum/viewtopic.php?t=1132 and http://pkp.sfu.ca/support/forum/viewtopic.php?t=910 for information on this.

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

Postby abhiram » Wed Oct 04, 2006 9:19 pm

Hi Alec,

I couldnt fix the file upload error that i mentioned earlier . Now i wanna to know is there any such problems ( mkdir safemode ) in ojs 2.0 .

Looking forward your reply

Regards
Abhiram .H







asmecher wrote:Hi Abhiram,

See http://pkp.sfu.ca/support/forum/viewtopic.php?t=1132 and http://pkp.sfu.ca/support/forum/viewtopic.php?t=910 for information on this.

Regards,
Alec Smecher
Open Journal Systems Team
abhiram
 
Posts: 30
Joined: Thu Aug 03, 2006 7:31 am
Location: India

Postby asmecher » Fri Oct 06, 2006 2:52 am

Hi Abhiram,

All OJS 2.x releases need to be able to create and manage directories; with Safe Mode's UID restriction, this isn't possible. OJS is able to create directories, but as they are created with the web server's UID, it is not then able to access them. PHP's "safe mode" feature in this situation is badly broken and you'll need to work with your ISP to work around it. If they can provide details on a method for creating directories with the correct UID, I'd be happy to suggest suitable changes for OJS to make use of it.

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

Postby abhiram » Sat Oct 07, 2006 3:38 am

Hi,
Our ISP disabled that safemode option temporarily and then enable shell_exec() , so i could upload that file. They told me its not a permanent option to disable that safemode option. After some time , when i try to upload a file some error occurs.

Warning: mkdir(/home/ejtropag/public_html/files/journals/4/articles/7): Permission denied in /home/ejtropag/public_html/classes/file/FileManager.inc.php on line 234

Warning: move_uploaded_file(/home/ejtropag/public_html/files/journals/4/articles/7/submission/original/7-14-1-SM.pdf): failed to open stream: No such file or directory in /home/ejtropag/public_html/classes/file/FileManager.inc.php on line 95

Warning: move_uploaded_file(): Unable to move '/tmp/phpC2moNa' to '/home/ejtropag/public_html/files/journals/4/articles/7/submission/original/7-14-1-SM.pdf' in /home/ejtropag/public_html/classes/file/FileManager.inc.php on line 95

Warning: Cannot modify header information - headers already sent by (output started at /home/ejtropag/public_html/classes/file/FileManager.inc.php:234) in /home/ejtropag/public_html/classes/template/TemplateManager.inc.php on line 187

Looking Forward your reply

Thanks and Regards
Abhiram .H






asmecher wrote:Hi Abhiram,

All OJS 2.x releases need to be able to create and manage directories; with Safe Mode's UID restriction, this isn't possible. OJS is able to create directories, but as they are created with the web server's UID, it is not then able to access them. PHP's "safe mode" feature in this situation is badly broken and you'll need to work with your ISP to work around it. If they can provide details on a method for creating directories with the correct UID, I'd be happy to suggest suitable changes for OJS to make use of it.

Regards,
Alec Smecher
Open Journal Systems Team
abhiram
 
Posts: 30
Joined: Thu Aug 03, 2006 7:31 am
Location: India

Postby asmecher » Sat Oct 07, 2006 5:58 am

Hi Abhiram,

Temporarily disabling the safe mode restriction is not a solution, as OJS needs to be able to create a directory for each submission. In any case, the reason that you're seeing these error messages is that the directories created by previous uploads can not be written to by OJS and will need to be changed with "chmod" and/or "chown" commands (ideally by connecting to the server using SSH or FTP).

PHP's safe mode UID restriction is generally considered to be badly broken, and you'll need to work with your ISP to determine an ongoing way of allowing OJS to create directories that it can then administer.

If your ISP is willing to relax the UID restriction into a GID (group ID) restriction, you may be able to configure permissions so that OJS works in this situation.

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


Return to OJS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests