PKP PLN Plugin ask for Archive_Tar PHP extension

I am sorry I am new to Linux, we run a Debian dedicated server with Plesk,
The command on web root gave me

php check_pear.php Could not open input file: check_pear.php

I used the command

grep -i error /var/log/messages

but it does bot show any information about check_pear.php

To run the check_pear.php script from the command line, you’ll need to be in the same directory as the check_pear.php script, or you’ll need to specify the full path. For example, your document root might be: /var/www/html/ojs/ The exact path will depend on your configuration.

Similarly, there will be a dedicated path to your webserver error logs, also depending on your configuration. As a starting point, see:

Ohh sure I did so, just for security reason I did not post it here. I did cd /var…/aro and then ran the php command

Here it is

cd /var/www/vhosts/koyauniversity.org/aro

php check_pear.php

Could not open input file: check_pear.php

If that file exists in that directory, the most likely reason you wouldn’t be able to run it is file ownership and permissions. You can check the ownership and permissions by typing ls -l in that directory.

You will probably be more interested, however, in finding the Apache error log and looking at the error output there. There can be PHP configuration differences when it is run by the webserver vs. run by command line, and you are primarily interested in the webserver configuration.

Thank you, Now I see what the problem was, I needed to go in httpdocs floder, now it gives me bool (true) things

root@koyauniversity /var/www/vhosts/koyauniversity.org/httpdocs/aro # php check_pear.php
bool(true)

But the issue with Archive TAR still presist and we can not activate the Plugin

Is this path (include_path .:/usr/share/php) suppose to just point to the folder of PEAR or to the location of System.php

The include path should have a reference to the PEAR folder, such as ‘.:/usr/share/php::/usr/local/php/pear/’. (Your actual include path will vary.)

The include path will need to be available to the webserver, not just the command line. You can check the include path available to the webserver via the phpinfo output:
User Home → Site Administrator → System Information → Extended System Information

Does check_pear.php also give bool(true) if run from the web?

I changed the value for include_path to .:/usr/share/php/PEAR and it is the same for local and master as it should here in php info

http://aro.koyauniversity.org/check_php.php

The check does not desplay anything in browser

http://aro.koyauniversity.org/check_pear.php

I checked this in OJS , User Home → Site Administrator → System Information → Extended System Information
and the php info is the same data for MASTER (.:/usr/share/php/PEAR) and for local I see this

include_path .:/var/www/vhosts/koyauniversity.org/httpdocs/aro-ojs/classes:/var/www/vhosts/koyauniversity.org/httpdocs/aro-ojs/pages:/var/www/vhosts/koyauniversity.org/httpdocs/aro-ojs/lib/pkp:/var/www/vhosts/koyauniversity.org/httpdocs/aro-ojs/lib/pkp/classes:/var/www/vhosts/koyauniversity.org/httpdocs/aro-ojs/lib/pkp/pages:/var/www/vhosts/koyauniversity.org/httpdocs/aro-ojs/lib/pkp/lib/adodb:/var/www/vhosts/koyauniversity.org/httpdocs/aro-ojs/lib/pkp/lib/phputf8:/var/www/vhosts/koyauniversity.org/httpdocs/aro-ojs/lib/pkp/lib/pqp/classes:/var/www/vhosts/koyauniversity.org/httpdocs/aro-ojs/lib/pkp/lib/smarty:.:/usr/share/php/PEAR

To see why the web browser doesn’t display anything for the check_pear.php script, you’ll need to find the webserver’s error log.

Also, please confirm that the file /usr/share/php/PEAR/Archive/Tar.php exists (this is case sensitive).

You can run the phpinfo() command directly from within OJS rather than exposing it via the check_php.php script. To do so, log in as the Site Administrator, then follow the path:

User Home (main navigation) →
Site Administrator (from your roles) →
System Information (under Administrative Functions) →
Extended System Information (all the way at the bottom of the page)

I did that and I posted the indcude_path data,

Well I think the problem is that I can not see any
/usr/share/php/PEAR/Archive/Tar.php, There is no Archive folder :frowning:

Have you run pear install Archive_Tar, per http://pear.php.net/package/Archive_Tar/ ?

That was not in the STEPS for installing PEAR (http://pear.php.net/manual/en/installation.checking.php), but I did that now, Restated server but still no sign

root@koyauniversity ~ # pear install Archive_Tar
WARNING: channel “pear.php.net” has updated its protocols, use “pear channel-upd ate pear.php.net” to update
downloading Archive_Tar-1.4.2.tgz …
Starting to download Archive_Tar-1.4.2.tgz (20,624 bytes)
…done: 20,624 bytes
install ok: channel://pear.php.net/Archive_Tar-1.4.2

The now when I run check in comand, it does not give bool (true) but error , the System.php in my case is out side the PEAR folder

root@koyauniversity /var/www/vhosts/koyauniversity.org/httpdocs/aro # php check_ pear.php
PHP Warning: require_once(System.php): failed to open stream: No such file or d irectory in /var/www/vhosts/koyauniversity.org/httpdocs/aro/check_pear.php on li ne 2
PHP Fatal error: require_once(): Failed opening required ‘System.php’ (include_ path=’.:/usr/share/php/PEAR’) in /var/www/vhosts/koyauniversity.org/httpdocs/aro /check_pear.php on line 2

What folder now has the directory “Archive” with the file “Tar.php”?

It is outside the PEAR folder in /usr/share/php/Archive

Make sure your include path references /usr/share/php.

I did that and now the chek via command line works, but the web access does not give any result just error 500

You’ll find the details of the 500 error in your Apache error log.

There is probably another log with the relevant information. The Apache logs are often separated on a per-virtualhost basis. Look in your Apache config for the virtualhost that provides access to OJS and check there for an ErrorLog directive. That directive will point to the path where OJS’s error output is going.

Alternately, you could turn on display_errors in config.inc.php, but beware that this will display all errors to the screen for all users!

Can you run that again, but with show_stacktrace on as well?

You have an open_basedir restriction set in your php.ini which seems reasonable, but the file it is complaining about (plugins/oaiMetadataFormats/README/READMEOaiMetadataFormatsPlugin.inc.php) seems very odd. I wonder where that is coming from.

This may entirely be tangential, however. Were you getting the 500 error in OJS, or was the 500 error only occuring with check_pear.php?

No I got that error when I run check_pear.php only, but now I keep getting Database connection failed! very often and I have to reload the browser couple times to get the page apear. I did not use to have this one. I installed tomact 6 on the sever, I am not sure if that caused thi connection problem. I get the following error message everytime on Database connection failed!

Database connection failed!

Stack Trace:

File: /var/www/vhosts/koyauniversity.org/httpdocs/aro/classes/core/Application.inc.php line 38
Function: PKPApplication->PKPApplication()

File: /var/www/vhosts/koyauniversity.org/httpdocs/aro/lib/pkp/includes/bootstrap.inc.php line 59
Function: Application->Application()

File: /var/www/vhosts/koyauniversity.org/httpdocs/aro/index.php line 60
Function: require("/var/www/vhosts/koyauniversity.org/httpdocs/aro/lib/pkp/includes…")

I just need to reinsate the config file as we work on a live website,

If the 500 error is only occurring in the check_pear.php script, changing the config.inc.php won’t affect that.

See this post on displaying PHP errors to the screen:

Add the suggested lines to your check_pear.php, visit the page on the web again, and report the error messages.