Learn html,php,javascript,computer and software fixes, css fixes, website designing,phpbb, computer troubleshooting, hosting




Archive for the ‘PHP SCRIPT INSTALLATION AND CUSTOMISATION’ Category

CHANGING USER PASSWORD IN MYSQL

Sunday, August 16th, 2009

I never thought it would be that simple but if you are using Cpanel, this is simply the  steps to take.

  • Simply Log into your Cpanel
  • Go to MYSQL database icon inside the cpanel as if you are trying to create a new database.
  • When the page opens find the form where you can add a new user.
  • Simply add the same exact username to the database you want to change the password and then just enter any new password you wish to use.
  • And there you go you are almost done.
  • Finally go to your config file and change the database password to the new one and you are done. If you dont do this last part, it will fail because it cannot connect to the database.

NOTE: Please make sure that you can find this configuration file of your site before you go through the process just to avoid complications.

Goodluck

CHANGING THE CUSTOMER WELCOME EMAIL IN OSCOMMERCE

Thursday, January 15th, 2009

Alright we are here again. I got an email from one of my client saying he would like to change the welcome email sent out by OSCOMMERCE store when a customer registers at his store. Actually it took me sometime to find the the file where i can do this but it has been finally cracked as usual. Here is how to go about it.

  • Go to your Oscommerce backend or admin
  • Go to tools
  • Go to file manager
  • Go to the includes folder
  • Go to language folder
  • Go to English or any folder containing the language your site uses.
  • Open the file create_account.php
  • Find this line:define(‘EMAIL_TEXT’, ‘You can now take part in the <b>various services</b> we have to offer you. Some of these services include:’ . “\n\n” . ‘<li><b>Permanent Cart</b> – Any products added to your online cart remain there until you remove them, or check them out.’ . “\n” . ‘<li><b>Address Book</b> – We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.’ . “\n” . ‘<li><b>Order History</b> – View your history of purchases that you have made with us.’ . “\n” . ‘<li><b>Products Reviews</b> – Share your opinions on products with our other customers.’ . “\n\n”);
    define(‘EMAIL_CONTACT’, ‘For help with any of our online services, please email the store-owner: ‘ . STORE_OWNER_EMAIL_ADDRESS . ‘.’ . “\n\n”);
    define(‘EMAIL_WARNING’, ‘<b>Note:</b> This email address was given to us by one of our customers. If you did not signup to be a member, please send an email to ‘ . STORE_OWNER_EMAIL_ADDRESS . ‘.’ . “\n”);
    ?>
  • Start editing the text, please if you dont know php, it is better to change only the words and stay inside any code or quotation lines or otherwise you will get an error.
  • Summary of the file to open = /includes/languages/english/create_account.php

Hope this helps out.

INSTALLING A PHP SCRIPT TO A CPANEL SERVER PLATFORM

Monday, November 10th, 2008

PHP is a server side programming language and runs mostly on all platforms. The server just needs to have a php interpreter installed that can interprete all php scripts installed in it. PHP also interacts with databases like MYSQL. Most servers have MYSQL because its free and open source.

Okay lets take you down the road straight away but before we do that let us talk about the things you will need in order to go through this tutorial very smoothly. I will base this tutorial using a server with a CPANEL platform. I think you will need the following my freinds.

  • A php script of your choice depending on the program you want to run .ie forum script, dating site script etc .
  • An ftp program in which to upload your files your server and an ftp access to your server.
  • A server running on any platform but preferably a Cpanel platform
  • A MYSQL database access directly through your server or through the MYSQL site itself.
  • A good documentation of the installation process you want to run , this can be found in the READ ME .txt file of the script you want to install or through the script vendor home page .

Alright thats about it, take a cup of tea and lets get down to business:

Now open your folder containing the php script you want to install and take a look at the file structure, after that you can close it or leave it open if you want.

If you already have an FTP (file transfer protocol) program, then you can connect to your server using your ftp program. Please contact me if you do not understand these or search more in our blog database for how to use an ftp tutorial. They are all basically the same procedure but some interface differ and may confuse you.

Lets assume you already know how to use an FTP program, then the next step to take is to quietly log into your server using your ftp and then upload all the files in the php script folder on your computer to the folder you want to install it in your web server. It is either in the “public_html” folder ( /root/) which is the root directory in your server or any other sub folder ( /root/your sub folder/ ) within the root that you would like to install the script.

After you have finished doing that then lets log into your cpanel.

NOW WE ARE INSIDE YOUR CPANEL

Okay the first thing we are going to do is embark on creating a MYSQL database for your new php script. please take note that not all php scripts needs a database but we are assuming that this one is a database driven php script.

In your CPANEL please find the icon that says “MYSQL, mysql databases” and then click on it to create your database for the php script you want to install. In the new window that opened do the following

  • Create a database ( that can be any name you like but relate it to your script if you like)
  • Create a username and password
  • Assign the username and password to the database created
  • Assign “ALL PRIVILEDGES” to the user

NOTE: Your database can also be managed through PHPMYADMIN ( we will get to that in the following lessons but let us install your script now. Please remember to write down or take note of your database name , user and password. you will need that for the installation process.

LET US INSTALL

Different php scripts have different installation process, most of the scripts will take you through an installation wizard but some will require you to manually do the installation and that will involve mainly manually creating tables and inserting values into tables created but dont worry about that , you will get to learn how to do that when we treat the MYSQL database section.

Also take note that some php scripts will either come with a folder named “INSTALL” or a single file called “install.php”. If it comes in a folder, you wil usually find the “install.php” file in the “INSTALL” folder. So its either (/root/install.php) or (/root/INSTALL FOLDER/install.php) .

NOTE: Please consult the script documentation for full instructions on how to install as it might differ from this tutorial.

TO GET YOUR SITE UP AND RUNNING LET US DO THESE:

  • Find the install.php file and point your mouse to it or simply type (http://www.yoursite.com/install.php or http://www.yoursite.com/INSTALL/install.php) to the browser just as it applies to the file structure in your web server.
  • After you have done that usually an installation wizard will appear asking for your database name, username, password.

Note: Please use this format if you are using a CPANEL server platform. when you create your database, user and password in the cpanel, it will usually look like this yourcpanelusername_databasename. Use this format to fil up your info. it goes like this;

DatabaseName = yourcpanelusername_databasename

DatabaseUsername = yourcpanelusername_username

DatabasePassword = your data base password

DatabaseHost = localhost

Once you have filled up all these informations and clicked on install button , it will be checked by the system and a form will appear to fill up your site administration information(informations used to administer your site please remember these)

Follow up all the procedures and then your site should be available to you. it wouldnt take more than 10 mins to do all these if you have a fast computer and have followed all the necessary installation procedures.

We will cover how to install manually in the next tutorial. (COMING SOON)

meanwhile have a nice time and enjoy your new php script. If you need further tutorial or help with your installation please let me know by using our contact information.