I wanted to try the appFog free plan to tryout my application I developed in Yii,I checked the jumpstart on appFog section that says that Yii applications are now supported by appFog
However I have checked all the documentations about framework, only drupal and wordpress were available, I searched all over the internet but I couldn't find the best docs for it
Then I decided to try to upload both Yii framework folder and my application and include an index.php file that includes the myapplication/index.php file, which seemed to be a nice try but some assest and other classes in yii are configured to look for yii framework in the root directory causing my application to crash with Yii error but not php error
If anyone has already tried or know where I can find a nice tutorial about Yii on appfog, I would really appreciate that.
I was able to deploy a test app without doing anything tricky:
Create a new php APP on AWS US East infrastruture from the appfog console
Download the latest Yii tarball and extract it to a FOLDER
Create test application:
$ cd FOLDER/framework
$ ./yiic webapp ../testdrive
Push the changes:
$ af update APP
Uploading Application:
Checking for available resources: OK
Processing resources: OK
Packing application: OK
Uploading (71K): OK
Push Status: OK
Stopping Application 'APP': OK
Staging Application 'APP': OK
Starting Application 'APP': OK
Open http://APP.aws.af.cm/testdrive/ in browser:
Welcome to My Web Application
Congratulations! You have successfully created your Yii application.
Related
I've spent 10+ hours yesterday reading up about / testing tutorials with google cloud and how I can use them as a host for my dynamic website.
With all of the new information in my head, I'm scrambled on what to do.
I already have my Virtual Machine Instance built with an IP that links to my domain, this works fine. However, I cannot for the life of me figure out how to put my project files on there. I figured it would have been something like "upload project files", "link with appengine", "link with cloud sql", but it seems like I was wrong?
In the tutorials, I uploaded googles sample projects (tutorials) by cloning a github link in the shell.
git clone https://github.com/GoogleCloudPlatform/getting-started-php.git
They also said a zip file could be extracted as an alternative.
Are those the only way of doing this? Should I create my own github and cone it in the shell?
Is it possible to link an AppEngine with a bucket that has my project files on there? (just throwing the question out there)
bonus question: once the files are uploaded, am I able to edit/develop through google cloud or do I need to edit changes in my files, then re-upload it to the cloud as an update?
This is my first time trying to have google (or any company) host my website, and this is completely foreign territory for me so any direction is much appreciated.
there are couple things mixed up in your question. Let me try to untangle them.
You don't need to create virtual machine if you want to run your PHP powered website on App Engine. There's a great overview in this article https://cloud.google.com/appengine/docs/standard/php/an-overview-of-app-engine
The way you run your PHP website on App Engine is by deploying your code to the version, you can do it using gcloud app deploy tool from your sources on your local machine. I recommend you to start by going through tutorial on here: https://cloud.google.com/appengine/docs/standard/php/quickstart
There's currently no way to link Google Cloud Storage bucket with App Engine version, you have to deploy your code yourself using either gloud app deploy or using App Engine Admin API that gcloud is using internally.
There's no way to edit your App Engine application code in the cloud.
I am new to google cloud plateform. I have a php application on my local host and want to set up this on App engine. I followed some documentation and used gcloud deploy command for example given in documents. It was working properly. But in examples it first clone a git repository and deploy a code from that on app engine. I know how to launch app engine instance. But I am not getting how I will upload code from my local host to app engine. I know app.yaml and config files are needed but my question is - how I will upload and deploy code to app engine even if I created app.yaml and config files.
I heard about google app engine launcer but didn't find any valid source for installing on ubuntu. Is there any client software that can be used to deploy my code on app engine or is it compulsory to first set up my code on git then use it as given in example in document.
Follow the quickstart in the documentation. It covers everything that you need:
Downloading the Cloud SDK (The launcher is ancient and deprecated, don't use it.)
Creating a Cloud Platform project in case you haven't yet.
Running locally, which you've already figured out.
Deploying your project to App Engine using the gcloud app deploy <path_to_app.yaml> command.
You don't need or want the launcher. You don't need to do anything with git.
After installing google cloud SDK and following all instruction on here i sucessfully set up local development server and php application.
Is it possible to run Cake 3.0 or higher on Azure Web Apps? I have an app running locally on a 3+ version but when I installed CakePHP on my Azure web app it's running 2.5.1.
I feel like it's just a matter of uploading all of the newer files and the db created for the 3.0 version but scared there is some kind of write access the new cake will need thus preventing it from running and burning a ton of my time.
I started learning PHP 3 weeks ago so calling me a newb is probably an insult to newbs.
This article tells answered most of my original questions regarding this issue.
Yes, it is possible to deploy CakePHP > 3.0 applications to Azure Web Apps. But we need to some preactions to make the application to run. Generally, you can try to following steps:
Create an empty Azure Web Apps, and enable Composer extension, and also you can enable Visual Studio Online for easy script modifications and command running. Refer to https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-mysql-deploy-use-git/#enable-composer-automation-with-the-composer-extension for more.
Create a file named web.config with the content at http://book.cakephp.org/3.0/en/installation.html#iis7-windows-hosts in the root directory of your application.
Add the inlt extension in PHP runtime on Azure. Add a folder named ext in your root directory, create a file ext.ini in this folder with the content:
extension=php_intl.dll. Add an App Setting to your Web App with the key PHP_INI_SCAN_DIR and value d:\home\site\wwwroot\ext. You also can do this step leverage Visual Studio Online extension after deployment. Refer to https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-configure/ for details.
Set up the development environment of your Azure Web Apps, deploy your CakePHP application to Azure via Git. Refer to https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-mysql-deploy-use-git/#set-up-the-development-environment for details.
wondering if someone can maybe help me out a bit.
I have been working on a project that is a symfony2 web app running on Microsoft azure. it was all working great! i have my code being pulled in from git and i can easily push and update the site.
I then started working on Logins, nothing fancy, i was playing around with HTTP_BASIC athuentication and had it working after following the docs here
http://symfony.com/doc/current/book/security.html
I had a few users and i was pretty happy as id never done this before, my aim down the line is to use doctrine and databases etc but for the moment this will do.
so i had it working locally then i pushed to my branch. and boom 500 error. now i'm not sure what I've done and I've already done a bit of research, but nothing has really helped?
I read somewhere that by removing all the .htaccess files would be a fix, but no avail. the error that i'm getting is just a google 500 error and not a symfony error which makes me that I've really messed it up!
i could roll back to a previously working commit but id lose a lot of work on the front end side, but its confusing how everything is working absolutely fine locally but not on the server... please ask me any questions that could help you help me i guess!
help would be great. also, im a junior!
I built an clear symfony application, configured the security system with HTTP_BASIC authentication on local, and deployed to Azure Web app via GIT. I didn’t have 500 internal error.
So I suspect that there are some errors in the application.
Usually, when we deploy symfony applications to Azure via GIT, there several files and folders will not be updated with the application which may cause the application lack of dependent packages, we can check the list in .gitignore file in root directory.
Login on KUDU console site of your Azure Web App, the URL should be: https://<your _site_name>.scm.azurewebsites.net/DebugConsole, run the following commands in cmdlet:
cd site\wwwroot
(if you do not have composer.phar file in your project)
curl -sS https://getcomposer.org/installer | php
php composer.phar install
It will install the dependences and clear the cache.
Furthermore, we can check whether the application can run in dev mode, visit URL: http://<your _site_name>.azurewebsites.net/web/app_dev.php, if it works fine in dev mode, but rise an error 500 in prod mode known as “app.php”, we should manually clear the production cache:
Login on KUDU console site, and run php app/console cache:clear --env=prod.
If you get a [Symfony\Component\Filesystem\Exception\IOException] exception, you can manually delete app\cache\prod folder and run the command again.
Also, we can check the detail error messages in dev.log and prod.log in app\logs folder.
Beside doing file operations in KUDU console site, we can use WebMatrix on Windows to remote our sites on Azure.
what my aim here is to, upload my project that is basically a controller returning a twig template its as simple as that, i just cant figure out how to get it on the hosting.
I have been using symfony for a few months now, so still new to it all. and all the hosting/details stuff is new too me.
Whats throwing me off is my understanding of a hosting web/ folder
and how azures its wwwroot/
i used this website
http://symfony.com/doc/current/cookbook/deployment/azure-website.html
but i'm finding it rather difficult to follow it..
does anyone have any better sites with more clear steps on how to deploy? i've read a lot about a public_html folder but i've never heard/used it before
If someone could explain how the www.domain.com/web/app.php works that would help, i know that, that is the file that is called, but not too sure if i need to say call this file "app.php" or if its done kinda like the way a standard websites looks for 'index.php'
any kinda help or pointers would be much appreciated here as i'm kinda lost
Generally, we can build our project and test on local, then deploy on Azure Web Apps via Git or FTP tools.
Here is my test steps:
Build Symfony project on local, referring Using the Symfony full-stack framework
Login to Azure preview Portal, click NEW=> Web+Mobile=> Marketplace, in Web Apps section click Web app + MySQL, then click create.
When finishing creating Web app service, we can find MySQL connection string in Settings=>Application settings=>Connection strings click show connection string.
then click Set up continuous deployment in Deployment section. Select Local Git Repository for the source. Then in Essentials section, we can find there added a Git URL. Copy it.
In your local symfony project, make sure your Symfony repository has a .gitignore file at its root directory with at least the following contents:
/app/bootstrap.php.cache
/app/cache/*
/app/config/parameters.yml
/app/logs/*
!app/cache/.gitkeep
!app/logs/.gitkeep
/app/SymfonyRequirements.php
/build/
/vendor/
/bin/
/composer.phar
/web/app_dev.php
/web/bundles/
/web/config.php
run the following commands to init git repo and first-time push to Azure:
`
git init
git add .
git commit -m "initial commit"
git remote add azure [URL for remote repository]
git push azure master
Sign on Kudu console of your Azure web site, at https://<your-website-name>.scm.azurewebsites.net/DebugConsole, run following commands:
cd site\wwwroot
curl -sS https://getcomposer.org/installer | php
php composer.phar install
Now visit http://<your-website-name>.azurewebsites.net/web/app.php in browser, we should see the project.
Now we need to configure URL rewrite to remove /web/app.php pattern of the url. Add a file named web.config with the content shown in Deploying to Microsoft Azure Website Cloud in the root directory which is /site/wwwroot on Azure. Click restart on Azure portal, now we can visit the site at http://<your-website-name>.azurewebsites.net .
By the way, for deploying a PHP-MySQL application on Azure Web Apps, we can get more information at Create a PHP-MySQL web app in Azure App Service and deploy using Git. And specifically for Symfony project, the Symfony guide is still useful, and we can ignore section Enabling the PHP intl Extension .
If you can't change the name of the "wwwroot" directory to "web", you have to change the configuration of symfony to use "wwwroot" instead.
Have a look at this page!
I think the easiest solution is the one with the symlink:
Some shared hosts have a public_html web directory root. Renaming your web directory from web to public_html is one way to make your Symfony project work on your shared host. Another way is to deploy your application to a directory outside of your web root, delete your public_html directory, and then replace it with a symbolic link to the web in your project.