Ubuntu snippet
Disable apache directory browsing in ubuntu:
sudo a2dismod autoindex
sudo service apache2 restart
Disable apache directory browsing in ubuntu:
sudo a2dismod autoindex
sudo service apache2 restart
Postfix
If you use Postfix on your server you have to change config > mail.php
// ‘driver’ => ‘smtp’,
‘driver’ => ‘sendmail’,
Install Postfix: http://www.codechewing.com/library/set-up-postfix-on-ubuntu-server/
https://help.ubuntu.com/14.04/serverguide/postfix.html
useful:
https://www.linode.com/docs/email/postfix/email-with-postfix-dovecot-and-mysql
Configure Postfix to Use Gmail SMTP on Ubuntu https://rtcamp.com/tutorials/linux/ubuntu-postfix-gmail-smtp/
Smtp
http://www.havetheknowhow.com/Configure-the-server/Install-ssmtp.html
[php snippet=1]
I tried out on Ubuntu Server.
Check this tutorial: http://www.youtube.com/watch?v=xHjk4mZALSY
You have to install youtube-dl :
sudo apt-get install youtube-dl
If you have problem with running check this link: http://askubuntu.com/questions/431508/unable-to-download-videos-using-youtube-dl-sig-error-how-to-correct
sudo youtube-dl -U
sudo easy_install -U youtube-dl
sudo youtube-dl
My test: sudo youtube-dl – f37 --extract-audio --audio-format mp3 -o "/var/www/mp3 folder/%(title)s.%(ext)s" https://www.youtube.com/watch?v=0w3olGsQ6tQ
f37: audo size setting
… You can set url with PHP:
$validLink = validData($_GET['youtubelink']);
$output = shell_exec('youtube-dl --extract-audio --audio-format mp3 -o "/var/www/
mp3 folder
/file/%(title)s.%(ext)s" '.$validLink );
You know:
The Laravel framework has a few system requirements:PHP >= 5.4, MCrypt PHP Extension
I got this error after deployment to the server: “Mcrypt PHP extension required.”
Solution:
sudo apt-get install php5-mcrypt
sudo php5enmod mcrypt
sudo service apache2 restart
sudo dpkg-reconfigure phpmyadmin
During reconfigure, I said “yes” to reinstalling the phpMyAdmin database. Afterwards, the problem was gone.
source: http://stackoverflow.com/questions/20731487/phpmyadmin-pma-table-uiprefs-doesnt-exist
I was deploying my Zend Framework 2 project when I got thios error:
Using $this when not in object context in /…./module/Webshop/Module.php on line …
“Upon googling, I found out that PHP 5.3 treats closures differently. This PHP version doesn’t support $this
in closures.” (https://github.com/laravelbook/ardent/issues/23)
So I had to update from 5.3 to 5.4
sudo apt-get update
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php5-oldstable
sudo apt-get update
sudo apt-get install php5