Archive for June, 2007

Trying to clone an uncloneable object of class ReflectionClass in error

Written by anil on Thursday, June 28th, 2007 in php.

"Fatal error: Trying to clone an uncloneable object of class ReflectionClass in …".

Set the PHP option

zend.ze1_compatibility_mode=Off in php.ini

This error almost killed me. So sharing the soloution … ;)

Thanks

Do you ever wonder what is happening when you login to a BASH shell. Why "ll" command works only on your office machine?? This article will give you a breif outlook on bash startup files. When you login the first file that is checked in your home directory is "~.bash_profile".
~ means your home directory.  This file will decide what all files have to be read during startup or the pragrams/commands to run when you login to bash.  A sample ".bash_profile"

(more…)

Bash tips - a small update to debugging bash scripts

Written by anil on Tuesday, June 26th, 2007 in Bash Scripting, Linux.

Here is a small update to, Bash tips - Debugging bash scripts We can also use other set parameters. set -f (Disable file name generation using metacharacters)

#set -f
#ls * /bin/ls: *: No such file or directory

Understand what happened? No more expansions.Wildcard is turned of. if "-f" is set bash will look for exact filenames. "*" is also considered as filename.

To turn it off use "+f"

#set +f

set -v (More verbrose) and"set +v"to turn off.

root@server4 [~]# ls tecpages .bash_profile —> Note this line
/bin/ls: tecpages: No such file or directory
.bash_profile

You can use set -xv when debugging to get a more verbrose output. Wondering what is "-x" for, please read Bash tips - Debugging bash scripts Thanks

A small help on sysvshm and sysvsem php modules

Written by anil on Sunday, June 24th, 2007 in php, Linux.

 Did you come across with these errors during ModernBill installation??

* You MAY have the “sysvshm” extension loaded for Unix performance optimizations [you do not].
* You MAY have the “sysvsem” extension loaded for Unix performance optimizations [you do not].

Solution,

Support for sysvshm and sysvsem functions are not enabled by default. To enable System V semaphore support recompile PHP with the option –enable-sysvsem. To enable the System V shared memory support recompile PHP with the option –enable-sysvshm.

As always take the backups of important conf files before trying anthing new

Thanks

mysqlcheck and myisamchk are used to check and repair tables (MYISAM Tables). They can help you keep your tables free from errors. If any errors occurred to MySQL database due to a server crash or by an unexpected MySQL service issue, those commands can be used to recover or repair your valuable MySQL databases. So what is the difference between mysqlcheck and myisamchk . . . :) mysqlcheck is a client program that communicate with the MySQL server over a network connection. To use mysqlcheck the MySQL server should be online. This also means that you can use mysqlcheck to repair a remote database. myisamcheck isn't a client program. It is a utility program that works directly on the files that represent MyISAM tables (.MYI files, inside MySQL database directory). You must need read write privileges on these files to use myisamchk.

When using myisamcheck on tables inside a database, the tables must not be accessed during the check. The safest method is to bring the server down during a myisamchk. Otherwise it will not give the results you are expecting.

Now the theory part is over … ;). Lets do some MySQL database repairing . . .

BEFORE PERFORMING OPERATIONS SPECIFIED IN THIS TUTORIAL PLEASE TAKE A BACKUP OF YOUR DATABASE

First mysqlcheck . . . By default if we doesn't provide any options mysqlcheck takes the first argument as the database name and check all the tables inside it. Example :- 

(more…)



Site Navigation