FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PHP and MySQL in windows





vignesh_natraj
I want to learn php and mysql. but each time i donot want to go online and test for errors. all i want is to test my dynamic page to be tested in Windows XP SP2 . i have installed IIS. i use Dreamweaver. also please give me a very good e book with bascis from A-Z of PHP and MySQL.
rohan2kool
as for ebooks.. i don't really know one.. try wikibooks.org... there's a lot of cool stuff there.

you need to download the php package from http://www.php.net
I recommend, you get the installer rather than the tarballs.

once downloaded, run the installation (since you're not using Apache, php installer has the option of automatically configuring IIS).

get mysql 5 (ce) from: mysql.com

Then, if u have php 5+, u need to enable mysql through the extensions. Most probably, the installer version is missing the extension dlls (not sure.. just check the directory in which you installed php for a folder called 'ext'). What we need is 'php_mysql.dll'. Once located, go to php.ini and there, set the directive ext_dir to the folder where the dll is. Then under the extension list, php_mysql.dll should already be written in a comment. Just un-comment it (remove the first semi-colon from it).

it shud work.. in case of any problems feel free to post here.

P.S: I'm not sure of how things go in IIS, coz i've never used it, but there's a folder called 'Inetpub' which acts as ur http server root.

rohan
yy1124
I am not too sure about this...but can IIS support php?

All this while I am using XAMPP as my php server (this include web server and mysql, with phpmyadmin), this is very suitable for beginners or do not want to do much setting or tweaking, just install it, put your site in your folder and start the startup script, you are on...

BTW, can anyone confirm that whether IIS support php or not?
rohan2kool
yy1124 wrote:
I am not too sure about this...but can IIS support php?


yep.. i'm 100% sure that not only IIS supports php, but also that the php installer has an option to automatically configure IIS. php works with any server (or rather, any server that supports CGI).. coz although the module version of php may not work with all servers (mostly, no other server than Apache), the php executable one behaves like any other cgi application (in fact, it is a cgi application).
TomS
When you get the php-package, you only have the phpinterpretet. I don't know if there's even a webserver in this package.
I recommend the xampp-suite (xampp.org). There you get the Apachewebserver, php, MySql with phpmyadmin and some additional stuff.
vignesh_natraj
i visited http://www.apachefriends.org/en/xampp.html i think it contains php,mysql and phpmyadmin enough more me to start working. thanks rohan and others for your reply
rohan2kool
TomS wrote:
When you get the php-package, you only have the phpinterpretet. I don't know if there's even a webserver in this package.
I recommend the xampp-suite (xampp.org). There you get the Apachewebserver, php, MySql with phpmyadmin and some additional stuff.


nope.. u don't get a webserver that's coz php doesn't recommend any server as such for use with it.
janszmatt
i use www.wampserver.com/en/
golles
janszmatt wrote:
i use www.wampserver.com/en/

I also use WAMP, it is fantastic, I don't need to upload all the files every few seconds. everyone uses it in our class for our php/mysql project. setup is verry easy, then goto http://localhost and done Very Happy
vignesh_natraj
i downloaded the xampp but i am afraid there are few vulnerabilities.
i recentelt encountered a Norton Antivirus pop up box saying
Quote:
An attempt to execute apache.exe from a remote computer was blocked

what does this mean are there any windows updates for apache security
yjwong
This isn't a vulnerability. Apache on Windows is not as safe as on Linux, but it is still very safe to use. I think Apache was trying to spawn a child process but was blocked by Norton.
sonam
I am instaling separately server, PHP and MySQL. I am using KF Web Server

http://www.keyfocus.net/kfws/

what is working perfectly on my XP windows. It is possible very simple to crate multiple sites on localhost with just few clicks what is perfect for testing. Then just open browser and type eg. locahost or localhost:99 or localhsot:111 etc. and sever will open different sites from different location on your XP OS.

Sonam
vignesh_natraj
i installed xampp but how to test my site
http://localhost/ is not working
rohan2kool
hmm.. that's strange.. try http://127.0.0.1 (if localhost isn't working.. this won't even Razz)

maybe, the apache service hasn't started (never used xampp before.. always installed everything manually.. so don't know exactly).

to run the apache service, see if there are any administrative tools with xampp (mostly there shud be) and try to start the apache and mysql servers.

if not, or alternatively, you can also try this:

go to Start>Run and type:

[for apache v1.x.x]:

net start apache

[for apache v2.x.x]:

net start apache2

You can also goto Settings>Control Panel>Administrative Tools>Services and start the services (namely apache and mysql) from a list.

See if this helps.

regards,
rohan
S3nd K3ys
I use Uniserver. Its' a free, no-install-required, portable (run it from USB from what I've heard) solution for coding/testing/education or even production.

Uniform Server wrote:
The Uniform Server is a WAMP package that allows you to run a server on any MS Windows OS based computer. It is small and mobile to download or move around and can also be used or setup as a production/live server. Developers also use The Uniform Server to test their applications made with either PHP, MySQL, Perl, or the Apache HTTPd Server.


http://www.uniformserver.com/index.php
X3 Talk
If you want to set up an Apache server without the pain, download XAMPP. It has mySQL and PHP inbuilt. Very good, highly reccommend.
vignesh_natraj
X3 Talk wrote:
If you want to set up an Apache server without the pain, download XAMPP. It has mySQL and PHP inbuilt. Very good, highly reccommend.

i have installed it but how do i make it to run.
can you please give me a walkthrough on how to test a php page with mysql database.
rohan2kool
as for the walkthrough.. here's my try at it (since i've never used XAMPP myself.. i'm doing a bit of guesswork).

1. Did the http://localhost work finally?
2. If yes, then check where you have installed XAMPP.
3. Let's assume it's in C:/XAMPP
4. Go to C:/XAMPP, there find the folder which contains the apache webserver files (mostly titled as apache or apache2).
5. Once there, search for a folder called 'htdocs' or 'www' or 'var_html/www'. It can be either of them. (different AMPs have different root folders. default for apache however is htdocs).
6. In the 'htdocs'/'www' folder, place your php files.
7. Now, http://localhost will contact the apache server and it will serve the directory 'htdocs' to you.
8. So, if u make a folder called 'myfolder' within 'htdocs', 'http://localhost/myfolder' will lead to 'myfolder' within htdocs. Imagine it as a partition, whose root is 'htdocs'.
9. Place your php files in the folder. Let's say you place it in the 'htdocs' foler with the name 'check.php'. This can be used as a sample code to check if everything's fine:

Code:

<?php
//code for check.php
phpinfo(); //get info for current php installation
?>


10. Point ur browser to http://localhost/check.php
11. Since u have downloaded a WAMP, everything will be already configured for you, so the server will process the php file (using the interpretor) and u can see the preview in your browser.
12. MySQL shall also be installed and configured with XAMPP.
13. just use any of the mysql functions to check it: MySQL functions in PHP

hope it helps... ask in case of any queries... Very Happy

rohan
vignesh_natraj
i reinstalled xampp. my norton firewall was creating problems but i switched it off when installing now its working.
thanks for your replies.
Related topics
PHP, MySQL...
ASP +PHP+MySQL Tutorials
what is your php mysql apache installer package
Need some php/mysql dlls
The Basics (php, mysql etc)
What is useful way in this php+mysql problem?
PHP/Mysql - beginner!
A very good PHP MySQL Tutorial
Setup php,mysql and others...
php, mysql and iis5
 EASY 40 frih$ IF YOU KNOW PHP+MySQL 
Php Mysql security testing
Project to join - php,mysql??
Link PHP/Mysql with Outlook Express
Free PHP/MySQL login script
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.