Jump to Navigation

054 - traceroute

If you are having problems connecting to your site or accessing your site's services, "traceroute" is to make sure there isn't a connectivity problem. A traceroute shows the route you take over the internet to reach your site or servers. Information on what routers or back-bone providers you pass through can help you diagnose the problem.

Example:

  • In the new terminal window, type the following command: "traceroute -n -w30 yourdomainname.com".
  • You get something similar to the following:

Linux:

053 - Output Buffering

To create a new output buffer and start writing to it, call ob_start(). There are two ways to end a buffer:
ob_end_flush() and ob_end_clean(). The former ends the buffer and sends all data to output, and latter
ends the buffer without sending it to output. Every piese of text written while an output buffer isopen is
placed into that buffer, as opposed to being sent output. If you do not want to end the buffer,
you can use ob_flush() and ob_clean.

Exapmle:

PHP:

052 - About PHPUnit

PHPUnit is such an infrastructure. It is a family of PEAR packages (PHPUnit, PHPUnit2) that is available from the PHP Extension and Application Repository (PEAR), a framework and distribution system for reusable PHP components. You can install it using the PEAR Installer by running.

PHP:

051 - Importing Data in Bulk

Often, when setting up a new database, you will need to migrate data from an old database to MySQL.
To do that, you can use LOAD DATA INFILE for a lot of data. You can use this statement to import organized
data from a text file into a table in MySQL.

Example:

MySQL:

051 - BLOB

This column data type allows for the storage of a large amount of binary data. You may give a width with this data type; the maximum is 65,535 bytes. If you attempt to store a value in a BLOB column that is larger thanits limit, unless the server is set to SQL strict mode, the data will be truncated and warning message will be generated. If strict mode is on, the data will be rejected and an error will be returned. A BLOB column cannot have a default value.

MySQL:

050 - MySQL Rollback to Savepoint

ROLLBACK TO SAVEPOINT identifier

MySQL:

049 - How to call a Perl script from PHP

The exec() function is best-suited for executing an operating system-level application intended
to continue in server background. Even there is a perl script you want to execute, it is easy to do that.

Perl script (languages.pl) :

048 - print_r(), var_dump(), var_export()

var_dump() is a similar function to print_r(). It does largely the same thing, but it prints out size of variables,
it does not print out nonpublic data in objects, and it does not hava the option to pass a second parameter
to return its output.

print_r() :

Array
(
[0] => value1
[1] => value01
[2] => value001
)

var_dump() :

047 - How to use Google Apps email service

To use Google Apps as your domain's email service, you'll need to modify your MX records to point to Google's mail servers. You must change your domain's MX records with your domain hosting account. Each domain host has slightly different instructions to change MX records. Some domain hosts provide DNS settings for you to make the required changes yourself while other domain hosts will make the requested change for you.

1. Sign in to your hosting account

046 - Create self Signed SSL Certificates

Self-signed certs are the same as signed versions except for the fact that a CA doesn't stamp it with their approval, instead you stamp it with yours. Self-signed certs offer the same amount of protection but at the cost of dealing with the annoying popup alert the browser displays and someone being able to forge your identity, however they are completely free and easy to make using OpenSSL.

1. Generate your praivate key

Pages

Subscribe to LAMP, Database and Cloud Technical Information RSS


Main menu 2

by Dr. Radut