Jump to content

Infinitely Executing SQL


d22552000

Recommended Posts

For some reason... this SQL statement runs infinitely and doenst stop until the script's execution limit, or the mysql socket limit is hit, -,- whichever comes first -,-.

 

This file is the code that calls the sql:

<?PHP
$n = DYN(manfilt($_POST['n']));

require('C:/Inetpub/wwwroot/VB3.6.7/sql.php');
echo '<br /><br />' . $sql;
sql($n);

echo '<br /><br /><br /><br /><a href="http://24.86.150.207/' . $p . '/admincp/index.php">Login to AdminCP</a>';

?>

 

This file IS: sql.php

<?PHP

function sql($DB) {
   $g_link = mysql_connect( '127.0.0.1', 'root', '') or die('Could not connect to server.' );
   mysql_select_db($DB, $g_link) or die('Could not select database.');

$sql = '
/* ***COMMAND TRUNCATED*** */
';

mysql_query($sql, $g_link) or die('Could not perform SQL.');
mysql_cose($g_link);
}

?>

The SQL by itself is 3,716 KBytes, and yes I have escape all '.

 

Note that my dyn and manfilt are custom function

filters I have made to filter out characters that are

not suited for database names.

 

SCRIPT OUTPUT:

Fatal error: Maximum execution time of 120 seconds exceeded in C:\Inetpub\wwwroot\VB3.6.7\sql.php on line 3
..

No Tables are Created.

 

I tried splitting the SQL into parts of 1023 kbytes. It is proessing right now.. maybe it might work..?

Link to comment
Share on other sites

LOLOLOL

 

Notice: Undefined variable: sql in C:\Inetpub\wwwroot\vbcreate.php on line 78

 

is there a maximum size to a variable?

 

fi you wanna se the full output its at http://24.86.150.207/registration/vbcreate.html

 

submit the forum with w/e you want to, the db deletes all the changes after 5 minutes casue I have it set to test mode.

Link to comment
Share on other sites

Because it is.  why is that important?

 

It is an entire database clone, thats why.

 

It is a preinstallation of a forum AND phpnuke.  Its my hosting.

 

Created a db for hte user, ads teh script -,-- I treid to use the source command but it didnt work/

Link to comment
Share on other sites

3MB is a lot of queries to execute over the network...my house has 6mb down / 512 kb up, with those numbers it takes the server 60 seconds just to get the SQL file from me, then if it is executing the commands on another remote host, that adds additional execution time, plus the time that the DB server takes to execute the commands.

 

Executing the commands can take a long period of time depending on a lot of things...number of indexes vs. number of inserts, etc.

 

There isn't a max size for a single variable, but there is a max size that the script can occupy in memory.

Link to comment
Share on other sites

I dont know any other way to do it, so im just tyring to get it to work now, i can redesiign it when it works.

 

oh and BTW, as far ase that, the mysql is localhost if you hadnt noticed so I dont ahve send times, but I still ahve the execute times.. ill run the sql file in phpmyadmin and see how long it takes...

 

Should I run the file with timeout(0); and see how long it takes?

Link to comment
Share on other sites

my max upload size is quite high because I host an upload sserver.

 

im running this script irght now with set_time_limit(0); to see how long it takes...

 

Could not perform SQLa. Mysql Said: " ";

 

<?PHP

function sql($DB) {
   $g_link = mysql_connect( '127.0.0.1', 'root', '') or die('Could not connect to server.' );
   mysql_select_db($DB, $g_link) or die('Could not select database.');

$sql = '
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--tables
--data
';
mysql_query($sql, $g_link) or die('Could not perform SQLa.');echo 'End of SQL.';

mysql_close($g_link);
}
?>

 

So... whats wrong now?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.