#18936 [Bgs]: Causes server to crash, serious problem

From: Date: Sat, 17 Aug 2002 05:27:48 +0000
Subject: #18936 [Bgs]: Causes server to crash, serious problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-17091@lists.php.net to get a copy of this message
ID: 18936 Updated by: rasmus@php.net Reported By: theshithead@cox.net Status: Bogus Bug Type: Performance problem Operating System: Unsure PHP Version: 4.2.0 New Comment: Apache is not an operating system, it is a web server. And yes, include does include the file, but it doesn't return it and put it into a variable the way you think it does. And no, you did not give us a script that we could copy and and run on our own servers to reproduce your problem. Previous Comments: ------------------------------------------------------------------------ [2002-08-17 01:25:25] theshithead@cox.net apache is OS include doesnt include the file? As far as I knew require/include worked the same except for the errors. Look bro, all I know is it totally messed up the server, I explained exactlly how to simulate this, just try it. You will see =) ------------------------------------------------------------------------ [2002-08-17 01:18:55] rasmus@php.net That's not how include works. Like I said before, it only returns a boolean status, it does not return the file. And what do you mean you know it was correct? Just look at your code. Until you can provide us with a reproducable short test case, a gdb backtrace, sensible log messages, or anything we can go on, there is absolutely nothing we can do. You couldn't even tell us the OS! ------------------------------------------------------------------------ [2002-08-17 01:15:43] theshithead@cox.net 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. ------------------------------------------------------------------------ [2002-08-17 01:13:07] rasmus@php.net No, obviously we can't. What exactly are you expecting the line: $loginStatus = include("$path_site/login.php"); to do? ------------------------------------------------------------------------ [2002-08-17 01:10:22] theshithead@cox.net Okay, I am going to make a full long complete example. first off, the MySQL Database stores my themes. the theme header is stored in the database and called upon by the var name $header. I eval it using the code I showed earlier. All variables show just fine. But when I call on $loginStatus I get the problem I described. Okay I will describe the problem in short: Header (stored in fulltext mysql database) (ALL MY HEADER HTML) <table><tr><td>$loginStatus</tr></td></table> Variables.php $path_site = "http://www.w0rms.com"; $loginStatus = include("$path_site/login.php"); themes.php (this converts the themes so the variables are defined) Connect(); $sql = mysql_query(select from etc); $myrow = mysql_fetch_array($sql); $theme_id = $myrow["theme_id"]; $header = addslashes($myrow[header]); eval("\$header = \"$header\";"); $header = stripslashes($header); Okay, here is index.php The page were all of it comes together: <?php // ======================================= // Required Files // ======================================= require("require/variables.php"); require("require/mysql.php"); require("require/functions.php"); require("require/common.php"); require("require/themes.php"); // ======================================= // We echo the header // ======================================= echo "$header"; phphphphphphphphp--- ?> That is as deep as I can explain it, without showing the entire scripts; can you create the same error? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18936 -- Edit this bug report at http://bugs.php.net/?id=18936&edit=1

« previous php.bugs (#17091) next »