How to debug slow PHP on a Windows Azure App Service? - php

I've installed WordPress on a Windows Azure App Service utilizing the provided template. It works, but it is extremely slow. I am using Azure Databases MySQL on the same datacenter as the site. According to the logs, the database has plenty of juice and available resources. The site is hosted on an S3 service plan running PHP 7.2 and WordPress 4.9.8. How can I know what is the cause of the slow responses? I need to see if it's a driver, MySQL, PHP on Windows, Plugin, etc? I would love to do this at a low level. I've followed this horribly formatted blog post instructions, but I don't get any logs.

Have you tried to use the built in App Service Diagnostics tool?
https://learn.microsoft.com/en-us/azure/app-service/app-service-diagnostics

Related

Can We use xampp as Online server in Google cloud ubuntu vm instance

Hi to all and Thanks in advance,
I am new to google cloud platform. Recently i created one google account and created one Ubuntu vm instance on that.Meanwhile, downloaded free version of xampp(php mysql server) from apache and installed on it.And also pointing one domain to that IP.I have a plan to host more website on(by making virtual host) it.I don't know whether its wright or wrong. I am really grateful if you are answering my below queries.
1.Whether its secure or not. If no, how to configure secure xampp server.Please also mention
alternative options.
If yes, to do something to get it right?.
2.Please tell me, the proper way to make ubuntu apache server on google cloud platform
I am very much eager to hear from you guys.
You've already created a VM instance and installed based on Ubuntu and installed XAMPP on it. In general there's no difference in installing and configuring software on standard server or GCE VM.
Have a look at the tutorial Setting Up LAMP on Compute Engine:
This page shows you how to get a LAMP stack running on a Google
Compute Engine virtual machine instance. Follow the steps in this
tutorial to configure LAMP on a Debian, Ubuntu, or CentOS instance.
and check if you missed something.
In addition, I'd recommend you a few extra steps:
reserve a static external IP address and assigning it to your VM instance instance.
use appropriate to your load machine type instead of mentioned in the tutorial f1-micro (you can change it later).
learn more about GCP Firewall to use it instead of firewall on your VM instance.
create snapshots of your persistent disk to protect your data.
choose DNS servers for your domains: it could be Google Cloud DNS or other DNS servers.
think about reservation of Compute Engine zonal resources, it could be helpful in some cases.
check Marketplace for preconfigured LAMP solutions.
Going back to your questions:
To avoid some obvious security issues you should follow community tutorial, official documentations, security recommendations for used software and common sense.
You're able to install LAMP manually (as you already did) or use preconfigured solution from Marketplace.
you can use centos to configure your apache mysql php to run your site. For more info visit the link here,
https://www.wlpbasic.tech/how-to-configure-a-lamp-on-centos-7/

Can I Host php driven site on AWS Using Lightsail?

Can we host a php site in AWS Lightsail?
I checked its feature but it shows wordpress joomla etc but not showing php.
Yes. AWS Lightsail is a server that supports many things. The feature you need is available and is called a "LAMP Stack":
LAMP stack is a popular open source web platform commonly used to run dynamic web sites and servers. It includes Linux, Apache, MySQL, and PHP/Python/Perl and is considered by many the platform of choice for development and deployment of high performance web applications which require a solid and reliable foundation.

I want to host yii application

I have created yii app locally. And now I wish to upload the same. I have brought the domain, but am bit confused, as which type of hosting should I go for ?
I have options like Cpanel(Linux), Parallels Plesk for Windows, VPS and Dedicated servers on some sites.
I have developed application using Yii 1.1
and database in MySql.
Could you guys suggest me best hosting available and suitable for me to go with.(Though It should be economic. :-p)
And what things should I consider, or are required while buying a hosting for my Yii application.
Edit :
I actually tried hostname/path/to/yii/requirements/index.php and It passed on my friends shared hosting, but I couldn't find proper way to install the Yii on his server space (He has an Windows hosting).
Someone said I'll require an SSH to run a command ( $php /yii/framework/yiic webapp directory-where-app-will-reside ) to install yii framework on server.
When called the Tech-support of his hosting agency they said youll have to go with VPS or dedicated server for SSH.
Yii applications runs on any servers/hosts that support php.
In this case you need a server or host that support mysql too.
Its related to your website traffic that choice sharing hosting or VPS.
In your application have to exists a file named requirement.php that shows Yii requirements, of course in Yii2. For Yii1:
Requirements ΒΆ After installing Yii, you may want to verify that your server satisfies Yii's requirements. You can do so by accessing
the requirement checker script via the following URL in a Web browser:
http://hostname/path/to/yii/requirements/index.php Yii requires PHP
5.1, so the server must have PHP 5.1 or above installed and available to the web server. Yii has been tested with Apache HTTP server on
Windows and Linux. It may also run on other Web servers and platforms,
provided PHP 5.1 is supported.
However is better your host be on LAMP platform.

Is it possible to simulate Azure Websites locally for testing?

We're developing a dynamic website that is to be hosted on Azure Websites. Before going to the staging phase, I'd like to test it locally in an environment that is as similar to the production environment as possible. (By testing I mean clicking around and checking that things work, nothing fancy.)
Right now we're doing this with standard Apache, MySQL and PHP installations, but I fear that things that work on this setup might not work on the live web server (Azure Websites).
Ideally, we'd use our own computers to run virtual machines that would be exactly like the production server we will be deploying to. Is this possible? If so, how? If not, is there another way that is better than what we're currently doing?
Your best bet will be to perform a test deployment to an Azure Website instance. There isn't a local emulator or replica for Azure Websites and Azure Websites are more than just a vanilla instance of IIS.
To provide you with the best chance of success I would recommend:
Replace Apache with IIS locally.
Ensure the version of PHP you are using aligns with a supported versions on Azure Websites. Deploy the PHP "runtime" on your IIS setup locally.
MySQL - again check supported versions align with the version you are running. This isn't embedded in the Azure Websites feature - you could run your own on a VM or leverage one from ClearDB.

How can I access a Lotus Notes Database from PHP5

I would like to access our Domino Databases from php.
My php5 is running in an Linux environment OpenSuse and for development Debian based System. Domino Server 8.5.1 is also running on a OpenSuse Server.
Currently I'am accessing the Databases via parsing the web pages from Notes, but that is a horrible way to do that.
Are there any ways or ideas to access Notes an more comfortable way?
Yes, there are plenty of ways. You can use Domino Designer to write a web service on the Domino server to expose the data that you want, and access the service that from your PHP code. You can use REST APIs if your Domino server can be upgraded to 8.5.3 or higher. You might be able to install Domino on your OpenSuse server and have your PHP code invoke Java programs that use the Notes classes in Notes.jar to do the work, or you can actually do that without installing Domino, but you'll have to use the remote version of the classes in NCSO.jar and your server will have to enable CORBA. You can use ODBC and NotesSQL as discussed here. I'm listing that last even though you did put an ODBC tag on your question because Notes databases are not relational and I find thinking of them that way to be too limiting, but if your data fits a relational model and you're comfortable with it, then it might be your best choice.
What Richard said, except I would start with this link for REST APIs. That takes you to the latest product documentation. Richard's link takes you to a slightly outdated page on OpenNTF.

Categories