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

PHP8 Rewrite #31

Open
Dygear opened this issue May 9, 2022 · 7 comments
Open

PHP8 Rewrite #31

Dygear opened this issue May 9, 2022 · 7 comments

Comments

@Dygear
Copy link

Dygear commented May 9, 2022

I've made a version of phpLiteAdmin basing it off a PHPLiteAdmin that I made 12 years ago. Key features include:

  • It's a complete rewrite of the software for use with PHP 8.0.
  • It uses only 1 file, just like SQLite databases themselves.
  • The file itself is self mutable to update databases and users it tracks from within the web interface.

Please have a look and let me know what you think.

@Hope-IT-Works
Copy link

Hey,

thanks for working on this!

Took me 30 minutes to realize that my PHP version was too high 😄

Is it a whole different architecture or do you try to build it like it was before?

@crazy4chrissi
Copy link
Contributor

Took me 30 minutes to realize that my PHP version was too high smile

The normal development version of phpLiteAdmin works with PHP 8.

https://www.phpliteadmin.org/phpliteadmin-dev.zip

@Dygear
Copy link
Author

Dygear commented Jun 5, 2022

Hey,

thanks for working on this!

Took me 30 minutes to realize that my PHP version was too high 😄

Is it a whole different architecture or do you try to build it like it was before?

Same concept yes. But all code is new. More than happy to release and sign what ever is needed to to the phpLiteAdmin dev team to get this merged.

@quantuumsnot
Copy link

Fast report ...
This rewrite seems to work faster but there's a problem - created a new user, logged in with its credentials, added already existing database and the script appended it into

$Users = [
];

instead in

$Database = [
];

OK, fixed that adding it manually but checking the data in one of tables the UI doesn't show next page of rows

@Dygear
Copy link
Author

Dygear commented Mar 12, 2023

Yeah, that's something I still haven't delt with (pages) but I'll get around to it. Didn't notice the problem with $database / $users. Wonder how I messed that up. (Probably just copied the code from one place to another.)

@quantuumsnot
Copy link

quantuumsnot commented Mar 15, 2023

Sometimes people do harm with admin panels like this one, so can you add the following code for query logging in 2.0?

The function that logs the query

function logQuery($queryforsave) {
  $fileName = "logs/" . date('d M Y') . ".txt";
  file_put_contents($fileName, $queryforsave, FILE_APPEND);
}

Example of what is passed to logQuery() function (from my small sales and inventory control system)

$queryforsave = "Product was sold in {$soldIn} >> UPDATE products SET quantity=quantity-{$_POST['sellquantity']} WHERE number={$sellNumber}" . PHP_EOL;
 logQuery($queryforsave);

Just add the user doing this query, or change whatever you'll find is ok

@Dygear
Copy link
Author

Dygear commented Mar 30, 2023

Hard to make that a generalized thing. I don't know that everyone would want logging, but I could understand why some would. Perhaps I need an $options array that enables disables logging for those that want it.

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

4 participants