PHP CLI requirements failed while executing

Ask your questions regarding TimeTrex installation here.
Post Reply
mike77fz
Posts: 4
Joined: Sat Oct 29, 2016 1:15 pm

PHP CLI requirements failed while executing

Post by mike77fz » Mon Aug 14, 2017 11:45 am

Hi,

Installing TimeTrex Community version on Cent OS 7 and receiving the following errors.

I'm using the sample ini.php file and renamed it to timetrex.ini.php, only find the one version of the file in the timetrex root folder. I had seen someone mention it was due to a version error, but I believe that post was from a couple years ago.

PHP CLI requirements failed while executing
"/usr/bin/php" "/var/www/html/timetrex/tools/unattended_upgrade.php" --config "/var/www/html/timetrex/includes/../timetrex.ini.php" --requirements_only --web_installer
Likely caused by having two PHP.INI files with different settings.Not writable (/var/timetrex/storage)File permissions are invalid, some TimeTrex files are not readable/writable. See detailed error messages below.Detailed Error Messages

PHP CLI Requirements Output:
----WARNING----WARNING----WARNING-----
--------------------------------------
Minimum PHP Requirements are NOT met!!
--------------------------------------
Failed Requirements: DatabaseType
--------------------------------------
PHP INI: /etc/php.ini
Process Owner: apache
--------------------------------------
Failed Requirements: Require,DatabaseType,WStorageDir
Not writable: /var/www/html/timetrex/classes/modules/install/../../../includes/timetrex.ini.php

Appreciate the communities assistance on this.

Thank you,
Mike

shaunw
Posts: 7483
Joined: Tue Sep 19, 2006 2:22 pm

Re: PHP CLI requirements failed while executing

Post by shaunw » Mon Aug 14, 2017 12:28 pm

Have you followed the CentOS instructions from here? https://www.timetrex.com/how-to-install ... nux-centos

mike77fz
Posts: 4
Joined: Sat Oct 29, 2016 1:15 pm

Re: PHP CLI requirements failed while executing

Post by mike77fz » Tue Aug 15, 2017 6:39 am

Yes.

shaunw
Posts: 7483
Joined: Tue Sep 19, 2006 2:22 pm

Re: PHP CLI requirements failed while executing

Post by shaunw » Tue Aug 15, 2017 7:39 am

Please post a copy of your timetrex.ini.php file here so we can take a look.

mike77fz
Posts: 4
Joined: Sat Oct 29, 2016 1:15 pm

Re: PHP CLI requirements failed while executing

Post by mike77fz » Thu Aug 17, 2017 8:25 am

timetrex.ini.php file is below. Thank you for your assistance.


<?php die('Unauthorized Access...'); //SECURITY MECHANISM, DO NOT REMOVE//?>
;
;
; TimeTrex Configuration File
; *Linux* Example
;
;

;
; System paths. NO TRAILING SLASHES!
;
[path]
;URL to TimeTrex web root directory. ie: http://your.domain.com/<*BASE_URL*>
;DO NOT INCLUDE http://your.domain.com, just the directory AFTER your domain
base_url = /timetrex/interface

;
;Log directory -- NOTICE: For security reasons, this should always be outside the web server document root.
;
log = /var/log/timetrex

;
;Misc storage, for attachments/images -- NOTICE: For security reasons, this should always be outside the web server document root.
;
storage = /var/timetrex/storage

;
;Full path and name to the PHP CLI Binary
;
php_cli = /usr/bin/php



;
; Database connection settings. These can be set from the installer.
;
[database]
type = postgres8
;type = mysqli

host = localhost
database_name = timetrex
user = timetrex
password = "XXXXXXXX"


;
; Email delivery settings.
;
[mail]
;Least setup, deliver email through TimeTrex's email relay via SOAP (HTTP port 80/443)
delivery_method = soap

;Deliver email through remote SMTP server with the following settings.
;delivery_method = smtp
;smtp_host=smtp.gmail.com
;smtp_port=587
;smtp_username=NOT CONFIGURED
;smtp_password=NOT CONFIGURED

;The domain that emails will be sent from, do not include the "@" or anything before it.
; *ONLY* specify this if "delivery_method" above is "smtp"
;email_domain = NOT CONFIGURED

;The local part of the email address that emails will be sent from, do not include the "@" or anything after it.
; *ONLY* specify this if "delivery_method" above is "smtp"
;email_local_part = DoNotReply


;
; Cache settings
;
[cache]
enable = TRUE
;NOTICE: For security reasons, this must be outside the web server document root.
dir = /tmp/timetrex



[debug]
;Set to false if you're debugging
production = TRUE

enable = FALSE
enable_display = FALSE
buffer_output = TRUE
enable_log = FALSE
verbosity = 10



[other]
; Force all clients to use SSL.
force_ssl = FALSE
installer_enabled = TRUE
primary_company_id = 0

;Specify the URL hostname to be used to access TimeTrex. The BASE_URL specified above will be appended on to this automatically.
; This should be a fully qualified domain name only, do not include http:// or any trailing directories.
hostname = localhost

;ONLY when using a fully qualified hostname specified above, enable CSRF validation for increased security.
;enable_csrf_validation = TRUE

; System Administrators Email address to send critical errors to if necessary. Set to FALSE to disable completely.
;system_admin_email = "NOT CONFIGURED"

;WARNING: DO NOT CHANGE THIS AFTER YOU HAVE INSTALLED TIMETREX.
;If you do it will cause all your passwords to become invalid,
;and you may lose access to some encrypted data.
salt = 0

shaunw
Posts: 7483
Joined: Tue Sep 19, 2006 2:22 pm

Re: PHP CLI requirements failed while executing

Post by shaunw » Thu Aug 17, 2017 1:02 pm

It would appear that your /etc/php.ini file isn't loading the PostgreSQL PHP extension, therefore its not able to connect to your database when using the PHP command line executable. The odd thing is that your web server appears that it can connect to the database, so it might be using a different php.ini file.

Post Reply