Staredit Network

Staredit Network -> Computers and Technical -> Quick PHP Debugger
Report, edit, etc...Posted by Pyro-Fire on 2007-02-03 at 08:38:17
Heres a quick php debugger that allows you to run php commands without making any hard-coded changes. has disallowed keywords for security. just edit the "stuff" array in the filter function.

note: must be a .php file


<html style="background-color:#999999">

<form action="test.php" method="post">
<textarea name="data" rows=14 cols=120 style="background-color:#000;border:2px solid #aa94f1;color:#FFF;"></textarea>
<br /><br />
<input style="background-color:#000;border:2px solid #aaaaff;color:#FFF;width:300px;height:40px;"type="submit" value="Run!" />
<h3>Script Outcome:</h3>


$data = $_POST['data'];

if(!stristr(filter($data),"print('Disallowed keyword found"))
print "<br /><br /><hr /><h3>Script Ran:</h3>".filter($data);

function filter($data)

$stuff = array("../","copy","delete","unlink","disk_","chmod","chown","chgrp","dirname","feof","fclose","fget",

$data = str_replace("\\'","'",$data);
$data = str_replace("\\\"","\"",$data);

foreach($stuff as $key => $value)
$data = "print('Disallowed Keyword Found: $value');";
return $data;



tell me what ye think.


seems to be a bit buggy... meh, if you got the skill you can upgrade it.
there, a little bit of work for you to do. always fun that.
Report, edit, etc...Posted by Syphon on 2007-02-03 at 11:32:10
Why not just enable your server to return proper errors?
Report, edit, etc...Posted by Doodle77(MM) on 2007-02-03 at 12:11:26
Or you can run PHP from the command line like I do tongue.gif
Report, edit, etc...Posted by Syphon on 2007-02-06 at 22:23:38
QUOTE(Doodle77(MM) @ Feb 3 2007, 12:11 PM)
Or you can run PHP from the command line like I do tongue.gif

I do that when writing PHP-GTK apps. It hurts my eyes.
Next Page (1)