Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing Symphony 3.0.0 in PHP 7.3.7 #2911

Open
bauhouse opened this issue Mar 29, 2020 · 6 comments
Open

Error installing Symphony 3.0.0 in PHP 7.3.7 #2911

bauhouse opened this issue Mar 29, 2020 · 6 comments

Comments

@bauhouse
Copy link
Member

$label = Widget::Label(__('Username'), Widget::Input('fields[user][username]', $fields['user']['username']));

Affected Symphony version(s) : 3.0.0
PHP version(s) : 7.3.16-1+ubuntu18.04.1+deb.sury.org+1
MySQL version(s): Ver 14.14 Distrib 5.7.29, for Linux (x86_64) using EditLine wrapper
OS(es) : Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-47-generic x86_64)

When attempting to install Symphony 3.0 on a DigitalOcean droplet running Ubuntu 18.04.4. I encountered the following error.

A severe error occurred whilst trying to handle an exception, check the Symphony log for more details
Undefined index: user on 355 of file 
/var/www/example.com/public_html/install/lib/class.installerpage.php

I encountered the same error when trying to install on a localhost (same environment as in this issue) running macOS Catalina 10.15.3 with PHP 7.3.7 and MySQL 5.7.26 (Homebrew). I was able to successfully install Symphony 2.7.10, then updated to Symphony 3.0.0.

@nitriques
Copy link
Member

Thanks @bauhouse for all those tests !
I think you are running with all errors (which is a good thing) but I something test (sadly) without the notices.

I assume you are getting the error when loading the installer (i.e. the install process has not yet begun?)

@nitriques nitriques added this to the 3.0.1 milestone Mar 30, 2020
@bzerangue
Copy link

@nitriques, I am having the same error that @bauhouse is experiencing when running on Ubuntu 18.04, PHP 7.4.3, MySQL 5.7.26. This is on the installer page. Same exact error.

@nitriques
Copy link
Member

Thanks @bzerangue for reporting.

@wdebusschere
Copy link

I also have this error with PHP 7.3.15 for the installer.
There are 2 errors in the log:

2020-04-01T10:20:39+00:00 5e846a > Notice: ErrorHandler 8: Undefined index: user on line 355 of file /Users/xxx/Sites/symphonycms3/install/lib/class.installerpage.php
2020-04-01T10:20:39+00:00 5e846a > Notice: ErrorHandler 8: Use of undefined constant SYMPHONY_URL - assumed 'SYMPHONY_URL' on line 193 of file /Users/xxx/Sites/symphonycms3/symphony/lib/core/class.exceptionrenderer.php

@wdebusschere
Copy link

wdebusschere commented Apr 1, 2020

dump of the fields

array(10) { ["admin"]=> array(2) { ["max_upload_size"]=> string(7) "5242880" ["upload_blacklist"]=> string(32) "/\.(?:php[34567s]?|phtml|pht)$/i" } ["symphony"]=> array(12) { ["admin-path"]=> string(8) "symphony" ["pagination_maximum_rows"]=> string(2) "20" ["association_maximum_rows"]=> string(1) "5" ["lang"]=> string(2) "en" ["pages_table_nest_children"]=> string(2) "no" ["version"]=> string(5) "3.0.0" ["cookie_prefix"]=> string(4) "sym-" ["session_gc_divisor"]=> string(2) "10" ["session_strict_domain"]=> string(3) "yes" ["cell_truncation_length"]=> string(2) "75" ["enable_xsrf"]=> string(3) "yes" ["error_reporting_all"]=> string(2) "no" } ["log"]=> array(3) { ["archive"]=> string(1) "1" ["maxsize"]=> string(8) "10485760" ["filter"]=> int(24575) } ["database"]=> array(12) { ["host"]=> string(9) "localhost" ["port"]=> string(4) "3306" ["user"]=> NULL ["password"]=> NULL ["db"]=> NULL ["driver"]=> string(5) "mysql" ["charset"]=> string(7) "utf8mb4" ["collate"]=> string(18) "utf8mb4_unicode_ci" ["engine"]=> string(6) "InnoDB" ["tbl_prefix"]=> string(4) "sym_" ["query_caching"]=> string(2) "on" ["query_logging"]=> string(2) "on" } ["public"]=> array(1) { ["display_event_xml_in_source"]=> string(2) "no" } ["general"]=> array(2) { ["sitename"]=> string(12) "Symphony CMS" ["useragent"]=> string(14) "Symphony/3.0.0" } ["file"]=> array(1) { ["write_mode"]=> string(4) "0644" } ["directory"]=> array(1) { ["write_mode"]=> string(4) "0755" } ["region"]=> array(4) { ["time_format"]=> string(5) "g:i a" ["date_format"]=> string(5) "m/d/Y" ["datetime_separator"]=> string(1) " " ["timezone"]=> NULL } ["cache_driver"]=> array(1) { ["default"]=> string(8) "database" } }

@nitriques
Copy link
Member

@wdebusschere Thanks, I've found what is causing the problem. Sadly, I lost many hours trying to install rector, in the hope that it would fix the problem by itself, but it turns out, it does not fix that. So I resorted in fixing the code with a nasty regexp.

Find: , \$fields([^,)]+)
Replace with: , isset($fields$1) ? $fields$1 : null

Ahaha. rector does a super job to remove those isset() ternary with ??, but for now, all the code base uses this pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants