setbased / php-audit Goto Github PK
View Code? Open in Web Editor NEWA tool for creating audit tables and triggers for logging data changes in a MySQL database.
Home Page: https://php-audit.readthedocs.io
License: MIT License
A tool for creating audit tables and triggers for logging data changes in a MySQL database.
Home Page: https://php-audit.readthedocs.io
License: MIT License
Any manual or docs on usage, e.g. what the config file is expected to include?
Could you write some documentation/example ?
Thanks !
Hi,
On Ubuntu 22.04, PHP 8.1, running the audit script produces a fatal error. If someone can suggest a fix, I would be grateful.
PHP Fatal error: During inheritance of ArrayAccess: Uncaught SetBased\Exception\ErrorException: Return type of Noodlehaus\AbstractConfig::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/cp/vendor/hassankhan/config/src/AbstractConfig.php:184
Stack trace:
#0 /var/www/cp/vendor/hassankhan/config/src/AbstractConfig.php(17): SetBased\ErrorHandler\ErrorHandler->handleError()
#1 /var/www/cp/vendor/composer/ClassLoader.php(571): include('...')
#2 /var/www/cp/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#3 /var/www/cp/vendor/hassankhan/config/src/Config.php(22): Composer\Autoload\ClassLoader->loadClass()
#4 /var/www/cp/vendor/composer/ClassLoader.php(571): include('...')
#5 /var/www/cp/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#6 /var/www/cp/vendor/setbased/php-audit/src/Command/BaseCommand.php(61): Composer\Autoload\ClassLoader->loadClass()
#7 /var/www/cp/vendor/setbased/php-audit/src/Command/AuditCommand.php(42): SetBased\Audit\Command\BaseCommand->readConfigFile()
#8 /var/www/cp/vendor/symfony/console/Command/Command.php(298): SetBased\Audit\Command\AuditCommand->execute()
#9 /var/www/cp/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()
#10 /var/www/cp/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#11 /var/www/cp/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#12 /var/www/cp/vendor/setbased/php-audit/bin/audit(28): Symfony\Component\Console\Application->run()
#13 /var/www/cp/vendor/bin/audit(117): include('...')
#14 {main} in /var/www/cp/vendor/hassankhan/config/src/AbstractConfig.php on line 17
Hello Dima,
Fix these issues below. Do this together with task https://youtrack.setbased.nl/issue/AUD-30.
I have set the variable '@abc_g_usr_id' at the time of user logon in my php application. I tried the static variable in audit.json file in additional sql column like the below
"set @'abc_g_usr_id' = 4;"
and it has been reflected in db table properly. Now, I got stuck in setting up the variable in login page. Can you help me out how can we use the variable for auditing End user and Session. I read the document but unable to find the solution.
Hi!
When trying to use composer, I cannot seem to fulfil the required dependencies:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- setbased/php-audit 1.9.0 requires symfony/console ^6.2.5 -> satisfiable by symfony/console[v6.2.5, ..., v6.3.4].
- setbased/php-audit[1.8.0, ..., 1.8.2] require symfony/console ^5.4.16 || ^6.2.2 -> satisfiable by symfony/console[v5.4.16, ..., v5.4.28, v6.2.2, ..., v6.3.4].
- setbased/php-audit[1.7.0, ..., 1.7.1] require symfony/console ^5.3.7 -> satisfiable by symfony/console[v5.3.7, ..., v5.4.28].
- setbased/php-audit[1.6.0, ..., 1.6.1] require symfony/console ^5.0 -> satisfiable by symfony/console[v5.0.0, ..., v5.4.28].
- setbased/php-audit[1.5.0, ..., 1.5.2] require setbased/php-stratum-mysql ^5.0 -> satisfiable by setbased/php-stratum-mysql[5.0.0, ..., 5.1.1].
- setbased/php-audit 1.4.0 requires setbased/php-stratum-mysql ^4.0 -> satisfiable by setbased/php-stratum-mysql[4.0.0, ..., 4.4.1].
- setbased/php-audit[1.0.0, ..., 1.3.0] require setbased/php-stratum-mysql ^4.0.0 -> satisfiable by setbased/php-stratum-mysql[4.0.0, ..., 4.4.1].
- symfony/console[v6.2.2, ..., v6.3.4] conflict with symfony/process <5.4.
- symfony/console[v5.0.9, ..., v5.4.28] conflict with symfony/process <4.4.
- setbased/php-stratum-mysql[4.4.0, ..., 4.4.1, 5.0.0, ..., 5.1.1] require zendframework/zend-code ^3.0 -> satisfiable by zendframework/zend-code[3.0.0, ..., 3.4.1].
- setbased/php-stratum-mysql[4.0.0, ..., 4.3.0] require zendframework/zend-code ^3.0.0 -> satisfiable by zendframework/zend-code[3.0.0, ..., 3.4.1].
- robbiep/zbar-qrdecoder 2.0.2 requires symfony/process ^3.0 -> satisfiable by symfony/process[v3.4.47].
- setbased/php-audit[0.9.6, ..., 0.9.8] require setbased/php-stratum ^0.9.64 -> found setbased/php-stratum[dev-master, 4.0.0, 4.0.1, 5.0.0, ..., 5.4.0, 6.0.0, ..., 6.3.1] but it does not match the constraint.
- setbased/php-audit 0.9.9 requires setbased/php-affirm ^0.2.0 -> could not be found in any version, there may be a typo in the package name.
- zendframework/zend-code[3.0.0, ..., 3.0.1] require php ^5.5 || ^7.0 -> your php version (8.1.2) does not satisfy that requirement.
- zendframework/zend-code[3.0.2, ..., 3.0.5] require php ^5.5 || 7.0.0 - 7.0.4 || ^7.0.6 -> your php version (8.1.2) does not satisfy that requirement.
- zendframework/zend-code 3.1.0 requires php ^5.6 || 7.0.0 - 7.0.4 || ^7.0.6 -> your php version (8.1.2) does not satisfy that requirement.
- zendframework/zend-code[3.2.0, ..., 3.4.1] require php ^7.1 -> your php version (8.1.2) does not satisfy that requirement.
- symfony/console[v5.0.0, ..., v5.0.8] require php ^7.2.5 -> your php version (8.1.2) does not satisfy that requirement.
- robbiep/zbar-qrdecoder is locked to version 2.0.2 and an update of this package was not requested.
- Root composer.json requires setbased/php-audit * -> satisfiable by setbased/php-audit[0.9.6, 0.9.7, 0.9.8, 0.9.9, 1.0.0, ..., 1.9.0].
Config files in JSON format will probably be pushed to a repository, but database credentials should of course not. Therefore, there should be a separate config file for the database user and password, etc, that can be added to .gitignore.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.