Install a new Cakephp3 Project with composer

  1. You need the php tool composer which you can get from composer.org
  2. Simply run the following command in the windows command prompt  while in your “c:\xampp\htdocs\” folder;
    composer create-project --prefer-dist cakephp/app mywebapp

    3.In your htdocs folder you should see a new folder called “my_app_name”

    Example:
    If you wanted to create an application called  “mywebapp” simply enter;

    composer create-project --prefer-dist cakephp/app mywebapp

AMD Driver Issues – Update 24th feb

Update 24th feb:
Teh latest AMD drivers cause problems with Overwatch, they seem to cause FPS spikes and basically ruin the game so once again ive rolled back them, drivers to right where i was 16.11.5

I seen a post on the Blizzard forums which acknowledged the issue;

Micro freezes after the new AMD driver update?
https://us.battle.net/forums/en/overwatch/topic/20753198965

[quote="207517502906"]Hey there everyone!

So I have seen this happen with AMD cards using the newer AMD drivers. In my experience reinstalling the standalone drivers that do not include Relive (Recording/Streaming) software (As well as disabling the Windows 10 Xbox Game DVR if you are on Windows 10) can solve this for you. Give the following a shot and see if it helps you all out.

Please disable the Windows 10 Game DVR via the XBoxlive app:
 1. From the start menu open the Xbox App.
 2. You will be asked to Sign in. Please do so, even if you have never used this app before. You may need to create a microsoft account if you do not already have one.
 3. On the options menu Click 'Game DVR'
 4. Switch off 'Record game clips and screenshots using Game DVR''

I would like you to perform a clean install of your drivers by completely removing the old drivers as follows:
 1) Let's remove the old drivers via a program called DDU ([url="http://www.wagnardsoft.com/forums/viewforum.php?f=5"]Display Driver Uninstaller[/url]) and choose the first link.
 2) Once that's installed, go ahead and run the program. It will say that you're not in safe mode and ask to run in safe mode. Go ahead and tell it yes to restart into safe mode.
 3) Once in Safe mode the program will pop back up. Simply select your video brand from the drop down and then click Clean and Restart.
 4) Once it restarts the PC you'll want to get your video drivers from [url="http://support.amd.com/en-us/download/desktop?os=Windows+10+-+64"]here[/url]. (Please note this was for the video card series mentioned earlier, if your card is different you may need drivers specific to your card.)

Finally, let's reset the in game user options:
 1. Click the blue bnet icon on the bnet app.
 2. Choose settings, then game settings.
 3. Click the reset in game user options button under the correct game listing.
 4. Confirm the changes and close the window.[/quote]

So i seemed to have solved the problems with the AMD drivers, i installed the Windows 10 Anniversary Update and not only does windows feel faster the drivers that had problems before now work.’

However im using 17.1.1 at the moment and have not retried the drivers below that were crashing.

Also when you upgrade your drivers you should always reset your in game video settings usally a “restore to default” option exists.  This seems to have sorted all the problems i was having.

AMD have released new drivers 17.1.2

Ive had 4 crashes to desktop since i installed the newest AMD 16.12.2 with Battlefield 1 so ive rolled back to 16.11.5.  The problems and crashes also happen with other games.  Im running Windows 10 64 bit with an AMD R9 380 4 GB.

The errors i got in Battlefield 1 happened 4 times and i wasn’t using DirectX 12 mode either and it never occurred before with previous drivers.


 

 

 

 

And since rolling back the drivers I’ve had no problems, guess the lads at AMD need to sort out the driver.

After a quick Google it seems im not the only person with this problem.

https://community.amd.com/thread/208966

https://www.google.ie/search?q=amd+16.12.1+problems&oq=amd+16.12.1

Edit:
AMD have released new drivers 16.12.2 and i still have issues with them so back to the old drivers.  A clean install of windows 10 didn’t fix the issue either.

16.12.2 – New Error -wtf

Even the update a few days ago still hasn’t sorted the problems.

 

 

CakePHP3 Cache Example – Using Curl to get a Web page contents


Heres a simple example of using the cache feature of cakephp. We want to grab a webpage contents from the web but we only want to do this once otherwise its going to be slow and waste resources.

The basic idea is that we check if the url is saved in cache, if it is then we read it in otherwise we must use curl to grab it.

CakePHP3’s Cache settings are in the config/app.php file;

/**
* Configure the cache adapters.
*/
'Cache' => [
'default' => [
'className' => 'File',
'path' => CACHE,
'url' => env('CACHE_DEFAULT_URL', null),
'duration' => '+60 minutes',//the duration object should cached for
/*'prefix' => 'mycacheprefix_',*/
],

 

 

CakePHP 3 Cache:
https://book.cakephp.org/3.0/en/core-libraries/caching.html