Blog Links

SQLite V3 with PHP – sample script


Warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 33 is not allowed to access /var/www/vhosts/earthinfo.org/httpdocs owned by uid 10011 in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 237

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/wp-content/uploads/2009/05/sqlite-150x150.gif) is not within the allowed path(s): (/var/www/vhosts/earthinfo.org/httpdocs:/tmp) in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 237

Warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 33 is not allowed to access /var/www/vhosts/earthinfo.org/httpdocs owned by uid 10011 in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 261

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/wp-content/uploads/2009/05/sqlite-150x150.gif) is not within the allowed path(s): (/var/www/vhosts/earthinfo.org/httpdocs:/tmp) in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 261
sqlite

SQLite [http://www.sqlite.org] is a very handy tool, essentially it creates a database in a file. SQLite V3 should be installed automatically with PHP5.
I find SQLite very handy when I want to make standalone code that uses a database, and because it doesn’t require an external application(such as Mysql) it makes it very portable. [...]

An easy way to use GNU Screen over SSH


Warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 33 is not allowed to access /var/www/vhosts/earthinfo.org/httpdocs owned by uid 10011 in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 237

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/wp-content/uploads/2009/05/heckert_gnusmall-150x150.png) is not within the allowed path(s): (/var/www/vhosts/earthinfo.org/httpdocs:/tmp) in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 237

Warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 33 is not allowed to access /var/www/vhosts/earthinfo.org/httpdocs owned by uid 10011 in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 261

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/wp-content/uploads/2009/05/heckert_gnusmall-150x150.png) is not within the allowed path(s): (/var/www/vhosts/earthinfo.org/httpdocs:/tmp) in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 261
heckert_gnusmall

GNU Screen is a free terminal multiplexer developed by the GNU Project since at least 1995. It allows a user to access multiple separate terminal sessions inside a single terminal window or remote terminal session. It is useful for dealing with multiple programs from the command line, and for separating programs from the shell that [...]

Linux – disk usage (du) human readable AND sorted by size


Warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 33 is not allowed to access /var/www/vhosts/earthinfo.org/httpdocs owned by uid 10011 in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 237

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png) is not within the allowed path(s): (/var/www/vhosts/earthinfo.org/httpdocs:/tmp) in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 237

Warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 33 is not allowed to access /var/www/vhosts/earthinfo.org/httpdocs owned by uid 10011 in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 261

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png) is not within the allowed path(s): (/var/www/vhosts/earthinfo.org/httpdocs:/tmp) in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 261

This is quick tip to fix a problem that has always bugged me – When showing disk usage in a human readable form (KB, MB, GB) for each subdirectory using “du -sh *”, how can you properly sort it into size order.
If you just want the solution here it it…

pre.command {
width:80%;
background-color:#FFF5F5;
border:1px dashed #BB8888;
margin:10px;
padding:10px;
}

alias duf=’du [...]

XPaths with PHP by example


Warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 33 is not allowed to access /var/www/vhosts/earthinfo.org/httpdocs owned by uid 10011 in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 237

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/wp-content/uploads/2009/05/php-150x150.png) is not within the allowed path(s): (/var/www/vhosts/earthinfo.org/httpdocs:/tmp) in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 237

Warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 33 is not allowed to access /var/www/vhosts/earthinfo.org/httpdocs owned by uid 10011 in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 261

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/wp-content/uploads/2009/05/php-150x150.png) is not within the allowed path(s): (/var/www/vhosts/earthinfo.org/httpdocs:/tmp) in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 261
PHP

Learn by example how to scrape web pages using PHP and Xpath.

Linux Quick Command Ref


Warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 33 is not allowed to access /var/www/vhosts/earthinfo.org/httpdocs owned by uid 10011 in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 237

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/wp-content/uploads/2009/04/penguin-150x150.jpeg) is not within the allowed path(s): (/var/www/vhosts/earthinfo.org/httpdocs:/tmp) in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 237

Warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 33 is not allowed to access /var/www/vhosts/earthinfo.org/httpdocs owned by uid 10011 in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 261

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/wp-content/uploads/2009/04/penguin-150x150.jpeg) is not within the allowed path(s): (/var/www/vhosts/earthinfo.org/httpdocs:/tmp) in /var/www/vhosts/earthinfo.org/httpdocs/wp-content/plugins/thumbnail-for-excerpts/thumbnailforexcerpts.php on line 261
Linux Penguin

A handy guide by example, of some common linux commands.