Jump to content

Problem in running phpinfo();


Recommended Posts

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

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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"

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.