Help Center

Read this first

Asking for help

Before contacting us for support, please read the following carefully:

  • The answer to your problem may be found here, or in the tutorials, or in the documentation.
    Please take the time to look for it before contacting us.
  • To help you we need to understand and be able to reproduce your problem.
    PHP CRUD Generator doesn't have any known bugs so far, and the problems encountered are mostly due to the configuration of your server, the structure of your database, or other parameters related to your project.

    This is why it is essential to provide us with all the information we may need:

    • FTP access
    • URL of the CRUD Generator
    • Admin URL
    • Login and passwords
    • Access to server administration if needed (cPanel)

    So please contact us and send us the necessary information, we will do our best to help you quickly and efficiently.

    If you refuse for any reason to give us the necessary information, we may not be able to help you effectively. In this case, no refund request will be accepted, except in special cases.

PHP errors and server configuration problems

Any PHP program can generate errors that depend on your server: PHP version, activated extensions, definition of global variables, ...

Here are a few recommendations that will help you in many cases:

  1. Turn on PHP error display

    • Find and edit your php.ini file
    • Find the display_errors directive and enable it
    • Refresh your page to see the error message, that will help to understand where the error come from.
  2. Blank page / Paths & URLs issues

    First turn display_errors On (see #1 above)

    PHPCG uses some constants to detect the paths & urls leading to PHPCG folders.
    A test file is available to view & debug your server values:

    1. Open install/server-test.php in your code editor
    2. L.15: Replace 'AUTHORIZE', false with 'AUTHORIZE', true to disable the protection
    3. Open the file in your browser from your PHP server

    You'll see the main constants, the expected values descriptions and the real values from your server.

    The solution will be to review your server settings, or contact us if you need more help.

  3. Test & Enable the PHP cUrl extension if needed

    PHPCG requires cUrl extension to be enabled.

    Open install/curl-test.php in your browser.
    If you don't see the success message you have a problem with the cUrl extension.
    The message displayed will tell you what's wrong and how to solve it.

    The solution can be to enable your cUrl extension from php.ini, or setup your firewall, or a message returned by cUrl.

  4. Database connection

    Here's how to test your database connection settings:

    1. Open install/db-connection-test.php in your code editor
    2. Replace 'host', 'user', 'pass', 'dbname', 'dbtable' with your connection settings
    3. Open the file in your browser from your PHP server

    You'll see the query sent to your database.
    If the connection is successful, you'll see a list with your table columns.
    Else, your connection settings are probably wrong, try to change them.

    Also check your firewall, which may be blocking access.

Installation errors

Cannot connect to licensing server

  • You probably entered a wrong purchase code.

    Double-check that you didn't paste the purchase code with a trailing space.

  • The licensing system has to validate your installation URL, which must be a valid URL.

    The validation functions is the following one:

    if (!filter_var($root_url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED)) {
        // $root_url is not a valid URL, registration will fail
    }

    To solve this you've got to install on a valid url.

  • You may have a problem with PHP cUrl. See "Connection to remote server can't be established"

Connection to remote server can't be established

The licensing system tries to send a cUrl request, and the request fails on your server.

  1. Open /install/curl-test.php in your browser.
    The script will try to connect to the licensing system, it should fail because cUrl previously failed with the installer, but it'll give you an explicit error message.
  2. Copy / Paste the error message in a Google search, you'll find many people who had the same problem before you and will explain how to fix it.

These issues are related to your server configuration (often firewall restrictions, or port 443 is closed, ...).
There's nothing specific and nothing wrong with PHPCG. Your server must be correctly configured to send cUrl requests.

If you are on shared hosting you must contact your host and ask them to unblock the cUrl requests



Script is already installed (or database not empty)

You're trying to install but the license table (typically user_data) already exists.

  1. open /generator/generator.php in your browser
  2. in the "Table" section, Choose a table & submit.

    1. if it shows the Build Read List & there's no error message, PHPCG is already installed properly, you can go on.
    2. else if you see the error "License is not installed yet or corrupted.", reinstall PHPCG.

An unknown error occurred (probably database failure ...)

You're trying to install on a domain which is already registered in the licensing system.

  1. open /generator/generator.php in your browser
  2. in the "Table" section, Choose a table & submit.

    1. if it shows the Build Read List & there's no error message, PHPCG is already installed properly, you can go on.
    2. else if you see the error "License is not installed yet or corrupted.", reinstall PHPCG.

The maximum number of allowed PHP CRUD Generator installations reached.

Unfortunately, installation failed because of this reason: The maximum number of allowed PHP CRUD Generator installations ([x] installation(s) total) reached.

Each Regular License allows 2 installations - 1 for your development server (localhost), the other on production server.

You can reinstall anywhere & at any time, but you can't have more than 2 simultaneous installations activated.

You have to uninstall PHPCG before reinstalling elsewhere.


Error - Not Acceptable!

Not Acceptable! You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version [...]

This error is generated by Apache mod_security

It means that your server Firewall (mod_security) is configured to block some requests for security reasons.

You have to allow the request manually, and the correct way to do this depends on your server itself.

A Google search may help.

If not, contact your server provider and ask for help. Give him the datetime you encountered the error and the url, it'll help him to help you.


The FollowSymLinks option is not allowed in your Apache server configuration.

This directive is used in /admin/.htaccess

To solve this issue:

  1. Open /admin/.htaccess in your code editor
  2. Replace Options +FollowSymLinks -MultiViews with # Options +FollowSymLinks -MultiViews

Admin panel errors

Error 404 (Page Not Found)

There may be different causes:

  1. Cause
    You're trying to open a READ list or a FORM that you didn't create yet.
    Solution
    open /generator/generator.php in your browser and generate the admin files.
  2. Cause
    Installation in a subfolder
    Solution
    1. open /admin/.htaccess in your code editor
    2. add your subfolder to the RewriteRule.
      For instance: RewriteRule . /your-folder/admin/index.php [QSA,L]
  3. Apache server - Cause
    Your server is misconfigured & URL rewriting is not allowed.
    Solution
    1. open your Apache configuration file (httpd.conf)
    2. find your project directory directives (<Directory "/var/www/html/phpcrud"></Directory>)
    3. change the AllowOverride directive to All (AllowOverride controls what directives may be placed in .htaccess files)
    4. restart Apache
  4. NGINX or Microsoft IIS server - Cause
    Your server doesn't use the .htaccess, so htaccess URL rewriting has no effect
    Solution
    Add the rewriting rules in your configuration file

Table not installed with the authentication module

The xxx table is used in the admin panel but was not installed with the authentication module.
The authentication module must be reinstalled to add the xxx table in profile rights management.

This happens when you installed the authentication module (therefore you have selected the MySQL tables that will be used in the admin),
then you've added another table to your MySQL database / admin panel.

It is obviously more appropriate (and more logical) to install the auth module only after your tables have all been created in your MySQL database.


However, if you need to add one or more tables to the authtentication module, everything is explained here:

How to update / reinstall the User Authentification Module

Error while recording when posting a form

You've got to show the SQL query on screen to understand why it failed.

Please report to this tutorial page for solution & detailed explanations.

Database connection errors

Warning: mysqli_connect(): (HY000/2002)

Warning: mysqli_connect(): (HY000/2002): Can’t connect to MySQL server [...]

The MySQL error #2002 happens when the program fails to connect to your MySQL database.

Most of the time, the connection failure is due to incorrect credentials.

It is also possible that the MySQL user does not have sufficient rights to access the database.

To help you set up and test your MySQL connection, a test file is available.

  1. Open install/db-connection-test.php in your code editor
  2. Replace 'host', 'user', 'pass', 'dbname', 'dbtable' with your connection settings and a table name from your database.
  3. Open the file in your browser from your PHP server

You'll see the query sent to your database.
If the connection is successful, you'll see a list with your table columns.
Else, your connection settings are probably wrong, try to change them.

Also check your firewall, which may be blocking access.


Production server is detected instead of localhost

PHPCG detects the environment (local / production server) and uses the database connection settings accordingly.

If your server is misconfigured it might return some wrong $_SERVER values, then PHPCG will act as if your environment was a production server instead of a localhost server.

The environment detection is done in conf/conf.php:

if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1' || $_SERVER['REMOTE_ADDR'] == '::1') {
    // localhost server detected, this should work if your server is properly configured.
}
                        

If your localhost is not properly detected, make a test to see what your server returns for $_SERVER['REMOTE_ADDR'], then add the value you found in the condition block in conf/conf.php:

if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1' || $_SERVER['REMOTE_ADDR'] == '::1' || $_SERVER['REMOTE_ADDR'] == 'my-server-dummy-value') {
    // localhost server detected, this should work if your server is properly configured.
}
                        

PHP Notice: ... | PHP Warning: ...

When you make some changes in your database structure, for instance add / rename or delete some tables or fields, you'll see some PHP NOTICE or WARNING messages.

That's ugly and a bit frightening, but fortunately you can ignore all of them, and nothing is broken in the system.

It just means that the generator data must be refreshed.

This tutorial explains in detail how to register changes in your database structure.

Call to undefined function generator\is_countable()

The PHP function is_countable() is available since PHP version 7.3.

If you encounter this error it means that your PHP version older than version 7.3

Updating to a PHP version above 7.3 will solve the problem.

Update errors

Update failed

  1. The automatic updater has to write in some of the PHPCG folders/subfolders:

    admin, class, conf, documentation, generator, install, vendor

    Try to increase your CHMOD (0755 should be ok)

  2. Open generator/update/update.log log file to see details about the failure.

Other errors

The user configuration file doesn't exist at [root]conf/user-conf.json

PHPCG detects the path to the root directory of the server and stores it in a constant named ROOT.

This operation is performed in conf/conf.php

There seems to be a problem with the values detected on your server. To solve this:

  1. Check the path to conf/conf.php ; if it contains uppercase characters replace them with lowercase letters.
  2. If you still need help contact us and send us your FTP access and your url.

Fatal error: class finfo not found

PHP finfo extension is missing on your server.

Solution: enable the PHP finfo extension in your php.ini or install it.

Contact us

We usually respond within a maximum of 24 hours

We'll often ask for an FTP access and/or your purchase code - if possible send them to us, we'll both save time.