Problem With Solutions

Something Different In Linux

Home » 2009 » December

Redirect one page to another page by using .htaccess

Posted by Rishikesh Vispute Categories: htaccess

Add the following rule in .htaccess file 1) If you want to redirect one page to another page, add the following code to the file, on a single line. redirect 301 /old-file-name.htm   http://www.domain.com/new-file-name.htm

view webalizer stats without login to cpanel

Posted by Rishikesh Vispute Categories: cpanel, Knowledge

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

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  [ Read More ]

There was a problem importing the database. The following error had occured: 1071: Specified key was too long; max key length is 1000 bytes; http://forums.oscommerce.com/topic/331202-1071-specified-key-was-too-long-max-key-length-is-1000-bytes-create-table/

How to stop syn attack on linux server

Posted by Rishikesh Vispute Categories: Basic Linux, DDOS, Network

The SYN (TCP connection request) attack is a common denial of service (DoS) technique. A SYN flood is a form of denial-of-service attack in which an attacker sends a succession of SYN requests to a target’s system When a client attempts to start a TCP connection to a server, the client and server exchange a  [ Read More ]

database not connected

Posted by Rishikesh Vispute Categories: Error and solution, mysql

Error : Your all database details is correct but the database is not connected  in any application. Solution : The problem due the ” sql.safe_mode”  is “On” in php.ini file.  You need to turn off the sql.safe_mode in server  php.ini file sql.safe_mode = Off Done

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

Delete php.ini file from all directories

Posted by Rishikesh Vispute Categories: Basic Linux, Linux Commands

Command for to Delete php.ini file from all directories find -name php.ini -exec rm -f {} \;

mysql connection in jsp

Posted by Rishikesh Vispute Categories: Email Marketing Series, How to, mysql, Tomcat

Database Connection by using jsp page . The URL based mysql connection  is ================================= jdbc:mysql://serverip address/DATABASENAME?user=USERNAME&password=PASSWORD ================================= OR ================================= <!– Database connection settings –> <property name=”connection.driver_class”>com.mysql.jdbc.Driver</property> <property name=”connection.url”>jdbc:mysql://localhost/database_name</property> <property name=”connection.username”>databses_user</property> <property name=”connection.password”>password</property> <!– configuration pool via c3p0–> ================================= OR ================================= try { Class.forName(“com.mysql.jdbc.Driver”).newInstance(); // here we are connecting to localhost, port 3306. Change it to  [ Read More ]

Create your own Apache Rewrite Log file

Posted by Rishikesh Vispute Categories: cpanel, htaccess

How to Create your own Apache Rewrite Log file ? If your account is hosted on suexec server then you need to add this code in http.conf file otherwise you can enable it by using .htaccess file. By using  http.conf file You need to ============================= # Roll your own Rewrite log # Log details via  [ Read More ]

How to update webalizer?

Posted by Rishikesh Vispute Categories: cpanel, How to, Knowledge

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.

Cpanel Introduction

Posted by Rishikesh Vispute Categories: cpanel

Cpanel Introduction ============================================= Cpanel Important directories. /usr/local/cpanel /var/cpanel /scripts /usr/local/cpanel ————— cpsrvd cpsrvd-ssl cpkeyclt /usr/local/cpanel/bin ——————- *Houses only scripts and binaries which provide installation and configuration of many cPanel managed services Notable Contents: eximstats checkperlmodules /usr/local/cpanel/logs ——————– CPSRVD ——-access_log, error_log CPANELLOGD—stats_log CPKEYCLT——license_lo /usr/local/cpanel/base ——————- frontend——-x, x2,xmail,monsoon webmail——-x, monsoon neomail horde 3rdparty——-squirrelmail, phpPgAdmin, phpMyAdmin /usr/local/cpanel/etc ——————-  [ Read More ]

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  [ Read More ]

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(); ?>  [ Read More ]

Error : Warning: session_save_path() [function.session-save-path]: SAFE MODE Restriction in effect. Solution : If osCommerce  shows the above  error on the page then you need to change the ” Session Directory”  path in database by using phpmyadmin. 1) Login to cpanel then click on the phpmyadmin 2) choose your database and search “/tmp” in database then  [ Read More ]

Test Credit and Debit Card Numbers

Posted by Rishikesh Vispute Categories: Knowledge

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  [ Read More ]

How to find How many accounts are hosted on server

Posted by Rishikesh Vispute Categories: Basic Linux, cpanel

How to find How many accounts are hosted on server #ll /var/cpanel/users | wc -l 1234

Client denied by server configuration

Posted by Rishikesh Vispute Categories: Error and solution, htaccess

Client denied by server configuration : Error : tail -f /usr/local/apache/logs/error_log | grep username [Sun Dec 07 14:04:38 2008] [error] [client 203.193.165.98] client denied by server configuration: /home/username/public_html/catalog/admin/index.php Solution: If you get above error then you need to check .htaccess file under respective directory(here catalog/admin) and there you need to comment the rule “Deny from  [ Read More ]

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  [ Read More ]

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  [ Read More ]

spamming on server

Posted by Rishikesh Vispute Categories: Basic Linux, cpanel, Email problems

How to check  spamming on server.. exim -bpc If this  is change very fast then it seems spamming is on server also you can check using tail -f /var/log/exim_mainlog some times client can spam using scripting that time above using above you can’t find error log so you can use tail -f /var/log/message or ps  [ Read More ]

check insecure permission

Posted by Rishikesh Vispute Categories: Basic Linux, Linux Commands

How to check insecure permission for files and folders on the server ? #For Directories find -type d -perm 777 #For Files find -type f -perm 777

How to check server is suexec or not

Posted by Rishikesh Vispute Categories: Basic Linux, Knowledge, Linux Commands

How to check server is suexec or not? make 777 permission for index.php file for a clients domain and then access it, if it gives an error as Internal server then sure it is suexec server this time copy servers php.ini file and make necessary changes for client. or root@rushi []# /usr/local/cpanel/bin/rebuild_phpconf – -current Available  [ Read More ]

How to enable font for client

Posted by Rishikesh Vispute Categories: Knowledge

Client ask for fonts. i.e. whether particular(Lucida for some tff files) font is enabled on the server or not or asking for its binary path: fire this command on the server #chkfontpath i.e. /usr/share/fonts/default/Type1 then search the font name which you want to enable for client for example lucida search this in /usr directory. #find  [ Read More ]

How to enable php setting for all Directories

Posted by Rishikesh Vispute Categories: htaccess, PHP

If you want enable some php related setting by using php.ini file and it reflect to all  other directories which is under your account. Then follow the steps.. First create php.ini file under the document root of your domain and change or add the default setting which you want or which is required for your  [ Read More ]

Error : The username admin has not been activated or is blocked. Solution : If your user name “admin” is not active then you can face this problem so  you need to active admin user name  by using phpmyadmin. 1) Login to cpanel then click on the phpmyadmin and choose your database which you have  [ Read More ]

Enable HTTPS on Tomcat

Posted by Rishikesh Vispute Categories: Tomcat

Enable HTTPS on Tomcat If you are looking to enable HTTPS in Tomcat first thing you will have to do is generating a server certificate for your website. A key tool command which comes with your JRE( Java Runtime Environment). Open a command shell which should know how to find your Java runtime environment properly.  [ Read More ]

Optimized by SEO Ultimate