Archive for the ‘Knowledge’ Category

Determine whether PHP is being run via HTTP or CLI – Follow Up

Wednesday, February 1st, 2012

As a quick follow up to yesterday’s post about how to determine whether PHP is being run via HTTP or CLI, I decided to do a quick post about where I found the values in the source code which are returned by the php_sapi_name() function and PHP_SAPI constant. I downloaded the PHP source code for [...]

Command line arguments for the PHP CLI

Wednesday, February 1st, 2012

The PHP command line interface or CLI allows you to run PHP scripts from the command line. It also has a number of flags that can be passed to it which allow you to see which modules are available, do a syntax check on a file, view PHP information etc. This post gives a basic [...]

Running PHP scripts as shell scripts

Wednesday, February 1st, 2012

As well as running PHP scripts via a web server such as Apache, you can also run PHP scripts from the command line (it’s also possible to write GUI apps with PHP using PHP-GTK, but I’ll maybe look at that another time). This post looks at the two ways you can run a PHP script [...]

How to Install Internet Explorer on Linux / Ubuntu?

Thursday, December 8th, 2011

Someone would ask: “Why would I need IE on Linux cause I got the newest and best browser ever called Firefox already installed?” Sometimes the IE is necessary for web designers working on Linux to test their pages, or to browse sites that don’t open in any browser except the IE. Here I will explain [...]

How To Disable a User Account in Linux Shell

Monday, November 28th, 2011
How To Disable a User Account in Linux Shell

This short howto will show how to disable a user account under linux. This might be useful in the situation where you don’t want to permanently remove the user, but you just want it disabled and no longer able to use the system. The user will still receive emails for example, but he will not [...]

Add Jobs To cron Under Linux or UNIX?

Tuesday, November 8th, 2011

How do I add cron job under Linux or UNIX like operating system? Cron job are used to schedule commands to be executed periodically. You can setup setup commands or scripts, which will repeatedly run at a set time. Cron is one of the most useful tool in Linux or UNIX like operating systems. The [...]

3 Steps to Perform SSH Login Without Password Using ssh-keygen & ssh-copy-id

Tuesday, November 8th, 2011

You can login to a remote Linux server without entering password in 3 simple steps using ssky-keygen and ssh-copy-id as explained in this article. ssh-keygen creates the public and private keys. ssh-copy-id copies the local-host’s public key to the remote-host’s authorized_keys file. ssh-copy-id also assigns proper permission to the remote-host’s home, ~/.ssh, and ~/.ssh/authorized_keys. This [...]