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

Cacti 1.3.0 dev - Error 500 after upgrade from git 048f2abcc..5f95d66c3 to latest git #6106

Open
morganfw opened this issue Feb 24, 2025 · 3 comments
Labels
bug Undesired behaviour unverified Some days we don't have a clue

Comments

@morganfw
Copy link

morganfw commented Feb 24, 2025

Hi,
after upgrading Cacti 1.3.0 dev from git 048f2ab..5f95d66 to latest git, a HTTP ERROR 500 is displayed from browser and if try to execute a db upgrade, following errors are displayed:

# php -q cli/upgrade_database.php --forcever=1.2.29
PHP Warning:  require(/var/www/html/cacti/include/vendor/composer/../phpstan/phpstan/bootstrap.php): Failed to open stream: No such file or directory in /var/www/html/cacti/include/vendor/composer/autoload_real.php on line 41
PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/html/cacti/include/vendor/composer/../phpstan/phpstan/bootstrap.php' (include_path='.:/usr/share/php') in /var/www/html/cacti/include/vendor/composer/autoload_real.php:41
Stack trace:
#0 /var/www/html/cacti/include/vendor/composer/autoload_real.php(45): {closure}()
#1 /var/www/html/cacti/include/vendor/autoload.php(25): ComposerAutoloaderInit4457df976b6743d4cf060b8bfc645118::getLoader()
#2 /var/www/html/cacti/include/global.php(630): include_once('...')
#3 /var/www/html/cacti/include/cli_check.php(54): include('...')
#4 /var/www/html/cacti/cli/upgrade_database.php(26): require('...')
#5 {main}
  thrown in /var/www/html/cacti/include/vendor/composer/autoload_real.php on line 41

Below the /var/log/apache2/error.log on Ubuntu 24.04 LTS

AH01071: Got error 'PHP message: PHP Warning:  require(/var/www/html/cacti/include/vendor/composer/../phpstan/phpstan/bootstrap.php): Failed to open stream: No such file or directory in /var/www/html/cacti/include/vendor/composer/autoload_real.php on line 41; PHP message: PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/html/cacti/include/vendor/composer/../phpstan/phpstan/bootstrap.php' (include_path='.:/usr/share/php') in /var/www/html/cacti/include/vendor/composer/autoload_real.php:41\nStack trace:\n#0 /var/www/html/cacti/include/vendor/composer/autoload_real.php(45): {closure}()\n#1 /var/www/html/cacti/include/vendor/autoload.php(25): ComposerAutoloaderInit4457df976b6743d4cf060b8bfc645118::getLoader()\n#2 /var/www/html/cacti/include/global.php(630): include_once('...')\n#3 /var/www/html/cacti/include/auth.php(27): require_once('...')\n#4 /var/www/html/cacti/index.php(25): include('...')\n#5 {main}\n  thrown in /var/www/html/cacti/include/vendor/composer/autoload_real.php on line 41'
@morganfw morganfw added bug Undesired behaviour unverified Some days we don't have a clue labels Feb 24, 2025
@cigamit
Copy link
Member

cigamit commented Feb 24, 2025

We are working on upgrading the code. You will need to run composer install to pull down a few extra dependencies (and install composer if you haven't).

@TheWitness
Copy link
Member

We should just upload them when we get a chance. I was bit too.

@morganfw
Copy link
Author

Ok composer installed on my Ubuntu 24.04 LTS system:

apt install composer

so issued composer install

composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]?
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - Root composer.json requires PHP extension ext-sqlite3 * but it is missing from your system. Install or enable PHP's sqlite3 extension.

To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/8.3/cli/php.ini
    - /etc/php/8.3/cli/conf.d/10-mysqlnd.ini
    - /etc/php/8.3/cli/conf.d/10-opcache.ini
    - /etc/php/8.3/cli/conf.d/10-pdo.ini
    - /etc/php/8.3/cli/conf.d/15-xml.ini
    - /etc/php/8.3/cli/conf.d/20-calendar.ini
    - /etc/php/8.3/cli/conf.d/20-ctype.ini
    - /etc/php/8.3/cli/conf.d/20-curl.ini
    - /etc/php/8.3/cli/conf.d/20-dom.ini
    - /etc/php/8.3/cli/conf.d/20-exif.ini
    - /etc/php/8.3/cli/conf.d/20-ffi.ini
    - /etc/php/8.3/cli/conf.d/20-fileinfo.ini
    - /etc/php/8.3/cli/conf.d/20-ftp.ini
    - /etc/php/8.3/cli/conf.d/20-gd.ini
    - /etc/php/8.3/cli/conf.d/20-gettext.ini
    - /etc/php/8.3/cli/conf.d/20-gmp.ini
    - /etc/php/8.3/cli/conf.d/20-iconv.ini
    - /etc/php/8.3/cli/conf.d/20-imap.ini
    - /etc/php/8.3/cli/conf.d/20-intl.ini
    - /etc/php/8.3/cli/conf.d/20-ldap.ini
    - /etc/php/8.3/cli/conf.d/20-mbstring.ini
    - /etc/php/8.3/cli/conf.d/20-memcache.ini
    - /etc/php/8.3/cli/conf.d/20-mysqli.ini
    - /etc/php/8.3/cli/conf.d/20-pdo_mysql.ini
    - /etc/php/8.3/cli/conf.d/20-phar.ini
    - /etc/php/8.3/cli/conf.d/20-posix.ini
    - /etc/php/8.3/cli/conf.d/20-pspell.ini
    - /etc/php/8.3/cli/conf.d/20-readline.ini
    - /etc/php/8.3/cli/conf.d/20-shmop.ini
    - /etc/php/8.3/cli/conf.d/20-simplexml.ini
    - /etc/php/8.3/cli/conf.d/20-sockets.ini
    - /etc/php/8.3/cli/conf.d/20-sysvmsg.ini
    - /etc/php/8.3/cli/conf.d/20-sysvsem.ini
    - /etc/php/8.3/cli/conf.d/20-sysvshm.ini
    - /etc/php/8.3/cli/conf.d/20-tidy.ini
    - /etc/php/8.3/cli/conf.d/20-tokenizer.ini
    - /etc/php/8.3/cli/conf.d/20-xmlreader.ini
    - /etc/php/8.3/cli/conf.d/20-xmlrpc.ini
    - /etc/php/8.3/cli/conf.d/20-xmlwriter.ini
    - /etc/php/8.3/cli/conf.d/20-xsl.ini
    - /etc/php/8.3/cli/conf.d/20-zip.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-sqlite3` to temporarily ignore these required extensions.

php-sqllite3 package was missing, installed it

apt install php-sqlite3

and re-issued command:

composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]?
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 2 installs, 0 updates, 0 removals
  - Downloading phpstan/phpstan (2.1.6)
  - Downloading rector/rector (2.0.9)
  - Installing phpstan/phpstan (2.1.6): Extracting archive
  - Installing rector/rector (2.0.9): Extracting archive
Generating autoload files
8 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Now the GUI is working again!
Thank you for the suggestions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Undesired behaviour unverified Some days we don't have a clue
Projects
None yet
Development

No branches or pull requests

3 participants