Archive

Archive for the ‘Cpanel scripts or addon software installations’ Category

Installing Word-Press manually

October 6th, 2009

1) Login to cpanel ==> Mysql databases

Create mysql database wp

Create the mysql database user wp with password wp

2) Login to shell go to user public_html folder

cd /home/user/public_html/

3) wget http://wordpress.org/latest.tar.gz

4) tar -zxvf latest.tar.gz

5) chown -R ehpzne66.ehpzne66 wordpress

6) cd wordpress

/home/user/public_html/wordpress/

7) vi wp-config-sample.php

replace the following setiings with the database name and user name you have created in cpanel

define(’DB_NAME’, ‘user_wp’);    // The name of the database
define(’DB_USER’, ‘user_wp’);     // Your MySQL username
define(’DB_PASSWORD’, ‘wp’); // …and password

wq!

8) mv wp-config-sample.php wp-config.php

Now go to the browser as this part is done in the browser

9) http://domain.com/wordpress/wp-admin/install.php

click on firststep

10) Provide the blog title

Email provide the email id of the client

Continue with second step

Save the admin logins you need to provide this logins to client same logins will also been sent to client email id also

Username
admin
Password
21de76

That’s it

Now you can login to wordpress at the following URL:

http://domain.com/wordpress/wp-login.php  ( Login with admin logins )

Cpanel scripts or addon software installations

oscommerce and php safe mode

October 6th, 2009

:: QUESTION ::

I am running php safe mode from several weeks now , without any big problem .
But I found now that oscommerce generate an error using php safe mode …

Warning: is_dir() [function.is-dir]: SAFE MODE Restriction in effect. The script whose uid is 32003 is not allowed to access /tmp owned by uid 0 in /home/test/public_html/oscommerce/includes/header.php on line 30

:: ANSWER ::

Just do this:

Uncoment the second line in each (remove ‘#’):

#do we need this?
#regsrep(”$installdir/includes/configure.php”,”\(\’STORE_SESSIONS\’”,”define(’STORE_SESSIONS’, ‘mysql‘);”);

#do we need this?
#regsrep(”$installdir/admin/includes/configure.php”,”\(\’STORE_SESSIONS\’”,”define(’STORE_SESSIONS’, ‘mysql‘);”);

in the file:
/usr/local/cpanel/addons/osCommerce/install

Then reinstall oscommerce cart.

Cpanel scripts or addon software installations

Errors after installing oscommerce

October 6th, 2009

< PROBLEM >

Errors after installing oscommerce

Immediatly after installing oscommerce through CPanel add-on scripts i get this error Sad

Warning: main(includes/configure.php) [function.main]: failed to create stream: No such file or directory in /home/ctbhost/public_html/cart/admin/includes/application_top.php on line 34

Fatal error: main() [function.main]: Failed opening required ‘includes/configure.php’ (include_path=’/usr/local/lib/php:/usr/lib/php’) in /home/ctbhost/public_html/cart/admin/includes/application_top.php on line 34

<? SOLUTION ?>

We can fix this error through following file edits.

1> in /shop/admin/includes/application_top.php
Change
require(’includes/configure.php’);
TO
require(’./includes/configure.php’);

2> in /shop/includes/application_top.php
Change
require(’includes/configure.php’);
TO
require(’./includes/configure.php’);

3> IN /cart/includes/configure.php
Change
define(’DIR_WS_INCLUDES’, ‘includes/’);
TO
define(’DIR_WS_INCLUDES’, ‘./includes/

4> IN /cart/admin/includes/configure.php
Change
define(’DIR_WS_INCLUDES’, ‘includes/’);
TO
define(’DIR_WS_INCLUDES’,’./includes/’);

Cpanel scripts or addon software installations

Oscommerce session errors

October 6th, 2009

Getting an error on both the catalog and admin main pages saying:

“Warning: The sessions directory does not exist: /tmp. Sessions will not work until this directory is created.”

Solution :  
Set this in both your admin/includes/configure.php and catalog/includes/configure.php:

Code:
define(’STORE_SESSIONS’, ‘mysql’);

Cpanel scripts or addon software installations

Bnbform installation guide ?

October 6th, 2009

First download bnbform.tar file from ftp://ftp.bignosebird.com/bnbform.tar

BigNoseBird.Com’s
- - - - -
All Purpose Form Handler

FOR UNIX & WINDOWS

NOW ON VERSION 4.1
——————

Proper validation of four character TLDs such as .name
and .info now allowed.

Updated January 31, 2000

Improved security features. Arbitrary file requests are
prevented by the script appending a unique extension to
each file type. File names and e-mail addresses are
are checked for possible exploit attempts.

Multiple recipients and cc’s are now supported.

Thank you page now shows submitted information.

ABOUT THE NEW FILENAME SYSTEM:

In order to prevent people from being able to overwrite
or read from files on your server, you MUST set up your
file names in the following way. Each item such as
automessage, is given an extension automatically by
the script. Do not include the extension in the VALUE
part of the HIDDEN INPUT tag. This is how the exploit
attempts are blocked. The list below shows the extension
associated with each file type.

<INPUT TYPE=”HIDDEN” NAME=”automessage” VALUE=”mymessage”>

the file MUST be named mymessage.baut when you
save it on the server.

<INPUT TYPE=”HIDDEN” NAME=”outputfile” VALUE=”form1″>

the script will create form1.bout

<INPUT TYPE=”HIDDEN” NAME=”countfile” VALUE=”form1″>

the script will create form1.bcnt

<INPUT TYPE=”HIDDEN” NAME=”emailfile” VALUE=”form1″>

the script will create form1.bemf

This program, bnbform.cgi is designed to allow you to
quickly implement your HTML based forms. The program
is configured by information you provide in the form
itself, so you can get the script to handle your data
in a variety of ways without changing your scripts.
Without writing one line of perl code, you can do
the following (in any combination!):

1.) Submit E-mail to a specified person(s) and CC
as well.
2.) Send the data to a file for easy import into a
database program.
3.) Automatically send a resonse to the submitter,
with a text file to contain your message.
4.) Define the order the data is printed.
5.) Enforce completion of specified fields.
6.) Define a page for a “Thank you” or an “Oops!”
message after the form is submitted.

I. GETTING READY TO INSTALL
—————————-
Included in this zip or tar file you will find the
following files:

FILE NAME DESCRIPTION
——— ———–
README.TXT The file you are reading!
bnbform.cgi The script
bnbform.html A sample form
mymessage.baut A sample autoreponse message
oops.html A sample HTML page for incomplete data
thanks.html A sample HTML page for saying thanks!

NOTE: PLEASE READ THE Q&A BELOW, IT CONTAINS SOME
USEFUL SETUP INFORMATION!

In order to install the script, you should only have
to find out the answers to the following questions:

Q: Where is perl on my server?
A: On some systems it is /usr/local/bin/perl but it
may be in /usr/bin/perl or /usr/sbin/perl. The very
first line of the script says,
#!/usr/bin/perl
This MUST be the first line of the script with nothing
including blank lines above it. If your “perl” is not
there, edit this line so that it is correct for your
system.

Q: What is an SMTP server?
A: This is the computer that handles your domain’s e-mail,
but you can also use your ISP’s mail server as well
(usually). On most systems, the “localhost” will work
just fine.

Q: Where is my cgi-bin directory?
A: This varies. Please check with your system
administrator or system FAQ if you do not know
this.

Q: How do I call a cgi-bin script from a form?
A: On my system, this does the trick:
<FORM METHOD=”POST” ACTION=”/cgi-bin/bnbform.cgi”>
Again, this can vary from server to server so
please consult your server FAQ or your system
administrator.

Q: How do I set file permissions?
A: Once the files are installed, using FTP, you want
to set the permissions on bnbform.cgi so that
they are the equivalent of 755. This means that
the owner can read-write-execute, group can
read-execute, and others can read-execute. If you
can login using telnet, you can issue the command:
chmod 755 bnbform.cgi
You must “cd” to the directory containing the
script before doing this.
For specific instructions on setting permissions
using FTP, please see the “HELP” for your FTP
program.

II. INSTALLING THE FILES ON YOUR SERVER
—————————————-

Edit the bnbform.cgi to make sure the path to perl is
correct, i.e.,

#!/usr/local/bin/perl

Edit the bnbform.html to make sure you are calling the
script properly, i.e.,

<FORM METHOD=”POST” ACTION=”/cgi-bin/bnbform.cgi”>
Also, change the e-mail address of the “submit_to” and
the http://domain.com/oops.html and http:domain.com/thanks.html
so that they are correct for your domain. You may delete the
lines containing the ok_URL and not_ok_URL if you want.

Using FTP, transfer the following files using ASCII mode.
NEVER USE BINARY TO TRANSFER TEXT FILES FROM A PC TO A
UNIX SERVER!!!!!

FILE LOCATION
bnbform.cgi cgi-bin directory
mymessage.baut cgi-bin directory
bnbform.html your webpage directory
oops.html your webpage directory
thanks.html your webpage directory

Set the permissions on bnbform.cgi to 755 which
means the owner can read-write-execute, group can
read-execute, and others can read-execute. (This
was one of the questions above!)

Guess what? That’s it! Installation is complete
and you can test the script using the bnbform.html
that is included- after you edit it as described
above.

III. CONFIGURING THE FORM FOR YOUR NEEDS
—————————————-
The bnbform.cgi script is very simple, and very flexible.
How it works, is that it looks at the form’s data for the
existence and content of some special fields, most of
which are HIDDEN so the reader doesn’t see them. Here are
a list of the magic fields:

IMPORTANT NOTE: ALL FIELD NAMES AND VALUES ARE CASE SENSITIVE!
To keep things simple- just use lower case.

submit_by: The e-mail address of the person completing the
form. You should make this required if you are
using autorespond.

required: A list seperated by commas “,” listing ALL fields
you wish to enforce data completion on. As an
example:
<INPUT TYPE=”HIDDEN” NAME=”required”
VALUE=”name,country,submit_by”>

data_order: In order for your information to show up in a file
or in your e-mail, you MUST list each field you want
to see in this comma “,” separated list. This also
specifies the order the data will be printed to mail
and to file. Here is an example:
<INPUT TYPE=”HIDDEN” NAME=”data_order”
VALUE=”name,country,submit_by,mailing_list,how_found,
grape,banana,apple”>

submit_to: The person to receive the e-mail. Example
<INPUT TYPE=”HIDDEN” NAME=”submit_to”
VALUE=”yourname@domain.com”>
You do not have to indicate a “submit_to”
if you are sending the information to a file,
and don’t need e-mail notification.
You can use more than one e-mail address, just put commas
between them, VALUE=”person1@x.com,person2@y.com”

cc_to: In addition to submit_to, you can also specify additional,
CC recipient(s).
<INPUT TYPE=”HIDDEN” NAME=”cc_to”
VALUE=”anotherperson@domain.com”>
You can use more than one e-mail address, just put commas
between them, VALUE=”person1@x.com,person2@y.com”

automessage: A textfile containing a message to go out as the
body of an autorespond e-mail. Example,
<INPUT TYPE=”HIDDEN” NAME=”automessage”
VALUE=”mymessage”>
***You can also specify the actual path to the file
if you will be running this outside of the main
cgi-bin directory- or if you want the data elsewhere.

outputfile: This tells the system you want to log information,
and what to name the file. The script will create
the file with proper permissions for you.
<INPUT TYPE=”HIDDEN” NAME=”outputfile”
VALUE=”form1″>
***You can also specify the actual path to the file
if you will be running this outside of the main
cgi-bin directory- or if you want the data elsewhere.

emailfile: Configured as above. Saves only the sender’s email address.

countfile: Configures like outputfile(above). Stores a counter number
for “Bates” Stamping your mail. The number is available as
$newnum or $fields{’counter’} to the script.

form_id: Optional. Forms part of the subject in to
the e-mail to the person receiving the data.
This helps them know which form it came from.
<INPUT TYPE=”HIDDEN” NAME=”form_id”
VALUE=”My Test Form”>

ok_url: A URL to jump to after successfully completing
the form. If this is not on the form, a default
“Thank you” message appears.
<INPUT TYPE=”HIDDEN” NAME=”ok_url”
VALUE=”http://domain.com/test/thanks.html”>
You MUST specify the full URL as shown above!
OPTIONAL!

not_ok_url: A URL to jump to after not filling in all the
required fields on the form. If this is not
on the form, a default “Oops” message appears.
<INPUT TYPE=”HIDDEN” NAME=”not_ok_url”
VALUE=”http://domain.com/test/oops.html”>
You MUST specify the full URL as shown above!
OPTIONAL!

IV. VARIOUS CONFIGURATION SCENARIOS
————————————

Field Name Datafile E-Mail Auto-Respond A-R with Message
———- ——– —— ———— —————-
submit_to X
—————————————————————-
submit_by X X
—————————————————————-
autorespond X X
—————————————————————-
outputfile X
—————————————————————-
automessage X
—————————————————————-

For datafile and autorespond:
submit_by
autorespond
outputfile

For datafile and autorespond with custom message:
submit_by
autorespond
outputfile
automessage

For e-mail notify and autorespond:
submit_to
submit_by
autorespond

For e-mail notify and autorespond with custom message:
submit_to
submit_by
autorespond
automessage

For the whole enchilada!!!!!!
submit_to
submit_by
autorespond
outputfile
automessage

V. THINGS YOU NEED TO KNOW….
——————————–

About CHECKBOX fields… Eventhough you can have multiple
CHECKBOX fields with different values- DON’T DO IT! This
script only picks up the last checked item.

Since information might be going to a datafile, it would
be nearly impossible for you to get uneven columns of data
straightened out. Use different names for each field.

VI. COOL TRICKS
—————-

Let’s say you have more than one person you may need to send
the mail to depending on the form. What you can do is place
the submit_to in a set of radio buttons, i.e.,

<INPUT TYPE=”RADIO” NAME=”submit_to” VALUE=”support@x.com” CHECKED>Support
<INPUT TYPE=”RADIO” NAME=”submit_to” VALUE=”sales@x.com”>Sales
<INPUT TYPE=”RADIO” NAME=”submit_to” VALUE=”billing@x.com”>Billing
<INPUT TYPE=”RADIO” NAME=”submit_to” VALUE=”pres@x.com”>President

Note that I have indicated CHECKED next to support. This way there
is a default value.

Cpanel scripts or addon software installations

4images in Safe Mode ?

October 6th, 2009

You can post following answer for customers having 4images problem.

Hi,
We have PHP SafeMode Restrictions on servers due to security reasons. However you can use following tweak to upload images.

In order to rectify this problem with 4images and safemode….you have to delete your image folders 4images/data/media/1,2,3, etc and 4images/data/thumbnails/1, 2, 3 then make new folders (1,2,3, etc.) and CHMOD the folders to 777.
For each new picture directory u create, you have to do the same.

Cpanel scripts or addon software installations

Cannot set environment variable ‘TZ’

October 6th, 2009

When installing the phpwebsite or php script I face the following error.

Warning: Safe Mode: Cannot set environment variable ‘TZ’ - it’s not in the allowed list in /home/public_html/lib/pear/Date/TimeZone.php on line 251

A: This is caused by the Calendar modules. Calendar uses the Pear Date class which uses a “set environment” command. Some servers do not like to be told how to set their environments. So you will need to turn this off.
Open the file lib/pear/Date/TimeZone.php in a text editor.
Go to line 247. You should be in a function named ‘inDaylightTime()’.
Add this line: return date(”I”);
at the very top of the function.

It should now look like this:

function inDaylightTime($date)
{
return date(”I”);
$env_tz = “”;
if(getenv(”TZ”))
$env_tz = getenv(”TZ”);
putenv(”TZ=”.$this->id);
$ltime = localtime($date->getTime(), true);
putenv(”TZ=”.$env_tz);
return $ltime['tm_isdst'];
}

This should stop the error. Perhaps in the future, the Pear team will supply a work around.

P.S. This can be found in the setup/repair.php file.

Cpanel scripts or addon software installations

Short description of all of the cpanel scripts

October 6th, 2009

/scripts/adddns Add a Dns Entry
/scripts/addfpmail Install Frontpage Mail Exts
/scripts/addservlets Add JavaServlets to an account (jsp plugin required)
/scripts/adduser Add a User
/scripts/admin Run WHM Lite
/scripts/apachelimits Add Rlimits (cpu and mem limits) to apache.
/scripts/dnstransfer Resync with a master DNS Server
/scripts/editquota Edit A User’s Quota
/scripts/finddev Search For Trojans in /dev
/scripts/findtrojans Locate Trojan Horses
Suggest Usage
/scripts/findtrojans &gt; /var/log/trojans
/scripts/fixtrojans /var/log/trojans
/scripts/fixcartwithsuexec Make Interchange work with suexec
/scripts/fixinterchange Fix Most Problems with Interchange
/scripts/fixtrojans Run on a trojans horse file created by findtrojans to remove them
/scripts/fixwebalizer Run this if a user’s stats stop working
/scripts/fixvaliases Fix a broken valias file
/scripts/hdparamify Turn on DMA and 32bit IDE hard drive access (once per boot)
/scripts/initquotas Re-scan quotas. Usually fixes Disk space display problems
/scripts/initsuexec Turn on SUEXEC (probably a bad idea)
/scripts/installzendopt Fetch + Install Zend Optimizer
/scripts/ipusage Display Ipusage Report
/scripts/killacct Terminate an Account
/scripts/killbadrpms Delete \”Security Problem Infested RPMS\”
/scripts/mailperm Fix Various Mail Permission Problems
/scripts/mailtroubleshoot Attempt to Troubleshoot a Mail Problem
/scripts/mysqlpasswd Change a Mysql Password
/scripts/quicksecure Kill Potential Security Problem Services
/scripts/rebuildippool Rebuild Ip Address Pool
/scripts/remdefssl Delete Nasty SSL entry in apache default httpd.conf
/scripts/restartsrv Restart a Service (valid services: httpd,proftpd,exim,sshd,cppop,bind,mysql)
/scripts/rpmup Syncup Security Updates from RedHat/Mandrake
/scripts/runlogsnow Force a webalizer/analog update.
/scripts/secureit Remove non-important suid binaries
/scripts/setupfp4 Install Frontpage 4+ on an account.
/scripts/simpleps Return a Simple process list. Useful for finding where cgi scripts are running from.
/scripts/suspendacct Suspend an account
/scripts/sysup Syncup Cpanel RPM Updates
/scripts/ulimitnamed RH 6 only. Install a version of bind to handle many many zones.
/scripts/unblockip Unblock an IP
/scripts/unsuspendacct UnSuspend an account
/scripts/upcp Update Cpanel
/scripts/updatenow Update /scripts
/scripts/wwwacct Create a New Account

Cpanel scripts or addon software installations

Setup skins in Invision Board when SafeMode is ON

October 6th, 2009

We are getting lot of complaints on php-safemode ON as customers unable to upload new skins if safemode is ON.
You can give following procedure to customers for uploading skins.

===========================================================
You can try following workaround to install skin If your PHP uses safe mode/

Then you need to do it manually. Here is how to do that:

1. Extract the set-skinname.tar file and you should have these files/directorys:
- images
- macro.txt
- stylesheet.css
- templates.html
- templates_conf.inc
- wrapper.html

2.a. In your FTP browser go into ’style_images’ in your forum directory and create a new folder called anything.
2.b. Go into the new folder (forumdir/style_images/name/) and upload everything in the ‘images’ directory of our extracted tar file in that folder.

3. Go into your forums AdminCP and go into ‘Skins & Templates’ then:
3.a. Go to ‘Board Wrappers’ and where it says OR Choose a wrapper file from your computer to import click ‘browse’ then find the wrapper.html file from our extracted tar file and click ‘import’
3.b. Go to ‘HTML Templates’ and import the templates.html file the same way as we did in 3.a.
3.c. Go to ‘Style Sheets’ and import the stylesheet.css file as we did in 3.a.
3.d. Go to ‘Macros’ and import the macro.txt file as we did in 3.a

4. To finish we need to put all the files in one skin set. Go into ‘Manage Skin Sets’ and press ‘Create new skin set’ then select all the files we have imported/uploaded and the images directory name you choose.

Tip: If you want it to be set as the main skin which guests see and members who haven’t choosen a skin click yes for ’set as defualt skin set’

===============================================================
Above procedure posted on invision board forums
http://www.invisionthings.com/forums/index…t=ST&f=9&t=3021

Cpanel scripts or addon software installations

Installing PHP-NUKE on addon domains

October 6th, 2009

Installation of the nuke on the addon domains is possible.

You can follow the following steps :

1) Install the required script from the cPanel to any folder of the public_html

2) Change the document root of the addon domain to the script path
eg : /home/steve/public_html/nuke

3) Change the domain name variable in config.php file from main domain to addon domain.

Cpanel scripts or addon software installations