home   |   about us   |   our network   |   services   |   affiliates   |   contact
 
Services
» Web Hosting
» Reseller Hosting
» Dedicated Servers
» Windows/ASP.net Hosting
» Managed Web Hosting
» Server Security / Auditing
» Remote Backup / Storage
» Virtual Dedicated Servers
 
Support
» Support Desk
» Client Login
» Forums
» FAQs
» Help Files
» Acceptable Use Policy
» Client Testimonials
» Blog
 
Tutorials
» Dedicated Server Tutorial
» Website Optimization
» Search Engine Optimization
» Web Hosting Tutorials
» Web Programming Tutorials
» Networking Tutorials
» Virtual Server Tutorials
» Resources



The Crucial Blog - Archive

April 12, 2008

cPanel Error: Invalid License File

Error: Invalid License File

Solution: First ensure your IP address is actually licensed: http://verify..net

If its showing as licensesd, then run

# rdate -s rdate.darkorb.net

If the error is still occurring run:

#/usr/local//cpkeyclt

If you continue to have the error, please contact your vendor or if a Crucial Paradigm customer please submit a tech support ticket.

Tags: ,

Related posts


No Comments

Filed under: Uncategorized by — aaron @ 9:01 pm


March 27, 2008

Creating and Running a Ruby On Rails application in cPanel - Crucial Paradigm

A number of clients have approached us asking how to get their Ruby on Rails application running on , so we wrote a tutorial to help alleviate some of doubt:

  1. Login to .
  2. Click on the icon for “Ruby on Rails”.
  3. Check the box for “Load on boot?”
  4. Fill in the “App Name” box with the application name”.
  5. Application Path will be automatically filled as public_html/application_name
  6. Select “production” for the Environment, which should already be selected as the default.
  7. Click “Create”

After starting the application, you can access it using the URL : http://domainname/app_name/public/
Avoid : http://domainname/app_name/public

Each application will be using a port above 12000(>12000). The application will be automatically assigned a port when we are creating the application from .

Note : If we are creating the application under public_html directory, the application’s source code and configuration files can be viewed by anyone on the web. So, to avoid this you have two options:

  • Create the application in the public_html directory and change config file permission to 600. Especially the database.yml (/home/username/public_html/application_name/config/database.yml) file in which all the mysql access details are specified.
  • Create the application in home directory and use the rewrite option.

You can create the application in the home directory (/home/username) and then use the rewrite option in ( >> Ruby On Rails >> Create A Rewrite). On the right hand side of each application, click the link “Create Rewrite” and save the required rewrite rule. For example: if you want to redirect the main domain to your rails application port, say http://domainname:12002, Select the main domain in “Domain & URL to be redirected to rails app” section and click save. Similarly, you can redirect a subdomain to the rails application by selecting the corresponding subdomains from the list(Domain & URL to be redirected to rails app). But before that you should create that particular subdomain in .

Each user can run 4 rails applications at a time.

Simple test application :
========================

  • Create the application from , for exampe: Application name : example
  • Generate the test controller, via SSH:

#cd /home/username/public_html/example/
#ruby script/generate controller home

  • Create corresponding directory to store views, via SSH:

#cd /home/username/public_html/example/appl/views/
# mkdir home
# vi index.rhtml
<h1>Welcome</h1>
And save index.rhtml file.
#cd ..
#chown -R username:username home

  • Start the application
  • You can access the application from http://domainname:port/home/

When you access the URL http://domainname:port, the default ruby welcome page will be displayed. If you want to see the application on the main page, set the corresponding route in the configuration file routes.rb.

For example: In the above test application example, to display the welcome page of our home controller, instead of rails welcome page, uncomment and change the following line in routes.rb (home/username/public_html/example/config/routes.rb).
map.root :controller => “welcome”
==> map.root :controller => “home”

Move the default rails welcome index file “/home/username/public_html/example/public/index.html” to another name(index.html.bak) or you can remove the file.

  • Now you can access the home page from http://domainname:port

Creating a simple database application :
========================================

  • Create the application from , application name, eg: testdata.
  • Create the database. Use db migration to create the database. Create a database user with privileges and assign this user to the database in .
  • Edit /home/username/public_html/testdata/config/database.yml

production:
adapter: mysql
database: username_databasename
username: username_databaseusername
password: *******
host: localhost

  • Use scaffolding to generate the controller, models and views.

#ruby script/generate scaffold Test

Rails strongly recommends the following:

  • Use ‘id’ as your primary key in a table.
  • Name of the model should be the singularization of the name of the database table.
  • Use rake db:migrate to migrate the database.
  • Start the application from . You can access the application from http://domainname:port/tests/
  • The scaffold generater by default will create some views and controllers. The scaffolded actions and views are: index, list, show, new, create, edit, update, destroy. You can see these simple views in http://domainname:port/tests/. This scaffolding offers skeleton code frameworks from which we can generate the application.

Rails Environments :

  • Test : For testing, where we can use sample data.
  • Development : For development which will use most of the time when we develop the application. In this environment your application’s code is reloaded on every request.
  • Production : Production for the “real deal”, or when the site goes live.

Mongrel :

uses Mongrel webserver for rails applications.

Starting mongrel :

  • >> Ruby On Rails >> application name >> Click “Run”. Or from command line,

# cd <path to application>
#mongrel_rails start -p 12004 -d -e production -P log/mongrel.pid
p –> port
d –> daemon
e –> environment
P –> path to mongrel pid file (default path: /home/username/public_html/application/log/mongrel.pid)

NOTE: Thanks to Anusha for this great article! 

Tags: ,

Related posts


No Comments

Filed under: Uncategorized by — aaron @ 6:28 pm


March 16, 2008

Spamd child process causing high server load

Sometimes, spamd child process for a particular user can cause high server load. This is a bug with spamassassin and is reported here:

https://issues..org/SpamAssassin/show_bug.cgi?id=5612

To fix the issue, apply the patch mentioned in the bug.

For , run the following scripts:

/scripts/autorepair spamd_dbm_fix
/etc/init.d/ restart

Tags: , , ,

Related posts


No Comments

Filed under: Uncategorized by — aaron @ 2:59 pm


March 13, 2008

Gem Error Ruby on Rails cPanel: uninitialized constant Gem::GemRunner (NameError)

Error: uninitialized constant Gem::GemRunner (NameError)

When: Installing Ruby on Rails gem on

Solution:

1. Open the file

/usr/bin/gem
or
/home/username/ruby/bin/gem

2. Simply add the line to that file
require ‘rubygems/gem_runner’
after
require ‘rubygems’

3. Save and exit

Tags: , ,

Related posts


No Comments

Filed under: Uncategorized by — aaron @ 1:34 am


March 13, 2008

How to install mod_proxy on apache 1.3 on cPanel

If you are looking to install mod_proxy on 1.3 under do the following:

1. Goto /home/cpin/installd/buildapache/apache_1.3.37/src/modules/proxy

2. Run this command
==
/usr/local//bin/apxs -i -c *.c
==
That will install mod_proxy to 1.3

3. Now edit the httpd.conf file and add the below entry to it.

LoadModule proxy_module libexec/mod_proxy.so
AddModule mod_proxy.c

4. Save and exit the conf file.

5. Restart .

Tags: , ,

Related posts


(2) Comments

Filed under: Uncategorized by — aaron @ 1:33 am


March 5, 2008

404 Error when to accessing /wp-admin/admin-ajax.php

When you receive this error:ForbiddenYou don’t have permission to access /wp-admin/admin-ajax.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

If you are receiving this error, then its likely you have mod_security installed on your server, and you will need to update your mod_security rules.

Find the following in your mod_security configuration:

Only accept request encodings we know how to handle
# we exclude GET requests from this because some(automated)
# clients supply "text/html" as Content-Type
SecFilterSelective REQUEST_METHOD "!^(GET|HEAD)$" chain
SecFilterSelective HTTP_Content-Type "!(^application/x-www-form-urlencoded$|^multipart/form-data;|^text/xml;)"

Change it to:

# Only accept request encodings we know how to handle
# we exclude GET requests from this because some (automated)
# clients supply “text/html” as Content-Type
SecFilterSelective REQUEST_METHOD “!^(GET|HEAD)$” chain
SecFilterSelective HTTP_Content-Type “!(^application/x-www-form-urlencoded;|^multipart/form-data;|^text/xml;)”

If you don’t have access to mod_security configuration (i.e. you are not the administrator of the server), then you can add the following to a .htaccess file for your site:

<IfModule mod_security.c>
SecFilterInheritance Off
</IfModule>

Tags: , , , ,

Related posts


No Comments

Filed under: Uncategorized by — aaron @ 4:56 pm


February 25, 2008

cPanel/WHM: quotacheck: Can’t find filesystem to check or filesystem not mounted with quota option.

When you receive this error message in /:

/scripts/fixquotas
Installing Default Quota …../aquota.user…./quota.user…./backup/aquota.user…./backup/quota.user…./boot/aquota.user…./boot/quota.user…./tmp/aquota.user…./tmp/quota.user…./var/tmp/aquota.user…./var/tmp/quota.user…..Done
are now on
Updating Quota Files……
quotacheck: Can’t find filesystem to check or filesystem not mounted with quota option.

quotacheck: Can’t find filesystem to check or filesystem not mounted with quota option.

….Done
Unable to read /etc/quota.conf at /scripts/resetquotas line 23.
You can try the following to resolve it:

First make sure you have the usrquota option for your / partition on /etc/fstab and then reboot the server.

If you are still having issues, make sure your kernel supports .

Tags: , ,

Related posts


No Comments

Filed under: Uncategorized by — aaron @ 2:30 am


February 18, 2008

Problems Logging into Horde - cPanel

When you are having problems logging into on , and just keep getting the same login page over and over again. This is usually due to the horde_sessionhandler table being corrupt in the database. You can usually fix the issues with logging into by doing one of the following steps:

1. In MySQL try: repair table horde_sessionhandler;

If this does not fix the issue, try the following:

2. In MySQL delete, and recreate the horde_sessionhandler table as follows:

drop table horde_sessionhandler;

CREATE TABLE horde_sessionhandler (session_id VARCHAR(32) NOT NULL,

session_lastmodified INT NOT NULL, session_data LONGBLOB,PRIMARY KEY

(session_id)) ENGINE = InnoDB;

GRANT SELECT, INSERT, UPDATE, DELETE ON horde_sessionhandler TO @localhost;

FLUSH PRIVILEGES;

Hope this helps!

Tags: , ,

Related posts


No Comments

Filed under: Uncategorized by — aaron @ 10:08 pm


February 13, 2008

cPanel - Hostname A Entry Missing!

This is common error on new / or (VDS):

Once you get the POP-UP window for the error, add the ‘ A Entry’ by clicking the ‘Add’ button in the POP-UP, after verifying the IP address details that it shows. This should be done just once.

This error message will keep coming up until the of the server has started resolving to the correct IP address and the propagation has been completed.

It seems like doesn’t take into account the /etc/hosts entry.

Tags: , , , , ,

Related posts


No Comments

Filed under: Uncategorized by — aaron @ 6:53 pm




     

Quick Links: Debian Dedicated Servers, Direct Deposit Hosting, Unmetered Dedicated Servers, Virtual Dedicated Servers, Windows Server Management, High Traffic Web Hosting - Load Balanced Clusters, Windows 2008 Server Virtual Dedicated Servers