问题
How to correct the programme
Error will display Call to undefined function session_is_registered() in /home/rajesh/public_html/lib/common.php on line 40 this is the 40th line
if(!session_is_registered("u_type")) {
session_register("u_type");
}
if(trim($_REQUEST['u_type']) != "") {
$_SESSION['u_type'] = trim($_REQUEST['u_type']);
}
another error configures.php am upload the file in my domain
mysql_connect(): Access denied for user 'rajesh'@'localhost' (using password: YES) in /home/rajesh/public_html/lib/configures.php on line 4
<?php
require_once "config.php";
require_once "var.inc.php";
$connect = mysql_connect(DB_SERVER, DB_USER, DB_PASSWORD);
$link = mysql_select_db(DB_NAME, $connect);
$sql = "SELECT * FROM ".CONFIG_TABLE."";
$res = mysql_query($sql);
$row = mysql_fetch_array($res);
Any one help me to correct the file and send a mail id am contact
回答1:
session_is_registered() was deprected on PHP 5.3.0 and removed on PHP 5.4.0 so I would bet that you are running PHP 5.4.0
You can easilly find out what version of PHP by calling
phpinfo();
Regarding the MySQL issue... you most probably have a user permission issue: Check:
That the mysql username has access from that computer. If MySQL is running on the same machine as the PHP server, you must have the DB_USER name that you are using with
@localhost. In MySQL a user withusername@%wildcard does not include localhost.Make sure that the mysql user actually has been granted access to the DB. And again,
username@localhostis different thanusername@%.
来源:https://stackoverflow.com/questions/29931889/in-my-php-file-error-will-display-as-undefine-function-session-is-register