cleaner way to install Apache, MySql and PHP on windows - php

I really say its a very hard time for me when started to install these 3 things on my windows 7 platform. I know there is WAMP available to install at one shot. But I for good understanding I want to install these 3 separately and want to integrate it. Why its so clumsy and difficult for integration? Can anybody please advise me how I can do the following?
Which latest versions of these 3 are best compatible?
After installing Apache what in which mode I should run it? Console application or Server Mode?
In apache whats the difference if I run with CGI or without CGI?
What the things or modules or any changes I have to ensure before going to install the MySql and PHP?
When I installed the MySql it tell me that MySql server is installed. Is the my MySql server is another HTTP server? Is it a replacement for Apache?
After I install the PHP what are the minimum things I should check so that I will be ensured that it will work with Apache after integration.
I found the logfile locations for Apache. But where can I find the logfile locations for PHP and MySql?
May be I am newbie in this domain so I am asking these questions. But it will help anyone who want to start newly. Please advise me...

Ok, I still dont see why you dont want to just install a package like WAMPP/XAMPP or Zend Server CE (personal favourite atm).
Put it this way:
Generally speaking, all latest versions are compatible, meaning,
latest PHP + latest MySQL + latest Apache
Typically server mode, but this really depends on what you want...
this is not something for noobs, again rather use a package
Do you want CGI? or not? Read the documentation on
http://httpd.apache.org/docs/2.1/howto/cgi.html
Dont bother, this usually isn't necessary - again use a package
Mysql is a Database Service
Browse to http://localhost/ if it works, then it works. Libraries depend on your personal needs, if you for example need php's
MCRYPT library installed, you'll know - install it... if it's
already installed, it will work anyway
Google it
I doubt this will help you much...

Related

I have developed am application using PHP7 but on the server there is PHP5 and we cannot upgrade the PHP there

Please help me, I have developed an application using Yii2 Framework which requires PHP5.6 or greater, and while deployment of the application on the test server I have noticed that on the test server we are using PHP5.5, So please tell me what can I do? The test server is running Ubuntu.
(Minimum requirement of Yii2 is PHP5.6 and we are using PHP5.5)
Thank You.
if I recall correctly, PHP 5.5.X and 5.6.X are not that different. So if you can deploy your application and it runs properly, you should be fine. If you are using composer, it might be harder (or impossible) to spoof your PHP version, though.
My two cents:
You tagged AWS (and therefor probably EC2), so why don't you just update your PHP version? Why don't you run your application on PHP 7.X anyway? It is a great improvement - performance-wise.
You can try a few things...
1) Do you need to have the dev modules from Composer on the test server? If not do a composer install —no-dev
2) Another switch worth trying on the test server is “--ignore-platform-reqs” I don’t recommend it and even though composer install the files the application might not work.
3) If the above isn’t a fix for you, modify your Composer file to put in the constraints of your environments, change your local environment to match the test server, and re-factor the application if necessary. I’d do that instead of rewriting a whole app in Yii1.
You might want to edit your question and add the information about your composer.json file. Do you commit the composer.lock file to source control?
Additionally, not wise for your company to use anything older than PHP 5.6. And PHP 5.6 will have security support ended in Dec 2018. http://php.net/supported-versions.php
Read the following PHP documentation linked below, particularly the backward incompatibility changes and deprecated features. If you use any of those, you need to change your code. If you don't, then you should be fine. You need to test it.
http://php.net/manual/en/migration56.php

Using Mamp or another package vs manually enabling PHP and installing MySQL on Mac 10.6

What are the benefits of installing mamp or another package vs enabling php in httpd.conf and manually installing mysql? I am really not sure of which option is better and would love some info.
Thanks,
MAMP and other packages are usually pre-configured and come with other tools like phpMyAdmin, SQLite Manager, SSL, code optimizers. If you think you're handy enough to do what others have done, go ahead. But it'll save you a lot of time and trouble by grabbing what's already available.
I've used MAMP for over two years now and I love it.
For me, I didn't want to configure PHP and MySQL with Apache. On my old computer I installed MySQL and then phpMyAdmin and had a lot of fun trying to get it all working. (But I'm not good with terminal and bash commands)
I installed MAMP on my new computer just because it does all the work for me. When I want to debug a php script, I just fire up my local server and make a few changes.
Imo, MAMP/WAMP = Easy get up and go in a development environment.
If you are running a business critical app, you may be better off with a LAMP stack

Best PHP download to keep all my options open?

In the past, I used WAMPserver on windows to parse PHP for me. This is a pre-configured package, focussed on working with MySQL.
When I tried to run PostgreSQL, I got error messages that said that my version of PHP wasn't compiled to work with PostgreSQL.
So, I've recently uninstalled WAMP and every associated with it. I've downloaded Apache 2.2.11 with openSSL, installed as admin(you know, run the command prompt as administrator, cd to the directory where the download was done and have it executed, so the install was done as admin).
That's that. I now have Apache installed, "it works" shows up, so I'm that far.
Now I'm wondering, do I download the exe and install, or the zip, or something else.
What is the best thing to do to make sure that the PHP on my system can handle everything I can ever throw at it?
Also, PHP first, or MySQL/Postgre first.
And lastly, what about PEAR? I need PEAR installed, which isn't standard on Windows. I'm guessing the pear.bat file in the PHP downloads will do that for me?
EDIT: I see one close vote, yet no comment as to why. It makes me wonder how people who are so lazy and rude got to have somany points.
I would recommend downloading the zip package, as configuring php is not really that difficult, and it allows you to add features as needed.
As for whether first to install php or MySQL/PostgreSQL, - it does not really matter. You can install them in any order.
Your guess regarding PEAR is quite correct
i haven't used wamp before, so i can't comment on that
i do however use xampp which sounds very similar
in xampp if i want to enable postgres support i edit the php.ini file and uncomment the postgres section of the ini file, same with any of the extensions that i need
perhaps this might be an alternative you can try if you get stuck
There are many ways to setup a HTTP server/PHP/database machine. Sometimes the behaviour of your development setup will differ from the live server's.
I would recommend finding out the setup your web host is using, then getting a vmware appliance image that fits that as close as possible and get any additional software using it's package manager (which is easier that installing stuff on Windows).
Setup a file sharing link between the VM and the host, make sure you can view the VM's port 80 in a browser running in your host OS and you're set.

How to work with PHP on Windows XP?

I want to do a sample program in PHP on Windows XP.
Do I need any special software to get this to work?
I am afraid that I simply open notepad type the PHP program and save it with php extension. Then I open it with the browser as a HTML file. But it does not work.
Please help
Thanks in advance
However you decide to install a webserver and php (or just php and use it in the console like someone mentioned):
Check out the PHP Manual, especially the Getting Started section.
Apache (Very, very easy)
Check out the WampServer getting started presentation.
Download and install WampServer.
And you are ready to go.
Microsoft (Not tested this myself)
Check out PHP on Windows.
Download and install the Microsoft Web Platform Installer.
Let me know how that work out... (never tried it myself, since WampServer is so easy)
You need to have a web server with PHP installed on your PC to make this work.
I highly recommend installing wampserver on your computer. It is a Windows installer that will put PHP, MySQL and Apache in your computer and let you manage all the services and such very easily. If you have problems getting it to work, you can also try out XAMPP, although I've never used it myself.
Some answers containing the hint for using wamp.
You should better use the Zend Server Community Edition.
This is also free and can be downloaded here:
http://www.zend.com/de/community/zend-server-ce
This contains Apache, Mysql, PHP and some Zend related Tools.
Benefit: its much better preconfigured than wamp.
Another easy one to set up (though it takes extra config to support PHP5) is easyPHP
you can simply install PHP, and then run the program and redirect the output
php foo.php > output.html
and then use any browser to open up that html file.
Since you have IIS on the windows cd I would suggest you go to control panel, install/uninstall programs and click on windows components and install IIS. Then install ASP.NET 3.5 from www.asp.net and finally install Phalanger from http://www.php-compiler.net/
That will give you the benefit of both worlds, you can program in ASP.NET using PHP as the language, you can use only PHP if you prefer that or you can mix using ASP.NET/C# on some pages and PHP on other pages within the same application.
I use XAMPP, works out of the box with his installer and is more than enough for a simple developer windows environment.
The simplest way - use www.microsoft.com/web platform installer. get the whole stack to run PHP all from one place.
i would like to share that before starting PHP we have to set environment for that and then we can start working with PHP.
http://code.freefeast.info/php-tutorials/setting-up-the-environment-for-php-php-tutorial/

Easy IIS install of php

Are there any "all-in-one" installers for php + mysql on iis? Preferably with a gui configuration interface.
The PHP part is easy with Web Platform Installer:
http://php.iis.net/
MySQL is a breeze to install on Windows:
http://dev.mysql.com/downloads/mysql/5.1.html#win32
I don't know of any all-in-one installers for both MySql and PHP, but PHP itself comes with an automated installer that will attach itself to IIS - but the preferred method is still manual (the automated procedure only uses CGI). There are plenty of how-to pages on the web that give you the step-by-step procedure required to get setup (and these differ based on your version of IIS) - I suggest you use one of those instead.
Some links to get you started:
PHP Documentation
Installing PHP 5 on IIS in 5 simple steps
I know this is not a direct answer, but a point of interest only. If you are looking for something that runs php/mysql that is quick to get setup for testing purposes you could try using a virtual appliance+vmware server/player
I don't know of any all in one installers, but you are probably better off just installing MySQL and PHP seperately. It's pretty straight forward.
MySQL has a GUI installation wizard in windows. I'm assume you know where to download this. You can download PHP for IIS from the Microsoft website here. It will have a GUI interface to some extent for installation:
http://www.microsoft.com/web/gallery/install.aspx?appid=PHP53
You will probably need to still reference MySQL by editing the php.ini file manually. This is a particually good FAQ:
http://learn.iis.net/page.aspx/353/install-and-configure-mysql-for-php-applications-on-iis-7-and-above/

Categories