Moved OJS 3.o to new domain and server issue

Thanks, I will inform hosting company admins about that.
I will let you know if there is something that could make life difficult :slight_smile:

Thanks,

Hi,
Is there any thing new related to this? I was looking trough my error log and noticed that main errors are “open_based”

Hi @knjigor,

You can resolve the open_basedir warnings by patching [OJS 3.0] getBasePath() returns an empty path in PKPTemplateManager · Issue #1902 · pkp/pkp-lib · GitHub.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher
I have applied suggested patch, but still getting errors:

[Fri Jun 30 08:33:16.625315 2017] [fcgid:warn] [pid 10222] [client 147.91.173.31:42852] mod_fcgid: stderr: PHP Notice:  Undefined variable: baseUrl in /var/www/clients/client0/web7/web/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 625, referer: http://godisnjak.ff.uns.ac.rs/plugins/generic/pdfJsViewer/pdf.js/build/pdf.worker.js
[Fri Jun 30 08:33:16.625320 2017] [fcgid:warn] [pid 10222] [client 147.91.173.31:42852] mod_fcgid: stderr: PHP Notice:  Undefined variable: baseUrl in /var/www/clients/client0/web7/web/lib/pkp/classes/template/PKPTemplateManager.inc.php on line, referer: http://godisnjak.ff.uns.ac.rs/plugins/generic/pdfJsViewer/pdf.js/build/pdf.worker.js
[Fri Jun 30 08:33:16.691659 2017] [fcgid:warn] [pid 10222] [client 147.91.173.31:42852] mod_fcgid: stderr: rl in /var/www/clients/client0/web7/web/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 625, referer: http://godisnjak.ff.uns.ac.rs/plugins/generic/pdfJsViewer/pdf.js/build/pdf.worker.js
[Fri Jun 30 08:33:16.691676 2017] [fcgid:warn] [pid 10222] [client 147.91.173.31:42852] mod_fcgid: stderr: PHP Notice:  Undefined variable: baseUrl in /var/www/clients/client0/web7/web/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 625, referer: http://godisnjak.ff.uns.ac.rs/plugins/generic/pdfJsViewer/pdf.js/build/pdf.worker.js
[Fri Jun 30 08:33:16.691687 2017] [fcgid:warn] [pid 10222] [client 147.91.173.31:42852] mod_fcgid: stderr: PHP Notice:  Undefined variable: baseUrl in /var/www/clients/client0/web7/web/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 625, referer: http://godisnjak.ff.uns.ac.rs/plugins/generic/pdfJsViewer/pdf.js/build/pdf.worker.js
[Fri Jun 30 08:33:16.691690 2017] [fcgid:warn] [pid 10222] [client 147.91.173.31:42852] mod_fcgid: stderr: PHP Notice:  Undefined variable: baseUrl in /var/www/clients/client0/web7/web/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 625, referer: http://godisnjak.ff.uns.ac.rs/plugins/generic/pdfJsViewer/pdf.js/build/pdf.worker.js
[Fri Jun 30 08:33:16.691693 2017] [fcgid:warn] [pid 10222] [client 147.91.173.31:42852] mod_fcgid: stderr: PHP Notice:  Undefined variable: baseUrl in /var/www/clients/client0/web7/web/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 625, referer: http://godisnjak.ff.uns.ac.rs/plugins/generic/pdfJsViewer/pdf.js/build/pdf.worker.js

Hi @knjigor,

After applying the patch, what does line 625 of lib/pkp/classes/template/PKPTemplateManager.inc.php read? Are you sure the patch applied cleanly?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher
I have apply patch cleanly, again, but I have noticed that there is big difference in my file:
This is how this part of my file looks like

  // Load minified file if it exists
  if (Config::getVar('general', 'enable_minified')) {
  	$path = $basePath . '/js/pkp.min.js';
  	if (file_exists($path)) {
  		$this->addJavaScript(
  			'pkpLib',
  			$path,
  			array(
  				'priority' => STYLE_SEQUENCE_CORE,
  				'contexts' => array('backend', 'frontend')

and acording to patch it should look like this before patching

 		// Load minified file if it exists
  		if (Config::getVar('general', 'enable_minified')) {
  			$this->addJavaScript(
  				'pkpLib',
				 $basePath . '/js/pkp.min.js',
  				array(
  					'priority' => STYLE_SEQUENCE_CORE,
  					'contexts' => array('backend', 'frontend')

and after patch

 		// Load minified file if it exists
  		if (Config::getVar('general', 'enable_minified')) {
  			$this->addJavaScript(
  				'pkpLib',
				$baseUrl . '/js/pkp.min.js',
  				array(
  					'priority' => STYLE_SEQUENCE_CORE,
  					'contexts' => array('backend', 'frontend')

When I apply patch i get error 500.

And if I just change basePath to baseUrl i get error 500. I’m shure that I’m doing something wrong :slight_smile:

Hi @knjigor,

I suspect the patch isn’t being fully applied. What exact version of OJS 3.x are you trying to apply it to?

Regards,
Alec Smecher
Public Knowledge Project Team

Our current version is OJS 3.0.2.0

Hi @knjigor,

When you apply the patch, does the patch tool report any warnings or failures?

Regards,
Alec Smecher
Public Knowledge Project Team

I apply patches manually by editing files, I’m not using any tools because this way I know what is done with files and how to revert it.

Hi @knjigor,

I would suggest using the patch tool – it’s a standard way to do this and not prone to e.g. typos. You can reverse patches you’ve already applied using the -r option to the tool.

Regards,
Alec Smecher
Public Knowledge Project Team