How wamp server works,from converting the program to output - php

In Wamp, what is the role of Apache server,SSL,php parser & SQL database from converting the program(php) to output.What is the function of each software (i.e.,Apache server,SSL,php parser & SQL database)that is used in wamp server.

The acronym WAMP refers (Microsoft Windows, Apache, MySQL and PHP). It is the alternative stack for the popular LAMP where L refers to Linux.
When we talk about a development stack we're referring to the set of software applications that work together to provide web services.
Apache is used to listen for incoming web requests from browsers on specific ports. The standard port for web requests is 80, and 443 for SSL. Each request made by a browser is interpreted by the Apache services to yield a response. The most common type of response is a HTML document which the browser displays.
When Apache is used with PHP the web requests are forwarded to the PHP interpreter. Which executes the PHP scripts as software instructions that generate the HTML document. PHP as a programming language can be very complex and people often use frameworks like CakePHP, Laravel or the Zend Framework. These are tools that help them make web applications.
MySQL is a database engine that allows applications written in PHP to read, write and delete data on the fly using SQL queries.
We call all the above the WAMP or LAMP stack because of it's popularity. It itself is not a standard but just an acronym that refers to when these tools are all working together. Over the years the popularity of this stack has resulted in people publishing easy to install packages that contain all the above, but in general you simply running this stack if you install them on the same network (or computer) and connect them together.

Related

Can I Host php driven site on AWS Using Lightsail?

Can we host a php site in AWS Lightsail?
I checked its feature but it shows wordpress joomla etc but not showing php.
Yes. AWS Lightsail is a server that supports many things. The feature you need is available and is called a "LAMP Stack":
LAMP stack is a popular open source web platform commonly used to run dynamic web sites and servers. It includes Linux, Apache, MySQL, and PHP/Python/Perl and is considered by many the platform of choice for development and deployment of high performance web applications which require a solid and reliable foundation.

How do I run a PHP enabled server from the command line?

I originally started developing PHP via WAMP/MAMP stacks. These work, but there are a lot of painful caveats to deal with.
More recently, I've begun working with other software stacks, like rails, that can run the server from arbitrary directories with a minimum of configuration, muss, or fuss. Just a simple rails -s or python -m SimpleHTTPServer 8000. (OK, the second one might not be simple).
Unfortunately, the rails one is for running a rails server. The python one sets up a very simple HTTP server. Neither one is appropriate for running PHP code.
Are there any alternatives out there to run a PHP based server from an arbitrary directory -- in this case, the development directory of the app I want to work on? I'd strongly prefer Mac OSX, but if there's a windows version available as well, I'd love to hear about it.
As of 5.4, PHP includes a built-in web server that can be used for development.
For example:
php -S localhost:8000 index.php
Documentation: Built-in web server
But keep in mind:
This web server was designed to aid application development. It may also be useful for testing purposes or for application demonstrations that are run in controlled environments. It is not intended to be a full-featured web server. It should not be used on a public network.

XAMPP can be used for production server which has windows OS

I am confused regarding using XAMPP as a bundled software for PHP , Mysql , Apache.
My specific requirements are as below
Production server needs to Windows OS (as i need some third party tools to be integrated and need to execute that by command lines and those thirt party tools supports only Windows OS)
Need to make application in Zend Framework 2.0
The points in which i have doubts are ,
We can run this application in IIS , but is ZF2 have performance issue with IIS ?
Can xampp used on production server ?
is there any alternate way to install PHP , Apache , Mysql individually , and it should be secure and reliable method .
Any help is appreciated.
Thanks in advance.
The performance will increase if you select the right components on windows.
For instance, if you use IIS, then also use the Wincache PHP extension.
In general: it is possible to secure a development server stack.
Install the stack and alter the settings until you get a safe environment.
I would suggest to use Nginx as the webserver and MariaDb as the database.
You might choose InnoDb for performance reason.
There is also the option to add Naxsi Firewall Rules to Nginx to secure the server.
For high-performance, especially streaming you might try this: http://nginx-win.ecsds.eu/
It's also worth to look at WPN-XM (sorry, shameless plug).
Keep in mind, that updating the components of your production system is key to keep it safe.
Keeping a production server environment save is easier on Linux, where you have a proper package management tool (e.g. apt-get).
But afaik, WPN-XM is the only server stack with a software registry on windows, which allows that.
For running Zend Framework 2 you need PHP.
You might also consider tweaking the Nginx configuration and add some rewrite rules for short-urls. But a small config like this would suffice: https://stackoverflow.com/a/19734670/1163786
To answer question 2 from your comment: Yes, Nginx and Apache can work together.
Nginx will act as reverse proxy before Apache and will only serve static files.
All request for static files will be very fast and it will consume less memory for concurrent requests because Nginx is event-based.
Apache would handle the non-static parts/ dynamic parts.
"I want Apache , PHP and Mysql only , so is that will be supported by Nginx."
It's possible.
Static request would be handled by Nginx.
Dynamic request would be handled by Apache, so ZF2 is served by Apache/PHP.
XAMPP, with a "secure" config, can be used in a production environment..but it's not recommended. XAMPP is just a stack of software for easy deploying a fully developer friendly environment.
With IIS you can gain performance, cause of it's caching mechanisms.
I would install MySQL, PHP without any software stack like XAMPP and add the IIS to the Windows Server. Configure everything and you are good to go.
If you don't wont to use IIS or Apache, try to have a look to nginx.

Is there some kind of portable server for running PHP web apps, something like for RoR or Django?

Currently I'm working on some PHP porjects. And it's a little bit difficult to navigate always through approximately 100 folders to the destination one. Also it's not very comfortable to create virtual hosts for Apache. And it would be much more comfortable to run from CLI command like "someserver start ." and then just go to the localhost:8080 in favorite web-browser and start enjoying the development process.
If you are thinking along the lines of a built-in server like Mongrel is for Ruby, then No. This doesn't exist for PHP as of PHP 5.3.6. A patch offering that is under discussion though:
CLI version of PHP will have a new command-line option -S followed by a host address (either in numeric or alphabetic) and a port number delimited by a colon, which will launch a builtin web server listening on the given address and port
php -S localhost:8000 docroot
Links:
Alexey Zakhlestins on PHP's Webserver
PHP Wiki Request for Comments: Built-in web server
Webserver Patch
For a complete self contained web development setup, you can use XAMPP. To simplify things further you can then just develop out of the htdoc or www folder provided by xampp.

recommended production environment for php5 application on windows?

We are about to deploy a php5 / symfony / mysql application on a windows stack (windows 2003 server)
Our IT department doesn't have much experience administering any other stuff but microsoft technology, so I'd like to know what configuration would you propose for a production environment...
apache and php on windows?
php on iis?
etc...
the application should use integrated security (that means the have should have some way to find get the domain/username of the logged user, in classic asp is as easy as Request.ServerVariables(“AUTH_USER”) )
it would also be very useful if you could point me to documentation on the subject.
This question and especiually the links in it may answer parts of your question: Apache vs. IIS PHP performance comparison
PHP works fine with IIS, although I've only been able to configure it to run with the site in the IIS directory hierarchy. (c:\inetpub\wwwroot). I've never been able to get it to run with a virtual directory outside that hierarchy.
Also, assuming that IIS is running (it is by default in Server 2003), IIS and Apache can't share port 80. If you have both running on the same box, one or the other will get port 80, but not both.

Categories