index.php requires autoloader.php, but file is missing #3369

Closed
opened 2026-02-05 06:30:46 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @ghost on GitHub (Nov 30, 2022).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

This is a fresh install on a newly built Ubuntu 22.04 server. I installed bookstack using the instructions in the documentation labeled "Ubuntu 22.04 Installation Script". I have not attempted to make any changes to the script or to any files since.

When I attempt to browse to my bookstack instance, I get a blank page. I checked the debugging guide, which indicated potential issues with permissions. www-data has RW access to bootstrap/cache, storage, and public/uploads directories. I next checked Apache logs and saw the following error:

PHP Fatal error: Uncaught Error: Failed opening required '/var/www/bookstack/public/../vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/bookstack/public/index.php:34\nStack trace:\n#0 {main}\n thrown in /var/www/bookstack/public/index.php on line 34

Line 34 of index.php has the following:
require __DIR__ . '/../vendor/autoload.php';

index

However, neither this directory nor file exist.

tree

Checking the installation log, I can see a similar error:

[6/9] Creating and populating BookStack .env file...
PHP Warning:  require(/var/www/bookstack/vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/bookstack/artisan on line 18
PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/bookstack/vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/bookstack/artisan:18
Stack trace:
#0 {main}
  thrown in /var/www/bookstack/artisan on line 18

install

I have no "settings view" because the application does not launch, so I am going to have to make an assumption on the version, based on the script pulling down the latest release.

Exact BookStack Version

v22.10.2

Log Content

Install log:

[6/9] Creating and populating BookStack .env file...
PHP Warning:  require(/var/www/bookstack/vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/bookstack/artisan on line 18
PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/bookstack/vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/bookstack/artisan:18
Stack trace:
#0 {main}
  thrown in /var/www/bookstack/artisan on line 18
[7/9] Running initial BookStack database migrations...
PHP Warning:  require(/var/www/bookstack/vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/bookstack/artisan on line 18
PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/bookstack/vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/bookstack/artisan:18
Stack trace:
#0 {main}
  thrown in /var/www/bookstack/artisan on line 18
[8/9] Setting BookStack file & folder permissions...
[9/9] Configuring apache server...
Enabling module rewrite.
To activate the new configuration, you need to run:
  systemctl restart apache2
Considering dependency mpm_prefork for php8.1:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php8.1:
Module php8.1 already enabled
Site 000-default disabled.
To activate the new configuration, you need to run:
  systemctl reload apache2
Enabling site bookstack.
To activate the new configuration, you need to run:
  systemctl reload apache2
----------------------------------------------------------------
Setup finished, your BookStack instance should now be installed!


Apache Log:


[Wed Nov 30 00:23:34.360661 2022] [mpm_prefork:notice] [pid 12749] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations
[Wed Nov 30 00:23:34.360707 2022] [core:notice] [pid 12749] AH00094: Command line: '/usr/sbin/apache2'
[Wed Nov 30 00:25:40.741541 2022] [mpm_prefork:notice] [pid 12749] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Nov 30 00:25:40.825910 2022] [mpm_prefork:notice] [pid 13325] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations
[Wed Nov 30 00:25:40.826255 2022] [core:notice] [pid 13325] AH00094: Command line: '/usr/sbin/apache2'
[Wed Nov 30 00:26:21.206349 2022] [php:warn] [pid 13345] [client ] PHP Warning:  require(/var/www/bookstack/public/../vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/bookstack/public/index.php on line 34
[Wed Nov 30 00:26:21.206406 2022] [php:error] [pid 13345] [client ] PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/bookstack/public/../vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/bookstack/public/index.php:34\nStack trace:\n#0 {main}\n  thrown in /var/www/bookstack/public/index.php on line 34

PHP Version

PHP 8.1.2-1ubuntu2.9

Hosting Environment

Ubuntu 22.04 self-hosted virtual machine (VirtualBox) using official installation script

Originally created by @ghost on GitHub (Nov 30, 2022). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario This is a fresh install on a newly built Ubuntu 22.04 server. I installed bookstack using the instructions in the documentation labeled "Ubuntu 22.04 Installation Script". I have not attempted to make any changes to the script or to any files since. When I attempt to browse to my bookstack instance, I get a blank page. I checked the debugging guide, which indicated potential issues with permissions. www-data has RW access to bootstrap/cache, storage, and public/uploads directories. I next checked Apache logs and saw the following error: `PHP Fatal error: Uncaught Error: Failed opening required '/var/www/bookstack/public/../vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/bookstack/public/index.php:34\nStack trace:\n#0 {main}\n thrown in /var/www/bookstack/public/index.php on line 34` Line 34 of index.php has the following: `require __DIR__ . '/../vendor/autoload.php';` ![index](https://user-images.githubusercontent.com/67406175/204679409-cb92acdd-e6ea-43e6-aaed-bbc836c26dac.png) However, neither this directory nor file exist. ![tree](https://user-images.githubusercontent.com/67406175/204679463-74877378-0444-4e46-892d-77f528fdcd28.png) Checking the installation log, I can see a similar error: ``` [6/9] Creating and populating BookStack .env file... PHP Warning: require(/var/www/bookstack/vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/bookstack/artisan on line 18 PHP Fatal error: Uncaught Error: Failed opening required '/var/www/bookstack/vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/bookstack/artisan:18 Stack trace: #0 {main} thrown in /var/www/bookstack/artisan on line 18 ``` ![install](https://user-images.githubusercontent.com/67406175/204681175-34b63145-7d8b-48a7-8df4-642217d2b6c4.png) I have no "settings view" because the application does not launch, so I am going to have to make an assumption on the version, based on the script pulling down the latest release. ### Exact BookStack Version v22.10.2 ### Log Content **Install log:** ``` [6/9] Creating and populating BookStack .env file... PHP Warning: require(/var/www/bookstack/vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/bookstack/artisan on line 18 PHP Fatal error: Uncaught Error: Failed opening required '/var/www/bookstack/vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/bookstack/artisan:18 Stack trace: #0 {main} thrown in /var/www/bookstack/artisan on line 18 [7/9] Running initial BookStack database migrations... PHP Warning: require(/var/www/bookstack/vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/bookstack/artisan on line 18 PHP Fatal error: Uncaught Error: Failed opening required '/var/www/bookstack/vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/bookstack/artisan:18 Stack trace: #0 {main} thrown in /var/www/bookstack/artisan on line 18 [8/9] Setting BookStack file & folder permissions... [9/9] Configuring apache server... Enabling module rewrite. To activate the new configuration, you need to run: systemctl restart apache2 Considering dependency mpm_prefork for php8.1: Considering conflict mpm_event for mpm_prefork: Considering conflict mpm_worker for mpm_prefork: Module mpm_prefork already enabled Considering conflict php5 for php8.1: Module php8.1 already enabled Site 000-default disabled. To activate the new configuration, you need to run: systemctl reload apache2 Enabling site bookstack. To activate the new configuration, you need to run: systemctl reload apache2 ---------------------------------------------------------------- Setup finished, your BookStack instance should now be installed! ``` **Apache Log:** ``` [Wed Nov 30 00:23:34.360661 2022] [mpm_prefork:notice] [pid 12749] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations [Wed Nov 30 00:23:34.360707 2022] [core:notice] [pid 12749] AH00094: Command line: '/usr/sbin/apache2' [Wed Nov 30 00:25:40.741541 2022] [mpm_prefork:notice] [pid 12749] AH00170: caught SIGWINCH, shutting down gracefully [Wed Nov 30 00:25:40.825910 2022] [mpm_prefork:notice] [pid 13325] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations [Wed Nov 30 00:25:40.826255 2022] [core:notice] [pid 13325] AH00094: Command line: '/usr/sbin/apache2' [Wed Nov 30 00:26:21.206349 2022] [php:warn] [pid 13345] [client ] PHP Warning: require(/var/www/bookstack/public/../vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/bookstack/public/index.php on line 34 [Wed Nov 30 00:26:21.206406 2022] [php:error] [pid 13345] [client ] PHP Fatal error: Uncaught Error: Failed opening required '/var/www/bookstack/public/../vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/bookstack/public/index.php:34\nStack trace:\n#0 {main}\n thrown in /var/www/bookstack/public/index.php on line 34 ``` ### PHP Version PHP 8.1.2-1ubuntu2.9 ### Hosting Environment Ubuntu 22.04 self-hosted virtual machine (VirtualBox) using official installation script
OVERLORD added the 🐕 Support label 2026-02-05 06:30:46 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Nov 30, 2022):

Hi @finchbeast,
Are you able to share more of the install log? Specifically from the start of the [4/9] section to the end of the [5/9] section. I think something has gone wrong earlier in the process. I suspect maybe a connectivity issue in downloading composer, but would need to see the logs to be sure.

@ssddanbrown commented on GitHub (Nov 30, 2022): Hi @finchbeast, Are you able to share more of the install log? Specifically from the start of the `[4/9]` section to the end of the `[5/9]` section. I think something has gone wrong earlier in the process. I suspect maybe a connectivity issue in downloading composer, but would need to see the logs to be sure.
Author
Owner

@ghost commented on GitHub (Nov 30, 2022):

[2/9] Preparing MySQL database...
[3/9] Downloading BookStack to /var/www/bookstack...
Cloning into 'bookstack'...
[4/9] Installing Composer (PHP dependency manager)...
PHP Warning:  copy(https://composer.github.io/installer.sig): Failed to open stream: Connection timed out in Command line code on line 1
PHP Warning:  copy(https://getcomposer.org/installer): Failed to open stream: Connection timed out in Command line code on line 1
PHP Warning:  hash_file(composer-setup.php): Failed to open stream: No such file or directory in Command line code on line 1
Could not open input file: composer-setup.php
rm: cannot remove 'composer-setup.php': No such file or directory
mv: cannot stat 'composer.phar': No such file or directory
[5/9] Installing PHP dependencies using composer...
Could not open input file: /usr/local/bin/composer
[6/9] Creating and populating BookStack .env file...
@ghost commented on GitHub (Nov 30, 2022): ``` [2/9] Preparing MySQL database... [3/9] Downloading BookStack to /var/www/bookstack... Cloning into 'bookstack'... [4/9] Installing Composer (PHP dependency manager)... PHP Warning: copy(https://composer.github.io/installer.sig): Failed to open stream: Connection timed out in Command line code on line 1 PHP Warning: copy(https://getcomposer.org/installer): Failed to open stream: Connection timed out in Command line code on line 1 PHP Warning: hash_file(composer-setup.php): Failed to open stream: No such file or directory in Command line code on line 1 Could not open input file: composer-setup.php rm: cannot remove 'composer-setup.php': No such file or directory mv: cannot stat 'composer.phar': No such file or directory [5/9] Installing PHP dependencies using composer... Could not open input file: /usr/local/bin/composer [6/9] Creating and populating BookStack .env file... ```
Author
Owner

@ssddanbrown commented on GitHub (Nov 30, 2022):

@finchbeast Yup, the script is having trouble when downloading composer.
Do you have network/firewall rules in place to block outgoing connections at all?

@ssddanbrown commented on GitHub (Nov 30, 2022): @finchbeast Yup, the script is having trouble when downloading composer. Do you have network/firewall rules in place to block outgoing connections at all?
Author
Owner

@ghost commented on GitHub (Nov 30, 2022):

No network firewall and no software firewall on this server (UFW disabled). I can use curl to access that URL, but seems like the script can't reach it.

root@bookstack:/tmp# curl https://composer.github.io/installer.sig
55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eaeroot@bookstack:/tmp# 
root@bookstack:/tmp# php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");'
PHP Warning:  copy(https://composer.github.io/installer.sig): Failed to open stream: Connection timed out in Command line code on line 1

I'll assume this is a connection issue on my end.

@ghost commented on GitHub (Nov 30, 2022): No network firewall and no software firewall on this server (UFW disabled). I can use curl to access that URL, but seems like the script can't reach it. ``` root@bookstack:/tmp# curl https://composer.github.io/installer.sig 55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eaeroot@bookstack:/tmp# root@bookstack:/tmp# php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");' PHP Warning: copy(https://composer.github.io/installer.sig): Failed to open stream: Connection timed out in Command line code on line 1 ``` I'll assume this is a connection issue on my end.
Author
Owner

@ssddanbrown commented on GitHub (Dec 1, 2022):

Coincidentally had another similar report within the last day, where the issue was that a proxy was used for HTTP(S) access on the system. Was not an issue in curl command usage since curl would pick up the proxy from environment variables.

@ssddanbrown commented on GitHub (Dec 1, 2022): Coincidentally had another similar report within the last day, where the issue was that a proxy was used for HTTP(S) access on the system. Was not an issue in curl command usage since curl would pick up the proxy from environment variables.
Author
Owner

@ssddanbrown commented on GitHub (Jan 15, 2023):

Since there's been no further follow up on this, and since this seems to be an instance/environment specific issue, I'm going to close it off.

@ssddanbrown commented on GitHub (Jan 15, 2023): Since there's been no further follow up on this, and since this seems to be an instance/environment specific issue, I'm going to close it off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3369