nachle_gale Posted January 17, 2010 Share Posted January 17, 2010 hi everybody, i have installed php and working very fine. i am able to code and have installed IIS7 which is working very fine. But my problem is that i am UNABLE to run the php file in which i have used phpinfo() code... whenever i try to run phpinfo() it give me error which is ataed below: "PHP Warning: phpinfo() [<a href='function.phpinfo'>function.phpinfo</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Australia/Melbourne' for '11.0/DST' instead in C:\inetpub\wwwroot\myphp\phpTest.php on line 2" what i need to do....... the code to run this is as: <?php phpinfo(); ?> PLEASE HELP Quote Link to comment Share on other sites More sharing options...
trq Posted January 17, 2010 Share Posted January 17, 2010 That is simply a warning stating that you should set php's timezone setting independently to that of the system by editing the date.timezone directive within your php.ini file. Set it, then restart your server and the problem should be fixed. Quote Link to comment Share on other sites More sharing options...
nachle_gale Posted January 17, 2010 Author Share Posted January 17, 2010 can u please send me what exactly steps do i have to follow to change the TIMEzone settings and exact values that i need to enter in php.ini Regards and thanks for ur 1st reply Quote Link to comment Share on other sites More sharing options...
trq Posted January 17, 2010 Share Posted January 17, 2010 You need to open the php.ini file in a text editor, find the directive that says 'date.timezone = ' and add your timezone. If the date.timezone line starts with a ; you need to remove that. There are instructions relating to timezone settings within the comments just prior to the date.timezone line. I for instance run my servers in Sydney, Australia so my setting looks like.... date.timezone = "Australia/Sydney" Quote Link to comment Share on other sites More sharing options...
nachle_gale Posted January 17, 2010 Author Share Posted January 17, 2010 thanks heaps migt its working now but now i am facing problems with setting up MySQL i have already installed MySQL on my computer.... do i need to make any changes with php.ini before working with MySQL i already have changed extension=php_mysql.dll extension=php_mysqli.dll in the php.ini what else i have to do to run smoothly REGARDS Quote Link to comment Share on other sites More sharing options...
trq Posted January 17, 2010 Share Posted January 17, 2010 After any changes to the php.ini you need to restart your server. Quote Link to comment Share on other sites More sharing options...
nachle_gale Posted January 17, 2010 Author Share Posted January 17, 2010 i have restarted my iis7 server after changining php.ini but the problem still eists the code of my test file is as: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <?php // hostname or ip of server (for local testing, localhost should work) $dbServer='localhost'; // username and password to log onto db server $dbUser='root'; $dbPass=' '; // name of database $dbName='test'; $link = mysql_connect("$dbServer", "$dbUser", "$dbPass") or die("Could not connect"); print "Connected successfully<br>"; mysql_select_db("$dbName") or die("Could not select database"); print "Database selected successfully<br>"; // close connection mysql_close($link); ?> </body> </html> and the ERROR msg that i recieves is as follows: PHP Fatal error: Call to undefined function mysql_connect() in C:\inetpub\wwwroot\myphp\sqlTest.php on line 21 Regards: Quote Link to comment Share on other sites More sharing options...
trq Posted January 17, 2010 Share Posted January 17, 2010 Does the php_mysql.dll file exist within your extensions directory? Quote Link to comment Share on other sites More sharing options...
nachle_gale Posted January 17, 2010 Author Share Posted January 17, 2010 there a folder named ext in my php folder whose path is as c:/php/ext and there is file in there Quote Link to comment Share on other sites More sharing options...
trq Posted January 19, 2010 Share Posted January 19, 2010 Are you sure you are editing the correct php.ini file? Quote Link to comment Share on other sites More sharing options...
nachle_gale Posted January 20, 2010 Author Share Posted January 20, 2010 yes i am sure about the fine........ this is the same file in which i did changes previously when u told me to change date.timezone settings....i changed date/time in the same php.ini file.......and it woked.but i am facing problems when to work with mysql Quote Link to comment Share on other sites More sharing options...
nachle_gale Posted January 20, 2010 Author Share Posted January 20, 2010 hi there i am sending u some screen shots of my phpinfo() and php.ini file where i changed the extension_dir andl also extension_dir location as shown in my phpinfo() may be this will help u [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
trq Posted January 20, 2010 Share Posted January 20, 2010 Well, according to your phpinfo() pages, mysql is enabled. I'm not sure what the problem would be. Quote Link to comment Share on other sites More sharing options...
nachle_gale Posted January 20, 2010 Author Share Posted January 20, 2010 so that means there is no solution of my problem..... ok i will tell you one more thing upto yesterday i was recieving the error message stating : PHP Fatal error: Call to undefined function mysql_connect() in C:\inetpub\wwwroot\myphp\sqlTest.php on line 21 but now i am recieving new message of activity timeout the first message is php generated error but i think this new one is iis7 stuff and also do i need to run mysql also before using it in the php............because i havent used mysql before i have just installed it on my laptop and dont know weather to run it and how to start it cheers! [attachment deleted by admin] Quote Link to comment 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.