Laravel 5.3 blank white screen no errors - laravel

I have gone through so many forums trying to find a solution to fix this error but non seems to be working.
Error in site-error.log
Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in /path/site/vendor/laravel/framework/src/Illuminate/Foundatio‌​n/helpers.php on line 475
I have assigned
sudo chown -R www-data:www-data /path/directory
results for ls -al
drwxrwxrwx 12 www-data www-data 4096 Oct 25 10:06 .
drwxrwxrwx 6 www-data www-data 4096 Oct 25 06:46 ..
drwxr-xr-x 6 www-data www-data 4096 Oct 25 10:04 app
-rw-r--r-- 1 www-data www-data 1646 Oct 25 10:04 artisan
drwxr-xr-x 3 www-data www-data 4096 Oct 25 10:04 bootstrap
-rw-r--r-- 1 www-data www-data 1412 Oct 25 10:04 composer.json
-rw-r--r-- 1 www-data www-data 134388 Oct 25 10:04 composer.lock
-rw-r--r-- 1 www-data www-data 1723068 Oct 25 10:04 composer.phar
drwxr-xr-x 2 www-data www-data 4096 Oct 25 10:04 config
drwxr-xr-x 5 www-data www-data 4096 Oct 25 10:04 database
-rw-r--r-- 1 www-data www-data 615 Oct 25 09:46 .env
-rw-r--r-- 1 www-data www-data 491 Oct 25 10:04 .env.example
-rw-r--r-- 1 www-data www-data 61 Oct 25 10:04 .gitattributes
-rw-r--r-- 1 www-data www-data 96 Oct 25 10:04 .gitignore
-rw-r--r-- 1 www-data www-data 558 Oct 25 10:04 gulpfile.js
-rw-r--r-- 1 www-data www-data 135 Oct 25 07:17 .htaccess
-rw-r--r-- 1 www-data www-data 401057 Oct 25 10:04 _ide_helper.php
-rw-r--r-- 1 www-data www-data 401 Oct 25 10:04 package.json
-rw-r--r-- 1 www-data www-data 930 Oct 25 10:04 phpunit.xml
drwxr-xr-x 5 www-data www-data 4096 Oct 25 10:04 public
-rw-r--r-- 1 www-data www-data 749 Oct 25 10:04 readme.md
drwxr-xr-x 5 www-data www-data 4096 Oct 25 10:04 resources
drwxr-xr-x 2 www-data www-data 4096 Oct 25 10:04 routes
-rw-r--r-- 1 www-data www-data 563 Oct 25 10:04 server.php
drwxrwxrwx 5 www-data www-data 4096 Oct 25 10:04 storage
drwxr-xr-x 2 www-data www-data 4096 Oct 25 10:04 tests
drwxr-xr-x 34 www-data www-data 4096 Oct 25 10:06 vendor
I also applied
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
but am still getting the black white screen. where am i going wrong

For anyone else who might be facing the same issue, after upgrading to php7 you have to disable Apache2's PHP5 module and enable PHP7, like so:
a2dismod php5
a2enmod php7.0
sudo service apache2 restart

Related

Why I am getting Screen is terminating error in MacOS

When trying to enter into Docker VM in mac, I am getting screen is terminating error whereby I cannot go into Docker Desktop. In Mac, Docker host is not the mac as it runs as a VM. Any solutions?
Thank you for the help.
Workarounds
I think it's a bug since version 2.3.0.4 of Docker Desktop for Mac, as I have used screen successfully to access the Docker VM in the past on Mac without this issue. (edit: this issue appears to be still present at version 2.4.0.0)
There are some alternative methods to access the Docker VM. Here is one that worked for me:
workaround method 1
run this command to enter shell of the Docker VM:
docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh
Then you can do what you need to do at the usual location for Docker volumes:
/ # ls -lah /var/lib/docker/volumes/
total 72
drwx------ 10 root root 4.0K Aug 27 11:34 .
drwx--x--x 15 root root 4.0K Oct 31 00:51 ..
drwxr-xr-x 3 root root 4.0K Aug 26 10:44 14ce94e174839f1947efa6fcbf5ac1fb2ea3b0f0b3f25311fee333ee374576b6
drwxr-xr-x 3 root root 4.0K Aug 25 12:34 34eb2bd80931ff954e1da80c5383beb4def61129d4005432b77080531cd10a5a
drwxr-xr-x 3 root root 4.0K Aug 27 11:34 830de2ce31519c921b50c448964b54517ca4461d337b56a9fd6e5b354ace3247
drwxr-xr-x 3 root root 4.0K Aug 25 12:34 data-layer_mongo_data
drwxr-xr-x 3 root root 4.0K Aug 26 11:01 ebb440184703bfad17184bd5ff74b677b50d74b8f0fbdd116506a1fcacfb00cd
drwxr-xr-x 3 root root 4.0K Aug 27 11:27 hawakening-services_back-end_log
drwxr-xr-x 3 root root 4.0K Aug 27 11:27 hawakening-services_front-end_log
drwxr-xr-x 3 root root 4.0K Aug 27 11:27 hawakening-services_mongo_data
-rw------- 1 root root 64.0K Oct 31 00:51 metadata.db
workaround method 2
Here's another one that also worked for me.
Run this command to enter shell of the Docker VM:
docker run --rm -it --privileged --pid=host walkerlee/nsenter -t 1 -m -u -i -n sh
As before, here is where the Docker volumes' directories are:
/ # ls -lah /var/lib/docker/volumes/
total 72
drwx------ 10 root root 4.0K Aug 27 11:34 .
drwx--x--x 15 root root 4.0K Oct 31 00:51 ..
drwxr-xr-x 3 root root 4.0K Aug 26 10:44 14ce94e174839f1947efa6fcbf5ac1fb2ea3b0f0b3f25311fee333ee374576b6
drwxr-xr-x 3 root root 4.0K Aug 25 12:34 34eb2bd80931ff954e1da80c5383beb4def61129d4005432b77080531cd10a5a
drwxr-xr-x 3 root root 4.0K Aug 27 11:34 830de2ce31519c921b50c448964b54517ca4461d337b56a9fd6e5b354ace3247
drwxr-xr-x 3 root root 4.0K Aug 25 12:34 data-layer_mongo_data
drwxr-xr-x 3 root root 4.0K Aug 26 11:01 ebb440184703bfad17184bd5ff74b677b50d74b8f0fbdd116506a1fcacfb00cd
drwxr-xr-x 3 root root 4.0K Aug 27 11:27 hawakening-services_back-end_log
drwxr-xr-x 3 root root 4.0K Aug 27 11:27 hawakening-services_front-end_log
drwxr-xr-x 3 root root 4.0K Aug 27 11:27 hawakening-services_mongo_data
-rw------- 1 root root 64.0K Oct 31 00:51 metadata.db

chmod will not work on entries of a directory

How come on this folder
sudo ls -l /etc/letsencrypt/archive/jenkinsv2.sfucsss.org/
total 20
-rw-r--rwx 1 root root 1927 Oct 17 22:58 cert1.pem
-rw-r--rwx 1 root root 1647 Oct 17 22:58 chain1.pem
-rw-r--rwx 1 root root 3574 Oct 17 22:58 fullchain1.pem
-rw----rwx 1 root root 1675 Oct 19 21:15 privkey-rsa.pem
-rw----rwx 1 root root 1704 Oct 17 22:58 privkey1.pem
Doing sudo chmod -R o-rwx /etc/letsencrypt/archive/jenkinsv2.sfucsss.org/ work but doing
sudo chmod -R o-rwx /etc/letsencrypt/archive/jenkinsv2.sfucsss.org/*
chmod: cannot access '/etc/letsencrypt/archive/jenkinsv2.sfucsss.org/*': No such file or directory
Does not?

Putting files to HDFS

I am running below commands on console:
[root#master ~]# pwd
/root
[root#master ~]# vi test.txt
#editting file
[root#master ~]# su - hdfs -c "hdfs dfs -put /root/test.txt /user/ambari-qa"
put: `/root/test.txt': No such file or directory
the file is there
[root#master ~]# pwd
/root
[root#master ~]# ls -l
total 9636984
-rw-r--r--. 1 root root 1823777034 Jun 12 08:34 ambari-2.6.2.2-centos6.tar.gz
-rw-------. 1 root root 716 Mar 19 2012 anaconda-ks.cfg
drwxr-xr-x. 2 root root 4096 Oct 15 11:30 Desktop
drwxr-xr-x. 2 root root 4096 Oct 15 11:30 Documents
drwxr-xr-x. 2 root root 4096 Oct 15 11:30 Downloads
-rw-r--r-- 1 root root 15 Oct 18 20:16 enabled~
-rw-r--r-- 1 root root 15 Oct 18 20:38 enablez~
-rw-r--r--. 1 root root 511720220 Oct 15 19:33 HDP-2.6.5.0-centos6-rpm.tar.gz
-rw-r--r--. 1 root root 7303095942 May 15 03:50 HDP-2.6.5.0-centos6-rpm.tar.gz.1
-rw-r--r--. 1 root root 43941068 Aug 13 20:28 HDP-UTILS-1.1.0.22-centos6.tar.gz
-rw-r--r--. 1 root root 185646832 Oct 15 17:04 jdk-8u181-linux-x64.tar.gz
drwxr-xr-x. 2 root root 4096 Oct 15 11:30 Music
drwxr-xr-x. 2 root root 4096 Oct 15 11:30 Pictures
-rw-r--r--. 1 root root 12148 Dec 16 2011 post-install
-rw-r--r--. 1 root root 552 Dec 16 2011 post-install.log
drwxr-xr-x. 2 root root 4096 Oct 15 11:30 Public
drwxr-xr-x. 2 root root 4096 Oct 15 11:30 Templates
-rw-r--r-- 1 root root 2 Oct 23 05:39 test
-rwxr-xr-x 1 root root 3 Oct 23 06:37 test.txt
However,I am getting no such file or directory, I am creating the file in the path but I get that error?
Seems the problem was due to privilege at /root directory
dr-xr-x---. 25 root root 4096 Oct 23 06:37 root
using chmod 755 worked then

chown: /usr/local: Operation not permitted - issue with brew update /usr/local is not writable - MacOS 10.13.1 high sierra

I am unable to do brew update because I can’t chown /usr/local:
$ brew update
Error: /usr/local is not writable. You should change the ownership
and permissions of /usr/local back to your user account:
sudo chown -R $(whoami) /usr/local
based on this: https://github.com/Homebrew/brew/issues/385
I tried these 2 chown command but it didnt work:
$ sudo chown -R $(whoami) $(brew --prefix)
chown: /usr/local: Operation not permitted
$ sudo chown -R $(whoami) /usr/local
chown: /usr/local: Operation not permitted
Here is my /usr/local listing:
$ cd /usr/local
$ ls -al
total 56
drwxr-xr-x 23 root wheel 736 Dec 2 15:24 .
drwxr-xr-x# 9 root wheel 288 Oct 26 00:22 ..
-rw-r--r-- 1 megasap wheel 0 Dec 2 15:11 .com.apple.installer.keep
drwxr-xr-x 16 megasap admin 512 Jan 11 14:08 .git
drwxr-xr-x 5 megasap admin 160 Dec 2 15:24 .github
-rw-r--r-- 1 megasap admin 1112 Aug 11 2016 .gitignore
-rw-r--r-- 1 megasap admin 253 Aug 11 2016 .travis.yml
-rw-r--r-- 1 megasap admin 291 Aug 11 2016 .yardopts
-rw-r--r-- 1 megasap admin 3161 Aug 11 2016 CODEOFCONDUCT.md
drwxr-xr-x 35 megasap admin 1120 Jan 11 11:35 Cellar
-rw-r--r-- 1 megasap admin 1241 Jan 26 2016 LICENSE.txt
drwxr-xr-x 9 megasap admin 288 Dec 2 15:25 Library
-rw-r--r-- 1 megasap admin 5451 Aug 11 2016 README.md
drwxr-xr-x 262 megasap admin 8384 Jan 11 23:09 bin
drwxr-xr-x 11 megasap admin 352 Dec 2 15:25 etc
drwxr-xr-x 57 megasap staff 1824 Dec 2 15:25 include
drwxr-xr-x 102 megasap staff 3264 Dec 2 15:25 lib
drwx------ 4 megasap wheel 128 Dec 2 15:24 libexec
drwxr-xr-x 3 megasap admin 96 Dec 2 15:23 n
drwxr-xr-x 34 megasap admin 1088 Dec 2 15:25 opt
drwxr-xr-x 8 megasap admin 256 Dec 2 15:24 sbin
drwxr-xr-x 16 megasap admin 512 Dec 2 15:25 share
drwxr-xr-x 8 megasap admin 256 Dec 2 15:25 var
I'm using macOS 10.13.1 high sierra.
Reinstalling Homebrew worked for me
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
You may want to try:
sudo chown -R $(whoami) $(brew --prefix)/*
For more see: https://github.com/Homebrew/brew/issues/3228
Apparently this is due to mac's "system integrity configuration". To get around this you need to reboot your machine into recovery mode (restart your machine and hold down ⌘+R) go into Utilities > Terminal and type the command:
csrutil disable
reboot
And then run your chown command. I guess its recommended to reenable this after changing permissions to re-enable the security.
Full disclosure, I haven't tried this myself - I'll give it a go later today since its a massive PITA. For the record, I'm only attempting to install python3.
Original information
On Mac, I have to give "Full Disk Access" to the terminal using the below page -
https://macreports.com/terminal-says-operation-not-permitted-on-mac-fix/
uninstall and install Homebrew using https://github.com/Homebrew/install

How to use local gem with bundler

I have local ruby gem, with a development version forked from github. So I have it locally. Now I want to use it in my application. I'm using bundler so I did:
gem 'otrs_connector', :path => '/devel/otrs_connector'
problem is that I get errors about missing files
require 'rubygems'
require 'otrs_connector'
then run
$ ruby app.rb
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- otrs_connector (LoadError)
how can I load my "under development" gem?
this is my /devel/otrs_connector
$ ls -al /devel/otrs_connector
total 112
drwxr-xr-x 15 marcinkrzyzanowski staff 510 Oct 1 15:22 .
drwxr-xr-x 33 marcinkrzyzanowski staff 1122 Oct 1 15:17 ..
-rw-r--r-- 1 marcinkrzyzanowski staff 55 Oct 1 15:04 .document
drwxr-xr-x 13 marcinkrzyzanowski staff 442 Oct 1 15:04 .git
-rw-r--r-- 1 marcinkrzyzanowski staff 820 Oct 1 15:04 .gitignore
-rw-r--r-- 1 marcinkrzyzanowski staff 480 Oct 1 15:04 Gemfile
-rw-r--r-- 1 marcinkrzyzanowski staff 773 Oct 1 15:04 Gemfile.lock
-rw-r--r-- 1 marcinkrzyzanowski staff 1054 Oct 1 15:04 LICENSE.txt
-rw-r--r-- 1 marcinkrzyzanowski staff 2016 Oct 1 15:04 README.rdoc
-rw-r--r-- 1 marcinkrzyzanowski staff 1428 Oct 1 15:04 Rakefile
-rw-r--r-- 1 marcinkrzyzanowski staff 5 Oct 1 15:04 VERSION
drwxr-xr-x 4 marcinkrzyzanowski staff 136 Oct 1 15:04 lib
-rw-r--r-- 1 marcinkrzyzanowski staff 16896 Oct 1 15:22 otrs_connector-1.3.0.gem
-rw-r--r-- 1 marcinkrzyzanowski staff 2954 Oct 1 15:04 otrs_connector.gemspec
drwxr-xr-x 4 marcinkrzyzanowski staff 136 Oct 1 15:04 test
Where is the file stored? I think you stored it in a devel folder in your home folder, not at /devel. If you start a path with a /, you points to the root of the HD path.
You might want to change the path to
gem 'otrs_connector', :path => '~/devel/otrs_connector'
(please note the ~ which is a replacement for the path to your home folder).

Resources