Http Error. I can't upload files

ojs_error

Hi!! Can you help me
My OS system is CentOS 7, php 5.6 and 7 and all necesary plugins , madia db.
My permission is 777 in all directory html and subdirectories and files, group and user root:root for all files, directories and subdirectories.

Need you help!!

my error_log file:

SubmissionFilesGridHandler::initialize($request, $args = NULL) in /var/www/html/ojs3/lib/pkp/controllers/grid/files/fileList/FileListGridHandler.inc.php on line 22, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.189954 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of SubmissionFileDAO::fromRow($row) should be compatible with PKPSubmissionFileDAO::fromRow($row, $fileImplementation) in /var/www/html/ojs3/classes/article/SubmissionFileDAO.inc.php on line 23, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.262594 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/html/ojs3/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.262778 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of JatsTemplatePlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /var/www/html/ojs3/plugins/generic/jatsTemplate/JatsTemplatePlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.270367 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /var/www/html/ojs3/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.270397 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /var/www/html/ojs3/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.271216 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of PKPFileUploadWizardHandler::initialize($request, $args) should be compatible with PKPHandler::initialize($request) in /var/www/html/ojs3/lib/pkp/controllers/wizard/fileUpload/PKPFileUploadWizardHandler.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.271408 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of SubmissionFileDAO::fromRow($row) should be compatible with PKPSubmissionFileDAO::fromRow($row, $fileImplementation) in /var/www/html/ojs3/classes/article/SubmissionFileDAO.inc.php on line 23, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.399997 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/html/ojs3/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.400177 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of JatsTemplatePlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /var/www/html/ojs3/plugins/generic/jatsTemplate/JatsTemplatePlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.407392 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /var/www/html/ojs3/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.407423 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /var/www/html/ojs3/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.408208 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of PKPFileUploadWizardHandler::initialize($request, $args) should be compatible with PKPHandler::initialize($request) in /var/www/html/ojs3/lib/pkp/controllers/wizard/fileUpload/PKPFileUploadWizardHandler.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.408390 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of SubmissionFileDAO::fromRow($row) should be compatible with PKPSubmissionFileDAO::fromRow($row, $fileImplementation) in /var/www/html/ojs3/classes/article/SubmissionFileDAO.inc.php on line 23, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.422015 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of PKPSubmissionFilesUploadBaseForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /var/www/html/ojs3/lib/pkp/controllers/wizard/fileUpload/form/PKPSubmissionFilesUploadBaseForm.inc.php on line 20, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.422062 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of SubmissionFilesUploadForm::validate($request) should be compatible with Form::validate($callHooks = true) in /var/www/html/ojs3/lib/pkp/controllers/wizard/fileUpload/form/SubmissionFilesUploadForm.inc.php on line 19, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.422075 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of SubmissionFilesUploadForm::execute($request) should be compatible with Form::execute() in /var/www/html/ojs3/lib/pkp/controllers/wizard/fileUpload/form/SubmissionFilesUploadForm.inc.php on line 19, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.503973 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/html/ojs3/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.504164 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of JatsTemplatePlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /var/www/html/ojs3/plugins/generic/jatsTemplate/JatsTemplatePlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.519373 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /var/www/html/ojs3/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:45:52.519404 2018] [php7:warn] [pid 25201] [client 148.216.28.81:57594] PHP Warning: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /var/www/html/ojs3/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.243846 2018] [php7:warn] [pid 25198] [client 148.216.28.81:57600] PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/html/ojs3/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.244227 2018] [php7:warn] [pid 25198] [client 148.216.28.81:57600] PHP Warning: Declaration of JatsTemplatePlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /var/www/html/ojs3/plugins/generic/jatsTemplate/JatsTemplatePlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.252665 2018] [php7:warn] [pid 25198] [client 148.216.28.81:57600] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /var/www/html/ojs3/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.252694 2018] [php7:warn] [pid 25198] [client 148.216.28.81:57600] PHP Warning: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /var/www/html/ojs3/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.253632 2018] [php7:warn] [pid 25198] [client 148.216.28.81:57600] PHP Warning: Declaration of PKPFileUploadWizardHandler::initialize($request, $args) should be compatible with PKPHandler::initialize($request) in /var/www/html/ojs3/lib/pkp/controllers/wizard/fileUpload/PKPFileUploadWizardHandler.inc.php on line 0, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.253868 2018] [php7:warn] [pid 25198] [client 148.216.28.81:57600] PHP Warning: Declaration of SubmissionFileDAO::fromRow($row) should be compatible with PKPSubmissionFileDAO::fromRow($row, $fileImplementation) in /var/www/html/ojs3/classes/article/SubmissionFileDAO.inc.php on line 23, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.268262 2018] [php7:warn] [pid 25198] [client 148.216.28.81:57600] PHP Warning: Declaration of PKPSubmissionFilesUploadBaseForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /var/www/html/ojs3/lib/pkp/controllers/wizard/fileUpload/form/PKPSubmissionFilesUploadBaseForm.inc.php on line 20, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.268315 2018] [php7:warn] [pid 25198] [client 148.216.28.81:57600] PHP Warning: Declaration of SubmissionFilesUploadForm::validate($request) should be compatible with Form::validate($callHooks = true) in /var/www/html/ojs3/lib/pkp/controllers/wizard/fileUpload/form/SubmissionFilesUploadForm.inc.php on line 19, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.268330 2018] [php7:warn] [pid 25198] [client 148.216.28.81:57600] PHP Warning: Declaration of SubmissionFilesUploadForm::execute($request) should be compatible with Form::execute() in /var/www/html/ojs3/lib/pkp/controllers/wizard/fileUpload/form/SubmissionFilesUploadForm.inc.php on line 19, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.271489 2018] [php7:notice] [pid 25198] [client 148.216.28.81:57600] PHP Notice: Only variables should be passed by reference in /var/www/html/ojs3/lib/pkp/classes/file/FileManager.inc.php on line 97, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.273739 2018] [php7:notice] [pid 25198] [client 148.216.28.81:57600] PHP Notice: Only variables should be passed by reference in /var/www/html/ojs3/lib/pkp/classes/core/PKPString.inc.php on line 447, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.362386 2018] [php7:warn] [pid 25198] [client 148.216.28.81:57600] PHP Warning: mkdir(): Permiso denegado in /var/www/html/ojs3/lib/pkp/classes/file/FileManager.inc.php on line 289, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.362502 2018] [php7:warn] [pid 25198] [client 148.216.28.81:57600] PHP Warning: move_uploaded_file(/var/www/html/ojs3_files/journals/1//articles/2/submission/2-8-2-1-2-20181008.pdf): failed to open stream: No existe el fichero o el directorio in /var/www/html/ojs3/lib/pkp/classes/file/FileManager.inc.php on line 119, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.362527 2018] [php7:warn] [pid 25198] [client 148.216.28.81:57600] PHP Warning: move_uploaded_file(): Unable to move ‘/tmp/phpajD20c’ to ‘/var/www/html/ojs3_files/journals/1//articles/2/submission/2-8-2-1-2-20181008.pdf’ in /var/www/html/ojs3/lib/pkp/classes/file/FileManager.inc.php on line 119, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.378376 2018] [php7:warn] [pid 25198] [client 148.216.28.81:57600] PHP Warning: get_class() expects parameter 1 to be object, null given in /var/www/html/ojs3/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 314, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2
[Mon Oct 08 10:46:12.378478 2018] [php7:error] [pid 25198] [client 148.216.28.81:57600] PHP Fatal error: Uncaught Error: Call to a member function getFileId() on null in /var/www/html/ojs3/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php:1065\nStack trace:\n#0 /var/www/html/ojs3/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php(315): PKPSubmissionFileDAO->_castToDatabase(NULL)\n#1 /var/www/html/ojs3/lib/pkp/classes/file/SubmissionFileManager.inc.php(233): PKPSubmissionFileDAO->insertObject(Object(SupplementaryFile), ‘uploadedFile’, true)\n#2 /var/www/html/ojs3/lib/pkp/classes/file/SubmissionFileManager.inc.php(57): SubmissionFileManager->_handleUpload(‘uploadedFile’, 2, ‘4’, NULL, 8, NULL, NULL)\n#3 /var/www/html/ojs3/lib/pkp/controllers/wizard/fileUpload/form/SubmissionFilesUploadForm.inc.php(157): SubmissionFileManager->uploadSubmissionFile(‘uploadedFile’, 2, ‘4’, NULL, 8, NULL, NULL)\n#4 /var/www/html/ojs3/lib/pkp/controllers/wizard/fileUpload/PKPFileUploadWizardHandler.inc.php(265): SubmissionFilesUploadForm->execute(Object(Request))\n#5 /var/www/html/ojs3/lib/pkp/classes/core/PKPRouter.inc.php(390): P in /var/www/html/ojs3/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 1065, referer: http://148.216.28.86/ojs3/index.php/ecosoc/submission/wizard/2?submissionId=2

Hi @mareregu,

Be aware that your installation is not safe – you must ensure that your files_dir (see config.inc.php) is either outside your web root, or protected from direct access using a .htaccess file or similar. See the “Recommended Configuration” section of docs/README.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi asmecher,

My system OJS remains the same, it does not load the files, and change the configuration. Some solution or reinstall system

Hi @mareregu,

Did you move your files_dir outside your web root, and update config.inc.php accordingly? What does your error log look like now?

Regards,
Alec Smecher
Public Knowledge Project Team

Yes I have my files_dir outside and configurated in my config.inc.php file., I have the same Error.

Hi @mareregu,

It definitely shouldn’t be exactly the same error messages – the path should at least have changed. Can you post your error log again?

Regards,
Alec Smecher
Public Knowledge Project Team

Thnks for your help!!
I can solve my problem.
I eliminate SELinux protection in my directories and reboot my server, change permission 750 root:apache, thats all.

HOw did you do this? I got the same error, not solved yet