Wednesday, September 23, 2015

Wordpress WPL Search fixes


WPL is a nice and complete plugin for WordPress for property management. While I was configuring the WPL on a server I saw that the search widget has a problem. The search button always appear on top or next to very first search parameters. Meanwhile other search parameters are hidden under the bottom slider.
In this post I am sharing with you how to place the search button at the bottom of search box & how to disable the "mor option slider".
For doing this process you need to have access to your web server control panel.
1. Login to your control panel
2. Goto file manager.
3. Navigate to the directory which WordPress is installed.
4. Then navigate to the following address: /wp-content/plugins/real-estate-listing-realtyna-wpl/widgets/search/tmpl/
5. Then open default.php for editing.
6. For disabling the search box " more option slider" find the following:
$bott_div_open = false;
Then change the false to true.
7. Then for moving the search button. Find following part
<div class="searxh_submit_box"> <input .... </div>
Cut it and past it after following line:
<?php echo $bott_div; ?>

Goodluck

Monday, November 17, 2014

Android 5.0 (Lollipop) is ready for Nexus 5


Form today Android Lollipop(Android 5.0) update is available for Nexus 5 smart phones. Today I installed the update. It seems the Gallery disappeared and only Photo feature remained. It seems Google is very interested to upload all of out photos on the cloud ;) However you can disable the sync. There are many new features and major graphical change which soon I might send a post about them.
This update is available for Nexus 4, Nexus 5, Nexus 7, and Nexus 10.

System update is available
System update is available

Wednesday, November 5, 2014

OWASP Malaysia Chapter Meeting

Tobias Gondrom (OWASP Foundation)


Yesterday I attended an event by OWASP Malaysia Chapter which conducted at Advanced Informatics School, UTM. Few security professional had interesting talks. 
First, Prof. Shamsul opened the session by a talk about UTM AIS and its activities in field of Information Security. Next Mr. Tobias Gondrom from OWASP foundation, introduced OWASP activities and project, then he had a talk on injection flaws. He covered SQL injection and XSS. Then, Wann Senn present his talk about the "Missing Link". Next, Mr. Amir Haris Ahmad presented an interesting speech on DNS security. And finally, Mr. Megat Muazzam Abdul Mutalib from CyberSecurity Malaysia,

Run Cron Jobs on Windows


Cron is name of a tool in Unix based operating systems. Cron is a time based scheduler which helps to run specific command on a specific date and time. Basically it used for automation of a service or software. For instance in a web application,if the developer want to send an email to the users everyday, this action can be automated using Cron jobs. Otherwise somebody need to call (run) the webpage everyday. In Linux server, user simply write a PHP webpage for sending the email and ask Cron to run it everyday on a specific time.
Now the problem with windows is that, you don't have access to Cron. But no worries here in this article we will teach you how to simulate the Cron in Windows environment.


  • First, right click on your favorite browser icon, and select properties. 
  • Second, copy the address in "Target" field.
  • Next, open the notepad and paste the address that you copied in middle of pair of double quotation signs.
  • Then, add a white space, and write the address of your PHP/ASP page which you want to run on a spspecificchedule in middle of pair of double quotation sign. (example below)
  • "C:\Users\User\AppData\Local\Google\Chrome\Application\chrome.exe" "http://localhost/myproject/send_mail.php"
  • Now, save the file with your desire name but with ".bat" extension. for instance cron.bat 
  • Go to "Control Panel" and open "Schedule tasks".
  • Click on "Create Basic Task"
  • Chose a name for your task (example: "SendMail Cron") and click Next.
  • Chose the timing schedule for the calling of the web page. And click Next.
  • In "Action" part, chose "Run a program" click next.
  • Now select the batch file which you created sooner (ex "cron.bat")
  • Finish
Now "Windows task scheduler" will run the batch file ("cron.bat") on that specific date and time which you adjusted. Consequently the batch file call your browser with the address of the web page which should be run.

Thursday, April 17, 2014

Send email using Xampp from localhost


I always had problem for testing my PHP codes which were include mail function. I used to upload them on server to test them. But today I decided to find the way to send the mail with PHP using XAMPP from localhost and I found the solution. Then I decided to share this simple tip with you guys. Before we start the procedure you need to have an email address on a running mail server such as Yahoo, Gmail or any other server that you have access to configuration of them as well, because we need their port number.

  1. First go to the path that you installed Xampp application. By default it is "C:\xampp\".
  2. Then we need to find the php.ini file which contains the configurations belong to PHP. This file by default is located at "C:\xampp\php\php.ini". Open it using any text editor like notepad.
  3. Using search in the editor try to find "sendmail_path". There should be two of them. One is commented using a ";" (semicolon) in the beginning of the line , and the other one is not commented. Comment the one that is active and active the one is commented. After the edit it should looks like below... (Similar)
    sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
    ; XAMPP: Comment out this if you want to work with mailToDisk,...
    ;sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe"
  4. Save the php.ini file and restart the Apache process. This is necessary for the configuration to take place.
  5. Next navigate to the sendmail directory. By default it should be located at "C:\xampp\sendmail" and open the "sendmail.ini" in the text editor.
  6. Now we need to set the configuration for the mail server. For this case I chose Gmail. The SMTP address of Gmail is: "smtp.gmail.com" and the SMTP port for Gmail is "587".
  7. Find "smtp_server" and write the Gmail SMTP address in front of that.
  8. Find "smtp_port" and write the Gmail SMTP port in front of that.
  9. Scroll down , you should be able to see "auth_username" & "auth_password". Put your gmail username in front of  auth_username and put the password in front of auth_password .
  10. Save and now you are good to send mail from local host. 
  • Note that your PHP mail function should have "from" header,otherwise your mail will not go through. 
  • Also remember the that the destination will receive the mail from your Gmail address not from the address you put in your PHP code.
  • The following code is a simple example of PHP script which can send a successful mail.
<?php
$subject = "The mail subject goes here";
$content= "And this is the mail content!";
$headers = "From:[email protected]\r\n";

mail($to,$subject,$content,$headers);
?>

THIS MAY NOT WORK ON SOME OF WINDOWS 8 OR 8.1 DUE TO THE SECURITY LIMITATION.
Please make sure your firewall, antivirus or other security software is not stopping the sendmail.exe to communicate with internet!

Social Networks Sharing