Upgrade PHP from 5.3 to 5.4 on Ubuntu 12.04

,

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

http://running-on-drupal8.co.uk/node/17

Solving Error: Fatal error: Uncaught exception ‘ZendI18nExceptionExtensionNotLoadedException’

,

I got this error after deploying Zend Framework 2 project on my webserver (Ubuntu):

Fatal error: Uncaught exception ‘ZendI18nExceptionExtensionNotLoadedException’ with message ‘ZendI18nTranslator component requires the intl PHP extension’

I had to install PHP Intl extension:

sudo apt-get install php5-intl

Apache Restart:

sudo service apache2 restart

Check what extension compiled:

php -m

Change modification date of files with PHP touch

Making 3 days older files

<?php
$directory = getcwd();
$handler = opendir($directory);
while ($file = readdir($handler)) {
       if ($file != "." && $file != "..") {
       echo $file. "n";
             if($file != 'olderfiles.php'){
             touch( $directory."/".$file, strtotime('-72 hours'));
             }   
        }
}
closedir($handler);
?>

Deleting 24 hours older files with PHP


<?php
$dir = $RESOURCEDIR."aktualis_ajanlatok/temp/";
$interval = strtotime('-24 hours');
foreach (glob($dir."*") as $file){
    if (filemtime($file) <= $interval ) unlink($file);
}

?>

Donwload file without open

My browser tried to open a >100M .log file from the net instead of download.
I searched another solution:

cURL is useful console program. You can use it on Windows also : http://curl.haxx.se/download.html
C:WindowsSystem32>curl http://servername.com/path_to_logs_file/portal_error-20140717.log > E:testfolderportal_error.log
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
100  176M  100  176M    0     0  1826k      0  0:01:38  0:01:38 –:–:– 1900k

Pink Pather on Chromatic harmonica and bluesharp

-1*  2  -2*   3 .. -1*  2  -2*   3  ..

5  -4 ..  2     3   -4  -3*……..-3    3   2  -1    2. …..

-1*  2   -2*   3 .. -1*  2   -2*   3 ..

5    -4 ..   2     -4     6     -5*……………

-1*   2    -2*   3 .. -1*   2    -2*   3 .

5   -4 ..  2    3    -4    -3*……..-3     3     2    -1     2. …..

6    -5    -4   -3    3     2     -3* -3 ..  -3*  -3 .. -3*  -3 .. -3*  -3 .

3    2     -1     2      2…………………

 

http://www.slidemeister.com/forums/index.php?topic=3677.0