Browsing "Older Posts"

Home » PHP

[SOLVED] "$cfg['Servers'][$i]['tracking'] … not OK di ubuntu

Siapa sich yang tidak kenal dengan aplikasi phpMyadmin yang di buat menggunakan bahasa pemrograman PHP yang digunakan untuk menangani administrasi Mysql melalui Web Base dengan menggunakan Aplikasi Browser.

Pada Kali ini saya akan memberikan solusi untuk menghilangkan pesan "The additional features for working with linked tables have been deactivated." pada phpMyadmin setelah melakukan instalasi pada ubuntu













  

Sebenarnya itu bukanlah error ataupun BUG pada phpmyadmin, melainkan Fitur pada phpmyadmin yang belum di aktifkan dan itu tidak akan mengganggu isi pada database yang kita buat.


Buka file "config.inc.php" di path "/etc/phpmyadmin/" menggunakan Terminal
$sudo gedit /etc/phpmyadmin/config.inc.php
Ketika aplikasi Gedit menampilkan file config.inc.php, Silahkan tambahkan script di bawah ini

$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
Dan simpan di bawah Text  "/* Optional: Advanced phpMyAdmin features */"

Kemudian keluar dari phpmyadmin...dan masuk kembali!!
Pesan tersebut akan hilang...

Semoga bermanfa'at!!!
Selasa, 10 Januari 2012

URL Encoder / Decoder [PHP]


Url Encode / Decode membantu untuk memperbaiki URL yang kita copy/paste menjadi link yang mudah di baca:







[example URL Encode]

http%3A%2f%2fvir0e5.blogspot.com%2f2011%2f04%2furl-encoder-decoder-php.html

[example URL Decode]
http://vir0e5.blogspot.com/2011/04/url-encoder-decoder-php.html



<?php

echo"<title>URL Encode / Decode</title>";
echo"<div align=center>URL Encode / Decode";

$bandit= stripslashes($_POST['c0de']);
    if ($bandit == "")
    {
        $bandit = $_GET['c0de'];
    }

$action = $_POST['action'];
    if ($action == "")
    {
       $action = $_GET['action'];
          if ($action == "encode"){
          $action = "enc0de";
          }
          elseif ($action == "decode")
          {
          $action = "dec0de";
          }
    }

switch($action){
case "enc0de":
       $output = urlencode ($bandit);
           if(!$output){
           echo 'Ada yang salah!!!';
           }

echo"<center><table width='380'><td>";
echo"<br><center>&#34;urlencode() function&#34;</center><hr></br>";
echo "<p> Input   : " . $bandit . "</p>";
echo "<p> Output: " . $output ."</p>";
echo "<p><a href='javascript:history.back(0);'> << Back </a></p>";
break;

case "dec0de":
$output = urldecode($bandit);
if(!$output){
echo 'Ada yang salah!!!';
exit;
}

echo"<center><table width='380'><td>";
echo"<br><center>&#34;urldecode() function&#34;</center><hr></br>";
echo "<p> Input    : " . $bandit . "</p>";
echo "<p> Output : " . $output ."</p>";
echo "<p><a href='javascript:history.back(0);'> << Back </a></p>";
break;

default: 
echo"<p>Input your text on text area...and enjoy it!!</p>";
echo '<form id="form1" name="form1" method="post" action="?encode/vir0e5\decode">
            <p>
               <textarea name="c0de" id="c0de" rows=8 cols=40 ></textarea>
            </p>
          
          <p>Pilih yang mau di cari</p>
          
          <p><input type=radio name="action" id="action" value="enc0de">Encode</p>
          <p><input type=radio name="action" id="action" value="dec0de">Decode</p>

        <input type="submit" class = "button" name="submit" id="submit" onClick="
        if(c0de.value==\'\'){alert(\'mana teksnya kang???\'); return false;}" value="Submit" />
        <input type="reset" name="reset" class="button" value="Reset"/>

    </p>
  </form>';
  
break;
}
?>
Selasa, 26 April 2011

Enumeration System [PHP]

Program Enumeration System menggunakan bahasa pemrograman PHP,

[Server Info]
Operating system info (uname), Server software,
Current owner of this file,File owner's user ID,File owner's group ID,
Current available disk space (GB),Current directory 
,User Agent





<?php
echo "<font color=\"red\">";
echo "<civ align='left'><b>ENUMERATION YOUR SYSTEM</b></div><br>";
echo "<font color=\"green\"><h3>Server Info</h3></font>";
echo "<b>Operating system info (uname)</b> - " . php_uname() . "<br>";
echo "<b>Server software</b> - " . $_SERVER['SERVER_SOFTWARE'] . "<br>";
echo "<b>Current owner of this file</b> - " . get_current_user() . "<br>";
echo "<b>File owner's user ID</b> - " . getmyuid() . "<br>";
echo "<b>File owner's group ID</b> - " . getmygid() . "<br>";

echo "<b>Current available disk space (GB)</b> - ";
if (preg_match("/Win/", php_uname())) {
 echo (disk_free_space("C:") / 1024000000) . " out of " . (disk_total_space("C:") / 1024000000) . "<br>";
} else {
 echo (disk_free_space("/") / 1024000000) . " out of " . (disk_total_space("/") / 1024000000) . "<br>";
}

echo "<b>Current directory</b> - " . getcwd() . "<br>";

echo "<font color=\"green\"><h3>Your Info</h3></font>";
echo "<b>IP Address</b> - " . $_SERVER['REMOTE_ADDR'] . "<br>";
echo "<b>Hostname</b> - " . gethostbyaddr($_SERVER['REMOTE_ADDR']) . "<br>";
echo "<b>User Agent</b> - " . $_SERVER['HTTP_USER_AGENT'] . "<br>";
?>

Image into a base64 string [PHP]


Ini adalah Contoh Encrypt file image dengan metode base64, menggunakan bahasa PHP







<title>Image to Base64 String</title>
  <fieldset>
 <legend>Image to Base64 String</legend>
  <center>
  <form name="select_all">
    <?php
    /**

  This code will help you to learn how we can convert an image into a base64 string!!
 */
                 echo"<h3><p>Image</p></h3>";
     //$file = File Image yang ingin di encode 
     //Filetype: JPEG,PNG,GIF
     $file = "encode.jpg";
     if($fp = fopen($file,"rb", 0))
     {
     $gambar = fread($fp,filesize($file));
     fclose($fp);

     
     $base64 = chunk_split(base64_encode($gambar));
     //Result
     $encode = '<img src="data:image/jpg/png/gif;base64,' . $base64 .'" >';
     echo $encode;
     } 
    ?>
    <br><textarea  name="text_area" rows="20" cols="70"><? echo $encode; ?></textarea>
    <p><input type="button" value="Select All Code" onClick="javascript:this.form.text_area.focus();this.form.text_area.select();"></p>
  </form>
  </center>
 </fieldset>