Unstoppable Domains โ€” AI Assistant

Php Help Needed

SpaceshipSpaceship
Watch

aakashvijay

Established Member
Impact
1
hi guys,
iam developing a website for me. but problem is i am unable to setup it. i am unable to link it to mysql db. iam not known to mysql db. can any one suggest me step by step method to run that script to my iis 5.0 with mysql 4 and php 5.0 installed on my system. just tell me how to connect and configure to database with php script....


thanks
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Hi Aakash,

First of all find out if your php is working ok on IIS. To do this you could run a simple script, as follows...

PHP:
<?
  echo "hello world";
?>

If this works, then, your php is setup.

Ideally your php should be installed as an ISAPI module rather than a cgi exe.

MySQL
=====


If you have setup mysql properly the following should work


Code:
C:\> C:\mysql\bin\mysqlshow 
C:\> C:\mysql\bin\mysqlshow -u root mysql 
C:\> C:\mysql\bin\mysqladmin version status proc C:\> C:\mysql\bin\mysql test

This is assuming that you have installed MySQL in "c:\mysql". If not, please change the path accordingly.

Alternatively you may download a tool for MySQL administration called phpmyadmin available at http://www.phpmyadmin.net/

This is very helpful for MySQL administration through php.

By default your mysql server is "localhost" and the username is "root" and password is blank (empty password)

You may have to change this later.

After this when you make connections through php, use "localhost" as your mysql server name.

PHP:
$dbCon = mysql_connect('localhost', 'root', '');//blank pass

Once you upload your site, then if your mysql server is in another server, then you will have to find the IP of that server or the sub domain name (like mysql.mydomain.com).

then a connection would be like this

PHP:
$dbCon = mysql_connect('mysql.mydomain.com', 'root', '');//blank pass

using this connection you could create recordsets

PHP:
$rs = mysql_db_query('mydbname', 'select * from table_name', $dbCon);

Using this recordset you can browse through fields

PHP:
while ($row = mysql_fetch_array($rs))
{
  echo $row['field1'];
  echo $row['field2'];
  echo $row['field3'];

}
 
0
•••
thanks aknal, u solved my one problem... but when i have uploaded my php script to the host server.. it is not installing or unable to cnnect to db... you may see by visit my page at win32api.freehosting123.com... thanks again....
 
0
•••
thanks aknal again for ur post..
i believe that u visited at my site...
what my problem is, i want to setup phpBB2 php script for my website... if u want to see phpBB2 php script then u may download it from http://internap.dl.sourceforge.net/sourceforge/phpbb/phpBB-2.0.11.zip

see it and help it to setup and start working for me on iis5.0. pls suggest me all thigs like db name, user name etc...
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Zero Commission
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back