d22552000
-
Posts
535 -
Joined
-
Last visited
Never
Posts posted by d22552000
-
-
those are three lines in mysql, but can usee any thing thta PHP might object to?
ie. unescape ' keys or anything else?
-
I know in MYSQL the command is:
Source ./ <filename> | <filename>
but how do I do that from anywhere but the command console?
When I do it in php or phpmyadmin I get...
Invalid Syntax: "source C:\f.sql" check manual by :\
What do I do?
http://www.phpfreaks.com/forums/index.php/topic,154828.0.html
I am asking a mysql related question there too.
-
I dont understnad what your question is...
-
please people... -,-.
-
I heard that there is a php module called PDFR that isnt installed by default, look about installing that.
-
not really. I just escaped your extra quotations. This infact fixes the mysql syntax.
Its a conundrum really. MySQL is really picky. I ran thath through PHPMYADMIN and it worked.
-
TRY:
$query = "mysql_query(\"SELECT * FROM gs_mem WHERE mem_validate = '".$mem_validate"\'\");
==
and
==
$update = "mysql_query(\"UPDATE gs_mem SET mem_active = 1 WHERE mem_validate = '".$mem_validate."'\");
-
these are your mysl lines, right?
$query = mysql_query("SELECT * FROM gs_mem WHERE mem_validate = '".$mem_validate."'");
and
$update = mysql_query("UPDATE gs_mem SET mem_active = 1 WHERE mem_validate = '".$mem_validate."'");
?
Ill go validate them now....
-
uh...
$time = time() - 300;
I don't know if that's what you want, but that would set the variable TIME with time that is 5 minutes old.
-
at the end of the page AND instead of all DIE(); clauses use:
die('ERROR: bla bla bla.<br />Mysql Said: '.mysql_error());
that will tell you about what happened to the sql.
-
OMFG line 13218.
I am inserting a LARGE sql syntax (3.5 MB) into a databse based on dynamic data...
(Do you know how to do the source command from php, cause i get:
invalid syntax by :/
)
SQL.php source below (minus the sql)
<?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 = ' /* 3.5MB of mysql queries */ '; mysql_query($sql, $g_link) or die('Could not perform SQL.' . mysql_error();echo 'End of SQL.'; mysql_close($g_link); } ?>
Lines 13217-13219:
(68, -1, \'bbcode_code\', \'<div style="margin:20px; margin-top:5px">\r\n <div class="smallfont" style="margin-bottom:2px">$vbphrase[code]:</div>\r\n <pre class="alt2" dir="ltr" style="\r\n margin: 0px;\r\n padding: $stylevar[cellpadding]px;\r\n border: 1px inset;\r\n width: $stylevar[codeblockwidth];\r\n height: {$blockheight}px;\r\n text-align: left;\r\n overflow: auto">$code</pre>\r\n</div>\', \'<div style="margin:20px; margin-top:5px">\r\n <div class="smallfont" style="margin-bottom:2px">$vbphrase[code]:</div>\r\n <pre class="alt2" dir="ltr" style="\r\n margin: 0px;\r\n padding: $stylevar[cellpadding]px;\r\n border: 1px inset;\r\n width: $stylevar[codeblockwidth];\r\n height: {$blockheight}px;\r\n text-align: left;\r\n overflow: auto">$code</pre>\r\n</div>\', \'template\', 1164202755, \'Kier\', \'3.6.4\', \'vbulletin\'), (69, -1, \'bbcode_code_printable\', \'<div style="margin:20px; margin-top:5px">\r\n <div class="smallfont" style="margin-bottom:2px">$vbphrase[code]:</div>\r\n <hr /><code style="margin:0px" dir="ltr" style="text-align:left">$code</code><hr />\r\n</div>\', \'<div style="margin:20px; margin-top:5px">\r\n <div class="smallfont" style="margin-bottom:2px">$vbphrase[code]:</div>\r\n <hr /><code style="margin:0px" dir="ltr" style="text-align:left">$code</code><hr />\r\n</div>\', \'template\', 1136596081, \'freddie\', \'3.6.0 Beta 1\', \'vbulletin\'), (70, -1, \'bbcode_html\', \'<div style="margin:20px; margin-top:5px">\r\n <div class="smallfont" style="margin-bottom:2px">$vbphrase[html_code]:</div>\r\n <pre class="alt2" dir="ltr" style="\r\n margin: 0px;\r\n padding: $stylevar[cellpadding]px;\r\n border: 1px inset;\r\n width: $stylevar[codeblockwidth];\r\n height: {$blockheight}px;\r\n text-align: left;\r\n overflow: auto">$code</pre>\r\n</div>\', \'<div style="margin:20px; margin-top:5px">\r\n <div class="smallfont" style="margin-bottom:2px">$vbphrase[html_code]:</div>\r\n <pre class="alt2" dir="ltr" style="\r\n margin: 0px;\r\n padding: $stylevar[cellpadding]px;\r\n border: 1px inset;\r\n width: $stylevar[codeblockwidth];\r\n height: {$blockheight}px;\r\n text-align: left;\r\n overflow: auto">$code</pre>\r\n</div>\', \'template\', 1164202759, \'Kier\', \'3.6.4\', \'vbulletin\'),
and yes, I escaped all 106219 ' symbols.[/code][/code][/code][/code]
-
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?
-
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?
-
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/
-
the third sql on line 87 has an UNescaped '.
This can cause parse errors, or sql errors.
-
use the SPY form validation jscript. It returns the form page and uses predefined variables (could be php echo string) and places them underneath the field, showing the data in teh field.,
EX:
Upload File: (file upload field) (submit button)
OUTPUT FROM SpY
Uplaod Files: (file upload field) Your files: *name* exceeds the maximum size! File Size: kbyte= *size in kbytes* File Size: dim=*file dimensions* octet=*only for exe and p-exe* mine-type *here* (submit button)
It is good for other things too, but I dont use it for much else.
I have attahced SPY source.. SPRY ASSETSSS
[attachment deleted by admin]
-
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.
-
he did say it was a guess and it was incomplete.
I suggest <?PHP instead of <?. Not all servers allow short_tag
-
lol ya, fixed now, but the script still doesnt work.
-
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..?
-
lol you guys are hilarious. I love how on eveyr forum I go tom, im always the one that they decide...
"Ya.. well.. many people do it, but.. this guy did it last."
it gets on my nerves. I posted this as a HOW TO copy dirs originally, and I thought it was solved.. but no.
so instead of double posting and bumping (two other rules) I posted it again. I wish php came with a function for this -,- maybe CDDIR lol?
I am trying the code you gave me "uwannadonkey"... hope it works. IT WOKRS YAYA THANKS
-
How do I copy an entire folder, subfolders and Files?
Please attach or reply with a script and Thank You.
-
so... what is the correect syntaxt o show absolutely everything? notices, warnings, usergenerated stuffs, EVERTHING...
error_reporting(E_ALL & E_NOTICE & E_STRICT & E_WARNING & E_USER_WARNING);
I know im missing some, cuase I don't get all level warnings.
-
I AM the only administrator.
its a confusing story, ive had my server up for some years now, and reinstall windows ocassionaly. Inetpub might be under old security permissions... oh and I can finally make directories! hers what I did:
while (!is_dir($p)) { mkdir($p); chdir('../'); i++; } echo i;
apparnetly when I tried to make a folder it used the include_dir in my php.ini file... -,-. So I told it to backtrack until its allowed to make the folder.
the output is like:
19
=,=, I told you, the server IS messy. but I have a new problem...
HOW TO COPY A WHOLE DIR OF FILES TO ANOTHER??? I have
tried two different scripts to do this and they have both failed.
copyr($s,$d); function copyr($source, $dest){ if (is_file($source)) { $c = copy($source, $dest); return $c; } if (!is_dir($dest)) { $oldumask = umask(0); umask($oldumask); } // Loop through the folder $dir = dir($source); while (false !== $entry = $dir->read()) { if ($entry == "." || $entry == ".."){ continue; } if ($dest !== "$source/$entry"){ copyr("$source/$entry", "$dest/$entry"); } } [/code that one doesnt even do anything, not a single echo or even a file made -,-.
[SOLVED] Gah I hate MYSQL Queries.
in PHP Coding Help
Posted
I don't know... I will look again.