How do I uninstall Phabricator - php

I host a Phabricator instance on a Ubuntu machine.
How do I uninstall Phabricator totally, including all config files and settings.
I already removed all three folders cloned from git, and uninstalled mysql-server using
sudo apt-get purge --auto-remove mysql-server.
However, when I run install_ubuntu.sh to install back again, the old admin account, the log for Daemons logs, and the site settings are still there in website.
How can I remove all configuration and data completely?

The problem most likely is that uninstalling the MySQL server does not delete databases. You have a couple of options.
Probably the best way to delete the data would be to run Phabricator's bin/storage destroy command. This is the best approach, because it does not make any assumptions about how Phabricator stores its data (MySQL, files etc.). Install Phabricator, MySQL and all other dependencies again, and look for bin/storage in Phabricator installation directory.
Another way would be to install mysql-server and mysql-client, launching the mysql command line client and dropping all databases starting with phabricator_.
If you really want to mess with database files directly, you can find them in /var/lib/mysql.

Related

PHP installation appears to be missing the MySQL extension which is required by WordPress?

I am currently updating our docker image in Azure.From this image appsvcorg/alpine-php-mysql:0.3 to this leonzhang77/alpine-php-mysql:0.31.
After pasting and save it on container,restart app, when I browse my site (linux.rapidvisa.com , Wordpress 4.9.7,PHP7) that error appeared.MySQL also cannot connect to var/run/mysqld/mysqld.sock.
I tried to fix it. I can see on my phpinfo.php that MySQL/MySQLi is not there or not running.
I am new in this Docker and Azure environment although I managed to enter into SSH and do some tweaking but no luck.
I tried to type sudo apt-get install blah..but command not found.Whenever I typed major commands always -ash: command not found. Can somebody advise me what to do?
i dont know what the exact problem is with your docker construct but your second one is the alpine distribution.
in alpine linux there is an other package manager system.
you have to use apk.
like: apk update or apk add htop

How to install PHP5 on Openshift?

I am trying to install PHP5 using the instructions available here.
However, when I perform: nohup ${OPENSHIFT_REPO_DIR}/misc/make.sh &, I get a:
nohup: failed to run command .../make.sh: Permission denied message on top of nohup: ignoring input and appending output to nohup.out.
I have tried sudo, but I don't have access as sudo (of course).
Does anyone have clear, complete and operational instructions to install PHP5 on Openshift?
Seems that you are using Windows, or you just lost the permission information.
Choose one solution:
Try fetching files by git clone.
I just updated this repo. Try it out! It's easier now! (Follow the new README instructions)

Questions on an external raspberry pi database

Okay so I need to have a server with a databse for a smartphone applications I'm working on, and there are a few requirements.
-SQL database
-Returns queries with JSON
So i had this old Raspberry Pi laying around and i wanted to set it up for it. But theres something im uncertain of, and google haven't helped me yet.
I planned on use SQLite on the Pi, and wanted to interact with it in PHP. Then use the PHP to convert into JSON, which would then be retrieved by the smartphone.
The thing is i don't know what service i can use on the PI to make this .PHP file able to be found from another device
You can install nodejs by running:
sudo apt-get install nodejs nodejs-legacy npm
For SQL database you can run
sudo apt-get install mariadb-server mariadb-client
Install your nodejs mysql module by:
sudo npm install -g node-mysql
That should get you started.

Installing ElastiCache Cluster Client on PHP AWS Elastic Beanstalk (without creating resource)

Elastic Beanstalk does not, by default, install the ElastiCache Cluster Client PHP module. This is needed to connect to an ElastiCache node cluster. Reading around, most of the instructions relate to creating an ElastiCache resource (which I assume will also install the PHP module on the Elastic Beanstalk). I want to install the PHP module without creating the resource as I want to use an existing cluster.
(64bit Linux PHP5.5)
The module is not installed by default in Beanstalk nor any EC2 instances. You have to do this yourself. This also is something completely different than creating a resource. You can do one without the other.
The ElastiCache Cluster Client for PHP is an extension that you can install via pecl on your instances. You can do this manually but if the instance is ever destroyed you have to do this again. Therefore it is much better to include the extension's install procedure as part of your deployment process. In a beanstalk app you can do this by adding configurations files in your .ebextensions dir.
For example, create these two files. I took these from an actual config file:
#.ebextensions/01fileselasticachephp.config
files:
"/tmp/AmazonElastiCacheClusterClient-latest-PHP54-64bit.tgz" :
mode: "000777"
owner: ec2-user
group: ec2-user
source: http://elasticache-downloads.s3.amazonaws.com/ClusterClient/PHP-5.4/latest-64bit
#.ebextensions/02setupelasticachephp.config
commands:
01install:
command: "pecl install /tmp/AmazonElastiCacheClusterClient-latest-PHP54-64bit.tgz"
The actual name of the files don't matter. They are for your own organization purposes. Anything in that directory with a .config extension will be executed in alphabetical order, that's why you want to prefix your files with a number so that they get executed in the right order: first download the extension and then install it. Mind you that you can also do it all at once in one file. I split it in two because because my actual config files were a lot bigger.
Once you have these files in place do a deployment and the Elastic Cache Cluster Client will be installed.
Note that at the time I deployed this, only the 5.4 client was available that's why my example shows that. I don't know if there is a 5.5 client so it's up to you to find out. You should only need to change the file name and URL to point to the 5.5 extension and should be all set to go.
UPDATE (as of 10/2020)
The solution above didn't work for me with the current software versions, but it definitely pointed me in the right direction. What didn't work was specifically the pecl install command (even using pecl7): it always threw the error "could not extract the package.xml file from [...]" and I couldn't find a solution for it.
So here's the config file that worked for me:
commands:
02-get-file:
command: "wget https://elasticache-downloads.s3.amazonaws.com/ClusterClient/PHP-7.3/latest-64bit"
02-untar:
command: "sudo tar -zxf latest-64bit amazon-elasticache-cluster-client.so"
03-move-file:
command: "sudo mv amazon-elasticache-cluster-client.so /usr/lib64/php/7.3/modules/"
04-create-ini:
command: "grep -qF 'extension=amazon-elasticache-cluster-client.so' /etc/php-7.3.d/50-memcached.ini || echo 'extension=amazon-elasticache-cluster-client.so' | sudo tee --append /etc/php-7.3.d/50-memcached.ini"
05-cleanup:
command: "sudo rm latest-64bit*"
06-restart-apache:
command: "sudo /etc/init.d/httpd restart"
Hope this helps other people!

PDO database browser for php (like phpmyadmin)

I would like to know if there is a php application able to browse any database supported by PDO. Something like phpmysqladmin but for PDO.
I have tried google and I didnt found any, checked http://alternativeto.net/software/phpmyadmin/ too, and nothing found...
I just want to browse a firebird/odbc database using a webbrowser, and I though that a pdo browser would be the best option for that.
You can install an php administration tool like Firebird Web Admin
sudo apt-get install php5-interbase git-core
sudo /etc/init.d/apache2 restart
git clone git://github.com/mariuz/firebirdwebadmin.git
mv firebirdwebadmin /var/www/firebirdwebadmin
load in the browser
localhost/firebirdwebadmin

Categories