Uploading Files Path Issue

While i m installing the ojs on the local system it asked me to create a files folder it is done and working properly. But when the same situation comes on server before the domain i cant create the folder so how to resolve this issue.

Hi @sharath,

When you say you can’t create the folder, what do you mean? Can you describe this in more detail?

Regards,
Alec Smecher
Public Knowledge Project Team

Actually while creating in the server i have created a sub domain with ojs then how do i keep a folder before that were the uploaded files (i.e., files folder) are stored so i m unable to create this folder before it because a sub-domain folder cannot be changed.

It sounds like you should ask your hosting provider this question. In OJS, the only requirement is that PHP be able to reach the files_dir path. You can specify an absolute or a relative path in config.inc.php. Your hosting provider should be able to help you with a path that will work.

Thank You for your advice

Thanks for the help the problem is been resolved now i m able to run ojs

Hello sharath how you solved the problem I am having the same. I am facing the following due to the miss configuration of “file directory”
cc: asmecher

Hi Niazwali,
I facing the same problem earlier but it has been resolved. On the server i
have created a files folder in then i have installed the ojs installtion
then i m able to work with it. So try it if you face the problem still i
will help you out.

                                                Thanking You

With Regards

Thanks for replay sharath, it works perfectly on the local server with WAMP but not on the remote server. I am using plesk over IIS having php support, I have created a folder named file under the Home Directory and specified as //file in the installation form, OJS was installed successfully but giving the above error. what to do?

Once try to rename it and give it as files and what are the configuration
you are passing please let me know through it i may help you out.

                                                Thanking You

With Regards

My files folder/directory is in the Home Directory like Home Director / files, I have entered both the Relative Path like ( //files or /files) and the exact path on the server like C:/intpub/vhost/mydomain/files , none solve the problem. I have uploaded the OJS in the main folder of my subdomain.

Actually the folder which you have created as files in that only try to
install ojs in it e.g.: /files/ojs/

                                                Thanking You

With Regards

Thanks, I am getting close to pick. You mean that I should create two folders in the subdomain folder one for ojs installation and second for data directory like

sorry i mean to say you have to create files folder in it try to install
ojs then you will get it. The directory should be like files/ojs
installation files

                                                Thanking You

With Regards

Remember to consider two primary things here:

  1. The process which runs the webserver must have read and write access to the folder you choose.
  2. The folder you choose must not be directly exposed to the internet by the webserver.

The path you specify in config.inc.php can resolve to the filesystem by an absolute path or by a relative path, but it must be able to be interpreted by PHP and accessed by the web user.

Your structure of:

  • Home
    • httpdocs
    • httpsdocs
    • ojs
    • files

Looks safest to me. In that case, your files_dir could look like:

files_dir = ../files

Is your problem resolved or still it is on.

                                                Thanking You

With Regards

I thank both of you.
I have tried all suggestions and search the web for related issues but fail to configure. I think my mean problem is open_basedir restriction as stated by ctgraham in http://forum.pkp.sfu.ca/t/ojs-3-error-logs/20706, but I have not found its solution there.
My logs also says
PHP Warning: file_exists(): open_basedir restriction in effect. File(/ojs/lib/pkp/lib/vendor/moxiecode/plupload/js/i18n/en.js) is not within the allowed path(s): (C:\Inetpub\vhosts\mydomain\subdomain;C:\Windows\Temp) in C:\Inetpub\vhosts\mydomain\subdomain\ojs\lib\pkp\classes\template\PKPTemplateManager.inc.php on line 588

will be very thankful if a solution is suggested

Sir, I have tried this before. Subfolders (journals, temp) were created successfully but uploading is not working!
I am using plesk, I have four users there as following and all have full control over the entire subdomain directory and it’s child directories

Administrators
Plesk Domain User(user)
Application pool group(IWPG_user)
system

You will need to change your open_basedir directive to allow PHP to access the files folder, or remove the open_basedir restriction.

See:
http://php.net/manual/en/ini.core.php#ini.open-basedir
and
https://mediatemple.net/community/products/dv/204404214/how-do-i-set-the-path-for-open_basedir

Thanks sir, I will tell my system administrator to set open_basedir to none. Won’t it effect the other already installed applications?