pb PHP with "include"

fomalhaut

Member
Messages
107
Reaction score
0
Points
16
Hello.

I've these messages when I execute the index.php file of my site :

Warning: include(ident.php) [function.include]: failed to open stream: No such file or directory in /home/usr/public_html/index.php on line 15

Warning: include() [function.include]: Failed opening 'ident.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/usr/public_html/index.php on line 15

Line 15 is : include('ident.php');

Am I obliged to put my php scripts (e.g. "ident.php" in this directory : /usr/lib/php or /usr/local/lib/php ? or can I change the include path and if yes, where ?

Thanks for your help.
 

fomalhaut

Member
Messages
107
Reaction score
0
Points
16
Scuse me, I'm french and I don't understand what the meaning of "cms" ?

This is my whole script "index.php" (in red is the line 15) :

<html><head><title>Fomalhaut</title>
<!-- <SCRIPT language=JavaScript src="orgueraphelerepert.js"></script> -->
<link rel=stylesheet href="Fomalhaut.css" type="text/css">
</head>
<body >
<div class="flot"><center>
<form action="Ident.php" method="post">
Identifiant :<br /><input type="text" name="utilisateur" /><br />
Mot de Passe :<br /><input type="password" name="upass" /><br />
<input type="submit" />
</form></center>
</div>
<h1>Fomalhaut</h1>
<?php

include("ident.php");
?>
<div class="baspage" >
Fomalhaut est hébergé sur
<script language=JavaScript>
document.write(location.hostname);
</script>
</div></center>
</body>
</html>
 

arsalanjalali

New Member
Messages
15
Reaction score
0
Points
0
Scuse me, I'm french and I don't understand what the meaning of "cms" ?

This is my whole script "index.php" (in red is the line 15) :

<html><head><title>Fomalhaut</title>
<!-- <SCRIPT language=JavaScript src="orgueraphelerepert.js"></script> -->
<link rel=stylesheet href="Fomalhaut.css" type="text/css">
</head>
<body >
<div class="flot"><center>
<form action="Ident.php" method="post">
Identifiant :<br /><input type="text" name="utilisateur" /><br />
Mot de Passe :<br /><input type="password" name="upass" /><br />
<input type="submit" />
</form></center>
</div>
<h1>Fomalhaut</h1>
<?php

include("ident.php");
?>
<div class="baspage" >
Fomalhaut est hébergé sur
<script language=JavaScript>
document.write(location.hostname);
</script>
</div></center>
</body>
</html>

I want to know what Content management system [cms][like joomla or php-nuke]you used for your website.
anyway i think your problem refer to ident.php that you must change any part of it.
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
include_path='.:/usr/lib/php:/usr/local/lib/php'

1. The first directory is '.' , ie the directory where the running script (in this case, index.php) is located. So, if 'ident.php' is located in /home/usr/public_html,it will be found.

2. If you use :

include( 'includes/ident.php');

then you can create a folder 'includes' in /home/usr/public_html and put ident into /home/usr/public_html/includes

3. If, for security reasons, you want to keep the included file out of the document root (ie where the webserver [Apache] can see it and send it out over the web), you can put ident.php into /home/usr/etc and then use:

include( '/home/usr/etc/ident.php');
 
Last edited:

fomalhaut

Member
Messages
107
Reaction score
0
Points
16
OK, thank you for your answers. My "ident.php" was in the good place, but I've written a Major "I" (Ident), and it was a minor "i" (ident) ;). It's ok now.

Thanks again.
 
Top