3

I am trying to install fresh Magento 2.0 to my centOS 6.5, php 5.6.19 via composer + browser install wizard. I have followed all the steps and install is success. All file permission are modified as suggested. My apache server is running with nobody:nobody user. But it's showing Internal Server Error in frontend and backend. Cleared cache (php bin/magento cache:flush), reindexed. Also changed the file/folder ownership to different user/group, and nobody:nobody too.

Can anyone please help me get out of this issue ?

NOTE: A localhost similar install process in php 7.0.1. is a success with even the data import using data import module. Could it be due to nobody user or maybe php ver. 5.6.19 ? Your hints and suggestions is highly appreciated.

cpanel error log shows this:

[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'global_notices' element cannot be added as child to 'global.notices', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'logo' element cannot be added as child to 'header', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'global.search' element cannot be added as child to 'header', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'user' element cannot be added as child to 'header', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'menu' element cannot be added as child to 'page.menu', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'breadcrumbs' element cannot be added as child to 'page.breadcrumbs', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'formkey' element cannot be added as child to 'page.formkey', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'page.title' element cannot be added as child to 'main.top', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'messages' element cannot be added as child to 'page.messages', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'page.actions.toolbar' element cannot be added as child to 'page.main.actions', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'legal' element cannot be added as child to 'footer', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'system_messages' element cannot be added as child to 'notifications', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'unread_system_messages' element cannot be added as child to 'notifications', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'notification_window' element cannot be added as child to 'notifications', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'notification.messages' element cannot be added as child to 'header', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'header.inner.left' element cannot be added as child to 'header', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'header.inner.right' element cannot be added as child to 'header', because the latter doesn't exist [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'logo' tries to reorder itself towards '', but their parents are different: 'header' and '' respectively. [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'global.search' tries to reorder itself towards 'logo', but their parents are different: 'header' and '' respectively. [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'user' tries to reorder itself towards '', but their parents are different: 'header' and '' respectively. [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'page.actions.toolbar' tries to reorder itself towards '', but their parents are different: 'page.main.actions' and '' respectively. [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'system_messages' tries to reorder itself towards '', but their parents are different: 'notifications' and '' respectively. [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'unread_system_messages' tries to reorder itself towards 'system_messages', but their parents are different: 'notifications' and '' respectively. [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'notification.messages' tries to reorder itself towards 'user', but their parents are different: 'header' and '' respectively. [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'header.inner.left' tries to reorder itself towards '', but their parents are different: 'header' and '' respectively. [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'header.inner.right' tries to reorder itself towards 'header.inner.left', but their parents are different: 'header' and '' respectively. [] []
[2016-03-26 17:49:06] main.CRITICAL: Broken reference: the 'global.search' tries to reorder itself towards 'notification.messages', but their parents are different: 'header.inner.right' and '' respectively. [] []

Here is the list displayed while doing ls -al:

drwxrwxr-x 13 nobody nobody      4096 Mar 26 16:51 ./
drwxrwxrwx 23 nobody nobody      4096 Mar 27 02:01 ../
drwxrwxr-x  5 nobody nobody      4096 Mar 21 10:06 app/
drwxrwxr-x  2 nobody nobody      4096 Mar 24 07:48 bin/
drwxrwxr-x  3 nobody nobody      4096 Mar 22 19:05 cgi-bin/
-rw-rw-r--  1 nobody nobody    437404 Mar 21 10:06 CHANGELOG.md
-rw-rw-r--  1 nobody nobody      2095 Mar 21 10:07 composer.json
-rw-rw-r--  1 nobody nobody    318476 Mar 21 10:07 composer.lock
-rw-rw-r--  1 nobody nobody      3425 Mar 21 10:07 CONTRIBUTING.md
-rw-rw-r--  1 nobody nobody     10011 Mar 21 10:06 CONTRIBUTOR_LICENSE_AGREEMENT.html
-rw-rw-r--  1 nobody nobody       631 Mar 21 10:06 COPYING.txt
drwxrwxr-x  4 nobody nobody      4096 Mar 21 10:07 dev/
-rw-rw-r--  1 nobody nobody         0 Mar 23 07:30 error_log
-rw-rw-r--  1 nobody nobody      1032 Mar 21 10:07 .gitignore
-rw-rw-r--  1 nobody nobody      2918 Mar 21 10:06 Gruntfile.js
-rw-rw-r--  1 nobody nobody      7577 Mar 23 16:33 .htaccess
-rw-rw-r--  1 nobody nobody      6419 Mar 21 10:06 .htaccess.sample
-rw-rw-r--  1 nobody nobody      1371 Mar 24 07:18 index.php
drwxrwxr-x  4 nobody nobody      4096 Mar 21 10:07 lib/
-rw-rw-r--  1 nobody nobody     10374 Mar 21 10:07 LICENSE_AFL.txt
-rw-rw-r--  1 nobody nobody     10364 Mar 21 10:06 LICENSE.txt
-rw-rw-r--  1 nobody nobody      4108 Mar 21 10:07 nginx.conf.sample
-rw-rw-r--  1 nobody nobody      1427 Mar 21 10:06 package.json
-rw-rw-r--  1 nobody nobody      1659 Mar 21 10:07 .php_cs
-rw-rw-r--  1 nobody nobody       804 Mar 21 10:06 php.ini.sample
drwxrwxr-x  2 nobody nobody      4096 Mar 21 10:07 phpserver/
drwxrwxr-x  7 nobody nobody      4096 Mar 22 18:38 pub/
-rw-rw-r--  1 nobody nobody      4388 Mar 21 10:06 README.md
drwxrwxr-x  7 nobody nobody      4096 Mar 21 10:07 setup/
-rw-rw-r--  1 nobody nobody      3731 Mar 21 10:07 .travis.yml
drwxrwxr-x  7 nobody nobody      4096 Mar 21 10:06 update/
drwxrwxr-x 14 nobody nobody      4096 Mar 26 15:34 var/
drwxrwxr-x 28 nobody nobody      4096 Mar 21 10:07 vendor/
5
  • Show ls -al of your top-level Magento directory. Mar 27, 2016 at 13:18
  • @SteveJohnson I have updated my question with magento base directory list
    – rbncha
    Mar 27, 2016 at 14:00
  • The 'broken reference' logs are not relevant. Please track down your server's PHP error log.
    – Ryan Hoerr
    Mar 27, 2016 at 15:31
  • There should be another user we refer to as the Magento file system owner. Ownership should look like user:group I'm not sure if that's the source of your problem but the user and group should be different. Mar 29, 2016 at 13:11
  • My VPS is running WHM cpanel which has nobody:nobody. As they informed me it's default and shouldn't have an issue. And yes, it was working fine for Magento ver. 1.9.x.x. I've changed all file ownership to nobody:nobody and file/folder permission level 664/775. It still doesn't work.
    – rbncha
    Mar 29, 2016 at 18:01

3 Answers 3

4

Since I didn't receive an answer to my question, I'm adding the steps to resolve it.

This is basically a permission issue. You need to be logged in as full previledged user or a su user in your server terminal. Run this in your magento 2.x installation root:

chown -R [apache-user:apache-group] .; && find . -type f -exec chmod 664 {} \; && find . -type d -exec chmod 775 {} \;
/usr/bin/php bin/magento setup:static-content:deploy;
/usr/bin/php bin/magento cache:flush;
2
  • 1
    I encountered this error due to a rouge var_dump in a Block causing a memory exhaustion. I'm sure debugging is on but it suppressed the error msg (I'll work that out later) so it could be file permissions or otherwise code error / exceptions. However the remedy above got me cooking with gas. Key point is Check the PHP log, not the Magento log Thanks rbncha. Dec 3, 2018 at 11:42
  • For Nginx how to give [apache-user:apache-group]? @rbncha thank you
    – zus
    Jun 10, 2020 at 1:06
0

I had faced similar issue. We can check the apache or Nginx error log. In my case, there was a syntax error in phtml. Resolving it fixed the issue.

0

Try for the "compose update"

to the below kind of error

2024-01-21T12:53:07.309317+00:00] main.INFO: Broken reference: the 'tracking' element cannot be added as child to 'header', because the latter doesn't exist [] [] [2024-01-21T12:53:07.316254+00:00] main.INFO: Broken reference: the 'notification_area' element cannot be added as child to 'notifications', because the latter doesn't exist [] [] [2024-01-21T12:53:07.317196+00:00] main.INFO: Broken reference: the 'unread_system_messages' element cannot be added as child to 'notifications', because the latter doesn't exist [] [] [2024-01-21T12:53:07.318044+00:00] main.INFO: Broken reference: the 'notification_window' element cannot be added as child to 'notifications', because the latter doesn't exist [] [] [2024-01-21T12:53:07.319384+00:00] main.INFO: Broken reference: the 'notification.messages' element cannot be added as child to 'header', because the latter doesn't exist [] [] [2024-01-21T12:53:07.322232+00:00] main.INFO: Broken reference: the 'global_notices' element cannot be added as child to 'global.notices', because the latter doesn't exist [] [] [2024-01-21T12:53:07.323310+00:00] main.INFO: Broken reference: the 'logo' element cannot be added as child to 'header', because the latter doesn't exist [] []

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.