USB Key web server with protected php scripts - php

I just started to work for a new customer. He sell access to his Cloud App, written in PHP/MySQL. Recently he got an inquiry from two of his customers asking if he could install the tool locally.
Before doing so, he would like to ask one of his representative to perform a demonstration on site, and asked me if I could create a portable version of the app on USB Drive.
There's no issue with that, except he want the PHP Scripts to be protected/encrypted, so they could not be just copied over.
Do you know how I could manage to do this? Do I have to set up a virtual machine with protected contents? Should I use any existing tool allowing to protect things like that?

Related

How do I access a Magento 2 website codebase / directory files?

As you can probably tell, I am new to Magento2 and I am trying to figure out some of the basics. I'm a full-stack developer that is use to developing (frontend and backend) myself then using docker and finally hosting it on an AWS:S3/EC2 or AWS: Elastic Beanstalk. With that said, Magento seems like a completely different beast to conquer.
I have a family member who is wanting me to do some basic frontend stuff for their website (such as changing Navbar design and a potential home page overhaul later on), naturally wanting to help them out I agreed to have a look and see what I can do. I have access to their Magento 2 dashboard area and have been looking around with no sure luck thus far. I have researched online that Magento 2 allows for a "Page Builder" or a "WYSIWYG" type functionality. But I am unable to use these types of tools because my family member had the website built by a Magento 2 developer firm awhile back and everything is coded manually and could cause problems if using one of the above mentioned tools. Due to this I am trying to get access to their site directory so that I can go in and make the necessary changes and upload the files. But I am really struggling on how to access the codebase.
I have read that an admin needs to send me the code??? Or grant me access to the code or something along those lines? I do have the host, port, root, username, password, etc. for the live server but still having trouble.
Any help would be greatly appreciated.
You need to use ssh to access the server
ssh user#host -p port
After you get into the server, you should set up a git repository in the project root and push the code from the server to the repository, then clone the repo to your local environment.
From there on, it's the normal development flow. You can use a clean database with sample data or you can dump the db from the live env and use it on your local env, but this will require some changes in the db after the import.
Detailing all the steps required to do this task would take forever and would cover a lot of different issues/steps.
"I have read that an admin needs to send me the code???"
Not sure what you mean by this, but a Magento admin is just a user on the backend side of the website. He does not have access to any code.
A git repository admin(probably previous dev) could grant you access to the code repository, but this doesn't seem like an option.

Google Cloud Platform files location

I wanted to move a website from a shared server to Google Cloud but I cannot wrap my head around it. Before giving up completely, I decided to make this question:
I already completed the Hello World tutorial (https://cloud.google.com/php/getting-started/hello-world). But what if I want to update the index.html file? Where would I find it?
I was expecting to see it in one of the storage Buckets, but that's not the case... even when installing a Kubernetes Engine.
If you decide to use Google App Engine Flexible (as the hello world sample app that you linked to) you need to understand the idea of this additional layer of abstraction over your server(s). App Engine Flexible is designed to make things easier for you - you focus on your code in your local machine where you modify it, update it and then with one command (gcloud app deploy) you instruct the App Engine to do one of the following:
start a VM (your server) and a Docker container with your app in it
if it's not already running
in case you are updating an existing app, it will update the code in the VM which is your server. If your app receives a lot of traffic, you may have more than one container and VM running and all of them will get updated.
Both things are presented schematically in the image in this section.
This way you can develop your app locally and not worry about actually getting inside the server with for e.g. ssh. Your code is there in those VM(s) and App Engine manages it for you (however, if you really need to, it is still possible to ssh into the VM in App Engine Flex environment).
If you have a static website, it can be hosted in the Storage buckets, which is a different scenario. However, as you're using PHP I assume it's more likely that your website is dynamic.

Is it possible to deploy PHP application on azure (WebApps) without using FTP?

Hi i have recently deploy my PHP(5.4) application to windows azure i.e.Web Apps.For that purpose I have used FTP to transfer my local files to azure.
Is there is any wayout so that I can just click and publish my PHP application to Azure like what we do in .net VS application (Right click publish) ?
As others have mentioned in comments, there are several continuous-integration sources for deployment. Assuming you're using the new portal (portal.azure.com), just pull up your web app and scroll down below Essentials. Near the bottom, you'll see the area about continuous deployments. If you haven't set it up yet, you'll see something asking you to set it up. Click, and then choose your source:
Once you set this up, you should be able to manage your deployments by simply pushing code to your repository.

PHP localhost app protection

I have POS aplication connected to TAX service, we will distribute it at XAMPP or Nusphere platform for Windows.
How can I protect my code from editing or copying ? Can I hide it at Xampp or something as that ?
I am doing a similar thing using wamp & sqlite (different industry, not POS)
I have quite tight integration with a webservice (that I control), so while people can edit and copy the app, they still need to login via an API for certain features. Without the features the app is limited in use.
While this doesn't stop people editing and copying, they still need to have an account on my webservice which is where I collect the $$$ from.

moving PHP MySQL web app offline

I recently built a web application for my company, and now they want it to support an offline mode. To complicate things, my company is very concerned about security and does not want me to use Xampp or Mamp. The application handles sensitive data and they think these programs will somehow make the data visible to the outside world (although I'm entirely sure this would be the case).
Anyways, I'm looking for a way to allow my application to run offline, and to also support the following technologies: PHP, MySQL, jQuery. The most difficult part of this is I need to execute PHP code outside of the typical server environment.
Can anyone please give me some advice on how I could implement such a system, and any associated vulnerabilities that I may face in terms of security and data storage?
Assuming you're installing this for an individual user on their machine - your best bet is to install apache/php/mysql, and configure apache to reject connections from any remote IP address.
The environment should be basically identical to your current application, but with only 1 user in the system.
There are some strange points in your question
now they want it to support an offline mode
Well, that's easy enough - get familiar with html5's offline features
To complicate things, my company is very concerned about security and does not want me to use Xampp or Mamp
Have you deployed your web app on a desktop machine? Or do you mean you are forbidden to use a webserver?? Xampp/Mamp are development tools - your public facing applications should be on a machine configured specifically for that purpose with a webserver running apache/nginx/iis/PHP5.4-builtin/whatever you like.
The most difficult part of this is I need to execute PHP code outside of the typical server environment.
How is your environment none-typical? Mike mentions php-gtk - but IMO you shouldn't go down that route unless you're requirements are "desktop app" + "absolutely must be written in php" - which is unclear from your question.
any associated vulnerabilities that I may face in terms of security and data storage
Well, anything you put in local-storage on a client (browser) the user can access - just bear that in mind. Don't send sensitive data to what is, from your perspective, an insecure and pseudo-public location i.e. some user's browser cache.
If you want to run html/javascript, you will probably need to run this in a server/client environment because a browser isn't capable of running the php and the php app as a stand alone app needs something to parse the html/css/javascript ( it needs the browser for it's presentation view ).
Best course of action is to put the application onto a server that you control access to. Set the access controls to specific IP addresses only, or even better if you can run it off an intranet behind a firewall where no one outside the network would be able to get to it.
PHP can run on a desktop environment, but they key here is that it won't run the javascript/html you use to display. You could use php with a third party library like php-gtk to make a desktop app that doesn't need a server or browser, but php-gtk doesn't have the best support.
If the application needs to store data for other computers/users to access, then it needs to be on a network. If it doesn't need to do this you might consider using a different programming language geared toward desktop applications so you can keep it entirely offline ( such a java or .NET ).

Categories