Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation failed in PHP-7 #171

Open
libregeek opened this issue Dec 1, 2016 · 16 comments
Open

Installation failed in PHP-7 #171

libregeek opened this issue Dec 1, 2016 · 16 comments
Assignees

Comments

@libregeek
Copy link
Contributor

libregeek commented Dec 1, 2016

Tried to install OpenCATS (master branch) in PHP-7.0.13 (Fedora 25 running MariaDB-10.1.19). Following is the error message:

PHP MySQL extension (mysql) is not loaded.
Check your settings in php.ini.

The above error is due to the following check in lib/InstallationTests.php

if (!self::DEBUG_FAIL && extension_loaded('mysql') && function_exists('mysql_connect'))
        {
            echo '<tr class="pass"><td>PHP MySQL extension (mysql) is loaded.</td></tr>';
            return true;
        }

There is also another check in index.php

if (!function_exists('mysql_connect') || !function_exists('session_start'))
{
    die('CATS Error: All required PHP extensions are not loaded.');
}

mysql_connect is deprecated as of PHP-5.5 and it's removed in PHP-7.
Refer: http://www.php.net/mysql_connect

I think we should use extension_loaded() method instead of function_exists().
http://php.net/manual/en/function.extension-loaded.php

The root cause of this issue can be solved by changing mysql_connect to mysqli_connect.

Do we need to maintain backward compatibility till PHP-4?

@mlespiau
Copy link
Contributor

mlespiau commented Dec 1, 2016 via email

@libregeek
Copy link
Contributor Author

OK. This means it's safe to go for mysqli. Another thought is to use PDO instead of mysqli. This way we could start expanding the application to use other databases (PostgreSQL, Oracle, etc..). It's a long and complex process, but can we start with PDO+MySQL (MariaDB)?

@mlespiau @RussH @skrchnavy @amaisonneuve What are your thoughts?

@RussH
Copy link
Member

RussH commented Dec 1, 2016

I expect mysqli is the quick solution - if we went PDO I assume it's only because there's a higher performance database we'd use instead..?!

@libregeek
Copy link
Contributor Author

I agree that mysqli is the quick solution. I was just trying to see if there are anyone interested in an alternate database.

Can we have a new version compatible with PHP-7, if I quickly fix these issues?

@mlespiau
Copy link
Contributor

mlespiau commented Dec 2, 2016

Hi @libregeek, probably it will be harder than that. You might want to get an idea of the scope by running this tool https://github.com/sstalle/php7cc

One of the reasons y wanted to move to composer and replace abandoned dependencies such as simple test was to be able to move to php7

@libregeek
Copy link
Contributor Author

You are right @mlespiau. The scope of this change is really big. I have attached the results of php7cc here. Making the app to work with PHP7 is defintely going to take time. I will initiate a new branch for this.

Another question is about the backward compatibility. If we are sticking only to mysqli, then it might break existing installations. Having both mysqli and mysql in the lib files will duplicate the code and makes it cumbersome to fix bugs. So I think PDO is a better option.
opencats-php7cc.txt

@libregeek
Copy link
Contributor Author

@mlespiau thanks for pointing me to php7cc. It's an excellent tool

@skrchnavy
Copy link
Contributor

I also support using an ORM, my doubt is if it is possible to extract objects from DB to use existing DB structure and do further migrations using some tools.
Writing manual migrations is time consuming and risky process, fortunately we need to support just one DB type migration.

libregeek added a commit to libregeek/OpenCATS that referenced this issue Dec 7, 2016
…thods.

This is a quick fix to make OpenCATS compatible with PHP7.
@libregeek
Copy link
Contributor Author

I did a quick fix to make OpenCATS running in PHP-7. It was really a nasty attempt. It seems the original authors didn't have any clue on how to share DB object across the application. I saw at least 3 places in which the DB connection is instantiated. I didn't touched other deprecated methods since the basic functionality is working fine. Here is the results of the latest compatibility check using php7cc
opencats-php7cc-161207a.txt

@skrchnavy
Copy link
Contributor

I found repo from @rankinp where are thes commits:
https://github.com/rankinp/OpenCATS/commits/patch-1
https://github.com/rankinp/OpenCATS/commits/patch-2
Could be helpful in this issue.

@cptr13
Copy link
Member

cptr13 commented Dec 26, 2016

Throwing my opinion in on this. I have been putting workarounds in the documentation and install videos. For example, Ubuntu 16.04 defults to php7. The documentation is written to clearly walk people through installing phpp5.6 through an additional repository. Centos7 defaults to php5.5, I did the same thing in that.

This, from my perspective, works fine for a while. At some point we will need to upgrade php compatibility.

One potential issue that comes from doing this (especially in Ubuntu 16.04+) is if someone has a machine with app#1 that requires php7 and app#2 that requires php5.6. I'm under the impression that it's possible, but I haven't managed to do it yet, so I don't know. That could be a big stumbling block for someone in that situation to adopt OpenCATS.

My point is this, if you guys are discussing these changes as a fix...cool. If it's a temporary band-aid to deal with the problem, I think the documentation will have it covered fine for a while...and maybe time/efforts are better spent on other things.

What do y'all think?

@KamalJoshiDelhi
Copy link

One potential issue that comes from doing this (especially in Ubuntu 16.04+) is if someone has a machine with app#1 that requires php7 and app#2 that requires php5.6. I'm under the impression that it's possible, but I haven't managed to do it yet, so I don't know. That could be a big stumbling block for someone in that situation to adopt OpenCATS.

Hi OpenCATS Team, I have been a user of OpenCATS but had to stop using it because of this issue somewhere around mid 2017... Please let me know if there is any progress on this issue and if OpenCATS now works with another APP that uses php7...

@KamalJoshiDelhi
Copy link

Hi Team,
In continuation of my earlier comment yesterday I thought of reporting the progress since yesterday...
I am using 'CATS Version 0.9.3 Inferno. Powered by CATS' and was not able to use my ATS, as due to some other important APP of mine needing me to upgrade my server to php7.0... was desperately looking for a solution to run both OpenCATS and the other APP of mine on same server...

Finally it could be achieved after I implemented all the changes suggested in the commit
libregeek@f9c5174

Fixed #171 Used mysqli procedural methods instead of mysql mehods.
This is a quick fix to make OpenCATS compatible with PHP7.
Showing 16 chaged files with 105 additions and 102 deletions.

The purpose of my writing back to you guys is 2 fold...
One, I thought, this will help your other users who are facing a similar situation to be able to use the suggested quickfix method of using OpenCATS with php7...

Second is the error log file messages after it has started running successfully shows some issues still unattended with fonts and labels... As I am not a technical programer, I could not make out much of this but I guess it is because of this on my index page now I am not able to view the 'Hiring Overview' graph... The error is copied from my error log below and if a solution for this can be suggested to me it would be great...

===============================
[13-Dec-2018 09:23:24 Etc/GMT] PHP Notice: Only variables should be passed by reference in /home/mywebserver/public_html/ats/lib/DataGrid.php on line 1696
[13-Dec-2018 09:23:24 Etc/GMT] PHP Notice: Only variables should be passed by reference in /home/mywebserver/public_html/ats/lib/DataGrid.php on line 1719
[13-Dec-2018 09:23:24 Etc/GMT] PHP Notice: Only variables should be passed by reference in /home/mywebserver/public_html/ats/lib/DataGrid.php on line 1696
[13-Dec-2018 09:23:24 Etc/GMT] PHP Notice: Only variables should be passed by reference in /home/mywebserver/public_html/ats/lib/DataGrid.php on line 1719
[13-Dec-2018 09:23:24 Etc/GMT] PHP Notice: Only variables should be passed by reference in /home/mywebserver/public_html/ats/lib/DataGrid.php on line 1696
[13-Dec-2018 09:23:24 Etc/GMT] PHP Notice: Only variables should be passed by reference in /home/mywebserver/public_html/ats/lib/DataGrid.php on line 1719
[13-Dec-2018 09:23:24 Etc/GMT] PHP Notice: Only variables should be passed by reference in /home/mywebserver/public_html/ats/lib/DataGrid.php on line 1696
[13-Dec-2018 09:23:24 Etc/GMT] PHP Notice: Only variables should be passed by reference in /home/mywebserver/public_html/ats/lib/DataGrid.php on line 1719
[13-Dec-2018 09:23:24 Etc/GMT] PHP Notice: Only variables should be passed by reference in /home/mywebserver/public_html/ats/lib/DataGrid.php on line 1696
[13-Dec-2018 09:23:24 Etc/GMT] PHP Notice: Only variables should be passed by reference in /home/mywebserver/public_html/ats/lib/DataGrid.php on line 1719
[13-Dec-2018 09:23:24 Etc/GMT] PHP Notice: Only variables should be passed by reference in /home/mywebserver/public_html/ats/lib/DataGrid.php on line 1696
[13-Dec-2018 09:23:24 Etc/GMT] PHP Notice: Only variables should be passed by reference in /home/mywebserver/public_html/ats/lib/DataGrid.php on line 1719
[13-Dec-2018 09:23:24 Etc/GMT] PHP Notice: A non well formed numeric value encountered in /home/mywebserver/public_html/ats/lib/artichow/inc/Label.class.php on line 238
[13-Dec-2018 09:23:24 Etc/GMT] PHP Notice: A non well formed numeric value encountered in /home/mywebserver/public_html/ats/lib/artichow/inc/Axis.class.php on line 335
[13-Dec-2018 09:23:24 Etc/GMT] PHP Notice: A non well formed numeric value encountered in /home/mywebserver/public_html/ats/lib/artichow/inc/Axis.class.php on line 320
[13-Dec-2018 09:23:24 Etc/GMT] PHP Fatal error: Uncaught Error: Call to undefined function split() in /home/mywebserver/public_html/ats/lib/artichow/inc/Font.class.php:252
Stack trace:
#0 /home/mywebserver/public_html/ats/lib/artichow/inc/Label.class.php(522): awTTFFont->getTextWidth(Object(awText))
#1 /home/mywebserver/public_html/ats/lib/artichow/inc/Axis.class.php(719): awLabel->draw(Object(awDrawer), Object(awPoint), 0)
#2 /home/mywebserver/public_html/ats/lib/artichow/inc/Axis.class.php(590): awAxis->drawLabels(Object(awDrawer))
#3 /home/mywebserver/public_html/ats/lib/artichow/Plot.class.php(522): awAxis->draw(Object(awDrawer))
#4 /home/mywebserver/public_html/ats/lib/artichow/Image.class.php(308): awPlot->drawEnvelope(Object(awDrawer), 25, 10, 388, 206)
#5 /home/mywebserver/public_html/ats/lib/artichow/Graph.class.php(256): awImage->drawComponent(Object(BarPlotDashboard))
#6 /home/mywebserver/public_html/ats/lib/GraphGenerator.php(355): awGraph->draw()
#7 /home/mywebserver/public_html/ats/modules/graphs/GraphsUI.php(460): pipelineStatisticsGraph->draw()
#8 /home/mywebserver/publ in /home/mywebserver/public_html/ats/lib/artichow/inc/Font.class.php on line 252

The code is presented here as it appears in error log file...
Kamal Joshi
New Delhi India

@KamalJoshiDelhi
Copy link

KamalJoshiDelhi commented Dec 13, 2018

Could get the graphs back on my dashboard by solving:
PHP Fatal error: Uncaught Error: Call to undefined function split() in /home/mywebserver/public_html/ats/lib/artichow/inc/Font.class.php:252

Used explode instead of split in line 252 and line 195 of lib/artichow/inc/Font.class.php

Rest of the error messages stay as it is...

@RussH
Copy link
Member

RussH commented Dec 14, 2018

Hi @KamalJoshiDelhi thanks for the feedback. @libregeek submitted what a proof of concept PHP v7 compatibility. A more fully developed commit for PHPv7 built on his work and was submitted by @gohanman in #362 It'll be tested and added into the next release.

@jsaqqa
Copy link

jsaqqa commented Jul 11, 2019

Hello guys, any idea when I can test a version of OpenCATS over php 7.x?

RussH added a commit that referenced this issue Sep 29, 2019
…op (#420)

* Fixed #171 Used mysqli procedural methods instead of mysql methods.
This is a quick fix to make OpenCATS compatible with PHP7.

* Updated mysql extension in docker config

* Fix insecure SMTP (#357)

A past phpmailer update changed to assume to use TLS even if its not enabled. This breaks insecure SMTP connections.

* Fix deprecated PHP4-style constructors (#358)

In some cases the file name implies it's for use with
PHP4 which probably doesn't work anymore. I changed
those too so there isn't noise in php7cc output

* Gate set_magic_quotes_runtime calls

Function was removed in PHP 7. Versions of PHP where
this functionality exists are theoretically not supported
and these calls could be removed entirely instead of
placed behind function_exists() checks

* Validate emails with filter_var() instead of eregi()

The ereg functions were removed in PHP 7. In this
specific use case filter_var() seems like a better
solution than migrating to a preg regex.

* Replace ereg functions with preg functions

erege functions were removed in PHP 7. FPDF has
the same patch upstream; artichow doesn't appear to
have been updated upstream.

* Use explode() instead of split()

split() was removed in PHP 7. Code was simply splitting
on different single character delimiters so using
explode() instead works fine.

* Don't combine `&` and `new` operators

This is a syntax error in PHP 7. It's been deprecated
for a long time so this change probably has no impact
on behavior

* Updated issue template to be more specific

* Update issue_template.md

* config file for the ProBot no-response bot

add the tag more-information-required to issues, if no response then will auto-close in 14 days.

* Update no-response.yml

* Updated test data for MySQL;
- strict mode compliant (now the default), and;
- added in candidate_tag tables to MySQL table structure

Installer does not error now when you select the demonstration data.

* Revert "Updated test data for MySQL;"

This reverts commit 2ce655a.

* Update modules/settings/SettingsUI.php

Co-Authored-By: gohanman <andy@gohanman.com>

* $co$conn is presumably a typo

* Correct mysqli_select_db argument order

* Missing paren in mysqli refactor

* Use MYSQLI_ASSOC consistently

* Update travis.yml for php 7.3 checks exclusively

* revised composer.json to require php v7

* Fix the PHP7 build in travis (#419)

* Rename composer.lock to ~composer.lock

* revert custom php image to generic

* Update .travis.yml

* Update .travis.yml

* revert custom php image

* Update docker-compose-test.yml

* Update docker-compose.yml

* Update docker-compose.yml

* Update docker-compose.yml

* Update docker-compose-test.yml

* Update docker-compose-test.yml

* Update docker-compose.yml

* Update docker-compose.yml

* Update docker-compose-test.yml

* Update docker-compose.yml

* Update docker-compose-test.yml

* Rename ~composer.lock to composer.lock

* Update .travis.yml

* Update .travis.yml

* pointed to russh dockerhub image for php 7.2

* update travis to use php 7.2

* Rename composer.lock to composer.lock_OFF

* tracking composer.lock for php 7.2

* updated target for php to be 7.2-fpm-alpine

* fixed typos

* remove redundant filew

* test fix for travis build errors

* simple rename php5 -> php7 in user instructions

* quick update to address XXE vulnerability

* New set of fixes for PHP 7.2 (#429)

* Updated PHPMailer to support PHP 7.2
    - PHPMailer 5.2 is no longer supported.
    - Legacy PHPMailer, which was under /lib didn't support PHP 7 best practices.
    - Removed /lib/PHPMailer directory.
    - Updated /lib/Mailer.php to support the new PHPMailer v6.
    - Updated code to support PHPMailer v6.
    - Tested the work locally and works fine.

* Resolved mysqli_error() handling by leveraging provided and tested PHP library function utilities.
- Where mysqli_connect was verified, I simplified and replaced error handling with with mysqli_connect_errno() and mysqli_connect_error().
- Where query request was verified, I simplified and replaced error handling with queryResult->connect_errno() and queryResult->connect_error().

* Added .DS_Store file in .gitignore
- Specified common Mac OS specific .DS_Store file to be ignored by git.

* Added codacy/coverage vendor library to the project's Composer dev dependencies list.

* Resolved issue with non-static method calls, as such:
- Corrected DatabaseSearch's fulltextDecode() and fulltextEncord() methods' signatures to be static.
- Corrected Contacts' getDepartmentIDByName() method call. Since, it was used differently multiple places.

* Resolved issue related to innaccessible property, as such:
- Reinforced query result object property existance check with isset().

* Resolved issue around referencing a non-existing scope property, as such:
- Replaced $sql with $this to correctly access class properties.

* Artichow - Resolved graph generation issue with PHP 7.2
- Label.class.php was complaining about count() param (texts) not being an array. Variable value needed to be verified prior the call to count().
- Label.class.php and Axis.class.php were complaining about function name was malformed for eval() to handle. microtime() needed to be carefully handled.

* Updated .gitignore to dismiss /vendor folder, which get generated by composer.

* Sphinx Search fixes for PHP 7.2
- Resolved deprecated create_function() by replacing with closure/anonymous function in Search.php.
- Resolved count() complaining about $this->_rs not being an array in Search.php on line 2091.
- Resolved by creating sphinx.conf to support newer Sphinx 2.2.4+ features.
- Resolved by creating the missing required folders for Sphinx use.
RussH added a commit that referenced this issue Oct 15, 2020
Merging the feature branch (PHP 7.2 compatibility) back to master. 

* toggle quickactionmenu visibility by clicking it

* Candidate duplicates module added and integrated with other modules

* corrected header of file to follow license

* duplicates module integrated into candidates module and added access level checks for duplicate functions

* added duplicates quick action menu

* quickaction for duplicates added

* rename of DuplicateCandidate to CandidateDuplicate

* tag fix

* quickaction fixes

* acl related refactoring ifor duplicates

* fixed typo error

* fixed typo error

* fixed duplicate quick action menu - added permissions and access level

* fixed duplicate quick action menu - added permissions and access level

* removing duplicate info from function parameters

* adjusting candidate datagrid

* removing unnecessary duplicate code

* adding includes

* added duplicate info into candidate show page

* config update

* changed duplicate secure object names

* removed unused template

* db upgrade, not tested

* updated migration from 0.9.4 to 0.9.5

* added duplicate db table to test db

* correction in javascript based on codacy review

* js code fixes based on codacy review

* removed forgotten or badly merged parameter from a function

* duplicate initialization

* fixed (hopefully well) duplicate primary key errors during update by using delete and insert ignore

* add ckeditor to composer

* updated reference to ckeditor in tpl files

* removed embedded ckeditor files

* added legacy_root into includes, defined in config.php

* added legacy root into tests

* missing legacy_root added

* small typo fixes in Legacy root usage

* added duplicate candidate icon to pipeline grids

* fixed duplicate rows after merge of candidate pipeline details and history

* fixed some logical errors and added input trim and whitespace removal to phone numbers

* removed unused function

* removed old todo

* fixed list entry duplicates in duplicate merge and moved it into separate functions

* fixed missing access level

* added URI encoding to AJAX call so "&" can be a part of a list name, not taken as a new URI parameter and thrown away (#251)

* Added a Public/Private column into job order datagrid (#239)

* updated import

* Ckeditor font plugin only where needed (#229)

* font plugin moved to instantiation of ckeditor
* remove duplicated code by extracting a common method

* travis build fix

* added indexes to duplicates table

* Job order import (#230)

* added class JobOrderImport

* added options for job order import

* added job order import into ImportUI

* fix in importUI to use joborder not candidate

* added import_id into job order import so that it can be reverted

* added import_id into job order import also in test.sql database

* added migration script

* Email templates support (#231)

* get, add, delete, update email templates lib changes

* Add/Delete template in template manager

* Add/Delete/Update template in SettingsUI

* new ajax functions to choose an email template and to preview how it'll look like for each candidate

* new ajax calls for emails

* send emails in bulk when not using template, send by one when using it

* getting neccesary info from db

* added js lib

* added fields to email form

* disabled checking of empty email body, ckeditor had problems with it

* preview css changes

* add comment to unused code

* files reformat

* single quotes to double quotes and changed order of functions
(based on codacy review)

* codacy review comments applied and format changes

* further change based on codacy review

* code cleanup

* Update db/cats_testdata.bak (#398)

Updated sample OpenCATS test data for MySQL;
- strict mode compliant (now the default), and;
- added in candidate_tag tables to MySQL table structure

Installer does not error now when you select the demonstration data.

Resolves ancient issue #9

* Revert "Update db/cats_testdata.bak (#398)" (#399)

This reverts commit 7f4b669.

* Update db/cats_testdata.bak (#400)

Updated test data for MySQL;
- strict mode compliant (now the default), and;
- added in candidate_tag tables to MySQL table structure

Installer does not error now when you select the demonstration data.

* Job order statuses configurable (#236)

* changes in variable name

* new class for job order statuses

* new status configuration in config

* replacing hard coded statuses/filters with ones from config/default

* removing mention of free version of opencats and replacing hardcoded statuses with ones from config

* hardcoded statuses to config Open statuses

* removed never used code/constants and replacing one mention with config statuses

* replaced hardcoded statuses with equivalent Open statuses from config

* replacing hardcoded default filter with the first one from config

* creating job order from existing one extended for job orders of all statuses

* changing JobOrderStatuses to static class

* altered default job order status in db to 'New', it should never be used though because in next commit a default new job order status from config or JobOrderStatuses class shall be used

* added default new job order status to code, didn't leave it to database to set its default

* added new job status const to config

* changed config statuses to correspond with the old ones

* database default status revert

* config status variables renaming

* added config info into class

* variable/method renaming

* method rename

* commented examples in config.php

* added include

* 16 chars is not enough for status, e.g. 'Candidate selected' is longer

* Corrected Lead status (not prospective)

* merge error fixed

* Import of files in different encoding (#238)

* added input file encoding to import, so we can convert it to UTF-8 if necessary

* encoding option won't show if the config variable is missing or empty

* fixed method comment

* renamed file to its class name and because there were two Import.php files already

* split modules/import/Import.php file into more files by classes, created an abstract parent class and kept only 'add' functions in child classes

* Whats left of modules/import/Import.php

* moved one function to Companies because it was duplicated in CompaniesImport and ContactsImport classes and shouldnt be in their parent class

* fixed/added includes

* removed encoding from import code to replace it somewhere else

* moved file encoding closer to file upload, commented out config options because they are not all supported

* removed duplicate definitions of import classes

* Pipeline in GUI  changed to Job Order or Candidates based on context where it is displayed. (#243)

tested locally, seems intuitive, can revert if issues.

* Fix state location mapping (#245)

* Fix state location mapping 

Replace administrative_area_level_2 which returns the county with administrative_area_level_1 which returns the state (expected).

* Update ZipLookup.php

Set return address values based on US vs non-US lookup location

* updated travis.yml to add in php 7.3 testing

* updated travis.yml to remove php 7.3 testing

Thought I could run testing for both versions - but i'll have ot have a separate branch; need to specify a different version of phpunit for php7.x

* Spelling Vetran -> Veteran

* Spelling Vetran -> Veteran

* Resolved issue #444 - rss is not valid (#447)

- Further analyzing the project source code for the use of getRSSDate(), it is confirmed that the call should be made statically, as CATSUtility::getAbsoluteURI() is done.
- To resolve the issue we needed to correct the function’s signature declaration in OpenCATS/lib/DateUtility.php, as such:
- Added the “static” property at the beginning of the function signature line 350, as such:
- static public function getRSSDate($unixTime = false)

* Closing out the 'test-php-7' feature branch and merging back to develop (#420)

* Fixed #171 Used mysqli procedural methods instead of mysql methods.
This is a quick fix to make OpenCATS compatible with PHP7.

* Updated mysql extension in docker config

* Fix insecure SMTP (#357)

A past phpmailer update changed to assume to use TLS even if its not enabled. This breaks insecure SMTP connections.

* Fix deprecated PHP4-style constructors (#358)

In some cases the file name implies it's for use with
PHP4 which probably doesn't work anymore. I changed
those too so there isn't noise in php7cc output

* Gate set_magic_quotes_runtime calls

Function was removed in PHP 7. Versions of PHP where
this functionality exists are theoretically not supported
and these calls could be removed entirely instead of
placed behind function_exists() checks

* Validate emails with filter_var() instead of eregi()

The ereg functions were removed in PHP 7. In this
specific use case filter_var() seems like a better
solution than migrating to a preg regex.

* Replace ereg functions with preg functions

erege functions were removed in PHP 7. FPDF has
the same patch upstream; artichow doesn't appear to
have been updated upstream.

* Use explode() instead of split()

split() was removed in PHP 7. Code was simply splitting
on different single character delimiters so using
explode() instead works fine.

* Don't combine `&` and `new` operators

This is a syntax error in PHP 7. It's been deprecated
for a long time so this change probably has no impact
on behavior

* Updated issue template to be more specific

* Update issue_template.md

* config file for the ProBot no-response bot

add the tag more-information-required to issues, if no response then will auto-close in 14 days.

* Update no-response.yml

* Updated test data for MySQL;
- strict mode compliant (now the default), and;
- added in candidate_tag tables to MySQL table structure

Installer does not error now when you select the demonstration data.

* Revert "Updated test data for MySQL;"

This reverts commit 2ce655a.

* Update modules/settings/SettingsUI.php

Co-Authored-By: gohanman <andy@gohanman.com>

* $co$conn is presumably a typo

* Correct mysqli_select_db argument order

* Missing paren in mysqli refactor

* Use MYSQLI_ASSOC consistently

* Update travis.yml for php 7.3 checks exclusively

* revised composer.json to require php v7

* Fix the PHP7 build in travis (#419)

* Rename composer.lock to ~composer.lock

* revert custom php image to generic

* Update .travis.yml

* Update .travis.yml

* revert custom php image

* Update docker-compose-test.yml

* Update docker-compose.yml

* Update docker-compose.yml

* Update docker-compose.yml

* Update docker-compose-test.yml

* Update docker-compose-test.yml

* Update docker-compose.yml

* Update docker-compose.yml

* Update docker-compose-test.yml

* Update docker-compose.yml

* Update docker-compose-test.yml

* Rename ~composer.lock to composer.lock

* Update .travis.yml

* Update .travis.yml

* pointed to russh dockerhub image for php 7.2

* update travis to use php 7.2

* Rename composer.lock to composer.lock_OFF

* tracking composer.lock for php 7.2

* updated target for php to be 7.2-fpm-alpine

* fixed typos

* remove redundant filew

* test fix for travis build errors

* simple rename php5 -> php7 in user instructions

* quick update to address XXE vulnerability

* New set of fixes for PHP 7.2 (#429)

* Updated PHPMailer to support PHP 7.2
    - PHPMailer 5.2 is no longer supported.
    - Legacy PHPMailer, which was under /lib didn't support PHP 7 best practices.
    - Removed /lib/PHPMailer directory.
    - Updated /lib/Mailer.php to support the new PHPMailer v6.
    - Updated code to support PHPMailer v6.
    - Tested the work locally and works fine.

* Resolved mysqli_error() handling by leveraging provided and tested PHP library function utilities.
- Where mysqli_connect was verified, I simplified and replaced error handling with with mysqli_connect_errno() and mysqli_connect_error().
- Where query request was verified, I simplified and replaced error handling with queryResult->connect_errno() and queryResult->connect_error().

* Added .DS_Store file in .gitignore
- Specified common Mac OS specific .DS_Store file to be ignored by git.

* Added codacy/coverage vendor library to the project's Composer dev dependencies list.

* Resolved issue with non-static method calls, as such:
- Corrected DatabaseSearch's fulltextDecode() and fulltextEncord() methods' signatures to be static.
- Corrected Contacts' getDepartmentIDByName() method call. Since, it was used differently multiple places.

* Resolved issue related to innaccessible property, as such:
- Reinforced query result object property existance check with isset().

* Resolved issue around referencing a non-existing scope property, as such:
- Replaced $sql with $this to correctly access class properties.

* Artichow - Resolved graph generation issue with PHP 7.2
- Label.class.php was complaining about count() param (texts) not being an array. Variable value needed to be verified prior the call to count().
- Label.class.php and Axis.class.php were complaining about function name was malformed for eval() to handle. microtime() needed to be carefully handled.

* Updated .gitignore to dismiss /vendor folder, which get generated by composer.

* Sphinx Search fixes for PHP 7.2
- Resolved deprecated create_function() by replacing with closure/anonymous function in Search.php.
- Resolved count() complaining about $this->_rs not being an array in Search.php on line 2091.
- Resolved by creating sphinx.conf to support newer Sphinx 2.2.4+ features.
- Resolved by creating the missing required folders for Sphinx use.

* Fixed #451 there was an issue with the installer, this was an issue with the the mysqli call that now now changed how errors number and error descriptions are captured

* Revert "Fixed #451 there was an issue with the installer, this was an issue with the the mysqli call that now now changed how errors number and error descriptions are captured"

This reverts commit a924d08.

* Fixed #451 there was an issue with the installer, this was an issue with the the mysqli call that now now changed how errors number and error descriptions are captured

* Two (2) Fixes - Resolved issue #444 + A missing class reference (#456)

* Resolved issue #444 - rss is not valid
- Further analyzing the project source code for the use of getRSSDate(), it is confirmed that the call should be made statically, as CATSUtility::getAbsoluteURI() is done.
- To resolve the issue we needed to correct the function’s signature declaration in OpenCATS/lib/DateUtility.php, as such:
- Added the “static” property at the beginning of the function signature line 350, as such:
- static public function getRSSDate($unixTime = false)

* Resolve issue with missing class reference to JobOrderStatuses which is used on line 1028 of Search.php as JobOrderStatuses::getOpenStatusSQL().

* Update ActivityEntries.php (#450)

minor change updates activity list for candidates to show most recent activity first. Previous behaviour shows oldest activity first.

* Update mailer.php to support umlauts (enforce UTF-8) (#449)

Submitted on behalf of @dveos from https://forums.opencats.org/viewtopic.php?f=4&t=1509

* added job reference number to pipeline datagrid on candidate show page (#268)

* Show 'lists' on candidates page (#269)

* added table to candidate show page to display lists where candidate belongs

* sending lists to template

* added lib function to get list names and ids for given candidate id

* fix LDAP module (#366)

* added activity logging after adding new candidate (#270)

* added the option to email a candidate from the candidate show page (it was already implemented through mailto:, but this option is through OpenCATS so the email templates can be used) (#246) (#457)

* Revert "added the option to email a candidate from the candidate show page (it was already implemented through mailto:, but this option is through OpenCATS so the email templates can be used) (#246) (#457)"

This reverts commit 0cd2295.

* PHP7 Test build and tag (#461)

* fix package generation

* updated secure api_key value for travis-ci

* Update .travis.yml

* adding php version currently under active support tot the test matrix (#465)

* adding php version currently under active support

Adding missing closing tag

* bumping docker compose to , fixing php 7.4 decprecation warnings

* Update the encrypted secure api_key for Travis CI to generate releases.

* Develop (#473)

* Resolved issue #444 - rss is not valid
- Further analyzing the project source code for the use of getRSSDate(), it is confirmed that the call should be made statically, as CATSUtility::getAbsoluteURI() is done.
- To resolve the issue we needed to correct the function’s signature declaration in OpenCATS/lib/DateUtility.php, as such:
- Added the “static” property at the beginning of the function signature line 350, as such:
- static public function getRSSDate($unixTime = false)

* Resolve issue with missing class reference to JobOrderStatuses which is used on line 1028 of Search.php as JobOrderStatuses::getOpenStatusSQL().

* Resolved an issue with MySQL fetch command failing due to empty record set. Safeguarding MySQL function call.

* Resolved an issue with SQL logic failing to safe keyword 'system'. Safeguarded by wrapping the keyword 'system' with backtick marks.

* Resolved issue with limited character space for site source URL that may contain long query strings.

* Updated OpenCATS version

* Resolved outdated artichow library related functional issues.

* Changed the organization's UI visible copyright statement to show OpenCAT.

* Travis.yml validation (#492)

* update travis.yml after yml validation - corrected syntax error

* Update Mailer.php - corrected syntax error

Co-authored-by: Kristina Odziomkova <Kristina.Odziomkova@anritsu.com>
Co-authored-by: skrchnavy <svetozar.krchnavy@anritsu.com>
Co-authored-by: SvetoKrchnavy <krchnavy@eea.sk>
Co-authored-by: Sveto Krchnavy <s.krchnavy@gmail.com>
Co-authored-by: Matias Lespiau <lespiau@gmail.com>
Co-authored-by: Sveto Krchnavy <skrchnavy@users.noreply.github.com>
Co-authored-by: smackjack3 <smackjack3@gmail.com>
Co-authored-by: Shant Adam <shant.adam@mxcgi.com>
Co-authored-by: amaisonneuve <amaisonneuve@911secure.com>
Co-authored-by: Alain Maisonneuve <amaisonneuve@gmail.com>
Co-authored-by: wumb0 <wumb0@finishyour.beer>
Co-authored-by: Bram Vogelaar <bram@attachmentgenie.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants