Deploy a Symfony2 app on cPanel - php

I'm new to cPanel and I want to deploy my Symfony2 app on it.
I need some guidance on how to do it,
I downloaded the Symfony2 framework with the Softaculous Apps Installer.
PS : My app is also on BitBucket.

First off all: CPanel is just a web-shell arround your linux os that makes it easy to maintain your server from distance through a web interface.
Actualy you do not need softaculous because it just installs an empty new symfony project.
There are globally two ways to install your symfony project.
Install git and Composer on your server, use git to pull the project from bitbucket and install the the vendors with 'composer install' or 'composer update'.
Upload your complete project from your local computer to the server with FTP.
In both ways you still have to install your database and set your configuration.

If you have a shared online server then just copy the entire symfony project through FTP, set up your database credentials in parameters.yml, and manually delete the prod directory inside var (symfony ≥ 2.8) or app (symfony ≤ 2.7).

Related

Google App Engine composer dependencies do not update

I'm running my PHP application on Google Cloud App Engine Standard. After I deployed a new version of my app with a new composer package, I see that this new package was not installed during the deployment.
I deploy my app with gcloud app deploy. In the Cloud Console Debug tool, I can't find the package in the vendor folder. The package is successfully installed locally.
Is there a trick to update composer packages?
I had this problem too. Turns out this only works for '2nd generation run times'. In other words, your application will need to be PHP7.3. php5 applications will not process composer files.

Minishift - How to compile assets using Laravel mix

I have a minishift instance running on my laptop. I am running a Laravel app on it and it's configured to use a private git repository (a copy of repo is present on my laptop from where I push the changes to the git repository). Now my question is
How do I compile assets on it using laravel mix after I make CSS changes on my local repository and push them to the git repo?
Till now I have tried to:
Run npm dev by logging in to minishift using SSH. But it gives the error npm not installed.
The npm package was added to the S2I base image only recently, it may not have got through to official images yet if using the Minishift from the CDK. It should have got through to CentOS based builder images that would be used by Origin based Minishift.
https://github.com/sclorg/s2i-base-container/issues/115
Where did you get Minishift from and what version?

Laravel: How to install php7 with Homestead

I m a newbie and learning Laravel. I m having a trouble with install php and homestead.
As I read in Laravel Official Website:
Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, a web server, and any other server software on your local machine.
So I think I do not need to install php in my local machine ??? But when I install composer, it requires PHP.exe and I cannot browse that PATH. I misunderstand here. I have been stuck in this problem and research many websites for whole day, so I think better to ask (even if it is stupid question). Could anyone explain for me please...
---EDIT_NEW---
This is my completed steps to use Laravel:
Install git
Install virturalbox
Install vagrant
vagrant box add laravel/homestead
git clone https://github.com/laravel/homestead.git Homestead
cd Homestead, bash init.sh
Configure Homestead
add to Hosts file
Now I have to install laravel, it requires composer. Composer installation requires php.exe PATH. But if I dont use XAMPP or others local development environment, how can I install Composer ?
(Note: Maybe I misunderstand here "without requiring you to install PHP, a web server, and any other server software on your local machine").
Are you executing composer "inside" Homested vagrant VM or in windows "cmd"? In the first case it's strange in the second of course it doesn't work. You need to acces the Homestead VM via SSH
Thanks for help, with your answers and Laracast Video: https://laracasts.com/lessons/say-hello-to-laravel-homestead-two. Now I got the answer.
You need to follow some steps to running Laravel in your system (windows 10).
1) Install XAMPP or WAMPP, you can download XAMPP from Here.
2) Install composer, find it from Here.
3) Install GIT (optional).
Than go for create New Laravel App.
1) Open Terminal -> goto C:/xampp/htdocs/
2) composer create-project laravel/laravel <App_Name>
3) php artisan serve

openshift symfony install third party libraries

I'm trying to add FosUserBundle and HWIOAuthBundle to my symfony project in openshift. In localhost, to add those libraries, I'd to edit composer.json and update the composer.phar. Now I don't know how to update the composer.phar on openshift.
My way(step-by-step):
Create a symfony app from openshift
clone the project to my localhost
edit the composer.json and push it again to openshift
after that, what should I do to update the composer? Or is there another way to add those libraries to the symfony project?
You probably need to setup an action_hook to run the composer command on the openshift server after you do a git push, maybe in the deploy action_hook. Another idea would be to install the libraries locally using composer and then add them into git and push all of it up to the server with a git push and let it all be deployed together. As far as I know composer is not installed on the server, so you may need to install it into your app-root/data directory and call it from there with your deploy hook.
Here is a blog article about using composer with OpenShift: http://stanlemon.net/2013/03/22/composer-on-openshift/ that might help answer your question

How do I install Zend Framework 2 and check if the installation works?

I need clear instructions for installing Zend Framework2 on a web host.
The hosting company is Ipage. Ipage already has Zend Engine installed, so it should support Zend Framework2.
Ipage does not provide ssh, so an ssh installation method would not work. I can only install by FTP'ing the files to the host.
I have Zend Framework Full Package as a zip file. In the zip file are bin, library, and resource folders. I have uploaded all those files to the server.
Issues:
I think there are path settings I need to set, and I need help with those.
after installation, I need to check if Zend Framework is working; is there a way to check that?
Here is what I have so far:
Downloaded ZendFramework - 2.2.1.zip
Extracted all the files from bin, library, and resource folders and uploaded them to the host.
I am stuck here, any help would be good.
You can follow these simple steps:
1) Use Composer to install Zend Framework on your local machine. This will generate the required autoloading etc for you.
2) Upload the files via FTP to your host.
Detail:
You must setup a local development envorinment on your machine, if you're using windows install something like Wamp/Xamp. This will install PHP/Apache etc for you.
To begin we will install the Skelleton Application to get started. Grab a copy from here:
https://github.com/zendframework/ZendSkeletonApplication
you can either download the package, or use one of the methods in the config, Git etc. Git would be recommended, but I am assuming you don't have this installed, so downloading the package is fine.
bring up a terminal window (in windows hit windows key + r and type cmd). change to the directory you placed the package.
now use composer to do your installation for you, type this:
cd my/project/dir
cd ZendSkeletonApplication
php composer.phar self-update
php composer.phar install
Now you should be ready to upload to your server (I have skipped howto seutp your local environment etc).
Upload the whole directory structure to your web server, making sure the public folder in in your document root on the server. It should now work :)

Categories