SSH Command in my FTP dev folder? - magento

Intro:
I have 2 folder on my ftp, one for my main website and one for the dev website.
Question:
If I run a ssh command into my magentoroot\dev\shell folder, should I worry about consequences on my main website?
thx

Not really. Unless the two site use the same database

Please, note in case you need to work on development website. You need a separate database and file system. If database in common there must be possibility of configuration change while working in admin or while performing operations and installation of new extension. So, always try different database for staging and production website

Related

Secure first time setup of nextcloud

I want to setup a Nextcloud on my personal VPS. To do the first time setup, I have to access the webserver via my browser and it says I should do it over http://localhost/nextcloud/ (Nextcloud Installation Wizard (Right in the beginning), but this does not work for my because the VPS is not my local machine. So I have to open up the setup website to the public web and everybody who would know the IP of my VPS could do it first time setup.
I read other tutorials from web applications (for example Confluence Confluence Installation Documentation (Point 4.2)) where this is the common way of setting things up the first time.
Is there another secure way to do this in general for setting up an webapp for the first time? Firewall? VPN? How do you guys do it?
Thank you for your help
Yes - this is the common way on how to set it up. In the unlikely case that somebody else sets it up in the short time between placing the files and running the installer, you could also remove the config/config.php and do the setup again.
If you want to not do the web based setup you could use the CLI tool to run the installation. It also asks in an interactive way to set up Nextcloud or all the parameters can be provided via CLI options.
See https://docs.nextcloud.com/server/12/admin_manual/installation/command_line_installation.html for more details on the CLI installation method.

laravel 5.2 run composer update at hosting

I developed my website and publish it on my host.while editing it in host I add package in composer file to use it.
My question
How to run composer update in host and how to get CMD screen ?
Or
How to add package in host?
please any one help me
This highly depends on your host. The usual "cheap" hosters are shared hosters. Which might or might not give you access to the cmd. Most probably you do not have root access - that makes a lot of things really hard.
One thing you can always do is running the commands directly from your code. You could put this code behind a specific route for example and remove it after the update.
exec('composer install my-package');
// or
shell_exec('composer install my-package');
You should look for ssh / shell access in your hosters faq. However I highly recommend hosting laravel applications on your own server or at least virtual server so that you have full access to everything.

+Moving CodeIgniter from live to local

Perhaps someone can share their experience or advise on how to get this accomplished.
I have looked around and found only a wiki entry dealing with server migration from host to host.
Here is the setup and things I have tried:
locally I am running win 10 with XAMPP server
hosted on hostgator
Downloaded all files from live site
Did an SQL dump/import onto my local mySQL
Edited ‘exp_sites’ for paths and URLs
Edited ‘config.php’ in system folder
Result:
- can not login into backend ...that is form refreshes but no redirect. I can tell that db is being queried since since I do get error back if it is a wrong password.
Anyone has done similar setups/downloads/takve-overs of their client’s site?
Ideally, I would just like the access to CP so I can edit the settings/paths of weblogs,uploads etc.
Thanks for your time!
Are you using CI default password library for password creation? If you are using then these passwords will not work for you because this library generate server dependent passwords.

Incrementally updating a remote joomla web site?

I have a Joomla 1.5 site on my localhost. It's hosted on a public hosting server as well.
I was wondering what is the best way to do incremental updates to the site? I mean I don't want to update the whole site, if I just changed one source file (html, php, images, etc) or made changes to the database. I understand, to be safe I'd have to update the database every time (export from local and import in remote), but I'm sure we can avoid unnecessary uploads of unchanged files.
I've seen https://www.akeebabackup.com and it doesn't offer what I need. One option is to use an ftp client (like Filezilla) which does folder synchronizations, but I'm not sure they work very well.
For database you could use master-master replication, which is quite easy to set up but you need GRANT privileges in MySQL, which most likely won't be possible on a shared hosting. I'd also suggest connection both machines via VPN to make it more secure.
The other easy way to sync databases is "Synchronisation" tool if you're using phpmyadmin.
If not, look at any MySQL planning software like MySQL Workbench, which also has this feature built-in.
You didn't tell what privileges you have to access the public hosting server.
If you're an admin you can have SVN admin installed and configured to sync files with your local data.
You can also have a GIT repository to do exactly the same, or LDAP set-up via VPN to keep your files in sync.
If you're not an admin just see or ask your hosting company what's of the above is available, I'm sure they'll be able to help you. Nowadays, hosting companies have SVN or GIT installed, which should be what you need.
I often use SVN tools built-in PHP Designer 8, but you can have SVN, GIT and many more also in NetBeans.

unknown file 663.php in ftp root

For some reasons I have a 663.php file in every folder and subfolders of my httpdoc root in my web server ftp. I don't know where this file came from and my host does not know either
I would very much appreciate any help
Depending on it's content it could seem like a PHP Shell Backdoor.
An attacker would upload this file to gain access to your files, database ect.
They usually exploit a flaw in your application, to upload files.
Be sure to update all the software you are running.
Someone might have gained access to your site, also change all passwords.
It looks like this has occurred before to other users:
Your site has been hacked. The 663.php file is sending out anonymous
spam. If you host with GoDaddy, this is a common theme as thousands
of accounts share one IP and one person with shell access can get in
and place an htaccess file above the root folder on the server and
autoload the files into every folder in your website and onto every
site within that IP address. Year1Media
Quote from AolAnswers.
Thank you all for your help. After a little search i found out that It was a Plesk security vulnerability. The problem was solved by running a patch in parallels plesk. Apart from inserting unknown files it also changed .htaccess to redirect to weird websites.
It Is a Plesk Problem
they are correction patches here:
http://kb.parallels.com/en/113321

Resources