Jump to content

PHP error message keeps on showing. Need your help


ukpapillon

Recommended Posts

Hi,

 

My homepage shows the error messages below:

 

Warning: chk_language(language/.php) [function.chk-language]: failed to open stream: No such file or directory in /home/mysite/public_html/include/function.php on line 35

 

Failed opening 'language/.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mysite/public_html/include/function.php on line 35

 

Presently, there's two languages options to choose from, (english/japenese)English is the default. Strangely when I select japenese, my homepage goes back to normal with all the features working perfectly.

 

I've tried everything. Restore the files, repair..etc.. I cannot find the source of the problem and this is driving me insane ??? >:(

 

I am using VPS hosting.

 

 

Please can someone help me here

 

Maria

 

Link to comment
Share on other sites

Below is the language.php script:

<?php

//CHECK HOTORNOT ADMINISTRATOR LOGIN

function chk_admin_login()

{

        global $config;

        if($_SESSION['AUID']!=$config[admin_name] || $_SESSION['APASSWORD']!=$config[admin_pass])

        {

                header("Location:$config[baseurl]/siteadmin/login.php");

                exit;

        }

}

 

 

//CHECK LANGUAGE SELECTED

function chk_language()

{

 

global $conn;

 

if ($_SESSION[lang] == 'english')

{

include("language/en_US.php");

 

}

elseif($_SESSION[lang] == 'japanese')

{

include("language/ja.php");

}

 

else

{

$sql="select * from sconfig where soption='language'";

        $rs=$conn->execute($sql);

$default=$rs->fields[svalue];

include("language/$default.php");

}

}

 

 

This is where there's a problem. Line 35

 

???

Link to comment
Share on other sites

Hi Jesirose

 

Thank you so much for helping me. Sorry I took long to reply. Had to go out.

Below is the rest of the script. Its quit a long code ( cannot insert the whole code):

 

//CHECK HOTORNOT MEMBER LOGIN

function chk_member_login($viewkey="")

{

       global $config,$conn;

 

       $sql="select * from signup where UID=$_SESSION['UID']";

       $rs=$conn->execute($sql);

       if($_SESSION['UID']=="" || $_SESSION['EMAIL']=="" || $rs->recordcount()==0)

       {

               $q = "";

               while(list($k,$v)=each($_GET)){$q.="&$k=$v";}

               $q=base64_encode($q);

               if($q!="")$add="&add=$q";

               $temp=$_SERVER['PHP_SELF'];

               $path=explode("/",$temp);

               $page=$path[count($path)-1];

               $page=str_replace(".php","",$page);

               header("Location:$config[baseurl]/signup.php?next=$page$add");

               exit;

       }

}

 

function session_to_db()

{

       global $conn;

       $sql="select * from signup where UID=$_SESSION[uID]";

       $rs=$conn->execute($sql);

       if($rs->recordcount()>0)

       {

               $_SESSION[emailVERIFIED]=$rs->fields['emailverified'];

       }

}

//MAIL FUNCTIION

function mailing($to,$name,$from,$subj,$body,$bcc="") {

global $SERVER_NAME;

$subj=nl2br($subj);

$body=nl2br($body);

$recipient = $to;

if($bcc!="") $headers = "Bcc: " . $bcc."\n";

$headers .= "From: " . $from . "\n";

//$headers .= "X-Sender: <" . "$to" . ">\n";

//$headers .= "Return-Path: <" . "$to" . ">\n";

//$headers .= "Error-To: <" . "$to" . ">\n";

$headers .= "Content-Type: text/html\n";

mail("$recipient","$subj","$body","$headers","-f$from");

}

//EMAIL VERIFICATION

function isMailVerified()

{

       global $config;

               

               if($_SESSION[emailVERIFIED]=="no")

               {

                       header("Location:$config[baseurl]/confirm_email.php");

               }

               else if ( $_SESSION['EMAILVERIFIED']=="off" )

               {

                       header("Location:$config[baseurl]/confirm_email.php?flag=off");

               }

}

 

 

function is_commented($vid)

{

       global $config,$conn;

       $sql="select count(*) as cnt from comments WHERE VID=$vid and UID=$_SESSION[uID]";

       $rs=$conn->execute($sql);

       if($rs->fields[cnt]>0) return "yes";

}

 

function is_video_commented($vid)

{

       global $config,$conn;

       $sql="select  be_comment from video WHERE VID=$vid";

       $rs=$conn->execute($sql);

               return $rs->fields[be_comment];

 

}

function is_video_rated($vid)

{

       global $config,$conn;

       $sql="select be_rated from video WHERE VID=$vid";

       $rs=$conn->execute($sql);

               return $rs->fields[be_rated];

 

}

 

function is_video_embabed($vid)

{

       global $config,$conn;

       $sql="select  embed from video WHERE VID=$vid";

       $rs=$conn->execute($sql);

               return $rs->fields[embed];

 

}

 

 

 

 

}

?>

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.