So I got my computer back from maintenance, and had to format it. Now I'm trying to re-install everything I had but I'm having trouble installing Laravel. I'm running on a Linux Mint 19.3 OS. I already have PHP installed with all laravel dependecies installed. I installed Composer and when I try to run
composer global require "laravel/installer"
I get this:
Changed current directory to /home/gustavo/.config/composer
Using version ^4.0 for laravel/installer
./composer.json has been updated
Running composer update laravel/installer
Loading composer repositories with package information
Updating dependencies
Lock file operations: 12 installs, 0 updates, 0 removals
- Locking laravel/installer (v4.0.5)
- Locking psr/container (1.0.0)
- Locking symfony/console (v5.1.8)
- Locking symfony/polyfill-ctype (v1.20.0)
- Locking symfony/polyfill-intl-grapheme (v1.20.0)
- Locking symfony/polyfill-intl-normalizer (v1.20.0)
- Locking symfony/polyfill-mbstring (v1.20.0)
- Locking symfony/polyfill-php73 (v1.20.0)
- Locking symfony/polyfill-php80 (v1.20.0)
- Locking symfony/process (v5.1.8)
- Locking symfony/service-contracts (v2.2.0)
- Locking symfony/string (v5.1.8)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 12 installs, 0 updates, 0 removals
- Installing symfony/polyfill-php80 (v1.20.0): Extracting archive
- Installing symfony/process (v5.1.8): Extracting archive
- Installing symfony/polyfill-mbstring (v1.20.0): Extracting archive
- Installing symfony/polyfill-intl-normalizer (v1.20.0): Extracting archive
- Installing symfony/polyfill-intl-grapheme (v1.20.0): Extracting archive
- Installing symfony/polyfill-ctype (v1.20.0): Extracting archive
- Installing symfony/string (v5.1.8): Extracting archive
- Installing psr/container (1.0.0): Extracting archive
- Installing symfony/service-contracts (v2.2.0): Extracting archive
- Installing symfony/polyfill-php73 (v1.20.0): Extracting archive
- Installing symfony/console (v5.1.8): Extracting archive
- Installing laravel/installer (v4.0.5): Extracting archive
6 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
10 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
I remember that usually the laravel installation end with "Build something amazing!" but I didn't get that phrase this time. And now, if try
Laravel new
It says Command not found. As if Laravel was never installed. What am I doing wrong?
You need to set your path variable. I don't know how to do it in linux since I'm a windows user but, you can easily find it on Laravel's official documentation. If you're still having some trouble setting the $PATH variable you can see this answer or maybe read about it from the scratch here.
You can also create a new project like this without setting a path variable:
// From the official documentation...
composer create-project --prefer-dist laravel/laravel blog
On most linux distros you need to add ~/.composer/vendor/bin to the $PATH environment variable.
If you are using bash, you can add it to ~/.bashrc with this line
export PATH=$PATH:~/.composer/vendor/bin
Related
After downloading the latest php and installing composer. then installed laravel using the command
composer global require laravel/installer
Changed current directory to C:/Users/User/AppData/Roaming/Composer
Using version ^4.2 for laravel/installer
./composer.json has been created
Running composer update laravel/installer
Loading composer repositories with package information
Updating dependencies
Lock file operations: 13 installs, 0 updates, 0 removals
- Locking laravel/installer (v4.2.8)
- Locking psr/container (1.1.1)
- Locking symfony/console (v5.3.6)
- Locking symfony/deprecation-contracts (v2.4.0)
- Locking symfony/polyfill-ctype (v1.23.0)
- Locking symfony/polyfill-intl-grapheme (v1.23.1)
- Locking symfony/polyfill-intl-normalizer (v1.23.0)
- Locking symfony/polyfill-mbstring (v1.23.1)
- Locking symfony/polyfill-php73 (v1.23.0)
- Locking symfony/polyfill-php80 (v1.23.1)
- Locking symfony/process (v5.3.4)
- Locking symfony/service-contracts (v2.4.0)
- Locking symfony/string (v5.3.3)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 13 installs, 0 updates, 0 removals
0 [>---------------------------] 0 [>---------------------------]
- Installing symfony/polyfill-php80 (v1.23.1): Extracting archive
- Installing symfony/process (v5.3.4): Extracting archive
- Installing symfony/polyfill-mbstring (v1.23.1): Extracting archive
- Installing symfony/polyfill-intl-normalizer (v1.23.0): Extracting archive
- Installing symfony/polyfill-intl-grapheme (v1.23.1): Extracting archive
- Installing symfony/polyfill-ctype (v1.23.0): Extracting archive
- Installing symfony/string (v5.3.3): Extracting archive
- Installing psr/container (1.1.1): Extracting archive
- Installing symfony/service-contracts (v2.4.0): Extracting archive
- Installing symfony/polyfill-php73 (v1.23.0): Extracting archive
- Installing symfony/deprecation-contracts (v2.4.0): Extracting archive
- Installing symfony/console (v5.3.6): Extracting archive
- Installing laravel/installer (v4.2.8): Extracting archive
0/13 [>---------------------------] 0%
10/13 [=====================>------] 76%
12/13 [=========================>--] 92%
13/13 [============================] 100%
6 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
11 packages you are using are looking for funding.
Use the `composer fund` command to find out more!`
After installation created a project laravel new example-app
Creating a "laravel/laravel" project at "./example-app"
Installing laravel/laravel (v8.6.1)
- Installing laravel/laravel (v8.6.1): Extracting archive
Created project in C:\test/example-app
> #php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework[v8.54.0, ..., 8.x-dev] require league/flysystem ^1.1 -> satisfiable by league/flysystem[1.1.0, ..., 1.x-dev].
- league/flysystem[1.1.0, ..., 1.x-dev] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
- Root composer.json requires laravel/framework ^8.54 -> satisfiable by laravel/framework[v8.54.0, v8.55.0, v8.56.0, 8.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- C:\php7\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Then I performed cd example-app и php artisan serve. После выполнения php artisan serve gives an error message :
PHP Warning: require(C:\test\example-app/vendor/autoload.php): Failed to open stream: No such file or directory in C:\test\example-app\artisan on line 18
PHP Fatal error: Uncaught Error: Failed opening required 'C:\test\example-app/vendor/autoload.php' (include_path='.;C:\php\pear') in C:\test\example-app\artisan:18
Stack trace:
#0 {main}
thrown in C:\test\example-app\artisan on line 18
After walking through the forums, I realized that there was not enough folder vendor in project
Project with files
After adding the vendor folder to the project using the command composer dump-autoload.The folder was added but after running the command composer dump-autoload a new error popped up :
Generating optimized autoload files
Class Illuminate\Foundation\ComposerScripts is not autoloadable, can not call post-autoload-dump script
> #php artisan package:discover --ansi
PHP Fatal error: Uncaught Error: Class "Illuminate\Foundation\Application" not found in C:\test\example-app\bootstrap\app.php:14
Stack trace:
#0 C:\test\example-app\artisan(20): require_once()
#1 {main}
thrown in C:\test\example-app\bootstrap\app.php on line 14
Script #php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
Then I tried to execute the command php artisan serve .Throws this error :
PHP Fatal error: Uncaught Error: Class "Illuminate\Foundation\Application" not found in C:\test\example-app\bootstrap\app.php:14
Stack trace:
#0 C:\test\example-app\artisan(20): require_once()
#1 {main}
thrown in C:\test\example-app\bootstrap\app.php on line 14
Then, walking around the forums, I just did not run to fix this problem I tried:
Composer update,
Composer install,
composer update --no-scripts
composer dump-autoload
composer install --no-scripts
I also tried this :
php artisan clear-compiled
composer dump-autoload
And tried to delete the vendor folder.
And so I tried it, though it says that there is no such file:
composer update --no-scripts
cd bootstrap/cache/->rm -rf *.php
composer dump-autoload
Nothing helped . I do not know what to do. And how to solve this problem.
Short description
I try to setup a basic TYPO3 installation using composer on a Debian 10 Server. Following all official instructions I could find, results in an http error 500 without meaningful (to me) content in the server log.
I encountered that problem on a clients server first, so I installed a completely fresh virtual server for debugging purposes and ran into exactly the same issue.
One thing I did, which might point someone in the know towards the solution:
web-devel#typo-test:/var/www/html/typotest/public$ cp index.php test.php
$ vi test.php
-> insert "print(__DIR__);" before call_user_func shows me a current path of
/var/www/html/typotest/public
which would result in a path of /var/www/html/typotest/public/vendor/autoload.php which doesn't exist.
However, replacing the reference to __DIR__ with "/var/www/html/typotest/" doesn't improve things ...
Same thing with both TYPO3 Releases 9 and 10
I couldn't find any mention of this problem, which amazes me for it being a straightforward approach. I'd be happy about any pointers toward a resolution or at least debugging tips ...
Long Description
-- Debian Gnu/Linux 10 all patches applied, Server IP is 192.168.100.171
-- Apache/PHP/XML/MySQL installed and running
-- Set the prerequisites according to https://docs.typo3.org/m/typo3/guide-installation/master/en-us/In-depth/SystemRequirements/Index.html
-- Prepare DB:
> MariaDB [(none)]> create database typotest;
Query OK, 1 row affected (0.000 sec)
> MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'web-devel'#'localhost' identified by 'XXXXXX';
Query OK, 0 rows affected (0.000 sec)
-- Pointing a browser to the IP results in the display of the default debian index page residing in /var/www/html
-- Created an info.php which displays correctly.
-- I realized, I didn't have the most current composer release. The suggested composer self-update failed so I installed composer according to https://www.digitalocean.com/community/tutorials/how-to-install-and-use-composer-on-debian-10
# php composer-setup.php --install-dir=/usr/local/bin --filename=composer
All settings correct for using Composer
Downloading...
Composer (version 1.10.8) successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer
-- So, all seems to be well
-- Next step - install TYPO3 according to
https://docs.typo3.org/m/typo3/guide-installation/master/en-us/QuickInstall/Composer/Index.html
$ cd /var/www/html
$ /usr/local/bin/composer create-project typo3/cms-base-distribution typotest
$ cd typotest
$ php vendor/bin/typo3cms install:setup \
--no-interaction \
--database-user-name=web-devel \
--database-user-password=XXXXXXX \
--database-host-name=127.0.0.1 \
--database-port=3306 \
--database-name=typotest \
--use-existing-database \
--admin-user-name=admin \
--admin-password=XXXXXXX \
--site-setup-type=site
-- which works flawlessly:
web-devel#typo-test:/var/www/html$ /usr/local/bin/composer create-project typo3/cms-base-distribution typotest
Creating a "typo3/cms-base-distribution" project at "./typotest"
Installing typo3/cms-base-distribution (v10.4.1)
- Installing typo3/cms-base-distribution (v10.4.1): Loading from cache
Created project in /var/www/html/typotest
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 87 installs, 0 updates, 0 removals
- Installing typo3/cms-composer-installers (v3.0.1): Loading from cache
- Installing typo3/class-alias-loader (v1.1.3): Loading from cache
- Installing helhum/config-loader (v0.12.2): Loading from cache
- Installing symfony/polyfill-php80 (v1.17.1): Loading from cache
- Installing symfony/process (v4.4.10): Loading from cache
- Installing symfony/polyfill-mbstring (v1.17.1): Loading from cache
- Installing symfony/polyfill-ctype (v1.17.1): Loading from cache
- Installing psr/container (1.0.0): Loading from cache
- Installing symfony/service-contracts (v1.1.8): Loading from cache
- Installing psr/cache (1.0.1): Loading from cache
- Installing symfony/polyfill-php73 (v1.17.1): Loading from cache
- Installing symfony/console (v4.4.10): Loading from cache
- Installing doctrine/lexer (1.2.1): Loading from cache
- Installing doctrine/annotations (1.10.3): Loading from cache
- Installing typo3fluid/fluid (2.6.9): Loading from cache
- Installing typo3/phar-stream-wrapper (v3.1.5): Loading from cache
- Installing typo3/cms-cli (2.0.0): Loading from cache
- Installing symfony/yaml (v4.4.10): Loading from cache
- Installing symfony/routing (v4.4.10): Loading from cache
- Installing symfony/polyfill-php72 (v1.17.0): Loading from cache
- Installing symfony/polyfill-intl-idn (v1.17.1): Loading from cache
- Installing symfony/polyfill-intl-icu (v1.17.1): Loading from cache
- Installing symfony/intl (v4.4.10): Loading from cache
- Installing symfony/mime (v4.4.10): Loading from cache
- Installing psr/event-dispatcher (1.0.0): Loading from cache
- Installing symfony/event-dispatcher-contracts (v1.1.7): Loading from cache
- Installing symfony/event-dispatcher (v4.4.10): Loading from cache
- Installing psr/log (1.1.3): Loading from cache
- Installing egulias/email-validator (2.1.18): Loading from cache
- Installing symfony/mailer (v4.4.10): Loading from cache
- Installing symfony/http-foundation (v4.4.10): Loading from cache
- Installing symfony/finder (v4.4.10): Loading from cache
- Installing symfony/var-exporter (v4.4.10): Loading from cache
- Installing symfony/cache-contracts (v1.1.7): Loading from cache
- Installing symfony/cache (v4.4.10): Loading from cache
- Installing symfony/expression-language (v4.4.10): Loading from cache
- Installing symfony/dependency-injection (v4.4.10): Loading from cache
- Installing symfony/filesystem (v4.4.10): Loading from cache
- Installing symfony/config (v4.4.10): Loading from cache
- Installing psr/http-message (1.0.1): Loading from cache
- Installing psr/http-server-handler (1.0.1): Loading from cache
- Installing psr/http-server-middleware (1.0.1): Loading from cache
- Installing psr/http-factory (1.0.1): Loading from cache
- Installing psr/http-client (1.0.0): Loading from cache
- Installing nikic/php-parser (v4.5.0): Loading from cache
- Installing ralouphie/getallheaders (3.0.3): Loading from cache
- Installing guzzlehttp/psr7 (1.6.1): Loading from cache
- Installing guzzlehttp/promises (v1.3.1): Loading from cache
- Installing guzzlehttp/guzzle (6.5.5): Loading from cache
- Installing doctrine/instantiator (1.3.1): Loading from cache
- Installing doctrine/event-manager (1.1.0): Loading from cache
- Installing doctrine/cache (1.10.1): Loading from cache
- Installing doctrine/dbal (2.10.2): Loading from cache
- Installing cogpowered/finediff (0.3.1): Loading from cache
- Installing typo3/cms-core (v10.4.4): Loading from cache
- Installing symfony/inflector (v4.4.10): Loading from cache
- Installing symfony/property-info (v4.4.10): Loading from cache
- Installing symfony/property-access (v4.4.10): Loading from cache
- Installing phpdocumentor/reflection-common (2.2.0): Loading from cache
- Installing phpdocumentor/type-resolver (1.3.0): Loading from cache
- Installing webmozart/assert (1.9.0): Loading from cache
- Installing phpdocumentor/reflection-docblock (5.1.0): Loading from cache
- Installing typo3/cms-extbase (v10.4.4): Loading from cache
- Installing typo3/cms-fluid (v10.4.4): Loading from cache
- Installing typo3/cms-install (v10.4.4): Loading from cache
- Installing typo3/cms-frontend (v10.4.4): Loading from cache
- Installing typo3/cms-extensionmanager (v10.4.4): Loading from cache
- Installing typo3/cms-recordlist (v10.4.4): Loading from cache
- Installing typo3/cms-backend (v10.4.4): Loading from cache
- Installing helhum/typo3-console (v6.3.2): Loading from cache
- Installing typo3/cms-about (v10.4.4): Loading from cache
- Installing typo3/cms-viewpage (v10.4.4): Loading from cache
- Installing typo3/cms-tstemplate (v10.4.4): Loading from cache
- Installing typo3/cms-t3editor (v10.4.4): Loading from cache
- Installing typo3/cms-sys-note (v10.4.4): Loading from cache
- Installing typo3/cms-setup (v10.4.4): Loading from cache
- Installing typo3/cms-seo (v10.4.4): Loading from cache
- Installing typo3/cms-rte-ckeditor (v10.4.4): Loading from cache
- Installing typo3/cms-info (v10.4.4): Loading from cache
- Installing typo3/cms-impexp (v10.4.4): Loading from cache
- Installing typo3/cms-form (v10.4.4): Loading from cache
- Installing typo3/cms-fluid-styled-content (v10.4.4): Loading from cache
- Installing typo3/cms-filelist (v10.4.4): Loading from cache
- Installing typo3/cms-felogin (v10.4.4): Loading from cache
- Installing typo3/cms-dashboard (v10.4.4): Loading from cache
- Installing typo3/cms-beuser (v10.4.4): Loading from cache
- Installing typo3/cms-belog (v10.4.4): Loading from cache
helhum/config-loader suggests installing ext-yaml (For improved performance when parsing yaml files you should use the PECL YAML Parser php extension)
symfony/console suggests installing symfony/lock
symfony/polyfill-intl-idn suggests installing ext-intl (For best performance)
symfony/polyfill-intl-icu suggests installing ext-intl (For best performance)
symfony/intl suggests installing ext-intl (to use the component with locales other than "en")
symfony/event-dispatcher suggests installing symfony/http-kernel
egulias/email-validator suggests installing ext-intl (PHP Internationalization Libraries are required to use the SpoofChecking validation)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses)
doctrine/cache suggests installing alcaeus/mongo-php-adapter (Required to use legacy MongoDB driver)
typo3/cms-core suggests installing ext-gd (GDlib/Freetype is required for building images with text (GIFBUILDER) and can also be used to scale images)
typo3/cms-core suggests installing ext-intl (TYPO3 with unicode-based filesystems)
typo3/cms-core suggests installing ext-zip
symfony/property-info suggests installing symfony/doctrine-bridge (To use Doctrine metadata)
symfony/property-info suggests installing symfony/serializer (To use Serializer metadata)
typo3/cms-extbase suggests installing typo3/cms-scheduler (Additional scheduler tasks)
typo3/cms-frontend suggests installing typo3/cms-adminpanel (Provides additional information and functionality for backend users in the frontend.)
Writing lock file
Generating autoload files
Generating class alias map file
> typo3cms install:fixfolderstructure
The following directory structure has been fixed:
Directory /public/typo3temp successfully created.
Fixed permission on /public/typo3temp.
File /public/typo3temp/index.html successfully created.
Set content to /public/typo3temp/index.html
Fixed permission on /public/typo3temp/index.html.
Directory /public/typo3temp/assets successfully created.
Fixed permission on /public/typo3temp/assets.
Directory /public/typo3temp/assets/compressed successfully created.
Fixed permission on /public/typo3temp/assets/compressed.
Directory /public/typo3temp/assets/css successfully created.
Fixed permission on /public/typo3temp/assets/css.
Directory /public/typo3temp/assets/js successfully created.
Fixed permission on /public/typo3temp/assets/js.
Directory /public/typo3temp/assets/images successfully created.
Fixed permission on /public/typo3temp/assets/images.
Directory /public/typo3temp/assets/_processed_ successfully created.
Fixed permission on /public/typo3temp/assets/_processed_.
Directory /public/typo3conf successfully created.
Fixed permission on /public/typo3conf.
Directory /public/typo3conf/ext successfully created.
Fixed permission on /public/typo3conf/ext.
Directory /public/fileadmin successfully created.
Fixed permission on /public/fileadmin.
Directory /public/fileadmin/_temp_ successfully created.
Fixed permission on /public/fileadmin/_temp_.
File /public/fileadmin/_temp_/.htaccess successfully created.
Set content to /public/fileadmin/_temp_/.htaccess
Fixed permission on /public/fileadmin/_temp_/.htaccess.
File /public/fileadmin/_temp_/index.html successfully created.
Set content to /public/fileadmin/_temp_/index.html
Fixed permission on /public/fileadmin/_temp_/index.html.
Directory /public/fileadmin/user_upload successfully created.
Fixed permission on /public/fileadmin/user_upload.
Directory /public/fileadmin/user_upload/_temp_ successfully created.
Fixed permission on /public/fileadmin/user_upload/_temp_.
File /public/fileadmin/user_upload/_temp_/index.html successfully created.
Set content to /public/fileadmin/user_upload/_temp_/index.html
Fixed permission on /public/fileadmin/user_upload/_temp_/index.html.
Directory /public/fileadmin/user_upload/_temp_/importexport successfully created.
Fixed permission on /public/fileadmin/user_upload/_temp_/importexport.
File /public/fileadmin/user_upload/_temp_/importexport/.htaccess successfully created.
Set content to /public/fileadmin/user_upload/_temp_/importexport/.htaccess
Fixed permission on /public/fileadmin/user_upload/_temp_/importexport/.htaccess.
File /public/fileadmin/user_upload/_temp_/importexport/index.html successfully created.
Set content to /public/fileadmin/user_upload/_temp_/importexport/index.html
Fixed permission on /public/fileadmin/user_upload/_temp_/importexport/index.html.
File /public/fileadmin/user_upload/index.html successfully created.
Set content to /public/fileadmin/user_upload/index.html
Fixed permission on /public/fileadmin/user_upload/index.html.
File /var/.htaccess successfully created.
Set content to /var/.htaccess
Fixed permission on /var/.htaccess.
Directory /var/charset successfully created.
Fixed permission on /var/charset.
Directory /var/labels successfully created.
Fixed permission on /var/labels.
Directory /var/lock successfully created.
Fixed permission on /var/lock.
> typo3cms install:generatepackagestates
The following extensions have been added to the generated PackageStates.php file: core, extbase, fluid, frontend, fluid_styled_content, filelist, impexp, form, install, recordlist, backend, setup, rte_ckeditor, about, belog, beuser, dashboard, extensionmanager, felogin, info, seo, sys_note, t3editor, tstemplate, viewpage
31 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
then
web-devel#typo-test:/var/www/html$ php typotest/vendor/bin/typo3cms install:setup
Welcome to the TYPO3 Console installer!
➤ Prepare installation
✔ Check environment and create folders
➤ Set up database connection
Database connection type (default: "mysqli"):
[mysqli ] MySQL connection
[pdo_sqlite] SQLite connection
[pdo_pgsql ] PostgreSQL connection
[mssql ] MSSQL connection
> mysqli
User name for database server (default: ""): web-devel
User password for database server (default: ""):
Host name of database server (default: "127.0.0.1"):
TCP Port of database server (default: "3306"):
Unix Socket to connect to (default: ""):
✔ Ok
➤ Select database
Use already existing database? (y/N): y
Name of the database (required): typotest
✔ Ok
➤ Set up database
Username of to be created administrative user account (required): admin
Password of to be created administrative user account (required):
Name of the TYPO3 site (default: "New TYPO3 Console site"): Test Site
✔ Ok
➤ Set up configuration
Specify the site setup type (default: "no"):
[no ] Do nothing
[site] Create root page
> site
Specify the site base url (default: "/"):
✔ Ok
➤ Set up web server configuration
Specify the web server you want to write configuration for (default: "none"):
[none ] Do not write any configuration files
[apache] Create Apache .htaccess file
[iis ] Create Microsoft-IIS web.config file
> apache
✔ Ok
✔ Set up extensions
Successfully installed TYPO3 CMS!
Pointing my browser at http://192.168.100.171/typotest/public/ results in an Error 500 with this error in the apache-log-file:
[Sun Jun 28 12:21:35.232020 2020] [php7:error] [pid 10894] [client 192.168.100.143:53326]
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function TYPO3\\CMS\\Core\\Imaging\\IconFactory::__construct(), 0 passed in /var/www/html/typotest/public/typo3/sysext/core/Classes/Utility/GeneralUtility.php
on line 3423 and exactly 2 expected in /var/www/html/typotest/public/typo3/sysext/core/Classes/Imaging/IconFactory.php:71\nStack trace:\n#0 /var/www/html/typotest/public/typo3/sysext/core/Classes/Utility/GeneralUtility.php(3423):
TYPO3\\CMS\\Core\\Imaging\\IconFactory->__construct()\n#1 /var/www/html/typotest/public/typo3/sysext/core/Classes/TimeTracker/TimeTracker.php(242):
TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\...')\n#2 /var/www/html/typotest/public/typo3/sysext/core/Classes/Error/ErrorHandler.php(162):
TYPO3\\CMS\\Core\\TimeTracker\\TimeTracker->setTSlogMessage('Core: Error han...', 2)\n#3 [internal function]:
TYPO3\\CMS\\Core\\Error\\ErrorHandler->handleError(2, 'fopen(/var/www/...', '/var/www/html/t...', 193, Array)\n#4
/var/www/html/typotest/public/typo3/sysext/core/Classes/Log/Writer/Fi in /var/www/html/typotest/public/typo3/sysext/core/Classes/Imaging/IconFactory.php on line 71, referer:
http://192.168.100.171/typotest/
Which doesn't make a lot of sense in the context ...
I tried the same with TYPO3 releases 9 and 10 - same result!
At this point TYPO3's var/log is empty.
Solved: I did a combination of:
chown -R web-devel.www-data typotest
chmod -R g+s typotest
and I had to set the php-fpm instance to run as web-devel. This seems to do the trick. Would be nice if this could be evaluated and added to the setup instructions ...
I want to use elasticsearch in my laravel 5.7.11 app and making some search I found
plugin laravel-scout-elastic ( https://github.com/ErickTamayo/laravel-scout-elastic )
and I tried firstly elasticsearch/elasticsearch and laravel-scout-elastic plugin after and the last show error:
$ composer require elasticsearch/elasticsearch
Cannot create cache directory /home/serge/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/serge/.composer/cache/files/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/serge/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Using version ^6.0 for elasticsearch/elasticsearch
./composer.json has been updated
Cannot create cache directory /home/serge/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/serge/.composer/cache/files/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/serge/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 4 installs, 0 updates, 0 removals
- Installing react/promise (v2.7.0): Downloading (100%)
- Installing guzzlehttp/streams (3.0.0): Downloading (100%)
- Installing guzzlehttp/ringphp (1.1.1): Downloading (100%)
- Installing elasticsearch/elasticsearch (v6.0.1): Downloading (100%)
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> #php artisan package:discover
Discovered Package: aloha/twilio
Discovered Package: barryvdh/laravel-debugbar
Discovered Package: beyondcode/laravel-dump-server
Discovered Package: cviebrock/eloquent-sluggable
Discovered Package: davejamesmiller/laravel-breadcrumbs
Discovered Package: fideloper/proxy
Discovered Package: intervention/image
Discovered Package: itsgoingd/clockwork
Discovered Package: jrean/laravel-user-verification
Discovered Package: laravel/tinker
Discovered Package: laravelcollective/html
Discovered Package: mews/captcha
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Discovered Package: orangehill/iseed
Discovered Package: proengsoft/laravel-jsvalidation
Discovered Package: rap2hpoutre/laravel-log-viewer
Discovered Package: spatie/laravel-activitylog
Discovered Package: spatie/laravel-tags
Discovered Package: spatie/laravel-translatable
Discovered Package: themsaid/laravel-mail-preview
Discovered Package: unisharp/laravel-filemanager
Discovered Package: xethron/migrations-generator
Discovered Package: yajra/laravel-datatables-oracle
Package manifest generated successfully.
> php artisan vendor:publish --provider="Proengsoft\JsValidation\JsValidationServiceProvider" --tag=public --force
Copied Directory [/vendor/proengsoft/laravel-jsvalidation/public] To [/public/vendor/jsvalidation]
Publishing complete.
serge#serge:/mnt/_work_sdb8/wwwroot/lar/Votes$ composer require tamayo/laravel-scout-elastic
Cannot create cache directory /home/serge/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/serge/.composer/cache/files/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/serge/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Using version ^4.0 for tamayo/laravel-scout-elastic
./composer.json has been updated
Cannot create cache directory /home/serge/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/serge/.composer/cache/files/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/serge/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Can only install one of: elasticsearch/elasticsearch[5.0.x-dev, v6.0.1].
- Can only install one of: elasticsearch/elasticsearch[v6.0.1, 5.0.x-dev].
- Can only install one of: elasticsearch/elasticsearch[5.0.x-dev, v6.0.1].
- tamayo/laravel-scout-elastic 4.0.0 requires elasticsearch/elasticsearch ^5.0 -> satisfiable by elasticsearch/elasticsearch[5.0.x-dev].
- Installation request for tamayo/laravel-scout-elastic ^4.0 -> satisfiable by tamayo/laravel-scout-elastic[4.0.0].
- Installation request for elasticsearch/elasticsearch (locked at v6.0.1, required as ^6.0) -> satisfiable by elasticsearch/elasticsearch[v6.0.1].
Can you advice me which versions have I to install and how ? I mean if I have to set version of packeges in console command?
Please, show format of these commands...
# php -v
PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS )
Thanks!
You must first install Scout via the following command:
composer require laravel/scout "5.0.x-dev"
I tried to download google api using composer to a legacy code but, the following error appeared:
composer require google/apiclient:^2.0
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for google/apiclient 2.0 -> satisfiable by google/apiclient[v2.0.0].
- google/apiclient v2.0.0 requires google/auth 0.8 -> satisfiable by google/auth[v0.8].
- Conclusion: don't install guzzlehttp/psr7 1.4.2
- google/auth v0.8 requires guzzlehttp/psr7 1.2.* -> satisfiable by guzzlehttp/psr7[1.2.0, 1.2.1, 1.2.2, 1.2.3].
- Can only install one of: guzzlehttp/psr7[1.2.0, 1.4.2].
- Can only install one of: guzzlehttp/psr7[1.2.1, 1.4.2].
- Can only install one of: guzzlehttp/psr7[1.2.2, 1.4.2].
- Can only install one of: guzzlehttp/psr7[1.2.3, 1.4.2].
- Installation request for guzzlehttp/psr7 (locked at 1.4.2) -> satisfiable by guzzlehttp/psr7[1.4.2].
Installation failed, reverting ./composer.json to its original content.
What should I do?
Try removing vendor/google and then run composer install again, this worked for me.
Can only install one of: guzzlehttp/psr7[1.2.3, 1.4.2].
Your dependencies led to confusion of two different major versions of the package, but only one can be installed.
The locked at 1.4.2 message means this package has been already installed as per your composer.lock file, and you're trying to install different version not compatible with your existing criteria.
$ composer show -a google/auth | grep psr7
guzzlehttp/psr7 ~1.2
You can check which existing package depends on the locked version by checking the dependency tree:
composer show -t
In some cases, removing composer.lock may help.
Otherwise, to see why (from where) the package is referenced, run:
composer why guzzlehttp/psr7 -t
See also: How to resolve a "Can only install one of:" conflict?
I finally found a solution for me, it works just removing composer.lock!!
I have an Amazon EC2 instance with Ubuntu 14.4.
I installed my composer globally.
When I install Lumen I get this result - everything seems fine:
ubuntu#ip-XXX-XX-XX-XX:/var/www/html$ composer global require "laravel/lumen-installer"
Changed current directory to /home/ubuntu/.config/composer
Using version ^1.0 for laravel/lumen-installer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing symfony/process (v3.1.0)
Loading from cache
- Installing symfony/polyfill-mbstring (v1.2.0)
Loading from cache
- Installing symfony/console (v3.1.0)
Loading from cache
- Installing guzzlehttp/promises (1.2.0)
Loading from cache
- Installing psr/http-message (1.0)
Loading from cache
- Installing guzzlehttp/psr7 (1.3.0)
Loading from cache
- Installing guzzlehttp/guzzle (6.2.0)
Loading from cache
- Installing laravel/lumen-installer (v1.0.2)
Loading from cache
symfony/console suggests installing symfony/event-dispatcher ()
symfony/console suggests installing psr/log (For using the console logger)
Writing lock file
Generating autoload files
ubuntu#ip-XXX-XX-XX-XX:/var/www/html$
But when I type lumen or lumen new blog I receive a lumen: command not found.
Based on other questions, I assume I have to add lumen to the PATH simillarly to this:
export PATH="~/.composer/vendor/bin:$PATH"
This does not make a difference - lumen: command not found is still displayed after running lumen new blog.
Did anyone run into this error?
Your problem will not be solved simply by unsetting PATH, as you'll still be left without a PATH that includes the necessary system directories. When you set your own PATH, in most cases you will want to append your new entry to the old PATH variable, not replace it entirely, as you have done.
Use this command
export PATH="$PATH:~/.composer/vendor/bin"
Notice the variable is set to begin with the existing $PATH. This way, you'll still have all the original system directories in your PATH, and your addition will be on the end. Because lumen is apparently the name of the binary you are trying to execute, and your PATH should include only directories containing binaries, not the binaries themselves.