Answers for "how to hide php errors"

PHP
11

how to install composer macos

Open a terminal and navigate to your user directory, ie cd /User/<USER_NAME>/
Run this command shown below to download Composer. This will create a Phar (PHP Archive) file called
composer.phar:

curl -sS https://getcomposer.org/installer | php

Now we move 
composer.phar file to a directory
sudo mv composer.phar /usr/local/bin/

We want to run Composer with having to be root al the time, so we need to change the permissions:
sudo chmod 755 /usr/local/bin/composer.phar
 
Next, we need to let Bash know where to execute Composer: 
nano ~/.bash_profile

Add this line below to bash_profile and save
 
alias composer="php /usr/local/bin/composer.phar"
and then run this command:
 
source ~/.bash_profile
 
Finally, run: 
composer -v
Posted by: Guest on November-23-2020
1

update composer mac

#mac
composer self-update
Posted by: Guest on January-02-2021
4

install composer on linux

# The following method has been tested on Ubuntu 20.04
# But i think it should work fine with any other distribution

# Ensure you're on Desktop, to prevent issues with permissions
cd ~/Desktop

# Download the installer script
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

# Verify intergrity to check whether an error happened during the fetch
php -r "if (hash_file('sha384', 'composer-setup.php') === '8a6138e2a05a8c28539c9f0fb361159823655d7ad2deecb371b04a83966c61223adc522b0189079e3e9e277cd72b8897') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

# Download composer script, which is the actual composer file
php composer-setup.php

# Remove the installer script as it's no longer needed
php -r "unlink('composer-setup.php');"

# To use composer globally, it's a good idea to move it to the path
# /usr/local/bin
sudo mv composer.phar /usr/local/bin/composer

# Try running composer to see if everything works fine
composer -V
# If you see the following output, then you're good to go:
# Composer version 1.10.10 2020-08-03 11:35:19
Posted by: Guest on September-04-2020
1

upgrading composer globally on windows

php composer.phar self-update
Posted by: Guest on October-14-2020
1

update composer mac

#Ubuntu-Download Composer and create a Phar (PHP Archive) file
$ curl -s https://getcomposer.org/installer | php

#Move it to bin directory
$ sudo mv composer.phar /usr/local/bin/composer
Posted by: Guest on November-25-2020
0

update composer

To update composer command just find location of composer.phar and update as:
 where composer 	#Retrieves you location of your composer.phar
 cd path_to_composer.phar #Move to directory with composer.phar
 php composer.phar self-update	#Update your composer
Posted by: Guest on November-14-2020
1

php hide errors

ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
error_reporting(0);

/* [email protected] */
Posted by: Guest on April-27-2021
0

report simple error in php

// Report simple running errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);
Posted by: Guest on August-16-2020

Browse Popular Code Answers by Language