Jump to content

sastro

Members
  • Posts

    99
  • Joined

  • Last visited

    Never

Everything posted by sastro

  1. Here is my code <script type="text/javascript"> function resize(id,va) { document.getElementById(id).width = va ; } </script> <img src="https://www.google.com/logos/classicplus.png" id="img" height="100%"> <script type="text/javascript">resize('img','50%');</script> Its not working to resize the image with % but worked without %. I need to resize image width with persentage. Please help
  2. So, in my case i should use mysql db1,db2,db3,db4 < 4backup.sql or mysql db1 db2 db3 db4 < 4backup.sql I just need to make sure because its need about 10 hours to restore 4backup.sql and knows its result
  3. Hi, I just backup 4 databases (db1,db2,db3,db4) with : mysqldump -uroot -ppassword --databases db1 db2 db3 db4 > 4backup.sql I can not restore via phpMyAdmin because file 4backup.sql about 33 gigabyte large. how to use mysql command to restore it? Thanks in advance
  4. Thank you, thank you and thank you. Works like a charm.. You're the best... I can't found the solved button
  5. Hi, I need help with preg_replace all chars after last " - " . exp. string. my lovely wife - wake up Check Google ban tool - Check adsense ban tool - new tool Need result like this my lovely wife Check Google ban tool - Check adsense ban tool Thanks in advanced
  6. Wrong question... Sory, it my false.
  7. here the script <?php $a='dir/5_cat/big-dog.html dir/0_cat/wild-dog.html dir/1_cat/expensive-dog.html dir/3_cat/expensive-cat.html'; $b='dir/1_cat/expensive-dog.html'; $th=str_replace(array('.','/'),array('\.','\/'),$b); if(preg_match('/'.$th.'/',$a)){ echo 'found'; }else{ echo 'not found'; } ?> It works if $b='dir/1_cat/expensive-dog.html'; but result still found with $b='dir/1_cat/expensive-dog.htm'; Please help
  8. I just removed [mysqld_safe] and it works.
  9. I found that Query cache is disabled from mysqltuner.pl -------- General Statistics -------------------------------------------------- [--] Skipped version check for MySQLTuner script [OK] Currently running supported MySQL version 5.1.50 [OK] Operating on 64-bit architecture -------- Storage Engine Statistics ------------------------------------------- [--] Status: -Archive -BDB -Federated -InnoDB -ISAM -NDBCluster [--] Data in MyISAM tables: 1G (Tables: 20) [OK] Total fragmented tables: 0 -------- Performance Metrics ------------------------------------------------- [--] Up for: 15s (10 q [0.667 qps], 7 conn, TX: 7K, RX: 633) [--] Reads / Writes: 100% / 0% [--] Total buffers: 24.0M global + 2.7M per thread (151 max threads) [OK] Maximum possible memory usage: 439.2M (17% of installed RAM) [OK] Slow queries: 0% (0/10) [OK] Highest usage of available connections: 0% (1/151) [!!] Key buffer size / total MyISAM indexes: 8.0M/572.8M [!!] Query cache is disabled [OK] Temporary tables created on disk: 0% (0 on disk / 2 total) [!!] Thread cache is disabled [OK] Table cache hit rate: 53% (8 open / 15 opened) [OK] Open file limit used: 1% (16/1K) [OK] Table locks acquired immediately: 100% (18 immediate / 18 locks) [!!] Connections aborted: 14% -------- Recommendations ----------------------------------------------------- General recommendations: MySQL started within last 24 hours - recommendations may be inaccurate Enable the slow query log to troubleshoot bad queries Set thread_cache_size to 4 as a starting value Your applications are not closing MySQL connections properly Variables to adjust: key_buffer_size (> 572.8M) query_cache_size (>= 8M) thread_cache_size (start at 4) Here my my.conf [mysqld] skip-innodb datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql old_passwords=1 [mysqld_safe] key_buffer_size = 570M query_cache_type=1 query_cache_size = 8M query_cache_limit=1048576 thread_cache_size = 4 table_cache = 128 log-error=/var/log/mysql/mysql_error.log log-slow-queries = /var/log/mysql/mysql-slow.log long_query_time = 5 pid-file=/var/run/mysqld/mysqld.pid max_connections=50 MySQL server version 5.1.50 Please help
  10. <?php $url = 'http://www.example.com'; print_r(get_headers($url)); print_r(get_headers($url, 1)); ?>
  11. Try this <?php $destination='aircraft/'.$reg."1.jpg"; $temp_file = $_FILES['image']['tmp_name']; move_uploaded_file($temp_file,$destination); imgresize($destination); $destination2='aircraft/'.$reg."2.jpg"; $temp_file2 = $_FILES['image2']['tmp_name']; move_uploaded_file($temp_file2,$destination2); imgresize($destination); $destination3='aircraft/'.$reg."3.jpg"; $temp_file3 = $_FILES['image3']['tmp_name']; move_uploaded_file($temp_file3,$destination3); imgresize($destination); function imgresize($filename) { $source = imagecreatefromjpeg($filename);; $fullpath = $filename; list($width, $height) = getimagesize($filename); $thumb = imagecreatetruecolor($newwidth, $newheight); imagecopyresampled($thumb,$source,0,0,0,0,200, 133,$width,$height); imagejpeg($thumb, 'images/thumbs/'.basename($filename), 100); } ?>
  12. Need more explain about the result should be
  13. Thanks for reply. Found the solution <script language="Javascript"> var n=""; var x=0; var de=0; for(i=0;i<20;i++){ n=n+'-'+i; x=x+1; if(x==5){ de=de+1000; j=n+' - '; setTimeout(function (x){return function(){alert(x)};}(j),de); x=0; n=""; } } </script>
  14. Try to remove imagetruecolortopalette($simg, false, 256); $palsize = ImageColorsTotal($simg);
  15. use imagecopyresampled instead imagecopyresized
  16. Try this <?PHP if(isset($_POST['Submit'])) { $date = $_POST['date']; if ($date = '1966-10-03'){ //Do Something $submitx=1; } else { //Possible to unset? unset($date); unset($_POST['Submit']); } } if($submitx==0){ ?> <form action="" method="post"> <input type="text" name="date" /> <input type="Submit" name="Submit" value="Submit" /> </form> <?PHP } ?>
  17. Here is the code <script language="Javascript"> var n=""; var x=0; var de=0; for(i=0;i<20;i++){ n=n+'-'+i; x=x+1; if(x==5){ de=de+5000; setTimeout("alert(n)",de); n=""; x=0; } } </script> Why the alert result empty? It should be 4 times alerts every 5 seconds with -1-2-3-4-5 -6-7-8-9-10 -11-12-13-14-15 -16-17-18-19-20 Please help
  18. Here is the virtual host <VirtualHost 127.0.0.1:8007> DocumentRoot "/home/myweb/public_html" ServerName myweb.com php_admin_value error_log /var/log/httpd/php_error_log <Directory "/home/myweb/public_html"> allow from all Options +Indexes </Directory> </VirtualHost> Also i chowned /var/log/httpd/php_error_log to apache and chmod to 777 but file php_error_log still empty after i run the script <?php include; echo dasfs';?> Thanks in advanced
  19. Ok, it works. Also DELETE FROM table WHERE name NOT REGEXP '[a-z]'; Thanks
  20. Here is my table CODE | NAME 001 | Mayhem 002 | 3434 003 | just1 . . . How to delete record with no char ( In PHP !preg_match('/[a-z]/i',$str) ) based on field NAME? So the list will looks like CODE | NAME 001 | Mayhem 003 | just1 . . . Thank you in advanced
  21. I need to convert eregi_replace to preg_replace. here is the code : $str = eregi_replace("((([ftp://])|(http(s?)://))((:alnum:|[-\%\.\?\=\#\_\:\&\/\~\+\@\,\;])*))"," ",$str); $str = eregi_replace("(([^/])www\.|(^www\.))((:alnum:|[-\%\.\?\=\#\_\:\&\/\~\+\@\,\;])*)"," ",$str); It is a script to remove url in string. Thanks in advanced
  22. Is there any other way to passing javascript variable to php beside GET?, because i've got error "Request-URI Too Large The requested URL's length exceeds the capacity limit for this server." when access : http://www.myweb.com/proc.php?js=1&v=World%20News%20-%20Poll%20shows%20D.C.%20Mayor%20Fenty%20getting%20more%20credit%20than%20support%20in%20primary%20race%20against%20Gray%0AWorld%20News%20-%20Apocalyptic%20views%20hinder%20constructive%20political%20debate%0AWorld%20News%20-%20Latest%20heat%20wave%20could%20set%20records%0AWorld%20News%20-%20LOTTERIES%0AWorld%20News%20-%20A%20list%20of%20Lierman%27s%20backers%0AWorld%20News%20-%20A%20new%20round%20of%20alcohol%20sales%20for%20SE%20block%2C%20and%20residents%20are%20taking%20sides%0AWorld%20News%20-%20At%2023%2C%20Md.%20candidate%20Kyle%20Lierman%20enjoys%20money%20and%20name%20recognition%0AWorld%20News%20-%20Robert%20L.%20Ehrlich%20Jr.%27s%20tax%20returns%20show%20private%20sector%20has%20been%20lucrative%0AWorld%20News%20-%20Dr.%20Gridlock%3A%20Washington%20could%20beat%20the%20rush%20on%20defusing%20rush%20hour%0AWorld%20News%20-%20How%20to%20navigate%20the%20new%20peak%20Metrorail%20fares%0AWorld%20News%20-%20Featured%20Advertiser%0AWorld%20News%20-%20Deep-fried%20foods%20stand%20at%20Maryland%20State%20Fair%20draws%20curiosity%20and%20customers%0AWorld%20News%20-%20Columbia%20Heights%20Day%20festival%20offers%20something%20for%20everyone%0AWorld%20News%20-%20Local%20Digest%0AWorld%20News%20-%20Chihuahua%27s%20less-than-civil%20disobedience%0AWorld%20News%20-%20Virginia%20ponders%20losing%20ABC%20stores%3B%20studies%20conflict%20on%20privatizing%20liquor%20sales%0AWorld%20News%20-%20Sharpton%27s%20%27Reclaim%20the%20Dream%27%20event%20brings%20thousands%20to%20honor%20MLK%0AWorld%20News%20-%20Red%20Line%20Metro%20stations%20to%20close%20for%20maintenance%20work%20over%20Labor%20Day%20weekend%0AWorld%20News%20-%20Dr.%20Gridlock%3A%20How%20to%20get%20around%20town%20this%20weekend%0AWorld%20News%20-%20Dr.%20Gridlock%3A%20How%20to%20get%20around%20town%20this%20weekend%0AWorld%20News%20-%20Shady%20pasts%20could%20follow%20medical%20marijuana%20capitalists%20to%20D.C.%0AWorld%20News%20-%20LOTTERIES%0AWorld%20News%20-%20Featured%20Advertiser%0AWorld%20News%20-%20Local%20digest%0AWorld%20News%20-%20Jury%20finds%20that%20senior%20police%20officials%20violated%20District%27s%20whistleblower%20act%0AWorld%20News%20-%20Statewide%20computer%20meltdown%20in%20Virginia%20disrupts%20DMV%2C%20other%20government%20business%0AWorld%20News%20-%20King%27s%20legacy%20debated%20before%20Beck%20march%0AWorld%20News%20-%20Digital%20age%20threatens%20Japanese%20translation%20service%20in%20District%0AWorld%20News%20-%20Loudoun%20restaurateur%20sentenced%20to%2012%20years%20in%20%2471%20million%20loan%20scam%20on%208%20banks%0AWorld%20News%20-%20Montgomery%20County%20woman%2C%2097%2C%20forced%20from%20home%20after%20storm%20drain%20flooding%0AWorld%20News%20-%20washingtonpost.com/onfaith%0AWorld%20News%20-%20Churches%20in%20California%20and%20Arizona%20help%20start-up%20firm%20distribute%20discounted%20food%0AWorld%20News%20-%20Religion%20Events%0AWorld%20News%20-%20Md.%20accuses%20Konterra%20developer%20of%20pollution%20violations%0AWorld%20News%20-%20Maryland%20students%2C%20parents%20want%20principal%20accused%20of%20sexual%20harassment%20fired%0AWorld%20News%20-%20Featured%20Advertiser%0AWorld%20News%20-%20MARC%20Camden%20Line%20delays%3B%20Severe%20backups%20on%20I-66%20East%20at%20the%20Beltway%0AWorld%20News%20-%20Friendships%20that%20last%20have%20molded%20Vincent%20Gray%27s%20life%0AWorld%20News%20-%20LOTTERIES%0AWorld%20News%20-%20Online%20federal%20benefits%20calculators%0AWorld%20News%20-%20Competition%20for%20domestic%20fliers%20still%20tight%20among%20area%20airlines%0AWorld%20News%20-%20Local%20Digest%0AWorld%20News%20-%20Hostility%20across%20U.S.%20jars%20Muslim%20college%20students%0AWorld%20News%20-%20D.C%20seeks%20commuter%20input%20to%20help%20find%20new%20%27slug%27%20pickup%20sites%20for%20ride-sharers%0AWorld%20News%20-%202%20men%20injured%20after%20late-night%20assault%20on%20Green%20Line%20train%0AWorld%20News%20-%20Watch%20for%20the%20lawyers%20in%20D.C.%20Democratic%20mayoral%20primary%0AWorld%20News%20-%20Federal%20government%20wants%20to%20hit%20American%20Airlines%20with%20a%20record%20fine%0AWorld%20News%20-%20Michigan%20prosecutor%20says%20suspected%20serial%20killer%20will%20face%20life%20in%20prison%0AWorld%20News%20-%20Featured%20Advertiser%0AWorld%20News%20-%20Upper%20Marlboro%20man%20sentenced%20to%20life%20term%20in%20wife%27s%20death%0AWorld%20News%20-%20Federal%20Eye%3A%20So%20you%20want%20to%20host%20a%20rally%20on%20the%20Mall%3F%0AWorld%20News%20-%20Roadblocks%20in%20D.C.%20marijuana%20law%20don%27t%20quell%20entrepreneurs%27%20excitement%0AWorld%20News%20-%20New%20cameras%20to%20catch%20Metrobus%20drivers%27%20mistakes%0AWorld%20News%20-%20Metro%20Transit%20Police%20on%20platforms%20as%20students%20pour%20out%20of%20schools%0AWorld%20News%20-%20Montgomery%20likely%20to%20pick%20superintendent%20who%20fits%20Weast%27s%20mold%2C%20experts%20say%0AWorld%20News%20-%20D.C.%20Metro%20won%27t%20let%20SmarTrip%20users%20leave%20with%20insufficient%20fare%0AWorld%20News%20-%20Q.%0AWorld%20News%20-%20Online%20federal%20benefits%20calculators%0AWorld%20News%20-%20Baltimore%20girl%2C%2014%2C%20charged%20as%20an%20adult%20with%20murder%20and%20held%20without%20bail%0AWorld%20News%20-%20D.C.%20police%20lieutenant%20is%20found%20guilty%20of%20assault%0AWorld%20News%20-%20Lotto%20numbers%20for%20August%2025%2C%202010%0AWorld%20News%20-%20Featured%20Advertiser%0AWorld%20News%20-%20New%20D.C.%20voting%20machines%20pass%20their%20final%20public%20test%20before%20primaries%20begin%0AWorld%20News%20-%20Walter%20Reed%20patients%2C%20staff%20may%20have%20been%20exposed%20to%20radiation%20in%20May%0AWorld%20News%20-%20Education%20Secretary%20Arne%20Duncan%20wants%20schools%20to%20give%20parents%2C%20teachers%20more%20data%0AWorld%20News%20-%20Dr.%20Gridlock%3AMetro%20higher%20a.m.%20rush%20fares%20to%20start%20Monday%0AWorld%20News%20-%20D.C.%20ruling%20to%20keep%20%27closed%20primary%27%20system%20deals%20blow%20to%20Fenty%20campaign%0AWorld%20News%20-%20For%20critics%20of%20Islam%2C%27sharia%27%20becomes%20shorthand%20for%20extremism%0AWorld%20News%20-%20Brutal%20slave%20history%20unearthed%20at%20Frederick%20County%27s%20L%27Hermitage%0AWorld%20News%20-%20The%20Reliable%20Source%3A%20Rhee%20and%20Kevin%20Johnson%20downsize%20their%20wedding%0AWorld%20News%20-%20Vincent%20Gray%27s%20first%20D.C.%20mayoral%20race%20TV%20ad%20attacks%20Adrian%20Fenty%20for%20%27cronyism%27%0AWorld%20News%20-%20Fairfax%20City%20teen%20dies%20after%20electrical%20accident%20while%20trimming%20a%20tree%0AWorld%20News%20-%20Marine%20from%20Falls%20Church%20killed%20by%20bomb%20in%20Afghanistan%0AWorld%20News%20-%20Featured%20Advertiser%0AWorld%20News%20-%20Suicide%20office%20is%20sought%0AWorld%20News%20-%20Phil%20Mendelson%27s%20challengers%20try%20to%20break%20through%20a%2012-year%20legacy%0AWorld%20News%20-%20%0AWorld%20News%20-%20Local%20news%20roundup%3A%20Maryland%20man%20convicted%20in%20rape%2C%20beating%0AWorld%20News%20-%20Body%20found%20after%20Leesburg%20fire%3B%20homicide%20suspected%0AWorld%20News%20-%20Lotteries%0AWorld%20News%20-%20Commuters%20stranded%20as%20electrical%20problem%20halts%20trains%20between%20D.C.%20and%20New%20York%0AWorld%20News%20-%20Washington%20lawyer%20accused%20of%20paying%2015-year-old%20runaway%20for%20sex%0AWorld%20News%20-%20Jerry%20Weast%2C%20superintendent%20of%20Montgomery%20schools%2C%20to%20retire%20in%20June%0AWorld%20News%20-%20Heroin%20addict%20convicted%20of%20felony%20neglect%20in%20Fairfax%20baby%27s%20drug%20overdose%0AWorld%20News%20-%20Families%20that%20found%20help%20in%20D.C.%20after%20Hurricane%20Katrina%0AWorld%20News%20-%205%20years%20after%20Katrina%3A%20Md.%20company%20helped%20some%20families%20back%20to%20their%20feet%0AWorld%20News%20-%20Efforts%20to%20revamp%20schools%20by%20D.C.%2C%20Maryland%20result%20in%20%24325%20million%0AWorld%20News%20-%20Featured%20Advertiser%0AWorld%20News%20-%20Jerry%20Weast%2C%20superintendent%20of%20Montgomery%20schools%2C%20to%20retire%20in%20June%0AWorld%20News%20-%20Post%20Now%3A%20MoCo%20school%20chief%20Jerry%20Weast%20to%20retire%0AWorld%20News%20-%20Summer%20heat%20has%20led%20to%2026%20deaths%20in%20Md.%0AWorld%20News%20-%20Digital%20diversions%20leave%20teens%2C%20parents%20sleep-deprived%0AWorld%20News%20-%20Virginia%20can%20impose%20tougher%20abortion%20clinic%20oversight%2C%20AG%20Cuccinelli%20says%0AWorld%20News%20-%20Local%20Digest%0AWorld%20News%20-%20LOTTERIES%0AWorld%20News%20-%20Montgomery%20firefighters%27%20petition%20on%20ambulance%20fees%20fails%20to%20make%20Nov.%20ballot%0AWorld%20News%20-%20Hard%20times%20for%20Tysons%20Corner%20landowner%20when%20%241.2%20million%20deal%20collapses%0AWorld%20News%20-%20Live%20Nation%20deal%27s%20rising%20cost%20hits%20sour%20note%20with%20some%20on%20Montgomery%20council%0AWorld%20News%20-%20Family%20dispute%20over%20property%20led%20to%20fatal%20shooting%20in%20Louisa%2C%20Va.%0AWorld%20News%20-%20Virginia%20Railway%20Express%20can%20sell%20railcars%20and%20locomotives%20to%20the%20Army%0AWorld%20News%20-%20Featured%20Advertiser%0AWorld%20News%20-%20Former%20Montgomery%20malpractice%20lawyer%20sentenced%20to%205%20years%20for%20bilking%20clients%0AWorld%20News%20-%20Judge%20issues%20gag%20order%20in%20perjury%20case%20against%20Roger%20Clemens%0AWorld%20News%20-%20Cuccinelli%3A%20Virginia%20can%20regulate%20abortion%20clinics%0AWorld%20News%20-%20School%20resumes%20relatively%20smoothly%20in%20Washington%20region%0AWorld%20News%20-%20Across%20the%20Washington%20region%2C%20students%20head%20back%20to%20school%0AWorld%20News%20-%20Neil%20M.%20Godleski%2C%2031%2C%20found%20fatally%20shot%20in%20D.C.%27s%20Petworth%20neighborhood%0AWorld%20News%20-%20World%20News%20Roundup%3A%20Flood%20aid%20picks%20up%20in%20Pakistan%0AWorld%20News%20-%20At%20100th%20birthday%20party%20for%20storied%20Howard%20Theatre%2C%20hopes%20for%20a%20restoration%0AWorld%20News%20-%20LOTTERIES%0AWorld%20News%20-%20Far%20from%20Ground%20Zero%2C%20other%20plans%20for%20mosques%20run%20into%20vehement%20opposition%0A&foo=28296 Thx in advanced
  23. I'm using nginx as front end for apache. The example url like this http://www.mydomain.com/category-1/fat-burner.html and on the apache it goes to http://www.mydomain.com/index.php?cat=1&topic=fat-burner What i want is nginx to cache this page (http://www.mydomain.com/category-1/fat-burner.html) for 1 day so apache no need to proccess it, but if there not cached yet, apache will proccess it first then nginx cache it. The point is nginx should check if the page has been cached or not. Sory for my english.
×
×
  • 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.