Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

codemandavid's avatar

Package installation and php artisan serve not working

Hello

im new to laravel and i have been trying to install a package (5.8) to kickstart my learning. But each time i run the installation command i get the following :

PS C:\WINDOWS\system32> cd C:\Users\USER\Desktop\
PS C:\Users\USER\Desktop> composer create-project --prefer-dist laravel/laravel blog "5.8.*"
Installing laravel/laravel (v5.8.35)
  - Installing laravel/laravel (v5.8.35): Loading from cache
Created project in blog
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 143 installs, 0 updates, 0 removals
  - Installing ocramius/package-versions (1.5.1): Loading from cache
  - Installing doctrine/lexer (1.1.0): Loading from cache
  - Installing doctrine/annotations (v1.8.0): Loading from cache
  - Installing guzzlehttp/promises (v1.3.1): Loading from cache
  - Installing psr/http-message (1.0.1): Loading from cache
  - Installing http-interop/http-middleware (0.2.0): Loading from cache
  - Installing symfony/process (v4.3.5): Loading from cache
  - Installing symfony/polyfill-ctype (v1.12.0): Loading from cache
  - Installing symfony/filesystem (v4.3.5): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing symfony/service-contracts (v1.1.7): Loading from cache
  - Installing symfony/polyfill-php73 (v1.12.0): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.12.0): Loading from cache
  - Installing symfony/console (v4.3.5): Loading from cache
  - Installing ralouphie/getallheaders (3.0.3): Loading from cache
  - Installing guzzlehttp/psr7 (1.6.1): Loading from cache
  - Installing guzzlehttp/guzzle (6.3.3): Loading from cache
  - Installing laravel/installer (v2.2.0): Loading from cache
  - Installing zendframework/zend-stdlib (3.2.1): Loading from cache
  - Installing zendframework/zend-hydrator (2.4.2): Loading from cache
  - Installing nikic/php-parser (v4.2.4): Loading from cache
  - Installing ocramius/code-generator-utils (1.0.0): Loading from cache
  - Installing ocramius/generated-hydrator (3.0.0): Loading from cache
  - Installing paragonie/random_compat (v9.99.99): Loading from cache
  - Installing webmozart/assert (1.5.0): Loading from cache
  - Installing phpdocumentor/reflection-common (2.0.0): Loading from cache
  - Installing phpdocumentor/type-resolver (1.0.1): Loading from cache
  - Installing phpdocumentor/reflection-docblock (4.3.2): Loading from cache
  - Installing phpunit/php-token-stream (3.1.1): Loading from cache
  - Installing sebastian/version (2.0.1): Loading from cache
  - Installing sebastian/type (1.1.3): Loading from cache
  - Installing sebastian/resource-operations (2.0.1): Loading from cache
  - Installing sebastian/recursion-context (3.0.0): Loading from cache
  - Installing sebastian/object-reflector (1.1.1): Loading from cache
  - Installing sebastian/object-enumerator (3.0.3): Loading from cache
  - Installing sebastian/global-state (3.0.0): Loading from cache
  - Installing sebastian/exporter (3.1.2): Loading from cache
  - Installing sebastian/environment (4.2.2): Loading from cache
  - Installing sebastian/diff (3.0.2): Loading from cache
  - Installing sebastian/comparator (3.0.2): Loading from cache
  - Installing phpunit/php-timer (2.1.2): Loading from cache
  - Installing phpunit/php-text-template (1.2.1): Loading from cache
  - Installing phpunit/php-file-iterator (2.0.2): Loading from cache
  - Installing theseer/tokenizer (1.1.3): Loading from cache
  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Loading from cache
  - Installing phpunit/php-code-coverage (7.0.8): Loading from cache
  - Installing doctrine/instantiator (1.2.0): Loading from cache
  - Installing phpspec/prophecy (1.9.0): Loading from cache
  - Installing phar-io/version (2.0.1): Loading from cache
  - Installing phar-io/manifest (1.0.3): Loading from cache
  - Installing myclabs/deep-copy (1.9.3): Loading from cache
  - Installing phpunit/phpunit (8.4.1): Loading from cache
  - Installing psr/event-dispatcher (1.0.0): Loading from cache
  - Installing psr/simple-cache (1.0.1): Loading from cache
  - Installing psr/cache (1.0.1): Loading from cache
  - Installing symfony/cache-contracts (v1.1.7): Loading from cache
  - Installing symfony/config (v4.3.5): Loading from cache
  - Installing symfony/event-dispatcher-contracts (v1.1.7): Loading from cache
  - Installing symfony/var-exporter (v4.3.5): Loading from cache
  - Installing psr/log (1.1.0): Loading from cache
  - Installing symfony/cache (v4.3.5): Loading from cache
  - Installing symfony/expression-language (v4.3.5): Loading from cache
  - Installing symfony/finder (v4.3.5): Loading from cache
  - Installing symfony/polyfill-php72 (v1.12.0): Loading from cache
  - Installing symfony/polyfill-intl-idn (v1.12.0): Loading from cache
  - Installing symfony/mime (v4.3.5): Loading from cache
  - Installing symfony/http-foundation (v4.3.5): Loading from cache
  - Installing symfony/event-dispatcher (v4.3.5): Loading from cache
  - Installing symfony/debug (v4.3.5): Loading from cache
  - Installing symfony/http-kernel (v4.3.5): Loading from cache
  - Installing symfony/dependency-injection (v4.3.5): Loading from cache
  - Installing zendframework/zend-eventmanager (3.2.1): Loading from cache
  - Installing zendframework/zend-code (3.4.0): Loading from cache
  - Installing ocramius/proxy-manager (2.2.3): Loading from cache
  - Installing symfony/proxy-manager-bridge (v4.3.5): Loading from cache
  - Installing symfony/yaml (v4.3.5): Loading from cache
  - Installing true/punycode (v2.1.1): Loading from cache
  - Installing psr/http-server-handler (1.0.1): Loading from cache
  - Installing zendframework/zend-diactoros (1.8.7): Loading from cache
  - Installing zendframework/zend-httphandlerrunner (1.1.0): Loading from cache
  - Installing container-interop/container-interop (1.2.0): Loading from cache
  - Installing zendframework/zend-validator (2.12.1): Loading from cache
  - Installing zendframework/zend-session (2.9.0): Loading from cache
  - Installing zendframework/zend-loader (2.6.1): Loading from cache
  - Installing zendframework/zend-json (3.1.2): Loading from cache
  - Installing zendframework/zend-view (2.11.3): Loading from cache
  - Installing zendframework/zend-servicemanager (3.4.0): Loading from cache
  - Installing zendframework/zend-escaper (2.6.1): Loading from cache
  - Installing zendframework/zend-uri (2.7.1): Loading from cache
  - Installing zendframework/zend-http (2.10.0): Loading from cache
  - Installing zendframework/zend-router (3.3.0): Loading from cache
  - Installing zendframework/zend-config (2.6.0): Loading from cache
  - Installing zendframework/zend-modulemanager (2.8.3): Loading from cache
  - Installing zendframework/zend-mvc (3.1.1): Loading from cache
  - Installing zendframework/zend-filter (2.9.2): Loading from cache
  - Installing zendframework/zend-inputfilter (2.10.1): Loading from cache
  - Installing zendframework/zend-form (2.14.3): Loading from cache
  - Installing zendframework/zend-mvc-plugin-fileprg (1.1.0): Loading from cache
  - Installing zendframework/zend-mvc-plugin-flashmessenger (1.2.0): Loading from cache
  - Installing zendframework/zend-authentication (2.7.0): Loading from cache
  - Installing zendframework/zend-mvc-plugin-identity (1.1.1): Loading from cache
  - Installing zendframework/zend-mvc-plugin-prg (1.2.0): Loading from cache
  - Installing zendframework/zendxml (1.2.0): Loading from cache
  - Installing zendframework/zend-server (2.8.1): Loading from cache
  - Installing zendframework/zend-math (3.2.0): Loading from cache
  - Installing zendframework/zend-xmlrpc (2.7.0): Loading from cache
  - Installing zendframework/zend-xml2json (3.1.2): Loading from cache
  - Installing zendframework/zend-text (2.7.1): Loading from cache
  - Installing zendframework/zend-dom (2.7.2): Loading from cache
  - Installing zendframework/zend-console (2.8.0): Loading from cache
  - Installing zendframework/zend-test (3.3.0): Loading from cache
  - Installing zendframework/zend-tag (2.7.1): Loading from cache
  - Installing zendframework/zend-stratigility (1.3.3): Loading from cache
  - Installing zendframework/zend-soap (2.6.0): Loading from cache
  - Installing zendframework/zend-di (2.6.1): Loading from cache
  - Installing zendframework/zend-servicemanager-di (1.2.1): Loading from cache
  - Installing zendframework/zend-serializer (2.9.1): Loading from cache
  - Installing zendframework/zend-psr7bridge (0.2.2): Loading from cache
  - Installing zendframework/zend-progressbar (2.7.0): Loading from cache
  - Installing zendframework/zend-permissions-rbac (2.6.0): Loading from cache
  - Installing zendframework/zend-permissions-acl (2.7.1): Loading from cache
  - Installing zendframework/zend-paginator (2.8.2): Loading from cache
  - Installing zendframework/zend-navigation (2.9.1): Loading from cache
  - Installing zendframework/zend-mvc-plugins (1.0.1)
  - Installing zendframework/zend-i18n (2.9.2): Loading from cache
  - Installing zendframework/zend-mvc-i18n (1.1.1): Loading from cache
  - Installing zendframework/zend-mvc-form (1.0.0)
  - Installing zendframework/zend-mvc-console (1.2.0): Loading from cache
  - Installing zendframework/zend-mime (2.7.2): Loading from cache
  - Installing zendframework/zend-memory (2.6.1): Loading from cache
  - Installing zendframework/zend-mail (2.10.0): Loading from cache
  - Installing zendframework/zend-log (2.11.0): Loading from cache
  - Installing zendframework/zend-json-server (3.2.0): Loading from cache
  - Installing zendframework/zend-i18n-resources (2.6.1): Loading from cache
  - Installing zendframework/zend-file (2.8.3): Loading from cache
  - Installing zendframework/zend-feed (2.12.0): Loading from cache
  - Installing zendframework/zend-debug (2.6.0): Loading from cache
  - Installing zendframework/zend-db (2.10.0): Loading from cache
  - Installing zendframework/zend-crypt (3.3.1): Loading from cache
  - Installing zendframework/zend-captcha (2.9.0): Loading from cache
  - Installing zendframework/zend-cache (2.9.0): Loading from cache
  - Installing zendframework/zend-barcode (2.7.1): Loading from cache
  - Installing zendframework/zendframework (3.0.0)
symfony/console suggests installing symfony/lock
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
sebastian/global-state suggests installing ext-uopz (*)
sebastian/environment suggests installing ext-posix (*)
phpunit/php-code-coverage suggests installing ext-xdebug (^2.7.2)
phpunit/phpunit suggests installing ext-soap (*)
phpunit/phpunit suggests installing ext-xdebug (*)
phpunit/phpunit suggests installing phpunit/php-invoker (^2.0.0)
symfony/polyfill-intl-idn suggests installing ext-intl (For best performance)
symfony/http-kernel suggests installing symfony/browser-kit
symfony/http-kernel suggests installing symfony/var-dumper
zendframework/zend-session suggests installing mongodb/mongodb (If you want to use the MongoDB session save handler)
zendframework/zend-http suggests installing paragonie/certainty (For automated management of cacert.pem)
zendframework/zend-filter suggests installing psr/http-factory-implementation (psr/http-factory-implementation, for creating file upload instances when consuming PSR-7 in file upload filters)
zendframework/zend-form suggests installing zendframework/zendservice-recaptcha (in order to use the ReCaptcha form element)
zendframework/zend-authentication suggests installing zendframework/zend-ldap (Zend\Ldap component)
zendframework/zend-math suggests installing ext-gmp (If using the gmp functionality)
zendframework/zend-i18n suggests installing ext-intl (Required for most features of Zend\I18n; included in default builds of PHP)
zendframework/zend-log suggests installing ext-mongo (mongo extension to use Mongo writer)
zendframework/zend-log suggests installing ext-mongodb (mongodb extension to use MongoDB writer)
zendframework/zend-debug suggests installing ext-xdebug (XDebug, for better backtrace output)
zendframework/zend-captcha suggests installing zendframework/zendservice-recaptcha (ZendService\ReCaptcha component)
zendframework/zend-cache suggests installing ext-apc (APC or compatible extension, to use the APC storage adapter)
zendframework/zend-cache suggests installing ext-apcu (APCU >= 5.1.0, to use the APCu storage adapter)
zendframework/zend-cache suggests installing ext-dba (DBA, to use the DBA storage adapter)
zendframework/zend-cache suggests installing ext-memcache (Memcache >= 2.0.0 to use the Memcache storage adapter)
zendframework/zend-cache suggests installing ext-memcached (Memcached >= 1.0.0 to use the Memcached storage adapter)
zendframework/zend-cache suggests installing ext-mongo (Mongo, to use MongoDb storage adapter)
zendframework/zend-cache suggests installing ext-mongodb (MongoDB, to use the ExtMongoDb storage adapter)
zendframework/zend-cache suggests installing ext-redis (Redis, to use Redis storage adapter)
zendframework/zend-cache suggests installing ext-wincache (WinCache, to use the WinCache storage adapter)
zendframework/zend-cache suggests installing ext-xcache (XCache, to use the XCache storage adapter)
zendframework/zend-cache suggests installing mongodb/mongodb (Required for use with the ext-mongodb adapter)
zendframework/zend-cache suggests installing mongofill/mongofill (Alternative to ext-mongo - a pure PHP implementation designed as a drop in replacement)
zendframework/zend-barcode suggests installing zendframework/zendpdf (ZendPdf component)
zendframework/zendframework suggests installing zendframework/zend-ldap (zend-ldap component ^2.7.1, if you need LDAP features)
Package http-interop/http-middleware is abandoned, you should avoid using it. Use http-interop/http-server-middleware instead.
Generating autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
PS C:\Users\USER\Desktop>
 

and each time i run the

php artisan serve

i get the following error

PS C:\Users\USER\Desktop> cd blog
PS C:\Users\USER\Desktop\blog> php artisan serve
PHP Fatal error:  Uncaught Error: Class 'Illuminate\Foundation\Application' not found in C:\Users\USER\Desktop\blog\bootstrap\app.php:14
Stack trace:
#0 C:\Users\USER\Desktop\blog\artisan(20): require_once()
#1 {main}
  thrown in C:\Users\USER\Desktop\blog\bootstrap\app.php on line 14

Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in C:\Users\USER\Desktop\blog\bootstrap\app.php:14
Stack trace:
#0 C:\Users\USER\Desktop\blog\artisan(20): require_once()
#1 {main}
  thrown in C:\Users\USER\Desktop\blog\bootstrap\app.php on line 14
PS C:\Users\USER\Desktop\blog>

i have tried googling the answers but i all the solutions found don't seem to solve the problem.

i have used

composer dump-autoload
composer install --no-scripts

to no avail

i have also tried deleting the vendor folder and composer.lock file and running

composer install
that didn't solve it

i have also tried to downloading all the dependencies specified but it doesnt seem to work too

i am using xampp

0 likes
9 replies
douglasakula's avatar

@codemandavid Edit your php.ini file and enable list of extensions laravel requires e.g. ext-intl then remember to restart apache server / xampp and it should work perfectly

1 like
ketansavaliya's avatar

In my situation, I didn't have the full vendor dependencies in place (composer file was messed up during original install) - so running any artisan commands caused a failure.

I was able to use the --no-scripts flag to prevent artisan from executing before it was included. Once my dependencies were in place, everything worked as expected.

composer update --no-scripts
codemandavid's avatar

this is my php.ini file

extension=bz2
extension=curl
extension=fileinfo
extension=gd2
extension=gettext
;extension=gmp
;extension=intl
;extension=imap
;extension=interbase
;extension=ldap
extension=mbstring
extension=exif      ; Must be after mbstring as it depends on it
extension=mysqli
;extension=oci8_12c  ; Use with Oracle Database 12c Instant Client
;extension=odbc
;extension=openssl
;extension=pdo_firebird
extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
;extension=pdo_pgsql
extension=pdo_sqlite
;extension=pgsql
;extension=shmop

which extensions should i manipulate ?

codemandavid's avatar

@douglasakula i just uncommented the

extension=intl

and restarted my server . doesnt seem to be working so i need to confirm if there is any other extension is should enable

Snapey's avatar

From the install page;

  • PHP >= 7.1.3
  • BCMath PHP Extension
  • Ctype PHP Extension
  • JSON PHP Extension
  • Mbstring PHP Extension
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension
douglasakula's avatar

Hey @codemandavid - I saw a bunch of extensions from the logs you shared above - ext-uopz, ext-soap

It should work when this extensions are available for the packages laravel is trying to install. Also share the new error messages you are getting after fixes done on enabling extensions - so we can rule out if its an extensions issue.

codemandavid's avatar

hey @douglasakula thank you very much. the error has not changed a bit . still same error

PS C:\Users\USER\Desktop> cd blog
PS C:\Users\USER\Desktop\blog> php artisan serve
PHP Fatal error:  Uncaught Error: Class 'Illuminate\Foundation\Application' not found in C:\Users\USER\Desktop\blog\bootstrap\app.php:14
Stack trace:
#0 C:\Users\USER\Desktop\blog\artisan(20): require_once()
#1 {main}
  thrown in C:\Users\USER\Desktop\blog\bootstrap\app.php on line 14

Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in C:\Users\USER\Desktop\blog\bootstrap\app.php:14
Stack trace:
#0 C:\Users\USER\Desktop\blog\artisan(20): require_once()
#1 {main}
  thrown in C:\Users\USER\Desktop\blog\bootstrap\app.php on line 14
PS C:\Users\USER\Desktop\blog>
douglasakula's avatar

Could be you have more than 1 php.ini file - or the one you are editing is not the one being loaded

Run php --ini within your projects directory to verify the php ini file in use

Please or to participate in this conversation.