Kurinchi Blogger Scribbles …


Archive for August, 2009

Aug 31
2009

PHP removing deprecated related errors from display

Last updated: September 2nd, 2009

To remove deprecated warning message displays when executing PHP programs, open php.ini file and ADD to it

error_reporting = E_ALL & ~E_DEPRECATED

This is the setting for the production environment where you would not like to display the deprecated function related errors.

Sample error message
Assigning the return value of new by reference is deprecated in nusoap.php on line 7381

Aug 30
2009

Apache Error Log

Last updated: September 3rd, 2009

Apache Error Log Expected “</File> but saw </Files>”

Check the error log file (in ubuntu it is in /var/log/apache2/error.log) for the above stated error message. Check the .htaccess file or the apache configuration files where you have restricted file permission using File Directive.

Aug 29
2009

Linux: which vs. whereis command difference

Last updated: September 3rd, 2009

Difference between which command and whereis command in Linux

For e.g. lets find where “samba” is located in a CentOS server

$ which samba
which command searches the list of programs listed down through the PATH settings

$ whereis samba
whereis command also searches for programs that are not present in the PATH setting

Aug 20
2009

No Framework PHP MVC framework by Rasmus

Last updated: August 20th, 2009

Read the article on No Framework PHP MVC framework written by Rasmus Lerdof (he doesn’t need an introduction!) who explains on how we could gear a simple, yet easy to manage framework with bells and whistles of Web2.0 features.

Re-read the disclaimer after you finish reading the article on the framework and the comments, so you can understand the essence of the article.

Link to No Framework
http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html

Aug 19
2009

How to Export Mysql schema, data to Access database?

Last updated: August 18th, 2009

In order for you to export data from MySQL to Access database, you need to first download MySQL ODBC connector from

http://dev.mysql.com/downloads/connector/odbc/3.51.html

(Choose MSI installer from the downloads section and install it in your machine)

After installing MySQL ODBC connector, you need to configure ODBC connector in order connect MySQL database.

1. Choose Start > settings > Control Panel > Administrative Tools. Then double click on Data Sources (ODBC)

2. Click System DSN and then press “Add” button. There will be a dialog asking you to choose new data source. Choose MySQL ODBC 3.51 driver and click Finish

3. Next you need to fill in the details that will enable ODBC drive to open the database of your choice. Give a name for the data source (e.g. MyDSN), Server name (e.g. localhost), User (e.g. sqlusername), Password (password for user sqlusername) and the name of the database to which you want to connect to in MySQL

4. Click the Test button to ensure everything works fine and as expected.

5. The DSN “MyDSN” gets created for you when you click the “Ok” button.

6. Now, go to Access and create a database (e.g. MyAccessDB)

7. In Access, click “File > Get External Data > Import > and then choose “ODBC Databases” from “Files of Type” option. This will open a new dialog window asking you to “Select Data Source”

8. From the new dialog window, choose “Machine Data Source“. This will display the DSN “MyDSN” which you have created earlier. Choose that DSN and click “Ok” to import the database from MySQL to Access database.

Aug 18
2009

Free resources – Open source code management related

Last updated: August 15th, 2009

Code Revision, Code Management

Subversion (Tigris) Download
http://subversion.tigris.org/getting.html

Open Source Version Control Book
http://svnbook.red-bean.com/

Git Distributed Open Source Version Control Download
http://git-scm.com/download

Git Man Page
http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html

CVS Download
http://www.nongnu.org/cvs/

CVS Help
http://ximbiot.com/cvs/manual/

Aug 17
2009

Simple File Sharing Steps with Samba in CentOS for beginners

Last updated: August 11th, 2009

Samba facilitates file sharing across linux, windows systems for beginners

First create a folder in your Windows system, right click the folder and share the folder for network access. Let say that you have created a folder for share as “xpshare” and that the name of your windows machine is “windowsxp” (right click “My Computer” and select properties. Under the tab “Computer Name” you can note the name of the machine)
(more…)

Aug 16
2009

Premature end of script headers: apache error

Last updated: August 11th, 2009

Apache errors and the approach to solve it

Premature end of script headers
500 Internal Server Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.

Some troubleshooting tips:

i) Check /var/log/apache2/error.log (in ubuntu, check the respective apache error log location for the messages)

ii) Check if the content type of the page is correctly set for the html content output.

print “Content-type: text/html\n\n”;

iii) Check if a valid permission has been given for the file to get executed. The file need permission 755 for it to be executed on the server.

iv) Check if the configuration path, inclusion path are set correctly in the referenced programs

Aug 15
2009

Permission denied: exec of failed in Apache Server

Last updated: August 11th, 2009

Apache Permission Denied Error can be caused due to one of many configuration mistakes listed below

Check the apache configuration settings

i) The first is the reference to folder where cgi or perl files will reside and its execute permission settings

 <ScriptAlias /cgi-bin/ /usr/local/cgi-bin/>
 <Directory "/usr/local/cgi-bin">
     AllowOverride None
     Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
     Order allow,deny
     Allow from all
 </Directory>

ii) The second is the proper add handlers that are set for the file execution

AddHandler cgi-script .cgi .pl
<Files ~ "\.pl$">
    Options +ExecCGI
</Files>
<Files ~ "\.cgi$">
   Options +ExecCGI
</Files>

Check the apache error log for any messages (/var/log/apache2/error.log).

Aug 14
2009

Ubuntu: Change menu order in GRUB loader

Last updated: August 14th, 2009

GRUB stands for GRand Unified Bootloader. This is to enable the listing of multiple operating systems so the users could choose the OS of their choice.

To change the menu order we need to edit a file called menu.lst

# vi /boot/grub/menu.lst

Look for a line “default 0“. This is the option to indicate that the first menu on the list should be loaded by default. In order for you to set the default menu content in the GRUB loader that needs to get started you can set this parameter.

This is of the form “default <ID>” where ID = N -1. If there are 4 list items in the menu and if you want to load the 4th item by default, you need to set this configuration setting to “default 3″.

Another option for you is to have the menu list with the entry “savedefault = true“. This would enable the last used menu entry to get loaded during the next boot.


Valid HTML 4.01 Strict  Valid HTML 4.01 Strict