How to change the maximum execution time for PHP scripts

How to change the maximum execution time for PHP scripts

This article describes how to change the maximum execution time for PHP scripts by using the max_execution_time directive in a php.ini file.

Using the max_execution_time directive

By default, the maximum execution time for PHP scripts is set to 30 seconds. If a script runs for longer than 30 seconds, PHP stops the script and reports an error. You can control the amount of time PHP allows scripts to run by changing the max_execution_time directive in your php.ini file.

To change the maximum execution time, use a text editor to modify the max_execution_time directive in your php.ini file. For example, to set the maximum execution time to 40 seconds, use the following setting:

max_execution_time = 40

The second method is to fix it by editing your .htaccess in the same directory as the executing script by include this line

php_value max_execution_time ?

Replace “?” with the with the value you need to replace it with.

php_value max_execution_time 259200
Phonegap fullscreen Android application

Phonegap fullscreen Android application

If You want to switch Your Android Phonegap application into fullscreen mode use following tutorial:

All you have to do is to edit your main file and do the steps below:

  1.  Open Your main in /src/ directory
  2.  Add “import android.view.WindowManager;
  3.  Add the code below, after “super.onCreate(savedInstanceState);” in the middle of that << and super.loadUrl

Final code of main should be the same as the code on example below:

public class CordovaApp extends CordovaActivity
public void onCreate(Bundle savedInstanceState)
// fullsceen the app requestWindowFeature(Window.FEATURE_NO_TITLE);
// end of fullscreen app super.init();
// Set by <content src="index.html" /> in config.xml
How to Link Facebook to Twitter

How to Link Facebook to Twitter

Linking your Facebook account with your Twitter account will make it even easier for you to share your thoughts with your friends and followers. If you want to know how to do it in just a few easy steps, follow these instructions.

Make sure you are logged into your Facebook account and click here or go to
[su_frame align=”center”] Facebook Twitter[/su_frame]

Click on “Link my Profile to Twitter.

[su_frame align=”center”]Facebook Twitter[/su_frame]

Click on “Authorize app.” (after entring your twitter username and password) This will allow your Facebook account to post to your Twitter account.

[su_frame align=”center”]Facebook Twitter[/su_frame]

[su_frame align=”center”]Facebook Twitter[/su_frame]

Make any necessary adjustments to your settings. You should be told that your Twitter is now linked to your Facebook profile. Right now, there will be checked boxes next to the following: status updates, photos, notes, videos, links, and events. If you’d like any of those to not be linked to your Twitter, then you can unclick them and select “Save changes.”

[su_frame align=”center”]Facebook Twitter[/su_frame]

Cordova PhoneGap

Cordova PhoneGap

This guide shows how to set up your SDK environment to deploy Cordova apps for Android devices, and how to optionally use Android-centered command-line tools in your development workflow.

Overview, what you need

Skip the parts below if you already have installed / configured them.

Download the ADT Plugin

To add the ADT plugin to Eclipse:

  1. Start Eclipse, then select Help > Install New Software.
  2. Click Add, in the top-right corner.
  3. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:

    [su_box title=”N O T E” style=”soft” box_color=”#f7aa16″]The Android Developer Tools update site requires a secure connection. Make sure the update site URL you enter starts with HTTPS.[/su_box]

  4. Click OK.
  5. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
  6. In the next window, you’ll see a list of the tools to be downloaded. Click Next.
  7. Read and accept the license agreements, then click Finish.

    If you get a security warning saying that the authenticity or validity of the software can’t be established, click OK.

  8. When the installation completes, restart Eclipse.

PATH environment

To modify the PATH environment on Windows 7:

  1. Click on the Start menu in the lower-left corner of the desktop, right-click on Computer, then select Properties.

  2. Select Advanced System Settings in the column on the left.

  3. In the resulting dialog box, press Environment Variables.

  4. Select the PATH variable and press Edit.

  5. Append the following to the PATH based on where you installed the SDK, for example:


Apache Ant

Download the file and extract it to (in this case): "C:\Development\apache-ant"
Make sure that you make you have the following set in your advanced system properties, environment variables.
System variables:
  • ANT_HOME: C:\Development\apache-ant
  • Path: %ANT_HOME%\bin
    • Add the line above at the end of the rest of the paths and make sure it precedes with an ;


Download the installer from the link above and install it the standard way (next, next…. finish).
It will automatically add it self to the path variables. For reference they are mentioned below here anyway.
User variables:
  • Path: C:\Users\Walid\AppData\Roaming\npm
    • Where as Walid is my username and should be yours.
System variables:
  • Path: C:\Program Files\nodejs\

Cordova PhoneGap

Open Command Prompt (cmd), and type the the following command to install Cordova CLI::

npm install -g cordova

If you already have Cordova installed on your computer, make sure you upgrade to the latest version:

npm update -g cordova

Create your first App

Create project

  1. In Command Prompt (cmd) go to the folder in which you maintain your source code and type the command below. This will create a Workshop app (change the name if needed).
  2. [code]cordova create workshop com.yourname.workshop Workshop[/code]

  3. Navigate to the project directory:
  4. cd workshop
      Add support for the Android platform
    • On the command line, make sure you are in the workshop directory and type:
    cordova platforms add android
  5. Make sure you are in the workshop directory, and add basic plugins to your projects:
    cordova plugin add org.apache.cordova.device
    cordova plugin add org.apache.cordova.console
  6. Examine the directory structure under workshop.
    • The www folder is where you will code your HTML / JavaScript application. Open the index.html file in a browser to see the default application created by the Cordova CLI.
    • The platforms folder is where Cordova will build your application for different platforms (iOS, Android, etc). The contents of this folder will be automatically generated by the Cordova CLI, and you should never edit code in that directory.
    • Plugins are installed in the plugins directory.
    • Application parameters (name, author, etc) are stored in config.xml.

Building your project for Android

To build the project in the workshop/platforms/android folder and run it on an Android device connected to your computer using a USB cable, type:

[code]cordova run android[/code]

To build the project in the workshop/platforms/android folder and run it in the Android emulator, type:

cordova emulate android
How to remove your meta tag generator from Joomla header

How to remove your meta tag generator from Joomla header

Your Joomla site always comes with a default meta generator to show that your website is a Joomla site, and sometimes it will show its version as well. It is important to hide this for security measures if you do not want others to see your source code and know it is a Joomla site and what version it may be.

It is good to be aware that the changes you make will be overwritten when upgrading your Joomla version.

  1. Open your head.php file
  2. joomla_header_1

    • Open your FTP program.
    • Navigate to this file: (root directory)/libraries/joomla/document/html/renderer/head.php
    • Open your head.php file with a Text Editor.
  3. Navigate to the meta generator section of the PHP code
  4. Joomla Header

    Look for the line of code that creates a function called getGenerator().

  5. You can remove the line of code by commenting it out and your site will now show a meta name generator.
  6. Joomla Header Generator

    Adding 2 slash lines in front of the code will prevent the website from rendering it as code. So it’s basically removed, without removing it. It’s always safe to do the commenting method so you can always revert back to previous changes.

  7. Instead of commenting it, you can change the code

    Joomla Header

You can change this to any type of meta name you’d like. I changed my site to “author” with my name in the double quotes, removing everything else within the quotes first.

Congratulations! You now have full control of your header file, but remember you are able to edit most sections using your admin panel but it is good to know how to remove sections and where to find the actual file your header code is generated at.

How to Secure Your Wireless (Wi-Fi) Home Network

How to Secure Your Wireless (Wi-Fi) Home Network

wireless Networking (Wi-Fi) has made it so easy for anyone to use Internet on your computer, mobile phones, tablets and other wireless devices anywhere in the house without the clutter of cables.

With traditional wired networks, it is extremely difficult for someone to steal your bandwidth but the big problem with wireless signals is that others can access the Internet using your broadband connection even while they are in a neighboring building or sitting in a car that’s parked outside your apartment.

OK, so I know there is no such thing as "hack-proof" or "hacker-proof", just like there is nothing out there that is completely "water-proof", let’s just say that in this article we’re going to learn how to make your wireless router as "hacker-resistant" as possible. Now that we’ve got that out of the way, let’s get down to business.

Your wireless router is a prime target for hackers wanting to infiltrate your network or freeload off your Wi-Fi connection. Here are some things you can do to make your wireless router harder to hack:

Enable WPA2 Wireless Encryption and Create a Strong SSID Network Name and Strong Pre-shared Key

If you aren’t using Wi-Fi Protected Access (WPA2) encryption to protect your wireless network then you might as well leave your front door wide open because hackers can virtually walk right into your network. If you’re using outdated Wired Equivalent Privacy (WEP) security, which is easily cracked in seconds by most hackers, you should consider upgrading to WPA2. Older routers may need a firmware upgrade to add WPA2 functionality. Check your router manufacturer’s manual to learn how to enable WPA2 wireless encryption on your router.

You will also need to make a strong SSID (wireless network name). If you are using your router’s default network name (i.e. Linksys, Netgear, DLINK, etc) then you are making it easier for hackers to hack your network. Using a default SSID names helps hackers in their quest to crack your encryption because they can use pre-built rainbow tables associated with common SSID names to crack your wireless encryption.

Create a lengthy and random SSID name even though it might be hard to remember. You should also use a strong password for your pre-shared key to further discourage hacking attempts.

Turn on Your Wireless Router’s Firewall

If you haven’t already done so, you should consider enabling your wireless router’s built-in firewall. Enabling the firewall can help to make your network less visible to hackers looking for targets on the Internet. Many router-based firewalls have a "stealth mode" that you can enable to help reduce your network’s visibility. You will also want to test your firewall to ensure that you have configured it correctly.

Use an encrypted personal VPN service at the router level

Virtual Private Networks used to be a luxury that could only be afforded by large corporations. Now you can buy your own personal VPN service for a small monthly fee. A personal VPN is one of the biggest roadblocks you can throw at a hacker. A personal VPN has the capability to anonymize your true location with a proxied IP address and can also put up a wall of strong encryption to protect your network traffic.

If your router supports personal VPN service at the router level then this would be the best way to implement a personal VPN as it allows you to encrypt all traffic entering and leaving your network without the hassle of setting up VPN client software on your computers. Using the personal VPN service at the router level also takes the encryption process burden off of your client PCs and other devices. If you want to use a personal VPN at the router level, check to see if your router is VPN-capable. Buffalo Technologies has several routers with this capability as do other router manufacturers.

Disable the "Admin Via Wireless" feature on your router

Another way to help prevent hackers from messing with your wireless router is to disable the "admin via wireless" setting. When you disable the "admin via wireless" feature on your router it makes it so that only someone who is physically connected to your router via an Ethernet cable can access the admin features of your wireless router. This helps to prevent someone from driving by your house and accessing the administrative functions of your router if they’ve compromised your Wi-Fi encryption.

Given enough time and resources a hacker might still be able to hack into your network, but taking the steps above will make your network a harder target which will hopefully frustrate a hacker and cause them to move on to an easier target.

Introduction to Structured Query Language

Introduction to Structured Query Language

This page is a introductory tutorial of the Structured Query Language (also known as SQL) and is a pioneering effort on the World Wide Web, as this is the first comprehensive SQL tutorial available on the Internet. SQL allows users to access data in relationalf database management systems, such as Oracle, Sybase, Informix, Microsoft SQL Server, Access, and others, by allowing users to describe the data the user wishes to see. SQL also allows users to define the data in a database, and manipulate that data. This page will describe how to use SQL, and give examples. The SQL used in this document is “ANSI”, or standard SQL, and no SQL features of specific database management systems will be discussed until the “Nonstandard SQL” section. It is recommended that you print this page, so that you can easily refer back to previous examples.

Table Components

Table-name and Column-name

Where table-name and column-name are the names used and offered by you for the table and its columns, type stands for the kind of data to be stored in each column or field and size gives the maximum size of each field in terms of characters wide.

There is a wide range of data types available for use with Relational Database Management System (RDBMS). A few of the most commonly used data types and those that you will learn to use in this unit follow.


This is optional and can be omitted. A column can be defined as NOT NULL. Use of this option means that the data must include a value for that column. If a column is defined as NOT NULL, and no value is given when inserting data, then an error will occur. The row will not be stored. Primary key columns (see below) must be defined as NOT NULL. For further information, see the discussion on null values later in this section.


This part of the command specifies the column, or columns, that make up the primary key. In a relational database all tables must have one, and only one, primary key (PK) defined. Should a table have more than one column that makes up the primary key then a comma separates them.

For example: PRIMARY KEY (student_number, unit_number).


This part of the command specifies the column, or columns, that make up the foreign key (FK). In a relational database a foreign key is the primary key of the parent table that links or joins tables together and enforces referential integrity between tables. To illustrate how and why we define foreign keys in database we are going to use the department and employee tables; see below.

Foreign key
Database Foreign key

Foreign Key Constraint

The foreign key constraint:

  • will reject an insert or update of a value if a corresponding value does not currently exist in the master table
  • will reject a delete if it would invalidate a references constraint; for example, a department may not be removed from the department table if there are any employees from the employee table who belong to that department
  • must reference a primary key column or group of columns in the master table
  • requires that the data type of the foreign key column(s) and constraint column(s) match.

Using the Create Table Command

CREATE TABLE table_name
column_name1 data_type size,

column_name2 data_type size,

column_name3 data_type size,

The column_name parameters specify the names of the columns of the table.

The data_type parameter specifies what type of data the column can hold (e.g. varchar, integer, decimal, date, etc.).

The size parameter specifies the maximum length of the column of the table.

The column_name parameters specify the names of the columns of the table.

The data_type parameter specifies what type of data the column can hold (e.g. varchar, integer, decimal, date, etc.).

The size parameter specifies the maximum length of the column of the table.

Rules for table and column names:

  • Can include letters and numbers but must begin with a letter.
  • Cannot include spaces. However, if you wish to represent a space use an underscore (_). For example: employee_number.
  • Cannot be a reserved word used in SQL, e.g. TABLE.
  • Cannot be the name of an SQL command, e.g. CREATE.