I recently created a PHP server on an Amazon EC2 Linux AMI instance and I am struggling to figure out how do to upload the PHP code to in order to be displayed on the browser from a .php file type setting.
The only option that was availiable to me to write PHP code and have it displayed was through creating a script directly from the Linux Terminal using the following commands
>SamplePage.php #this creates the php file
nano SamplePage.php #this opens the editor to start writing the code in the terminal.
However is there a visual interface that I could use to upload php code files/documents/pictures. So that I can click and drag the .php file on to the server without typing it on the terminal?
Does the phpMyAdmin do that? Or is is only for used managing MySQL (database) tasks and not for uploading PHP files/graphs/pictures needed to develop a fully integrated site?
By the way, here are the instructions I used to create the LAMP server with PHP as well as MySQL.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html
phpMyAdmin is a web-interface for managing databases.
You could check if there is already some ftp-server installed. Like vsfpt (just an example, there are a lot more free & open source ftp-servers available). if you encounter any problems with that a good place to ask questions related to hosting and servers is ServerFault
You could also transfer the files via ssh-connection with the help of scp (See: How to copy files from one machine to another using ssh or How to upload local system files to Amazon EC2 using ssh). Another option would be to use a visual ssh-client.
There is also server-management software available that offer a visual file-manager as a website, like plesk, but since you already setup most of the stack this would be hard to do on top of that.
There are many IDEs and Editors that have support for SSH and SCP. Either built in or through plugins. For example: Eclipse, Netbeans, Atom and VSCode. All of which are free and can be configured to support PHP development.
I have made a web application with php and mysql in wamp server. Now i want to convert it into desktop application for windows platform which will run offline as complete desktop application.
Please anybody help me. Because it so so important for my job place...
Thanks..
nightrain - https://github.com/kjellberg/nightrain
PHP Nightrain is a packager written in Python for the PHP Programming Language. Using this tool you can convert your PHP/HTML/CSS/Javascript application to a Native Desktop Application. Currently, PHP Nightrain supports the Windows, Mac (OS X) and the Linux operating systems.
PHP Desktop - https://github.com/cztomczak/phpdesktop
PHP desktop GUI framework with HTML5 Chrome/IE engine.
You can check out exeoutput for php. It's a paid application priced at one time fee of USD 99. They also have discounts for students and teachers.
It outputs the file in a single exe file format for Windows and the exe can be run as a standalone file without installation and portable in a USB too with complete web server, chrome browser packaged as an application.
You don't need to rewrite your existing html, php code and can use it as it is.
You can also connect to sqlite and mysql databases if your app is database dependent and place the database either outside the main exe or embedded inside it. The latest version is packaged with php 7.3 which you can upgrade if needed. All major php modules are included by default
Your complete PHP, HTML java script code is protected since it's inside of an exe which doesn't extract when running so no one can reverse engineer the code and redistribute your app. You can also set a splash screen png image, an expiration date so just in case some one redistributes it, it will become invalid and unusable after the expiration date. changing the system clock will not allow reuse of the expired app.
I have been using it for some time and that's the only solution i found which was polished enough for use.
I tried PHP Desktop before but the code is exposed in that case and end user can modify your code and redistribute it in PHP Desktop.
Note: I am not associated with exeoutput in any way but found the app so useful hence the lengthy answer.
I am new to PHP scripting language. Basically I am a .Net guy, worked on various web applications using MVC, Razor, ASP.NET, C#...etc. I thought this the best time to practice on PHP and planning to start work on projects using PHP.
I am trying to setup PHP development environment in my local machine.
Please guide me in the following questions.
What are the available software’s I need to install in my machine to start PHP development (SQL, IIS, PHP scrip, TFS)?
In order to create team project I want to use Team Foundation Server (TFS) within the eclipse IDE. Pease tell me someone, how to connect TFS from eclipse IDE (or) any alternate ways?
How to configure IIS to server PHP web pages? Do I need to install additional software other than eclipse?
I have done the following steps,
I downloaded Java from java.com.
I downloaded eclipse from eclipse.org then installed to my machine and pointed to default workspace(C:/users/xxxx/workspace).
Installed add-on phpeclipse to eclipse IDE. This add-on downloaded from phpeclipse.com
Open Eclipse IDE=> help=> Install New Software=> Add.
Name: [PHPEclipse]
Location: [http://phpeclipse.sourceforge.net/update/stable/1.2.x/]
Ok=> followed instruction to complete installation.
After completing the above steps, I just created a new PHP project then wrote echo statement in .php page but it prompting me below error when I run my test project
I'm a real klutz when it comes to Eclipse, but I'm also poor, which is why it is the option I've chosen.
I've installed Eclipse 3.5, Eclipse for PHP, and RSE. I've actually gotten to a point where I can create a new (local) project and download all files to my local (Windows) computer. I'm not running any kind of web server on my local box, and am hoping to keep it that way for now.
I've imported my remote folder into my local project, where I can see all my PHP files and edit them. But of course, when I save, it just saves the local copy. Is there no "put" command? Can I not save straight to the server? Or perform an immediate sync of that one file? I certainly wouldn't want to have to perform a complex sync operation after every little incremental change.
I have no idea what RSE really is, nor how it works, and the documentation is, well, cloaked at best, non-existent at worst. Does anyone have some tips for me? What should my workflow be (barring any local server to test)?
Ideally, I would love to be able to open up the entire "project" directly from its location on the remote server and avoid dealing with a "local" copy altogether. Failing that, I would be willing to "get" the entire remote site once, and then manually "put" individual files that I change locally back, provided it's not a cumbersome process. Am I asking too much? Dreamweaver operates this way, but it's support for PHP is limited at best and can't be considered a full-fledged IDE...
I use WinSCP and enable remote synchronization.
Everything that changes on the local system is automatically synchronized trough SCP/FTP onto the server.
Looks like RSE might be overkill for your needs. Here's a similar question and popular answer to your problem of uploading from Eclipse:
How do I add FTP support to Eclipse?
Secondly, you could try out a version control system like SVN - it would take a little bit of time and work to set it up but probably be far more useful than getting RSE going and then you could develop locally, commit your changes to the server and then update the workspace on the server.
Thirdly, there are other IDEs out there, like Netbeans, with built in support for working on remote files.
Sorry to drag up an old topic but Remote System Explorer is exactly what you need. No need for sFTP or a Shell. Setup the connection in the RSE perspective just like you normally would using your sFTP/SSH client.
Open the folder for the first time and you get the login dialog. Enter your credentials. Store them as needed.
Now navigate to your development files and double click or right click to open the file. Eclipse caches a local copy till you save, Ctrl-S.
Need to do some shell work. Right click on a folder and Launch a Terminal. If your files are source controlled, such as svn, you can checkout or update from the terminal.
I use to have Putty, FileZilla and a host of other editors and utilities. Now I never leave Eclipse. SQL, Shell, sFTP, PHP, CSS/HTML, C/C++, Droid, all within Eclipse.
I tackled the same problem recently. I got a web site hosting company and was using SeaMonkey and developing the code on the 'production server' and learned to do development on a 'development server' and then upload the debugged, working stuff to the production server.
So I use Xampp (it's a good, and FREE, local web server you can easily install on your laptop) and I use NetBeans to develop. Netbeans is better than Microsoft tools -- no ballmer involved in the deal.
xampp uses Apache as the (local) web server and provides Mysql and PHP server-side-scripting support.
The quality of these two is HIGH. Just excellent stuff. You will want to get a local web server running on your laptop, do your development locally, then upload using ftp or the Netbeans environment, the files to your 'production web server.'
I messed around with a lot of different unrelated pieces trying to put a local web server, debugger, mysql database together and then got really lucky and found xampp and then NetBeans.
I think #Łukasz's note deserves to be an answer on this page - it would have saved me a great deal of time, so hopefully it will do the same for others:
Here is great tutorial for Eclipse: How to setup Eclipse with PHP PDT, Remote System Explorer, Theme Manager, and Drupal Plugins Eclipse + PDT + Remote System Explorer allows you to develop PHP applications remotely.
I will add that downloading and using the smaller Eclipse for PHP Developers and thus skipping step 2 on the blog works just fine.
I'm using Netbeans 6.9 to develop PHP code; testing happens locally on my PC (XAMPP); once done code is uploaded using Netbeans upload facility to the production web server.
I recall reading about Netbeans capabilities running scripts when "building" the project, and looking for a primer about it.
Particularly I'm looking for some ways to achieve the following, right before uploading files to the production server:
- strip comments from PHP sources
- minify PHP
- minify Javascript & CSS
Can someone enlighten me?
I think what you may be aiming for is a tool like Apache Ant. It runs an XML with several targets which usually are nothing more than some shell scripts.
So this means;
Setup Apache Ant
Find some CLI/shell scripts to do the jobs you mention
Create an ANT build file with the FTP upload in the end
Run the ANT file
More info on Apache Ant; http://ant.apache.org/