How to host Codeigniter app on Azure? - php

I wanted to ask you to help me (with some tutorial link or something), what i want to do is to upload php Codeigniter application on azure?
Also in my application, I got upload feature so I should make it work too (don't know if it's more complex becasue of that).
I was using wamp during developing, now I need to push it on server.

Generally, deploy a CI application to Azure Web Apps is simple, you can simply create an Azure Web Apps on Azure portal, then step in the manage page of your Azure Web Apps, click All settings=>deployment source=>chose source=>Local Git Repository to set the git deployment setting of your Azure Web Apps service.
Then you can find the Git clone url under the essential tab.
Additionally, Azure App Service can run php composer.phar install when you run git push, but it's not enabled by default. To enable it, you need to install the Composer extension for your web app.
Here is a CI template on Azure sample, you can refer to https://github.com/Azure-Samples/app-service-web-php-get-started for any hits.
And here is a video https://youtu.be/bBb_Hi2Odqc, you can refer to. It manages on the classic portal, but still works today.

Deploying Codeigniter is very easy, all you need to make sure is placing the project directory correctly.
Just upload the project folder to the hosting either by SSH or FTP.
Modify the .htaccess file accordingly.
Once all the above is set up, including uploading all the files to host, don't forget to update config.php database.php and route.php with new hosting parameters.
To make your upload feature work correctly you just need to give proper/required write access to the upload folder of the application.
And that's all you need to do while deploying Codeigniter application.

Related

SOS! How do I deploy multiple Laravel apps on a windows IIS server in a LAN

I am setting up an IIS server in readiness to host multiple PHP web apps. These will be used within our local network so no need internet access. I have read a lot of stuff on how to go about it but am getting lost even more. someone please help.
You can refer to this document for detailed steps about deploy php application on IIS.
Here are some main important points:
Install IIS in control pannel(windows) or server manager(windows server).
Configure php. Youcan download it from php official website or Web PI(more recommand). The version over php8 may not work on IIS.
Make the physical path of site points to root folder of application. It will auto generate web.config. Set the permission of root folder to avoid 500 error.
If you have multiples version of php, you can isntall php manager to configure them.

How to use Laravel storage on Azure Web App

I'm trying to host my project using Azure Web App. I created storage link
console output , but I still can't access my files. How can I fix it? Files appear in public folder if check from Kudu.
Thanks for asking question! If I have understood right you want to have a Laravel app running on Azure App Service. If so, you may wish to investigate this article which deploys an app to App Service on Windows and to this article if deploying to App Service on Linux.

laravel 5.1 on windows azure web application

I want to deploy a laravel app on my azure web application
but that return this error
HTTP Error 500.0 - Internal Server Error
The page cannot be displayed because an internal server error has occurred.
I know my web.config was setting error ..
I search some resource also can't resolve my question ...
http://blog.bobbyallen.me/2015/06/26/configuring-and-hosting-laravel-5-x-applications-on-windows-azure/
Actually, Azure Web site’s root directory is site\wwwroot, when we are deploying projects from Github to Azure Web Apps, Azure will automatically move the project to the root path site\wwwroot. So it is not necessary to change the root directory.
On my side, I cloned your project, deployed it on Azure by git, and browsed the URL <site_name>. azurewebsites.net/public to check project. I got the error message about the project couldn’t find the file vendor/autoload.php, so it looks like the project was lack of dependence.
I installed composer as the article you provided told in KUDU Console site. The URL should be https://<your_site_name>.scm.azurewebsites.net/ (first installed composer, we need to restart the console site).
Then click “Debug console”=>”CMD” at the header navigation of the console site to enter in command line tool, change directory to D:\home\site\wwwroot and run composer install, after finishing installation, we browse <site_name>.azurewebsites.net/public again, and it works well.
To set the URL rewrite to remove the “public”, we can simply modify “site\wwwroot” to “site\wwwroot\public” at virtual applications and directories section in Azure portal.
In addition you may want PHP project to show detailed errors during testing. By default, “display_errors” is off, we can simply create a file named “.user.ini” in the root directory and wirte “display_errors = on” in this file. Please read this article for more information.

PHP in Azure cloud service

Can any one suggest what is the configuration need to be done to run a simple php file in the Azure cloud service.
I am able to view my simple php file in Azure Web Site, But i cant view the same file in Azure Cloud service.
Can some one provide me some suggestions?
When you say "I am able to view my simple php file in Azure Web Site, But i cant view the same file in Azure Cloud service.", I believe you mean you can browse your PHP site in Windows Azure Websites however not with Windows Azure Service configured as something.cloudapp.net. Isn't it?
As you asked for suggestions here are some steps you can use to troubleshoot your problem:
When you access your PHP file i.e. servicename.cloudapp.net/phpinfo.php does it shows file not found error or it returns error related with PHP runtime? This is because you would need to put together PHP runtime as well as all the PHP files in your package before deploying it. If you miss any of important content, your site will not run. So you must be sure that all the contents specific to your application are in your Package which you deployed to Windows Azure cloud service.
To verify you have all the contents in your Package, you can rename cspkg to zip and then unzip it. After that you can rename cssx file to zip again and unzip it to see if all the contents are there.
You can enabled RDP access to your Azure VM and log into to check for consistency
Also for Azure Cloud Service you use this documentation: http://azurephp.interoperabilitybridges.com/articles/packaging-applications

unable to deploy symfony project to a shared hosting web server

i am using Symfony 1.4, to create my project. i have tried to deploy project using the command and methods given in chapter-16 in symfony book. but i am not able to deploy my symfony project from my local computer to web server. Can i directly copy paste my symfony project to my web server?? will that work?? or is there any other method??
NOTE: i am using Propel as ORM.
Your best option is:
1. gzip up the entire project
2. export all the data from the database using something like mysqldump
3. upload the files to the server
4. import the database dump into your server database
5. unzip your project
A couple notes:
1. Due to the shared hosting environment, you may have security issues due to other hosts on the server gaining access to your php files See here.
2. Hopefully your host allows SSH access to your server account, administering a symfony project is MUCH easier when this is the case.
3. If you don't have SSH access to your account you will have to upload the files to the server without gzipping them and this takes a LONG time due to the number of files symfony creates.
4. If possible place all your symfony files except for the web folder outside the public_html folder.
When I have to deploy something I do this:
Check if the requirement (php5, mysql4 etc) on the production server matches my application.
Change the configuration files to reflect the production server.
Upload everything to the server using ftp.
Your question is cryptic, you should really specify what kind of error you are getting.

Categories