Open Mte90 opened 2 years ago
A rewrite should not be needed. The {base} is not correctly detected.
@Mte90 Can you tell me the webserver you are using? Is it Apache, PHP internal server or Nginx?
For PHP's internal server I added a file start.sh
containing a command to start the application:
php -S localhost:8000 admin.php
I hope this helps.
On apache :-)
I saw that bash script few minutes ago :-)
Thank you. I'll test the {base} detection on Apache and get back to you
It is fixed in v2.0.2. Does it work for you?
[Fri Oct 07 14:39:05.575271 2022] [proxy_fcgi:error] [pid 81210] [client 127.0.0.1:53206] AH01071: Got error 'PHP message: PHP Warning: Undefined array key "tables" in /home/www/php-crud-admin/admin.php on line 13121PHP message: PHP Fatal error: Uncaught TypeError: Tqdev\\PhpCrudAdmin\\Column\\DefinitionService::makeNamed(): Argument #1 ($array) must be of type array, null given, called in /home/www/php-crud-admin/admin.php on line 13121 and defined in /home/www/php-crud-admin/admin.php:13128\nStack trace:\n#0 /home/www/php-crud-admin/admin.php(13121): Tqdev\\PhpCrudAdmin\\Column\\DefinitionService->makeNamed()\n#1 /home/www/php-crud-admin/admin.php(13087): Tqdev\\PhpCrudAdmin\\Column\\DefinitionService->optimizeDatabase()\n#2 /home/www/php-crud-admin/admin.php(14036): Tqdev\\PhpCrudAdmin\\Column\\DefinitionService->__construct()\n#3 /home/www/php-crud-admin/admin.php(14212): Tqdev\\PhpCrudAdmin\\Admin->__construct()\n#4 {main}\n thrown in /home/www/php-crud-admin/admin.php on line 13128'
I get this.
Looking at what is printed the urls in the admin ui:
https://github.com/mevdschee/php-crud-admin/blob/60b6d05b914407098de25d77474151aa1db061b1/templates/column/list.html#L2
But the readme doesn't mention that is required a URL rewriting for the file and that will ignore the folder where the project is.
Example:
http://localhost/php-crud-admin/admin.php/table/list
Generate:
But
http://localhost/php-crud-admin/admin.php/
I get the list of tables but the links arehttp://localhost/admin/column/mytable/list
.