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

[Bug] Creating a basic table gives an error #75

Closed
frank-rachel opened this issue Dec 12, 2024 · 3 comments
Closed

[Bug] Creating a basic table gives an error #75

frank-rachel opened this issue Dec 12, 2024 · 3 comments

Comments

@frank-rachel
Copy link

Bug report

What I did

Created model using Add Model, just id field and one extra field

What I expected to happen

Table, model and crud to be created

What happened

Call to undefined function Backpack\DevTools\Generators\exec()
Model is created, table is not

What I've already tried to fix it

Mailed Backpack, was sent here

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

PHP VERSION:

8.3.14

PHP EXTENSIONS:

Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, json, iconv, SPL, pcntl, random, readline, Reflection, session, standard, mbstring, shmop, SimpleXML, tokenizer, xml, bcmath, dom, fileinfo, gd, imagick, intl, exif, mysqlnd, mysqli, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, soap, sockets, sodium, xmlreader, xmlwriter, xsl, zip

LARAVEL VERSION:

11.35.1.0

BACKPACK PACKAGE VERSIONS:

backpack/basset: 1.3.6
backpack/crud: 6.7.43
backpack/devtools: 3.1.7
backpack/generators: v4.0.7
backpack/theme-tabler: 1.2.15

Operating System and Server Setup

I encountered the problem above on my Linux machine, and my web server is set up using PostgreSQL db.

Copy link

Based on the information provided in your bug report, it appears you're encountering an error when trying to create a basic table using Backpack's DevTools. The specific error you're seeing is "Call to undefined function Backpack\DevTools\Generators\exec()". This suggests there might be an issue with the DevTools package or its dependencies.

Unfortunately, the knowledge sources provided don't contain specific information about this particular error. However, I can offer some general advice based on the information available:

  1. First, ensure that you have the latest versions of Backpack and its packages installed. You're using Backpack CRUD 6.7.43 and DevTools 3.1.7, which are recent versions, but it's always good to check if there are any updates available Backpack Versions.

  2. The error suggests that the exec() function is not available or recognized. This could be due to PHP's exec() function being disabled on your system for security reasons. You might want to check your PHP configuration to see if this function is enabled.

  3. If the problem persists, you might want to try clearing your Laravel cache and config:

    php artisan config:clear
    php artisan cache:clear
    
  4. If none of the above helps, it would be best to report this issue directly to the Backpack DevTools repository, as it seems to be a specific problem with that package.

  5. As a workaround, you could try creating the table manually using Laravel migrations instead of relying on the DevTools for this particular task.

If the problem continues, I recommend reaching out to the Backpack community or support channels with the specific error message and steps to reproduce the issue. They would be better equipped to assist with this particular error that isn't covered in the provided knowledge sources.

ℹ️ Please note our AI Bot does not reply to follow-ups, this will be the only AI answer in this thread. If the AI helped you find the answer, please mark it as answered or write details below so it can learn. Then close the conversation. If not, please give more information for when a human reads this. ℹ️

Relevant sources:

Github Issue (closed): Couldn’t work out with the DevTool
Github Issue (closed): Error Undefined array key 1 with model created by devtools
Github Issue (closed): [Bug] [Feature] Improve error message when table has not been migrated
Bug report
Github Issue (closed): [Bug] Typed property Backpack\CRUD\app\Library\Database\Table::$columns must not be accessed before initialization
Github Issue (closed): Undefined index: columns (View: .... vendor/backpack/crud/src/resources/views/crud/fields/table.blade.php)
Github Issue (closed): Command "backpack:button" is not defined.
Github Issue (closed): [Bug]
Github Issue (closed): [Bug] Uncaught TypeError: crud is undefined
Devtools error creating CRUD
Github Issue (closed): Deploy Backpack for Laravel in production
Github Issue (closed): [Bug] List Operation does not get populated with information (no rows in table)
Github Issue (closed): [Bug] Upgrade BackPack v5 to v6
Github Issue (closed): [Bug] Fresh install on Ubuntu 22.04 LTS makes 500 Error

@jcastroa87
Copy link
Member

Hello @frank-rachel

First try to check if exec work on your PHP, create a file with this

<?php
var_dump(function_exists('exec'));
?>

If is disabled, can you check in your php.ini if there is a line like this

disable_functions = exec,passthru,shell_exec,system

And delete exec from disable functions.

Let me know if that works for you.

Cheers.

@jcastroa87
Copy link
Member

Due to not activity, I will close this issue, but please feel free to re-open or create a new one if needed.

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants