buy tadalafil

Archive for the ‘Knowledge’ Category

Remove extensions from url

Saturday, March 20th, 2010

How to remove the  .php extension from the URL  ?

Ans : Add the following code in .htaccess file

======================

Options +FollowSymLinks
Options +Indexes
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC,L]

======================

How to remove the  .html extension from the URL  ?

Ans : Add the following code in .htaccess file

======================

Options +FollowSymLinks
Options +Indexes
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.html [NC,L]

======================

view webalizer stats without login to cpanel

Tuesday, December 22nd, 2009

Is it possible to view webalizer stats without login to cpanel?

Yes. Do the following steps.

cd /home/username/www
ln -s ../tmp/webalizer   webalizer
chown username.username  webalizer
cd ../tmp
chmod 755 ./
chmod 755 ./webalizer
—————-
will allow domain.com/webalizer/ for viewing stats without logging in to cpanel

suEXEC mechanism enabled (wrapper:

Tuesday, December 22nd, 2009

Not able to start httpd & the error is as below

Configuration Failed
[Tue Dec 22 11:24:33 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
[Tue Dec 22 11:24:33 2009] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock

Checking your disk shows that you have plenty of space. The problem is that apache didn’t shut down properly, and it’s left myriads of semaphore-arrays left, owned by my apache-user. Run:-

ipcs -s | grep nobody

Removing these semaphores immediately should solve the problem and allow apache to start.

ipcs -s | grep nobody | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'

Done

Warning: unlink(/tmp/b5714c117c314452941e2cbf776c0ce7.dat)

Tuesday, December 15th, 2009

Error : Warning: unlink(/tmp/b5714c117c314452941e2cbf776c0ce7.dat) [function.unlink]: Operation not permitted in /home/username/public_html/calendar/includes/dbi4php.php on line 828

Solution: The problem due the /tmp directory.  The /tmp directory is secure so this warning is generated. You need to create one /tmp folder under the document root (/home/username/public_html/calendar/) and change the setting  from /tmp to “/home/username/public_html/calendar/tmp” in setting.php file.

Done

How to update webalizer?

Friday, December 11th, 2009

Some time the webalizer is not updated automatically , at that time you need to update the webalizer manually by using following command.

/usr/local/cpanel/3rdparty/bin/english/webalizer  -N  10  -D  /home/username/tmp/webalizer/dns_cache.db -R 250 -p -n domain.com -o  /home/username/tmp/webalizer   /usr/local/apache/domlogs/domain.com

Note : Replace username equal to correct username and domain.com equal to correct domain name.


How to make root domain .htaccess not affect to addon domain

Friday, December 11th, 2009

Some time the root domain .htaccess file rule affect to addon domains. So you can not access your addon domain properly. If you want to disable this rule for the addon domain then you need to add the following rule in the root domain .htaccess file.

RewriteCond %{HTTP_HOST} ^(www\.)?addon_domain\.com
Rewriterule .* - [L]

for example addon domain is bestdesigns.co.in then rule is

RewriteCond %{HTTP_HOST} ^(www\.)?bestdesigns\.co.in
Rewriterule .* - [L]

Note : Where addon_domain should be replaced by the actual domain name, and I’m assuming that both addon_domain.com and www.addon_domain.com exist and resolve to your server.

Warning: Cannot modify header information – headers already sent by

Tuesday, December 8th, 2009

Errror : Warning: Cannot modify header information – headers already sent by (output started at /home/username/public_html/includes/formvalidator.php:573) in /home/username/public_html/admin/insert_product.php on line 40

Solution : Then you need to add the following code at the top of file (/home/username/public_html/includes/formvalidator.php).

<? ob_start(); ?>

then at the bottom of the page place this line of code:

<? ob_flush(); ?>

Done

Test Credit and Debit Card Numbers

Monday, December 7th, 2009

Refer this URL and use the test Credit and Debit Card Numbers for the testing to shopping cart site or your paypal script.

http://blog.rac.me.uk/2009/02/12/techy-test-credit-and-debit-card-numbers/
http://www.merchantplus.com/resources/pages/credit-card-logos-and-test-numbers

For example:

Card Type          : Visa
Card Owner       : test
Card Number   : 4012888888881881
Card Expiry Date: December, 2016
CV2 Number    : 123 or 1234

Test Credit Card Account Numbers

Credit Card Type

Credit Card Number

American Express 378282246310005
American Express 371449635398431
American Express Corporate 378734493671000
Australian BankCard 5610591081018250
Diners Club 30569309025904
Diners Club 38520000023237
Discover 6011111111111117
Discover 6011000990139424
JCB 3530111333300000
JCB 3566002020360505
MasterCard 5555555555554444
MasterCard 5105105105105100
Visa 4111111111111111
Visa 4012888888881881
Visa 4222222222222

Note : Even though this number has a different character count than the other test numbers, it is the correct and functional number.

Processor-specific Cards


Dankort (PBS) 76009244561
Dankort (PBS) 5019717010103742
Switch/Solo (Paymentech) 6331101999990016

Thumbnail not created for EXIF jpeg file

Friday, December 4th, 2009

Error: Thumbnail not created for EXIF jpeg file by using Imagemagick

Solution : The problem due the Imagemagick version. You need to upgrade your Imagemagick version. You can easily upgrade your Imagemagick version by using yum command.

root# yum install glib2
root# yum install libpng
root# yum install libjpeg
root# yum install libtiff
root# yum install ghostscript
root# yum install freetype
root# yum install ImageMagick
root# yum install ImageMagick-perl

Done


Maximum execution time of 30 seconds exceeded

Friday, December 4th, 2009

Error : Maximum execution time of 30 seconds exceeded in Magento.

Solution: You need to increase your maximum execution time for php scripts on your server. You can edit your php.ini file to increase this value

max_execution_time = 600

or

You can try adding the following line at the start of your file on which you are facing error.
For example : /home/username/public_html/estore/app/code/core/Zend/Cache/Backend/File.php

set_time_limit(180);

Done