I wrote a simple Application in HTML with a form. I submit the form into a PHP file and insert the data into a database.
I created an App Service on Azure Portal + MySQL database
It took me a while to get the git Pipeline going (So Git - Azure Portal - deploying into a Webservice)
If I submit my form, the data will go to the database just fine.
Now I wanted to extend everything with a monitoring tool. So I tried Application Insights. But unfortunately, that doesn't work. If I understand it correctly it's because of the PHP file or to be exact the Php Stackruntime on Azure.
Is it possible to the monitoring anyway somehow? I only have experience in Php and Html a little bit of Java and Javascript.
Thanks.
I have deployed sample PHP App to Azure App Service.
So I tried Application Insights. But unfortunately, that doesn't work.
I have checked with both PHP 8.0 and 8.1 runtime version. The Application Insights option is disabled for PHP.
Thanks #Dmitry-Matveev for the Application Insights SDK.
Is it possible to the monitoring anyway somehow?
Check the below steps to Monitor Azure PHP App Service.
Way 1:
Check the Logs under Monitoring.
Way 2:
Enable Application logging (File System).
Navigate to the Log stream to check the Live metrics.
Also, we can check the metrics section to monitor the App.
Related
I have Laravel application runs on an azure VM and I would like to send app logs to Azure Monitoring Logs instead of use the traditional log file.
I have checked this documentation https://learn.microsoft.com/en-us/azure/azure-monitor/agents/data-sources-custom-logs but it also depends on custom log file.
Is there any other solutions to send logs directly to azure?
For monitoring application data, we use azure application insights service. However, currently the instrumentation is available only few languages as stated
in this document (https://learn.microsoft.com/en-us/azure/azure-monitor/app/platforms#unsupported-community-sdks)
Alternatively, you can use Open Telemetry in PHP which is a observability framework – an API, SDK, and tools that are designed to aid in the generation and collection of application telemetry data such as metrics, logs, and traces which is not currently in production.
You can also leverage the below SDK to write your custom log messages to application insights.
https://github.com/Microsoft/ApplicationInsights-PHP
https://github.com/provisions-group/ms-application-insights-laravel
I have a Windows Azure subscription.
My requirement is to run a PHP script on my server. This PHP script will create a JSON file.
This JSON file will be downloaded by my iOS app. (Some kind of authentication is an added bonus)
How would I go about doing this? Should I create a "Mobile Service" or should I create a "Website" or something else like "Cloud Services"?
As far as I have researched, I think the only way to do this would be the old school website way. Any input on this will be really helpful. Thanks.
Mobile services are great if you want to create a quick CRUD layer for an app with a backend cloud storage such as Azure SQL DB. It also provides support for scheduled tasks and push notification. But for what you're after (producing a JSON file), you may find it easier to go with Azure Web Sites or Azure Cloud Services (PaaS). Azure Web Sites has a model that you'll likely find easier and with the free/shared tiers, provides a lower cost point for many models. If you want something that gives you a bit more control, then Cloud Services might be a good alternative as well. But given the simple example you've provided, you should be able to accomplish this fairly quickly using Web Sites.
I have one .php web site and I want to put it in iPad application "web application".
I mean create UIWebView and load files in WebView, so my First question is, is it possible to create this webApp and can I run it on Xcode simulator?
What do I need for implementing this application (Apache, MySQL) inside ipad outside?
Basically I want to have all my .php class inside of app and run it via iPad app, it means that if I hadn't any internet I can run the application.
Since I want to run it in both iPad and XCode simulator.
Would you please give me some hints for implement this application?
A few points you need to think about:
App Store Approval - if you intend to market this app (i.e it's not for jailbroken devices via Cydia, or an in-house corporate app) then you will most likely run in to issues with the approval process.*
You're intending to bundle in a scripting language with your application. Now this may not be an issue depending on whether or not this is exposed to the end-user; but you do run the risk of Apple finding out and pulling the plug.
The alternative to bundling in a scripting language (PHP in your case) is going to be loading the code off of an external server. This is a no-no straight away, as Apple requires your application to have functionality offline - or atleast they did. Where this leaves all the Social Networking and other network-dependant apps... Well, I guess there are exceptions!
Device Performance - you're essentially intending to run a small web server on a mobile device; a tablet in this case. This could be very resource intensive, so is probably not wise. I personally wouldn't want my battery being drained because someone has decided that they want to bundle in a web server with their application.
Your implementation idea itself is sound, in the respect of using a UIWebView. You should probably check out the Apache Cordova/PhoneGap framework, and that should satisfy your needs and provide an off-the-shelf way of packaging up your web app. If you do need custom functionality then it's worth looking at anyway; plugins are relatively easy to develop, there's a wide range available already and the plans for cordova now are to allow developers to implement it into native applications. (Say, if only one view requires PhoneGap functionality etc)
Personally, I fail to see what requires PHP that can not be done via HTML5 and PhoneGap. There are storage options available, SQL options, you're using web technologies so can easily query external web services. It's also a lot safer with regards to app approval - as it's tried and tested; there are many applications build using such solutions already in the store.
I think you need a serious re-think. Otherwise, perhaps you could post some more details?
Please note that PHP is a server-side language. So do you want to run a server on your iPad? If so, you can develop PHP applications on a proper desktop/laptop and then view them on iPad Safari browser over Wifi.
Otherwise you can install LightHTTPd server with PHP libraries, MySQL, CURL and all from Cydia app store on a jailbroken iOS device to get a full environment. For Android there is this app PAW server available which can run an Apache server in such devices.
If you just want to check your website is working fine on small devices, or you want to check responsiveness of your website. Go to:Ipad Peek and run your website on given devices/simulators using url.
A simple google search pulled up this free framework: http://www.ipfaces.org/
I've never used to before, but it might do what you need.
We have a web-application(Loyalty platform for restaurants) developed in PHP. But most of these merchants dont have internet connection all the time. So, is there way to convert only merchant module into a desktop application so that merchant works stand alone and it syncs to web application whenever there is an internet connection.
Yes it is possible ,but not like a wizard job.
If you know only PHP than you can use Titanium ,and deploy Desktop App's.
You can use a local database ,an XML ,jSON or SQLite and on the first connection with internet you can clear the local database and update the Remote one.
I am working on a similar project and in my case I am following the below aproach.
Web Application is PHP and MySQL
Desktop Application is .net Application using SQL Lite
Windows Service checks for internet connection and syncs db in the background
In my case, my users can go offline for days or weeks and data was critical for me and I felt HTML 5 offline content was not the best option for this.
No. Designing a desktop PHP app is very different from designing a web PHP app and will require major amounts of rearchitecting.
Now having said that, it is possible to deploy a web server to the client's machine and have it run a web PHP app there. It will still require some rearchitecting to get the sync working though.
Develop a desktop application in .net or Java what ever you are familiar with and use some database like SQLite to save the data locally. When ever the user goes to online you need to connect to your online database and sync the data.
If there is possibility that same data can be updated by different users, then you have to plan on handling the conflicting scenarios like if a data record is updated at both end which data should be used. If there is no possibility to concurrent update then simply you will have to upload your data when user goes online.
I'm developing an Android app, and due to time circumstances, I started developing the project in PHP, together with a MySQL backend. is it possible to package the project folder as a APK where it could be opened within the tablet?
I understand Android applications are meant to be written in Java, and I have checked out:
http://phpforandroid.net/
But it doesn't answer if it was possible to package a complete PHP project as an APK.
No. Since PHP is a server side language you would have to run a webserver and a MySQL server on the device (like #deceze said).
Since you have already started development in PHP my recommendation would be to develop a web based application and have your users access it from a very lightweight client on the Android device. You could use something like PhoneGap or AppCelerator to develop a front end client app since I'm guessing your talents lie in web development :)
"When all you have is a hammer, you start to approach every problem as if it was a nail"
You're using the wrong tool for the job. PHP is not meant for writing interactive GUI applications, it's meant for running server side scripts or commandline scripts. Even if you could easily run PHP on an android phone (which you cant), it would be the wrong choice of language for a phone app.
You have two options
1) throw away the work you've done so far and redo it in a language more appropriate to the task at hand
2) deploy your application to a publicly accessible web server and run it via the handset's web browser.
If you think about it, you'd need to squeeze a web server, the PHP core, whatever extensions your application uses and a MySQL server onto a handheld device. This is seriously overkill.
And why MySQL? Android provides SQLite database support.