Welcome,
I've got a quick question about PHP development environment. To be specific, I would like to use a program (maybe XAMPP or WAMP) for home use, php development. I am mostly worried about the security aspect of these two programs or programs suggested. Would they be safe for home use while hooked up to the internet? Are there any security measures that can be used to disable remote access, so that only my pc were able to access and control? Additionally, what program would you guys suggest using for PHP development (mysql, apache).
Would they be safe for home use while hooked up to the internet? Are
there any security measures that can be used to disable remote access,
so that only my pc were able to access and control?
If you don't forward any ports and make sure to use a firewall on the computer (Windows Firewall should be enough in your case) in order to block all unwanted traffic coming to your PC, that shouldn't be too much of an issue.
Additionally, what program would you guys suggest using for PHP
development (mysql, apache).
This is too broad of a question, generally just use whatever you're comfortable with. If you don't know what you would be most comfortable with, just start using the default configuration. For instance, XAMPP uses MariaDB and Apache.
Related
Bear with me here ... I can't show exact examples or provide a link to the web server for security reasons. If anything more is needed I will gladly provide it.
What I HAVE:
I have a server that hosts an internal networked intranet for my company.
Coded with PHP, MySQL, HTML, etc
Ubuntu 14.04LTS
Normal Apache Web Server Configuration
Login access
Couple hundred PHP files for different pages/features needed for the company
Maintenance
FTP into the directories (shown below)
Manually edit PHP files with Notepad++
Test in Beta Directory -> move to -> Secure (overwriting current file there)
I know this procedure for maintaining is horrible so I'm trying to come up with a better solution
What I NEED:
Features
IDE Connectivity (Aptana,Eclipse,etc)
Commit/Push/Pull Capable with Server from IDE
Version Control
Keep backups for Rollbacks
Test & Main Server
Like how I have a Beta and Secure Directory for testing and releasing to everyone
What needs to be done on the Ubuntu Server in order to accept push/pull requests, store multiple versions, and store commit messages?
Do I need to install anything on the Ubuntu server in order to communicate with the remote computer I'm trying to access from?
I am a beginner and I learned only HTML and CSS.
When I tried to host my website I opened this look at method two it is about localhost I searched a lot about it but I didn't understand anything like:
It is a server side like PHP and phpMyAdmin
localhost is a hostname that means this computer and may be used to access the computer's own network services via its loopback network interface
I can't understand anything is it like WikiHow said and I can host my HTML and CSS website for free? Or is it like Google said?
First of all when learning CSS and HTML, you can simply just open the file location of the HTML in your web browser. There is truly no known reasons for someone doing CSS, HTML, and Javascript programming that is self-contained (i.e. no databases or crap like that)to NEED or even BENEFIT from having a web server set up.
That said, I'm a beginner, too, in a sense (I've just returned to web programming and found it so much easier and more fun than it was 7 years ago!) and I have been using a web server and localhost every time I program lately. This is because I'm programming in Ruby and I'm using a library for Ruby called Sinatra that makes web programming with Ruby SUPER easy! Anyways, when you use Sinatra, you must have a web server running, and you must use localhost rather than just opening a file location on your computer. Why? Because Sinatra replies to the GET and POST requests that a web server makes in response to a user's actions.
So, with Ruby installed, and Sinatra installed (I'm on Windows, not that it matters much) I simply use the Start Command Prompt with Ruby shortcut that was installed with Ruby and then at that command prompt I go to the directory with my program and type, e.g., ruby test.rb, and then I open Chrome and type localhost:3456. That's the default port for Sinatra. It can be changed easily. If you want examples of simple Ruby programs using Sinatra that you can use to see this web server behavior without even having to install a regular web server (you'll instead be using the lightweight one that comes WITH Sinatra's installation [on all platforms, I think]), you can find such examples if you Google Learn Ruby the Hard Way Exercise 50/51/52. That site is great. I've only used those 3 so that's why I chose them, there may be more.
Also, and again I've only been doing this for one month, on my own in a non-professional non-academic setting, I installed Apache, Googled that a bit, and it was also easy to install and serve up a HTML file to myself at least, and I think I got my Ruby program running easily, you just have to make sure you understand what the directory paths are supposed to be.
So, even though you don't need to unless you're doing something beyond HTML and CSS and basic Javascript, go ahead and either install Ruby and then follow Exercise 50 in Ruby the Hard Way to see how localhost works (this is easier than doing Apache IMO but that was my experience, plus you'll get exposed to Ruby with very easy copy and pasting from Ruby the Hard Way), or install Apache, it's super easy, get it running, and just find out what directory it's going to look for it's index.html on your system and make sure you put your index.html in that correct spot, load up your browser, and type localhost in the address bar (on chrome on windows 7 that's all you need, I bet OSX and Linux are same).
In fact, type localhost into Chrome (at least) and you'll see an ERR_CN_REFUSED or something like that. Note that Chrome would normally search the Internet. So, that loopback localhost functionality is in the OS... Cool stuff, good luck.
Localhost is just your local computer. It has an ip4 address 127.0.0.1 ipv6 ::1.
So if you connect to localhost you always connect to your own computer (usually not visible to the outside world unless you leave your computer on and stay connected to the internet and have your router/firewall configured that it forwards traffic to your PC (only do that when you know what your are doing).
You can try some IDE for coding, such as RubyMine or PHPStorm, and they're creating localhost for you, when you're running your code in web browser. I think that can be helpful because some of Chrome Extensions for web development doesn't work with local pages, for example, page rulers or so on.
I am a desktop application / database programmer customizing an ERP application in a Windows environment. I have also done documentation with HTML and javascript on our intranet. I have not done any web programming.
I need to convert an Access 2003 application. Instead of using .Net I think it would be wiser to use HTML to allow access from a tablet. This app will display drawings based on certain lookup values (i.e. part number) stored in a SQL server database. After some research it seems PHP is the best choice. But the things I have found explain on a server supplying the pages and not running locally. I see Apache and IIS mentioned but are these needed if the pages will be loaded on a single machine (or multiple machines but all pages will be present in a single directory structure).
When I search for running pages locally I get pages accessing a databse locally. But the database will be on a server.
Can someone steer me in the right direction?
if you want to use PHP then if you put your application online you can use MySql for the database. You will not need to make any changes because any web server uses mysql with php.
If you want to use PHP with SQL server then you will need on your server to install the Microsoft Drivers for PHP for SQL Server . in the following link you will have the documentation:
[www.microsoft.com/en-us/download/details.aspx?id=20098][1]
PHP has a built-in webserver since 5.4.0: http://php.net/manual/en/features.commandline.webserver.php
If you have PHP (>= 5.4) on your machine, you already have a webserver.
If i understand your question correctly you want to have the database on the tablet. That is possible, simply by installing the web and database server locally. Restrictions might apply depending on your tablet (OS) manufacturer though.
You could also have a "regular" web server / database server setup, and use the localstorage of your tablet's browser to have the result pages available in offline mode, and sync your data when possible, using php and maybe ajax scripts.
Since you don't want the presented data to be web-accessible (or at least not public), but you do want the presentation to be through HTML-pages, I can come up with two ideas:
Use a scripting language to access MS SQL Server, extract the data, and present it as HTML. Since you like PHP, maybe Perl with a suitable DB-access library might be a good idea.
PHP as you suggest, some kind of web-server, and a rigorous lock-down configuration so that the webserver is only accessible locally. Depending on the sensitivity of your data, this might be the worse option.
Enable Internet Information Server on your Windows system (using "Turn Windows Features on or off in the control panel) and install PHP: http://php.iis.net/
Alternatively Apache xampp installs the Apache webserver, MySQL (when wanted) and PHP on your system: https://www.apachefriends.org/index.html. To connect to Sql Server you have to remove the semicolon ; before the extension=php_mssql.dll line in the php.ini.
First, I am a complete novice when it comes to programming, so pardon my ignorant questions.
I hired two programmers to work on my project. They say they need a remote test server for testing things, before making it live, so that the changes are not live until all are okay.
My questions:
What are Remote Test Servers?
Why are they necessary?
Can they be set up with normal reseller or shared hosting?
How can you prevent the world from seeing what's on it?
Do you need a domain name for this?
How do I go about setting up a remote test server?
Any other comprehensive document to read up on this?
Thanks.
About Test Servers
A test server, in the case of websites, is used for changing around a website ( a copy ) without it being displayed to the public. This is done because, when a developer changes a webpage, the page will often seize to function or contain bugs due to incomplete changes of the source code. By putting these pages on a remote test server, the developers can use copies of the website - that are placed on this server - to make changes without affecting the pages that are being sent to the clients. You can actually configure this kind of server locally or remotely, depending on how you weigh the pros and cons.
Remote Test Server
You may set up a remote test server on sites like GoDaddy or DynDns. These services usually package a domain name with their server space. The benefit of this is that most of the 'set up' is already done for you. Also, as Silvertiger has pointed out, the service fees of this are usually quite low. This might be recommended because the massive amount of software your programmers may need is readily available on these servers. The only downside is that the only way to prevent the public from viewing this ( that I know of ) is to make it password protected. However, you may need public access anyway if your developers plan on working outside of your work environment.
Local Test Server
Alternatively, you may set up one of your own computer as a test server. The benefit of this is that the only fees you will have to pay are the costs of the computer ( it can be a low-end computer ). Since this computer would be connected to the network you wouldn't need a domain name, instead you will use an IP address assigned to the machine. It won't be hosted on the internet, so it's much easier to prevent other people from seeing it. The only downside is that your programmers must be within your network to work and setting this server up may be rather involved ( depending on the needs of your programmers ).
You will mainly have to download and configure all the appropriate software ( ie Apache, mySQL, PHP ) to get it working. This is typically done on a server OS ( ie Ubuntu Server ), but can be done on most operating systems. This process can also be made less painful by installing server software packages ( ie WAMP, LAMP, MAMP ), which include the basic software components your developers will need. I would recommend using Ubuntu. You may use Ubuntu Desktop if you'd like to keep a graphical interface during set up. Or, you may use Ubuntu Server - which saves a lot of memory by using a terminal-based user interface ( can make it more difficult to use ).
You may additionally consider adding a service called FTP to a local server. This is a service that allows you to remotely read and write to files on the server, and may be desired by your web developers for some of their editing programs ( Dreamweaver, for instance, can access files with FTP ).
As a side note, most developers should be familiar with setting up basic server software. In fact, it is usually part of the curriculum in webdesign. So, you may allow them to configure this software if you provide the computer for them. If you otherwise would like to configure it yourself, you may find some of the links following to be helpful.
Informational Links
General Web Servers
Wikipedia - general information on web servers
HowStuffWorks - information on how web servers work
Remote Servers
Godaddy - A common web hosting company from which you may use their service.
DynDns - ( as the aforementioned )
Local Servers
Ubuntu Server : A popular OS for servers
Apache : A popular HTTP server ( aka Web Server )
PHP : A commonly used language by web developers
LAMP : A package of basic server software for Linux ( Linux Apache mySQL PHP )
WAMP : A package of basic server software for Windows ( Windows Apache mySQL PHP )
MAMP : A package of basic server software for Mac ( Mac .. .. PHP )
Setting up LAMP : [Steps 1-5] A wonderful article on setting up a web server on Ubuntu.
A remote test server is a working php server that you can execute code on. It can be any server you have access to meaning that any reseller of hosting can provide you with a server but effectually it is just a web server you have access to. I presume you have a software that is asking for a remote test server like Dreamweaver or some other IDE.
I use my godaddy $8 a month hosting account account for testing..
Is there any way that I can set up Apache to run locally, specifically NOT connecting to the internet, so that it may serve dynamic content (PHP) over a LAN?
I'm trying to set up a development environment on my Windows XP SP3 box and gain some experience with building web PHP driven web applications. I have residential Rogers service, and it's a violation of the TOS to have a server running over that connection.
Umm yes. Just download apache and fire it up. The only way it's going to get to the outside is if you specifically open up ports in your firewall/router to let http traffic in and route it to your machine. And if you're serious about getting some experience, ditch XP and get a quality linux distro on your "development" box. You can always remote desktop or ssh to it from a windows machine if you feel more comfortable that way.
My experience has been that many hosting companies use CentOs for their client servers, so I'd recommend trying that first if the purpose is gaining useful experience.
Oh by the way, Linux happens to be free.
You can use WAMP. It installs everything you'll need to get a testing server up and running in minutes
Using a packaged solution like WAMP or XAMPP will provide you with the basics for setting up an Apache web server + PHP + MySQL + the phpMyAdmin interface for working with MySQL outside of the command line.