i am install october by composer
when i use php artisan october:install
after MySQL Password [xxxxx] mysql password setup step
i got this error
PHP Parse error: syntax error, unexpected ‘,’ in /Users/HFY/www/new_october/vendor/october/rain/src/Config/ConfigWriter.php(44) : eval()’d code on line 125
console tips:
Unable to rewrite key “default” in config, does it exist?
composer create-project is ok
after created, i change my database config
php artisan october:up is ok
php artisan october:env is ok
php artisan october:install get the error
without php artisan october:env
install is ok
october/october v1.0.401
Possibly related to #2361
@daftspunk i don't think so
my database password is normal character cr3939lake .
and i did not have change other configurations except mysql
here is mysql configuration

@LukeTowers i read this post before, but situation is completely different
there is ']' in his password, my password are all general characters (a-z0-9)
I can confirm I'm getting the same error after using october:env. Even using the simplest a-z only password didn't resolve the issue, so it really doesn't seem related to the older issue (and whether or not developers should be using less secure database passwords to work around installation problems is a whole other topic entirely, even if it were related to the older issue).
I think you should be executing in this order
Try install before env
@daftspunk i got this before you answer.
thank you all the way,but it still a trouble
I'm sorry, but I fail to see how this is an actual solution and not just a temporary workaround. Sure, the first installation will work, but after you've ran october:env, you now fundamentally can never run the install command again, so if you have to replace the database instance or database provider at some point after you've run that command, you're right back to October refusing to install because it can't eval it's own code after the env command has been ran.
Also, what about the scenario of running October as a development copy that you track in git and then trying to check out on a live server _after_ production? In this scenario you're going to be committing the env affected code, but it's going to break the install process when you try to do a new checkout.
It seems like realistically the october:env command simply isn't trustworthy so long as it leaves the install command in a broken state.
@robinmalburn I'm not even sure why you'd be using the install command in the first place for setting up new environments. artisan october:up works fine for that, assuming you've configured your environment correctly and setup an empty database for October to use.
See https://github.com/octobercms/october/issues/2768#issuecomment-288351782 for my typical development flow when working with October.
@LukeTowers Thanks for pointing out that you can skip the install step and just run october:up, I'd assumed the install command was doing more than just writing config files and was a required step. Looking at the code itself, it seems the install command is also responsible for configuring the admin account, so it seems like just running october:up is going to leave you with the hard coded defaults. Is that correct or are the admin details you specify during the install phase actually being when just october:up is called with an empty database?
That's correct, it'll initialize that environment with the hardcoded defaults, unless you have a plugin migration / seeder that runs to remove that account and replace it with one of your choosing.
Personally I never even use that command as I view it as essentially a command line version of the web based installer.
Agreed with @robinmalburn, after october:env, it is hard to deploy to server using git command with checkout and october:install, and I couldn't check in the modified config files to prevent the above mentioned issue.
Error is still present, I can't proceed to the install process and create a new admin user.
Doing an echo of contents variable on ./vendor/october/rain/src/Config/ConfigWriter.php:44 this is the result:
...
'redis' => [
'cluster' => false,
'default' => 'mysql',
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
],
],
...
You can see 'mysql', statement is in a strange wrong position, the configuration's parsing seems wrong.
If I delete the redis configuration section from the ./config/database.php and the installer working as expected.
@daaru00 feel free to submit a PR to fix it. Personally I don't use the october:install command at all, and you really shouldn't be using it in an automated fashion anyways, that's what october:up is for.
Most helpful comment
Error is still present, I can't proceed to the install process and create a new admin user.
Doing an echo of
contentsvariable on./vendor/october/rain/src/Config/ConfigWriter.php:44this is the result:You can see
'mysql',statement is in a strange wrong position, the configuration's parsing seems wrong.If I delete the redis configuration section from the
./config/database.phpand the installer working as expected.