jasonc Posted September 11, 2010 Share Posted September 11, 2010 I have Windows 7 and wish to install PHP and MySQL on it to save on uploading and testing my code each and everytime I make a change!! But I get a page of install files on http://windows.php.net/download/ So wish to find out what one I should use for very basic usage, just PHP and MySQL are needed no https or IIS. My server is Linux and has PHP 5.2.8 and MySQL 5.0.67-community Quote Link to comment https://forums.phpfreaks.com/topic/213123-wish-to-install-phpmysql-on-windows-7-pc-which-one-do-i-install/ Share on other sites More sharing options...
wildteen88 Posted September 11, 2010 Share Posted September 11, 2010 You're going to need to install a http server on to your computer in order to run your PHP scrupts. I'd suggest you to install Apache2.2 from http://httpd.apache.org Download the latests version of MySQL5.0 Community Server from http://downloads.mysql.com For PHP you'll want to download the PHP 5.2 package titled VC6 x86 Non Thread Safe and choose the zip option. Do not use the Installer Once you have Apache, PHP and MySQL downloaded. First install Apache. However during the Installation process click the Customise install option, choose to install Apache to C:\Server\Apache In one of the steps it'll ask for some hostnames, just type in localhost for both cases. The web server administrator email address can be any address, fake or valid. I normally just use webmaster@localhost. Next, extract the PHP zip package to C:\Server\PHP. Now open the folder C:\Server\PHP and rename the file named php.ini-recommended to php.ini. Next you'll want to add the PHP folder to the PATH Environment Variable. Restart your computer to finish the PHP installation Once you're computer has restarted. Open Apaches httpd.conf configuration file (Located in C:/Server/Apache/httpd). Add these three lines to the bottom of the file # PHP5 configuration LoadModule "C:/Server/PHP/php5apache2_2.dll" PHPIniDir "C:/Server/PHP" AddType application-x/httpd-php5 .php Save the httpd.conf and restart Apache (there should be an Apache taskbar icon. left click this icon and choose Restart). Before configuring Apache/PHP. First create a file called info.php in Apaches htdocs folder (C:/Server/Apache/htdocs) and place this code into the file <?php phpinfo(); ?> Delete the existing files in the htdocs folder too. Now open your web browser and go to http://localhost/info.php. You should get a page generated displaying the PHP version and configuration. Confirm the line that reads Loaded Configuration File does point to C:/Server/PHP/php.ini. If this is correct then Apache and PHP are properly configured. You can now setup Apache/PHP as you require. Just remember to restart Apache if make any changes to Apache and/or PHP's configuration. Lastly install MySQL to C:/Server/MySQL. The default installation options should be fine. Quote Link to comment https://forums.phpfreaks.com/topic/213123-wish-to-install-phpmysql-on-windows-7-pc-which-one-do-i-install/#findComment-1109925 Share on other sites More sharing options...
NicholasB Posted November 15, 2010 Share Posted November 15, 2010 Worked for me BUT I changed # PHP5 configuration LoadModule "C:/Server/PHP/php5apache2_2.dll" PHPIniDir "C:/Server/PHP" AddType application-x/httpd-php5 .php to # PHP5 configuration LoadModule php5module "C:/Server/PHP/php5apache2_2.dll" PHPIniDir "C:/Server/PHP" AddType application/x-httpd-php .php Thanks, many days of pain are over Quote Link to comment https://forums.phpfreaks.com/topic/213123-wish-to-install-phpmysql-on-windows-7-pc-which-one-do-i-install/#findComment-1134665 Share on other sites More sharing options...
tibberous Posted November 19, 2010 Share Posted November 19, 2010 You're going to need to install a http server on to your computer in order to run your PHP scrupts You can run PHP command line too. While it might seem pointless, there is a lot of cool stuff you can use it for. I wrote a backup system / server checker that runs as a command line app, and it emails me if any of the servers go down. You can also do image resizing and just general PHP practicing in command line. You'll probably WANT apache, but you should know how to run PHP without it. Last time I interviewed someone, one of the interview questions was a command line script that would read a url and print the value at it every 10 ten seconds -- you'd be amazed how few people got it =/ It was even an open-internet test! Quote Link to comment https://forums.phpfreaks.com/topic/213123-wish-to-install-phpmysql-on-windows-7-pc-which-one-do-i-install/#findComment-1136982 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.