I am confused...........

I have made a project . No problem in localhost but whenever I try to execute in my domain server it shows :

Warning: include_once(body/login/logIn.php) [function.include-once]: failed to open stream: No such file or directory in /mounted-storage/home36c/sub003/sc29343-BHKZ/progekt.com.utpal/helora/body.php on line 68

You can check : http://utpal.progekt.com/helora

I have used code in my project :

define("BODY",'body/');
define("LOGIN",BODY.'login/');

@$action=trim($_REQUEST['action']);
@$script=trim($_REQUEST['script']);

if(strcmp($action,"admin")==0){
	switch($script){
	
		case 'login':include_once LOGIN."logIn.php";
			break;	
}
}

I have set all of my files 777 permissions. But no output.
Can you fix it?????

Does this file exist?

/mounted-storage/home36c/sub003/sc29343-BHKZ/progekt.com.utpal/helora/login/logIn.php

Note the filename case logIn.php

Yes, this file exists (I have used logIn.php)

Member Avatar for diafol

This looks like an extremely convoluted method of running a login script.

define("BODY",'body/');
define("LOGIN",BODY.'login/');
 
@$action=trim($_REQUEST['action']);
@$script=trim($_REQUEST['script']);
 
if(strcmp($action,"admin")==0){
	switch($script){
 
		case 'login':include_once LOGIN."logIn.php";
			break;	
}
}

You can replace the defines with a var;

$phproot = $_SERVER['DOCUMENT_ROOT'];
 ...
case 'login':
 include_once "$phproot/logIn.php";
 break;
...

if there's an error test:

if(file_exists("$phproot/logIn.php")){
  "yes!";
}else{
  "dawg down chew tabbacee";
}

this error clearly says the file did not exist, you file logIn.php does not exist, try re checking your file on it's directory body/login/

Thanks ... That file was there but I have mistaken in my code with session use. Sorry about that. That running in my localhost without no problem but problem in web server.

Did u set file permissions for the project folder?
If your server is a Linux server definitely you have to set the file permission.

Linux server treat case-sensitive. logIn.php and login.php are different whether they're same file on Windows server. Check your filename.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.