Cannot install soap on wordpress on azure - wordpress

I want to install a plug that requires SoapClient.
In WooCommerce -> Status I have message like that "Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected."
I spent a lot of time on it trying several ways:
1. https://social.msdn.microsoft.com/Forums/en-US/18ddb045-05ed-4ad3-aafa-a2c872ece55e/install-soap-module-for-php-72-in-web-app-for-containers-wordpress?forum=windowsazurewebsitespreview
In Azure SCM Kudu -> SSH
Later I reset the server using azure and still not working.
When I perform this action twice I get this message, but when I do a reset I can install it again.
2. How do I install soap extension?
In Azure SCM Kudu -> SSH
I cannot use sudo and apt-get
I also can't understand why I don't have root on ssh. In many examples, people have something like root#ASFF1234. I have only ASFF1234. :(
In Azure SCM Kudu -> Bash
I cannot use sudo and apt-get doesnt work.
3. https://bobcares.com/blog/woocommerce-soap-client/
yum doesn't work on SSH and bash
Would someone be able to tell me what I'm doing wrong?
Thank you in advance.

Related

How to became superuser on AWS EC2 WordPress Site

I want to install SSL on AWS EC2 WordPress Site,
I have tried this:
bitnami#ip-172-24-0-191:/opt/bitnami/apache2/htdocs$ sudo /opt/bitnami/bncert-tool
An updated version is available. Would you like to download it? You would need to run it manually later. [Y/n]: Y
The tool will exit now. To run the updated version run the following command:
/opt/bitnami/bncert-tool
bitnami#ip-172-24-0-191:/opt/bitnami/apache2/htdocs$ /opt/bitnami/bncert-tool
but I have this error:
Error: There has been an error.
This installer requires root privileges. Please become superuser before
executing the installer
Press [Enter] to continue:
All you have to log in with AWS root user first.
Installing SSL depends on your web panel like cpanel, cyberpanel, directadmin etc.
If you have bought a SSL then install it via panel first.
If you want to install SSL via SSH access, Be sure your SSH port is open and the credentials are correct.
Your error is showing because of not root user access.
Thanks.

AWS CodeDeploy deployment failed at event ApplicationStop

I am trying to set up auto-deployment from GitHub to AWS, using EC2.
I set Role with CodeDeployServiceRole auto policy
After following the Tutorial: Use AWS CodeDeploy to Deploy an Application from GitHub, my deployment fails at the ApplicationStop event, after trying for couple of minutes with error code HEALTH_CONSTRAINT. I'm not sure how to troubleshoot the issue/where to look.
These are few hints of how you can navigate your way
Logs as mentioned in comments in /var/log/aws/codedeploy-agent
As AWS support recommend you can add for one time --ignore-application-stop-failures so it will skip that step in case it failed last time and see، because the application stop Lifecycle event uses the appspec file from the last successful build so if that one is corrupted somehow this step will fail in the following builds
(not recommended) you can delete the file, that CodeDeploy uses to keep track of the previous successful deployment in the following path /opt/codedeploy-agent/deployment-root/deployment-instructions/
Check the latest logs at /var/log/aws/codedeploy-agent
If your deployment is failing at ApplicationStop event, then most likely the issue is your EC2 instance does not have the necessary permissions to get the artifacts from S3 bucket.
Your EC2 instance must have an IAM role attached which gives it enough permissions to download the artifacts from S3 bucket
Your EC2 must be started with an IAM role. So you may have to reboot your instance after attaching the role to it.
From your configuration, looks like you have provided permissions to CodeDeploy to perform certain actions on your EC2. You may want to check if your EC2 also has the necessary permissions to download packages from S3 bucket.
Another reason for this error is that the CodeDeploy Service is not running on your machine. On Windows machines, Code Deploy Service terminates sometimes, and as a result, the deployment is not downloaded on the machine. Nothing appears in the logs either.
Run services.msc and check the code deploy agent service. If it is not running, start it and retry the deployment.
I had the same issue and solved it by solving codedeploy-agent that wasn't working on my EC2 instance.
sudo service {httpd/apache2} status
Something might have cause the agent not to run properly
Hope it will help
I had the same issue. You also need to make sure that your EC2 instance has code-deploy-agent installed.
Follow the below aws guide. It worked for me.
AWS guide to install code agent in linux server
Check if the codedeploy-agent is running.
sudo service codedeploy-agent status
if not running then use below command to run
sudo service codedeploy-agent start
If you are using aws Windows server, check the logs at :
C:\ProgramData\Amazon\CodeDeploy\log\codedeploy-agent-log.txt
AWS Docs
To check if the codedeployagent running in windows. Open powersheel command window and run these command.
powershell.exe -Command Get-Service -Name codedeployagent
Better to stop and start again.
powershell.exe -Command Stop-Service -Name codedeployagent
powershell.exe -Command Start-Service -Name codedeployagent
Or Restarting also works
powershell.exe -Command Restart-Service -Name codedeployagent
For me I had to uninstall the codedeployagent on windows by uninstalling and deleting old files of codedeploy.
Run the below command in powershell one by one to uninstall.
wmic
product where name="CodeDeploy Host Agent" call uninstall /nointeractive
exit
After this delete the codedeploy folder at this location.
C:\ProgramData/Amazon/CodeDeploy/
Now install codedeployagent on windows.
Start the codedeployagent again.
powershell.exe -Command Start-Service -Name codedeployagent

Missing value auth-url required for auth plugin password

I am trying to install openstack using devstack on ubuntu 16.04.
I followed the following link.
https://docs.openstack.org/developer/devstack/guides/single-machine.html
When I run
sudo openstack service list
, it prompt the following error.
Missing value auth-url required for auth plugin password
Make sure you are logged into horizon and download the rc file (right corner). After that do source admin-openrc.sh
Note that you have to download the rc file of the project you are working on
This should do. keystonerc_admin file is generated at the end of openstack packstack installation
source keystonerc_admin
always run admin-openrc file before running any openstack command
eg.
$source admin-openrc
then run whatever openstack command you want to run
eg.
$openstack --debug server list
Take rocky version of OpenStack Keystone as an example. https://docs.openstack.org/keystone/rocky/install/keystone-openrc-rdo.html#using-the-scripts
You can create an admin-openrc.sh (If you are installing OpenStack Keystone for the first time.) and put environment params. And source this file before you run any "openstack" command. This resolves the issue.
I put the admin-openrc.sh in directory /usr/share/keystone/admin-openrc.sh for a recommend.

How to correctly install dokku - with or without sudo?

I'm learning dokku right now for simple web deployment. Offical install instructions state this command:
wget -qO- https://raw.github.com/progrium/dokku/v0.3.12/bootstrap.sh | sudo DOKKU_TAG=v0.3.12 bash
I'm not a devop or admin, but as far as I understand this line, it performs all bootstrapping and installation under the root account, thanks to sudo. So dokku will be checked out into a directory with root access rights, and all additional directories like /var/lib/dokku/ will also have root access rights.
The problem is - all articles across the internet about dokku instructs to execute dokku command or do dokku-related actions without sudo. For example, instructions about this dokku database plugin, https://github.com/krisrang/dokku-mariadb, instructs to install it via:
cd /var/lib/dokku/plugins
git clone https://github.com/krisrang/dokku-mariadb mariadb
dokku plugins-install
This is not working, since /var/lib/dokku/plugins have root access rights and git clone will fail with acces denied. It's hard to be a non-admin nowadays, but maybe someone will hint what I'm doing wrong? Do I need to install dokku some other way, or all dokku-related tutorials across internet assume that I'm executing them under root (which is, by my limited admin knowledge, highly not recommended for security reasons).
You should run those three commands as sudo:
sudo su -
The dokku binary will run code as the dokku user even if you execute as root. So it should be fine to run that as is. Once you are the sudo user, just run the install instructions listed in your question. Hope my answer helps ! :)
I also contacted them as they mentioned:
In the future, we'll have a method to install plugins directly with a
dokku command
As far as I can tell, you need to run it as root. A traditional way to install a program without root-privileges is to download the source and compile it, which can be done by running:
git clone https://github.com/progrium/dokku.git
make
make install
Dokku's makefile depends on apt-get, which requires root access to run.
I'm not familiar with dokku or dokku-mariadb, but I think the author of dokku-mariadb also assumes root access.
For people running into the question on wether its fine to install through root user (on fresh created VMs as per the guide), try checking this Github issue:
https://github.com/dokku/dokku/issues/961
Since the commands related to dokku are prefixed with # rather than $, it means that its not necessary to run them from non-root user. It also makes writing suddo unnecessary (and form my experience counterproductive).

Migrate a self-hosted wordpress to MS Azure. Max query threshold exceeded with ClearDB

I would like to migrate a self-hosted wordpress site to Microsoft Azure. I've already done this migration job with Duplicator plugin from a server to another and everything worked well.
The problem with Ms Azure is that it uses a service called ClearDB to manage databases. (feel free to correct me if it's wrong) When you create a free account with this service you will get a restricted plan called Mercury which allows you to query your db (max dimension of 20MB) up to 3600 queries/hour.
But the migration process requires several operations on the database and the
As written in this blog the only option is to upgrade your plan to the 10$/month subscription.
I've found another way but the plugin the author uses in this link does not work for me.
Should I use another plugin to backup my WP content?
Do you have any advice?
Thanks
There are three solutions. I chose the first one.
Configure Mysql on a virtual machine and install Wordpress (classic way)
This can be done installing an already configured image with the Lamp packages on your Virtual Machine. Please see this link
If you want to set up it manually, follow these steps:
Create the vm (I used Ubuntu 14.04) then connect via SSH to your server.
ssh root#server_ip_address
Install Apache
sudo apt-get update
sudo apt-get install apache2
To check if Apache is installed, direct your browser to your server’s IP address. The page should display the words “It works!"
Install MySQL
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
During the installation, MySQL will ask you to set a root password. Once you have installed MySQL activate it with this command:
sudo mysql_install_db
Finish up by running the MySQL set up script:
sudo /usr/bin/mysql_secure_installation
The prompt will ask you for your current root password.
Install PHP
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
PHP also has a variety of useful libraries and modules that you can add onto your virtual machine. You can see the libraries that are available.
apt-cache search php5-
Decide which module you wish to install and type:
sudo apt-get install name_of_the_module
Although LAMP is installed, we can still take a look and see the components online by creating a quick php info page. Create a new file:
sudo nano /var/www/info.php
Add in the following line. Save and exit
<?php
phpinfo();
?>
Finally restart apache
sudo service apache2 restart
and check the info page typing in your url
server_ip_address/info.php
Install mysql in a VM and create an Azure Website with a Wordpress image. Then link the mysql db on the virtual machine to the Wordpress site.
Upgrade ClearDB plan to the 10$/month subscription and specify the url of your remote db in wp-config.php

Resources