Script-runner


Script-runner is a utility that launches H-Sphere scripts on Unix/Linux servers.
For this, H-Sphere control panel establishes an SSH connection with a Unix box and runs script-runner:ssh -a -x root@xxx.xxx.xxx.xxx /hsphere/shared/scripts/script-runner.plFurther, the control panel sends commands to the output stream of the SSH session and script-runner reads and performs the commands and then outputs.

The format of command passed to script-runner is:
COMMAND=command_name&PARAM1=param1&..&PARAMN=param n&INPUT=inputn
It starts with the keyword COMMAND followed by actual command. Then, if necessary, it’s followed by the parameters that are numbered from 1 and further. All parts of the command are separated with the ampersand (&). The ‘=’ symbol is followed by the value. The command ends with the line feed character.

If the command requires standard input, you should set the INPUT parameter. Commands are passed in the 8-bit ASCII encoding. Command parameters and standard input are passed in the URL-encoding.
Script-runner returns output in the following format:
OUTPUT=some_output&ERROR=text_of_error_or_empty_st ring&EXIT_CODE=0
If there is an error during script execution, parameter ERROR will contain the error text and output code EXIT_CODE will be nonzero. OUTPUT is a standard script output.

To check if script-runner is ready to accept commands, use ‘PING’ command. You should get the ‘PONG’ output.

Script-runner 1.8 logs all executed scripts and their output. They can be found in the /var/log/scriptrunner directory on the box where script-runner is running.

content-management system or an e-commerce application


What is suggested for creating a content-management system or an e-commerce application.

Well for these applications, MySQL is a great choice for your data storage.

Migrating H-Sphere Control Panel


hi,
i have a Web hosting account with H-Sphere Control Panel, now i want to Migrating H-Sphere Control Panel to a different server. Plz. help

Migrating H-Sphere Control Panel :-

  1. Prepare for migration

  2. On the target server, install the latest stable version.

  3. On the source server, update to the latest stable version.
  4. Make sure the source and target servers have the same versions of all software packages.
    For example, make sure that the target server has the same version of PostgreSQL as the source server.

  5. Move system data

  6. Log into the target server as the cpanel user.

  7. Copy files and directories in the table below from the source server to the target server with the rsync utility:
  8. Stop H-Sphere CP on the target server.
  9. Stop H-Sphere CP on the source server.
  10. Repeat the rsync command for each of the above directories to synchronize any changes made while you were copying the data.

  11. Change IPs on the target server

  12. Switch the IPs of the source and target servers. To do this, you’ll need to run the setup utility on each of the two servers.

  13. Reboot both source and target servers simultaneously to avoid having the same IP on both servers.
  14. Restart the router.
  15. Start H-Sphere CP on the target server.

For real-time chat program


For real-time chat program, which one is better Java or PHP?

For real-time chat program, client-side Java is completely unnecessary.
For very sophisticated applications that require more client-side processing or that need to maintain state, a Java applet may be necessary.

For PHP/MySQL applications, which of the UNIX versions are most suitable


For PHP/MySQL applications, which of the UNIX versions are most suitable?

For PHP/MySQL applications Unix vesions, suitable can be Linux, BSD, Irix, Solaris, HP-UX, or one of the
other flavors. Most of the people who created PHP and MySQL are deeply involved with Unix, and most of their development is done on Unix machines, so it’s not surprising that the software they have created works best on Linux, BSD, and other Unix boxes.

Traffic calculation of site


hi,
my site is hosted with cpwebhosting.net. how can i do traffic calculation of my site?

There are two types of traffic calculation in H-Sphere:

  1. Traffic calculation by third-party log analyzers – H-Sphere writes log files for each customer’s domain into respective directories to make them available for third-party log analyzers included into default H-sphere installation: Webalizer, Modlogan, and AWStats.

2. H-Sphere built-in traffic calculation – H-Sphere provides its own mechanism of traffic calculation used in billing. H-Sphere traffic reports are available in admin CP as Transfer Traffic Report in the Reports menu.

round to two decimal places


I need to round a number to two decimal places. What is the code to round to two decimal places?

use this code

Code:

$ctr= round(($row['number_clicks']/$row['impression'])*100, 2) . "%";

Domain Renewal


hi,
my Domain name will expire next month.can i Extend domain registration with the help of H-Sphere?

yes, u can do Domain Renewal with the help of H-Sphere

there are two types to do Domain Renewal In H-Sphere

  1. manual and
  2. automatic renew modes.

For Manual Domain Renewal:-

In Manual renew mode, you will be warned about domain expiration in advance, so that you can renew the domain on time. To renew your domain manually:

  1. Go to your CP Domain Settings/Domain info menu, and click the domain name link.
  2. On the page that appears in section Domain Renew Mode, click the Renew domain link.
  3. Choose a domain renewal period in the form, you will be taken to
    4.Press Submit and agree to charges, if any.

Automatic Renew Mode

If you have opted for an Automatic Renew Mode, the domain will be automatically renewed the number of years, you specified when choosing the Domain Renew Mode. The charges for a renewal will be made according to your plan settings

turn register globals on and off via the htaccess


Hello.

Is there a way to turn register globals on and off via the htaccess file and what is the code??

Also I need the proper cron code to dump a mailbox.

Plz. help

As about the crontab line, I don’t understand exactly what you want to do, just adjust the command if I’m wrong:

Code:

0 0 * * * rm -rf /home/website/inbox/*

Code:
php_flag register_globals 0

Requires PHP running as an Apache module.
 
 Not so sure about the cron. evoleto, below, has the code for having it run every day at midnight if that's all you wanted.

			

Domain Transfering


hi,
i want to move domains already registered from outside my CP. how can i do it?

Yes, u can transfer domains.
u can update domain’s info and change its DNS servers in the OpenSRS or Enom databases to the H-Sphere ones.

Transfered domains are registered with OpenSRS or Enom for the period chosen at transfer plus the time remaining from registration with original registrar.