Page 1 of 1

Installation

Posted: Mon Jun 27, 2005 7:58 pm
by S_henry
I've installed php version 5.0.4 on my pc (windows 2000 with iis). The problem is after i installed php, i can't run php file. Should i do any setting? Anybody can help me pls?

Posted: Mon Jun 27, 2005 8:09 pm
by neophyte
Why put it together for yourself when someone else has done it for you.

Check out.

http://apachefriends.org/en

Complete apache/php/perl/gd/ad_nauseam

Posted: Mon Jun 27, 2005 9:02 pm
by Revan
1. Make sure the PHP lib is defined in the httpd.conf file
2. Make sure the .php files mime is set correctly.

Posted: Mon Jun 27, 2005 10:08 pm
by Burrito
I think he said IIS in which case you need to make sure the extension is mapped correctly. If you're using isapi, it has to be mapped to the dll, if you're using cgi, it has to be mapped to the exe.

I'm at home now and don't have access to a w2k box, but when I get to work tomorrow I'll follow up on this and provide you with the exact steps. I know I've posted about this before so I'll also do a quick search now and see if I can find my post. If so, I'll just edit this one with a link for you.

edit: well I know I have made a more comprehensive post on how to do it than this, but this is all I could find:

viewtopic.php?t=33948

I'd suggest you do a search for installation and iis and see what you come up with.

Posted: Wed Jun 29, 2005 2:29 am
by S_henry
I've tried to refer from viewtopic.php?t=33948 and it works but is not 100% success. I still face the same problem on database connection as i got this error:

Fatal error: Call to undefined function mysql_connect() in C:\Documents and Settings\blah\Desktop\PHP Test\test.php on line 7

So anybody can help me to solve this problem pls?

Posted: Wed Jun 29, 2005 8:44 pm
by S_henry
Anybody got any idea?

Posted: Wed Jun 29, 2005 10:20 pm
by ol4pr0
Throw the IIS into the waste bin. And use APACHE :)

Posted: Thu Jun 30, 2005 3:11 am
by S_henry
Emm.. Apache also ok. But if somebody know how to use with IIS is better. To use php with IIS is not the problem anymore. The problem is on mysql connection. When i want to make connection, i got this error:

Fatal error: Call to undefined function mysql_connect() in C:\Documents and Settings\blah\Desktop\PHP Test\test.php on line 7

Maybe have to change some setting in php.ini file. But i don't know what should be changed. Anybody got idea?

Posted: Thu Jun 30, 2005 9:54 am
by Burrito
you need to uncomment the mysql extension and make sure your extension path is set up to point to the proper location of your extension dlls.

you also need to copy libmysql.dll to your windows folder.

After you change your php.ini file, you're going to need to restart the IIS server (assuming you're using isapi).

Posted: Fri Jul 01, 2005 3:00 am
by S_henry
Until now after i follow your instruction, i got this error:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in C:\Documents and Settings\blah\Desktop\PHP Test\test.php on line 11
Could not connect to DatabasePHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_curl.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_exif.dll' - The specified module could not be found. in Unknown on line 0 ...

I've check into that path ('C:\PHP\ext') and the dll file is exist. Do u know what the problem is?

Posted: Fri Jul 01, 2005 10:47 am
by Burrito
not sure why it would need cURL to use the mysql extensions... The other error/warning I've never seen before.

are you using some kind of class library to do your queries?

Posted: Sun Jul 03, 2005 8:42 pm
by S_henry
I only use usual way for my query like this:

Code: Select all

$db = mysql_connect("localhost", "", "")
      or die ("Could not connect to Database");    

mysql_select_db ("dbname",$db)        
      or die ("Could not select database");
Any idea?ct to Database");

mysql_select_db ("dbname",$db)
or die (&quote;Could not select database&quote;);


Any idea?= mysql_connect("localhost", "", "")
or die ("Could not connect to Database");

mysql_select_db ("dbname",$db)
or die ("Could not select database");


Any idea?te;, "")
or die ("Could not connect to Database&quote;); c]
$db = mysql_connect("localhost", "&quote;, &quote;&quote;)
or die (&quote;Could not connect to Database");

mysql_select_db ("dbname",$db)
or die ("Could not select database&quote;);


Any idea?ay for my query like this:

Code: Select all

$db = mysql_connect("localhost", "", "")
      or die ("Could not connect to Database");    

mysql_select_db ("dbname",$db)        
      or die ("Could not select database");
Any idea?db = mysql_connect("localhost&quote;, &quote;&quote;, &quote;&quote;)
or die (&quote;Could not connect to Database&quote;);

mysql_select_db (&his:

Code: Select all

$db = mysql_connect("localhost", "", "")
      or die ("Could not connect to Database");    

mysql_select_db ("dbname",$db)        
      or die ("Could not select database");
Any idea?ay for my query like this:

Code: Select all

$db = mysql_connect("localhost", "", "")
      or die ("Could not connect to Database");    

mysql_select_db ("dbname",$db)        
      or die ("Could not select database");
db ("dbname",$db)
or die ("Could not select database");


Any idea?:

Code: Select all

$db = mysql_connect("localhost", "", "")
      or die ("Could not connect to Database");    

mysql_select_db ("dbname",$db)        
      or die ("Could not select database");
Any idea?quote;localhost", "", "")
or die ("Could not connect to Database&quote;);

mysql_select_db (&quote;dbname&quote;,$db)
or die (&quote;Could uote;")
or die ("Could not connect to Database");

mysql_select_db ("dbname",$db)
or die ("Could not select database");


Any idea?ql_connect("localhost", "", "")
or die ("Could not connect to Database&quote;);

mysql_select_db (&quote;dbname&quote;,$db)
or die (&quote;Could not select database&quote;);


Any idea?ay for my query like this:

Code: Select all

$db = mysql_connect("localhost", "", "")
      or die ("Could not connect to Database&quote;);    

mysql_select_db (&quote;dbname&quote;localhost", "", &quote;&quote;)
      or die (&quote;Could not connect to Database&quote;);    

mysql_select_db (&quay for my query like this:

Code: Select all

$db = mysql_connect("localhost&quote;, &quote;&quote;, "")
      or die ("Could not connect to Database");    

mysql_select_db ("dbname",$db)        
      or die ("Could not select database");
Any idea?;, "", "")
or die (&quote;Could not connect to Database&quote;);

mysql_select_db ("dbname",$db)
or die (&quote;Could not select database&quote;);


Any idea?
$db = mysql_connect("localhost", "", "")
or die ("Could not connect to Database");

mysql_select_db ("dbname",$db)
or die ("Could not select database");


Any idea?

Posted: Sun Jul 03, 2005 9:28 pm
by Burrito
try running phpinfo and see what that looks like...

Posted: Mon Jul 04, 2005 1:47 am
by S_henry
OK. now can already. Actually before this i've uncomment all extension dll in php.ini. So now i just uncomment 'extension=php_mysql.dll' and no more error displayed when i run the program (to connect database). Maybe that's the problem. Thanx guys for all ur help. :)