OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Browse... + Upload = Blank Page

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.

Browse... + Upload = Blank Page

Postby codonnell » Wed Jul 18, 2007 8:07 am

I'm not sure what I'm doing wrong, but I've searched the forums, and most people having these problems seem to be getting an error message of some sort, which I'm not.

When a user or editor attempts to upload a file they are redirected after the POST to something like:

http://ojs.mydomain.org/index.php/ca/au ... veSubmit/3

The page is blank. I have even "viewed source" of the response, which is also blank. I presume if it was a folder permissions problem I'd get an error.

Help?

Thanks and OJS seems really great so far. Getting used to some of the new terminology however.
codonnell
 
Posts: 45
Joined: Wed Jul 18, 2007 8:03 am
Location: Troy, NY

Postby asmecher » Wed Jul 18, 2007 8:44 am

Hi codonnell,

A few things to check -- first, see if there's anything in your Apache error log. Then check to see if your web server has a post size limit, e.g. using the LimitRequestBody directive. There are also a few PHP limits you might check, like upload_max_filesize and post_max_size.

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

Some Error Messages

Postby codonnell » Wed Jul 18, 2007 8:59 am

I added in index.php:

ini_set('display_errors', E_ALL);

And get the following (with the '...' at the end indicating that the last error repeats a great many times).

Is this a permission issue? I've changed the owner of all of OJS to 'apache' since that seemed to allow the installation to occur successfully. Is there something else I ought to be doing? Is it a server configuration issue?

I looked in files/ and it has created journals/ and site/ but no further subdirectories.

--

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.org/subdomains/ojs/files/journals/1/articles/2/submission/original) is not within the allowed path(s): (/var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs:/tmp) in /var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs/classes/file/FileManager.inc.php on line 299

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.org/subdomains/ojs/files/journals/1/articles/2/submission/original) is not within the allowed path(s): (/var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs:/tmp) in /var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs/classes/file/FileManager.inc.php on line 279

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.org/subdomains/ojs/files/journals/1/articles/2/submission) is not within the allowed path(s): (/var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs:/tmp) in /var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs/classes/file/FileManager.inc.php on line 279

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.org/subdomains/ojs/files/journals/1/articles/2) is not within the allowed path(s): (/var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs:/tmp) in /var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs/classes/file/FileManager.inc.php on line 279

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.org/subdomains/ojs/files/journals/1/articles) is not within the allowed path(s): (/var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs:/tmp) in /var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs/classes/file/FileManager.inc.php on line 279

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.org/subdomains/ojs/files/journals/1) is not within the allowed path(s): (/var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs:/tmp) in /var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs/classes/file/FileManager.inc.php on line 279

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.org/subdomains/ojs/files/journals) is not within the allowed path(s): (/var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs:/tmp) in /var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs/classes/file/FileManager.inc.php on line 279

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.org/subdomains/ojs/files) is not within the allowed path(s): (/var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs:/tmp) in /var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs/classes/file/FileManager.inc.php on line 279

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.org/subdomains/ojs) is not within the allowed path(s): (/var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs:/tmp) in /var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs/classes/file/FileManager.inc.php on line 279

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.org/subdomains) is not within the allowed path(s): (/var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs:/tmp) in /var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs/classes/file/FileManager.inc.php on line 279

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.org) is not within the allowed path(s): (/var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs:/tmp) in /var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs/classes/file/FileManager.inc.php on line 279

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts) is not within the allowed path(s): (/var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs:/tmp) in /var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs/classes/file/FileManager.inc.php on line 279

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www) is not within the allowed path(s): (/var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs:/tmp) in /var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs/classes/file/FileManager.inc.php on line 279

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var) is not within the allowed path(s): (/var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs:/tmp) in /var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs/classes/file/FileManager.inc.php on line 279

...
codonnell
 
Posts: 45
Joined: Wed Jul 18, 2007 8:03 am
Location: Troy, NY

Postby codonnell » Wed Jul 18, 2007 9:03 am

asmecher wrote:There are also a few PHP limits you might check, like upload_max_filesize and post_max_size.


Thanks for the speedy response. I really appreciate it.

For reference, the test file is an RTF and is 6,276 bytes.

post_max_size = 8M
upload_max_filesize = 2M (notes to self to change this)

I couldn't find anything about "LimitRequestBody". I did however notice that "open_basedir = " is commented out. Should it be set to something? I notice that my error "open_basedir restriction in effect."

Thanks again, looking forward to having this baby up and running.

Best.
Casey
codonnell
 
Posts: 45
Joined: Wed Jul 18, 2007 8:03 am
Location: Troy, NY

Postby asmecher » Wed Jul 18, 2007 9:25 am

Hi Casey,

Another thing to check is whether your OJS files path is within your open_basedir path. If you're getting an open_basedir warning, it implies that the option is enabled -- have you checked a phpinfo() output to see whether or not the open_basedir directive is being configured e.g. in another configuration file?

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

Postby codonnell » Wed Jul 18, 2007 9:43 am

asmecher wrote:have you checked a phpinfo() output to see whether or not the open_basedir directive is being configured e.g. in another configuration file?


Just checked:

Directive | Local Value | Master Value
open_basedir | /var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs:/tmp | no value

| = columns delimeter in phpinfo() response.

/var/www/vhosts/mydomain.org/subdomains/ojs/httpdocs is the base directory of OJS.
codonnell
 
Posts: 45
Joined: Wed Jul 18, 2007 8:03 am
Location: Troy, NY

Postby asmecher » Wed Jul 18, 2007 10:30 am

Hi Casey,

OK, the problem is most likely to do with your files path (as configured in config.inc.php in the files_dir directive) being outside the list of accepted paths. You may be able to specify additional open_basedir paths using a .htaccess file, but it'll depend on your host.

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

Postby codonnell » Wed Jul 18, 2007 10:37 am

asmecher wrote:OK, the problem is most likely to do with your files path (as configured in config.inc.php in the files_dir directive) being outside the list of accepted paths. You may be able to specify additional open_basedir paths using a .htaccess file, but it'll depend on your host.


Alec...

Thanks for all your help on this. I suspect you're right that the files directory is somehow not available. When you say "specify additional open_basedir paths using a .htaccess file" how might one do that on a "typical" system. I can find specifics if you can give me a general case?

Thanks again, I'm reasonably tech savvy, but web serving was never my specialty.

Casey
codonnell
 
Posts: 45
Joined: Wed Jul 18, 2007 8:03 am
Location: Troy, NY

Postby asmecher » Wed Jul 18, 2007 10:53 am

Hi Casey,

A quick bit of Googling shows that the open_basedir option can apparently not, for security reasons, be set via the usual channels of an .htaccess file or an ini_set call. It sounds like you'll have to get it added to your php.ini configuration file. If you're using a shared host, that's not likely.

The best alternative is probably to move your files path into a subdirectory of httpdocs and update the OJS configuration file to match. Make sure you use an .htaccess file to restrict access via the web to this directory -- there's instructions, for example, at http://www.cs.dal.ca/studentservices/faq/tutorials/web_sites/htaccess.shtml.

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

Thanks...

Postby codonnell » Wed Jul 18, 2007 12:15 pm

Works great now. I changed it so files/ was within htttpdocs/ and made sure it was protected. Do you know of another "AuthType" than "Basic"? Can I have it use MD5 instead? I just hate plain text passwords.

Thanks again.

Casey
codonnell
 
Posts: 45
Joined: Wed Jul 18, 2007 8:03 am
Location: Troy, NY

Postby asmecher » Wed Jul 18, 2007 1:14 pm

Hi Casey,

I'd recommend just providing an empty .htpasswd file or using other .htaccess controls to simply deny access to that directory; there shouldn't be any need for someone to access the files path that way. IIRC, out-of-the-box Apache just supports an AuthType of "Basic"; however, there are modules that will allow authentication via other methods like MySQL.

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


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest

cron