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:
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.
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 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
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)
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
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,