Subdirectories = true gives me a http 500

Issue #372 resolved
laurent dhont created an issue

When I set subdirectories to true, I get a blank screen with a status code of 500. I enabled php error logging and this is what I see :

"PHP Fatal error: Uncaught Error: [] operator not supported for strings in /var/www/php/phpliteadmin.php:611\nStack trace:n#0 /var/www/php/phpliteadmin.php(758): dir_tree ('/opt/nodejs/job...')\n#1 {main}\n thrown in /var/www/php/phpliteadmin.php on line 611"

Directory of my sqlite files : /opt/nodejs/jobs Subdirectories /opt/nodejs/jobs/x, /opt/nodejs/jobs/y

My apache file :

<VirtualHost *:80> Servername phpliteadmin.x.y DocumentRoot /var/www/php </VirtualHost>

I think it has something to do with my apache configuration, I am really stuck. Please help me. Thanks in advance!

Comments (5)

  1. laurent dhont reporter

    Dear Sir,

    Thank you. I have already fixed it. The problem was when using php 7.2 / 7.3. I just downgraded to 7. And no problem, this project is great!


  2. Arizona 360VR

    //function to scan entire directory tree and subdirectories

    I think in line 592 path has to be declared as array

    $path = [];

    instead of

    $path = ‘’;

    This way subdirectories will work in php7.2 and up

  3. phpLiteAdmin repo owner

    Yes. This is basically what commit 9233989 changed. Just that we also still support ancient PHP 5 versions that don't support []syntax, so we use array()instead.

    This is fixed in the development version. I really need to release a new stable version so people don’t stumble across this over and over again 😞

  4. Log in to comment