Closed litan1106 closed 3 years ago
I wasn't able to reproduce this issue locally. Do you also face the issue when not using sail?
I also have the same problem and I'm not using sail - I had to switch back to 0.2.0 to get it working.
I also have the same problem and I'm not using sail - I had to switch back to 0.2.0 to get it working.
Thanks for the confirmation. I switched back to v0.2.0, it worked for me too. @nunomaduro Somehow, it was broken after v0.2.0 (I just updated the steps to reproduce it.)
@nunomaduro maybe caused by these changes? I reverted this line on v0.3.2 and 0.4.0. everything worked like v0.20
I can confirm seeing this issue with v0.3.2+ using Kubernetes. Rolling back to v0.3.1 fixed it. But an important note is that we don't have any .env file (only environment variables) and Octane are not seing them.
WARN Laravel Octane is within a beta period. It should only be used for local development and testing in order to improve the quality of the library and resolve any existing bugs.
INFO Server running…
Local: http://0.0.0.0:8080
Press Ctrl+C to stop the server
Illuminate\Encryption\MissingAppKeyException No application encryption key has been specified.
Currently investigating this...
I prepared a sample Dockerfile for you if needed.
FROM php:8.0.3-cli-buster
RUN apt-get update && apt-get install -y \
git \
unzip \
libzip-dev \
&& rm -rf /var/lib/apt/lists/*
RUN pecl install swoole
RUN docker-php-ext-install pcntl zip \
&& docker-php-ext-enable swoole.so pcntl.so zip.so
RUN curl -sS https://getcomposer.org/installer | php -- --$COMPOSER && mv composer.phar /usr/bin/composer
WORKDIR /var/www/html
RUN composer create-project laravel/laravel example-app
WORKDIR /var/www/html/example-app
RUN composer require laravel/octane \
&& php artisan octane:install --server=swoole
RUN rm /var/www/html/example-app/.env
# dummy APP_KEY env var
ENV APP_KEY=vvVmYOwJCBY5k0Kr5ykVGe1qYbNNCGJL
EXPOSE 80
CMD ["php", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=80"]
docker build -t test . && docker run test:latest
WARN Laravel Octane is within a beta period. It should only be used for local development and testing in order to improve the quality of the library and resolve any existing bugs.
INFO Server running…
Local: http://0.0.0.0:80
Press Ctrl+C to stop the server
Illuminate\Encryption\MissingAppKeyException
No application encryption key has been specified.
at vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php:79
75▕ protected function key(array $config)
76▕ {
77▕ return tap($config['key'], function ($key) {
78▕ if (empty($key)) {
➜ 79▕ throw new MissingAppKeyException;
80▕ }
81▕ });
82▕ }
83▕ }
Do you think this also affect this issue ? https://github.com/laravel/octane/issues/234
the python
keyword as system env didnt work in 0.3.2+ but it work in 0.3.1
Do you think this also affect this issue ? #234
the
python
keyword as system env didnt work in 0.3.2+ but it work in 0.3.1
Nope. I am sure that was caused by this change. ( I already tested it. )
Same issue
@zolotov88 @litan1106 @foremtehan @L3o-pold @anopier Can you all test this branch? https://github.com/laravel/octane/pull/257.
@nunomaduro from my test case here https://github.com/laravel/octane/issues/244#issuecomment-829188654 the issue seems fixed 👍
@nunomaduro This PR fixed my system env issue as well. Thanks again.
Description:
The system environment variables got override by the .env in Octane but not php-fpm or php-cli. The system environment variables shouldn't be override by the .env in Octane.
Steps To Reproduce: (max and linux)
Run command in the current Laravel project directory.
Make sure DB_USERNAME exists in the .env
Browse http://localhost:8000/test-sys-vars and see result
Then repeat 1 - 5 again with another version