Installation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Installation

Post 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?
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post 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
Revan
Forum Commoner
Posts: 83
Joined: Fri Jul 02, 2004 12:37 am
Location: New Mexico, USA
Contact:

Post 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.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post 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.
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Post 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?
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Post by S_henry »

Anybody got any idea?
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Throw the IIS into the waste bin. And use APACHE :)
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Post 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?
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post 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).
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Post 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?
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post 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?
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Post 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?
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

try running phpinfo and see what that looks like...
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Post 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. :)
Post Reply