|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-08-16 04:09 UTC] theshithead at cox dot net
This could be hard to explain, but here it goes:
<?php
#### Quick ex. of variables.php
$path_site = "www.w0rms.com";
loginStatus = include("$path_site/login.php");
?>
#### Quick ex. of index.php, page in wich problem occurs
<?php
// Required Files
require("require/variables.php");
require("require/mysql.php");
require("require/functions.php");
require("require/common.php");
require("require/themes.php");
echo "$header";
?>
#### Quick ex of themes.php, the page proccessing the info in database
<?php
Connect();
$sql = mysql_query("SELECT * FROM $db_themes WHERE theme_id = '$user_theme' ORDER BY theme_id ASC")or mysqlDie("N/A", __FILE__, __LINE__, mysql_error());
$myrow = mysql_fetch_array($sql);
$theme_id = $myrow["theme_id"];
$header = addslashes($myrow[header]);
eval("\$header = \"$header\";");
$header = stripslashes($header);
?>
#### Header of site, stored in MySQL Database (just example not full)
<td valign="top" border="0" background="$path_themes/eBlue/images/header_middle.gif">
// problem var
$loginStatus
</td>
As you can see, I am calling that var from my database. All other vars such as path_themes work fine. However this one causes the server to stop. Pages wont load, it completelly crashed for 3 hours. I tried it again, and it happend once more just now.
What might the cause be? I am clueless, the include is correct. And I am eval'ing it correct. The only time this happens is when I use the include function in my variable.
thanks,
w0rms.com
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 13:00:01 2025 UTC |
Okay, I have $var in my MySQL Database. I first eval it so the variable will work. $var = include("file.php"); that a little easier?Okay, in my header of my site, I have user the variable $var. I use fulltext database type, and use the following code so the variable works: $header = addslashes($myrow[header]); eval("\$header = \"$header\";"); $header = stripslashes($header); I define the $var in variables.php as $var = include("file.php"); I echo it in my index.php, header.php The page doesnt load, and then for several hours the server was down. No pages workedNo, obviously we can't. What exactly are you expecting the line: $loginStatus = include("$path_site/login.php"); to do?That line to include a file, since I cant include login.php in my mysql database, I include it by variable.. It might have been include('file.php'); instead, I know it was correct though, I tested it.