installing cakephp 3 manually, without composer - php

I need to install CakePHP 3 in an old-fashioned upload-unzip-run way.
The archive I've downloaded from cakephp/cakephp/tags does not contain the default folders like webroot, Model etc., which means it's not complete.
The official documentation does not cover this. Here's a relevant Github issue I found, but the person ends up still using Composer.
There's also cakephp/app and it seems to include those missing files, but it's not mentioned in cakephp/cakephp's composer.json, and even if I download it I've no idea how to merge the packages.

Packaged app (cakephp/app) releases that include all dependencies (framework (cakephp/cakephp), standard CakePHP plugins (cakephp/debugkit, cakephp/bake, etc), required third party libraries) can be found on GitHub.
https://github.com/cakephp/cakephp/releases
It's the download with the small package symbol, named like cake-3-x-x.zip.
However, it isn't a good idea to ditch the dependency manager, as keeping the code base and the autoloader up to date will be rather tedious, and, no offense, I have my doubts that you'll be able to handle this properly if you don't even know how to stitch the app and cake packages together.

You can install CakePhp 3 without Composer.
You need minimum requirements to install CakePhp 3 and CakePhp 3 boilerplate ( fresh copy of Cakephp 3 ).
You can download CakePhp 3 boilerplate from github.
Requirements
Server
HTTP Server. For example: Apache. Having mod_rewrite is preferred,but by no means required.
PHP 5.4.16 or greater.
mbstring extension
intl extension
Database :
MySQL (5.1.10 or greater)
PostgreSQL
Microsoft SQL Server (2008 or higher)
SQLite 3
All built-in drivers require PDO. You should make sure you have the correct PDO extensions installed.
CakePhp 3 Boilerplate:
Repository Home
https://github.com/cakephp/cakephp/releases
CakePhp 3.1.4
https://github.com/cakephp/cakephp/releases/download/3.1.4/cakephp-3-1-4.zip
CakePhp 3.0.15
https://github.com/cakephp/cakephp/releases/download/3.0.15/cakephp-3-0-15.zip
Download one repository and unzip where you wanted to install it.
You may get one error like ( you may not get error if you are lucky!)
Fatal Error
Cake\Error\FatalErrorException
Error: Class 'Cake\Mailer\Email' not found
File D:\xampp\htdocs\practice\cakephp\cakephp-3-1-4\config\bootstrap.php
Line: 138
Then you have to comment two line in config/bootstrap.php
//Email::configTransport(Configure::consume('EmailTransport'));
//Email::config(Configure::consume('Email'));
And finally you got CakePhp 3 installed.
[I am also new in CakePhp 3.So Please inform me if there are any wrong in my given process.]
Thanks

Use Composer.
Install Composer locally, follow the Cake installation instructions, then upload the created folders to the target webhost.

Easy, For CakePHP 3.x you can just download the release you want from here
https://github.com/cakephp/cakephp/releases (eg. https://github.com/cakephp/cakephp/releases/tag/3.3.16).
For a complete installation select the first download link (.zip)
the other links are just for the src

Just run this command to get a clone of CakePHP 3.10.0
git clone -b 3.x git://github.com/cakephp/cakephp.git

Try simple steps
1. Download XAMPP Server.
2. Install XAMPP server.
3. Go to ..\xampp\php\php.ini and open.
4. Add this line (extension=php_intl.dll) or if exist uncomment.
5. Download Composer setup from https://github.com/composer/windows-setup/releases/
6. Install composer and give php.exe file in path
7. Open cmd and check now php version using command php -v. if its showing php version its means its working.
8. Now open cmd and cd on xampp\htdocs folder & run command composer create-project --prefer-dist cakephp/app app_name
9. Finished folder created in htdocs.

Related

Yii2 composer upgrade not adding/updating files in project root?

I had an old Yii2 project that was built 2+ years ago on version 2.0.12, then left idle since around this time. Today I wanted to re-awaken this project and update it to the latest version
of Yii2 and all dependencies.
Reading the Upgrade notes here I saw that the following command will get me to the latest stable version:
composer require "yiisoft/yii2:~2.0.38" --update-with-dependencies
After this command succeeded I confirmed by running ./yii command in the project root that I am now on 2.0.38, however there are a few things missing. The main README.md remains the same as in version 2.0.12 and there are some files present in a clean build of 2.0.38 that remain missing from the root, e.g. Vagrantfile and docker-compose.yml.
Is there an undocumented step I am missing here to do this cleanly? Surely it's not down to manual intervention to go find/add these missing elements to fully upgrade?

PHP Composer does not clone symfony/assetic-bundle properly

I am trying to install Symfony on CentOS Linux wih PHP 5.6 and cPanel installed.
When I run composer require symfony/assetic-bundle , once adding bundle to the AppKernelphp, symfony (app/console too) stops working and keeps logging this error:
[10-Jun-2016 22:00:57 UTC] PHP Fatal error: Class 'Symfony\Bundle\AsseticBundle\AsseticBundle' not found in /home/avid24/public_html/app/AppKernel.php on line 19
After checking the vendor directory, turns out that composer has downloaded a single compressed file with a random name, I could extract it with unzip. but problem still exists!
This environment works properly on windows and I could easily update symfony and its components using composer.
Any help? Anyone with the same experience ?
Well, I eventually figured out the problem!
I enabled suhosin extension which prevents the composer and other similar command prompt php scripts from a proper execution.
As a temporary solution I copied php.ini and disabled unnecessary extensions and put it next to my project and call composer this way
$php -c ../composer-php.ini ~/composer ......
I'll create a script to make the life easier
I didn't find any resource which describes coexistence of composer and suhosin extension, so I'm not sure if this is the ultimate solution but the root cause is identified.
If anybody makes workaround this subject I'd be more than happy to know about it.

Newest symfony installer vs composer

I'd like to know whats the difference when creating new symfony project with new symfony installer that has appeared last time and old-way composer.
I've installed latest version of symfony (2.6.1) with both, and result was different, for example when I install symfony with composer, i get .gitignore file.
When I install with new symfony installer script, gitignore is missing.
Here is amount of catalogs and files in fresh project:
symfony installer: 1498 directories, 7136 files
symfony installer + composer update: 1571 directories, 7749 files
composer create-project: 1615 directories, 7905 files
I suppose I'll stick to old way - composer, since new installer seems to be bugged or at least not complete yet, however I'd like to understand more on this topic, whats the difference, is it safe to use new installer etc?
As Leggendario already explained, the installer downloads the dist files from the website (a .tar.gz or .zip file). This speeds up the installation process quite a bit.
However, when building the dist files, symfony.com uses a custom build script which removes some files and changes some things. On the other hand, composer simply downloads the repository for you.
The main differences:
Composer downloads the latest dependencies (as Leggendario pointed out), while the build script contains the latest files at the moment of building.
Composer uses the dev versions and thus uses git clone to download the packages. The build script uses only stable packages, which will make Composer use the dist version. Some packages remove test and doc files from their dist files.
Composer contains all project related information, like a .gitignore. The build script previously assumed the person installing it didn't have git, so removed this file and other git related files like the .gitkeep files in app/cache and app/logs.
I any case, both the installer and composer always give you a working version of the Symfony Standard Edition.
At last, the build script was changed now the installer became the official way of installing. It'll now contain the git related files. On the other hand, it'll not contain the LICENSE file, UPGRADE-*.md files and README.md file. So in the end, we can say that the one installed by the installer is more usable, as it removes useless files.
Symfony2 Installer will downloaded it from the web site ( in this case: http://symfony.com/download?v=Symfony_Standard_Vendors_2.6.1.zip ).
To see the differences between symfony installer and the classic composer create-project is enough to take a look at both composer.lock: https://www.diffchecker.com/oig86oki
On the left the composer.lock generated after composer create-project, on the right symfony installer. It was obvious to everyone that Symfony2 downloaded from an archive could not have the lastest packages. So, do the update with composer update.
Again, on the left the composer.lock of composer create-project, on the right the new composer.lock after the update: https://www.diffchecker.com/lj5j2eap
As we expected. But in the vendor dir there are not the same number of file. Some folders are not there. Some folders with functional tests are not downloaded with symfony installer. You need to force composer to update all packages, or reinstall them.
Did you update installer as well with :
symfony self-update
or in windows :
php symfony.phar self-update
As stated here ?
That's perhaps one part of the answer.
Among differences, the installer seems to deal better with different symfony versions.

Magento 2 installation, redirect 404 issue

I am facing a redirect 404 issue while installing Magento 2.
here are the steps i followed
1 - git clone this repo
2 - composer install in the root of the project
3 - composer install in the setup folder
4 - Enabled php_intl extension
5 - Created a virtual host magento2dev.com
Now when in browser, i run http://magento2dev.com This redirects me to 404 http://magento2dev.com/setup/en_US/index
Nothing is displayed in log ...
Using version alpha95, and now tried alpha96 But same problem.
any suggestions ???
Please install composer under root/home directory and then copy the composer.phar to user/local/bin directory so that it can be accessible from everywhere (assuming you have Ubuntu or Linux).
Right now, due to the unstable web interface of the installer, it is recommended to use CLI instead.
Here is a described sample installation.
Installing Magento 2 has always been an issue for me too. But it seems like using Docker is one of the best solution in my case. I ran a container which has a pre-built Magento 2 with all its system requirements.
We have lots of different docker images for Magento 2, try it out.
Sample Repo:
https://registry.hub.docker.com/u/ilampirai/docker-magento2/

Installing Laravel 4.1 with Laravel Installer

I'm trying to install Laravel 4.1 using the Laravel installer but the docs isn't very descriptive.
Can someone please give a step by step guide on how to do this? I'm completely new to Laravel and PHP frameworks as a whole.
I'm on a Windows 7 machine running WAMP 2.2.
This information/answer isn't quite up to date anymore. The instructions here will install the latest version which is no longer 4.1. For those still wanting to install Laravel 4.1 (despite 4.2+ being out), use the following command.
composer create-project laravel/laravel project_name 4.1
You could replace the 4.1 with 4.0 or 4.2 depending on your situation.
Laravel 4.1 is handy if you aren't in control of your PHP version and you're stuck back on 5.3.7
Laravel 4.2 requires PHP 5.4.
When upgrading a project to a newer version of Laravel, be sure to review the release notes
Installing Laravel means simply downloading Laravel Application bootstrap, which has to be placed in your project directory. That application has a composer.json file, which will, after you run composer install command, download all necessary dependencies (including core framework).
That is one way. Another preferred way is directly through:
composer create-project laravel/laravel project_name
In both cases, you need to have composer installed on your machine. Composer is a modern PHP package manager, which has a ton of benefits (autoloading, custom commands...).
There is really no need for two downvotes, especially when this guy was reading documentation, which he couldn't understand. We were all installing Laravel for the first time.
If you want install laravel via Laravel Installer use this method:
First, open up command line. then enter:
composer global require "laravel/installer=~1.1"
Now go to:
C:\Users\ {User Name} \AppData\Roaming\Composer\vendor
Copy and paste vendor in your destination folder.
Now in your destination folder hold the shift key down and press right click and in opened navigation menu click on "open command window here" then enter command below:
laravel new your_project_destination
Ex:
laravel new laraveltest

Categories