|
|
 |
|
 |
 |
|
 |
|
PHP is a general purpose scripting language used to create dynamic, database-driven websites.
It provides built-in support for the popular MySQL database format.
If you are going to install Viart Shop on a local machine that doesn't support PHP, you will have to do the following:
Note: if you do not have any problems with PHP-support, you can easily omit these instructions and proceed to PhpMyAdmin section
1. Download the PHP binaries
PHP is free and comes complete with the source code. If you are not interested in hacking the PHP source code,
you can simply download the Windows binaries. Both the binaries and the source code can be found at the PHP Website.
2. Install PHP
a. Create a directory for PHP on your computer. For example "C:\php".
b. You will not need all the files provided in the archive, so unzip the PHP archive into a temporary location first
e.g. "C:\Windows\Temp".
All the PHP files in the archive will be extracted into a folder inside this temp folder, the name will be based on
the version of PHP you downloaded. For example, if you downloaded php-4.2.3-Win32.zip and extracted it into "C:\Windows\Temp",
there'll be a folder called "C:\Windows\Temp\php-4.2.3-Win32\" where the files can be found.
The PHP Files You Need
Copy the following files into "C:\php"
- php.exe
- php4ts.dll
- php4apache.dll
Note:
- You can find php4apache.dll in the "sapi" sub-directory (e.g. "C:\Windows\Temp\php-4.2.3-Win32\sapi\").
- You will need to use php4apache2.dll if you're installing it for Apache 2.X. which you will be assumed to be doing.
- If you plan to load PHP extensions, you will need to copy the files in the "extensions" directory to "C:\php"
(or a sub-folder in "C:\php") as well.
- MySQL support is integrated into php and no longer needs an extension dll.
3. Configuring PHP
First of all you may need to copy the file "php.ini-dist" from the extracted files into your Windows directory
(typically "C:\Windows") on most Windows 95/98/ME/XP; you then need to rename this file "php.ini".
Use an ASCII text editor (such as Notepad) to open "php.ini".
You may need to make the following changes to the file, depending on your requirements:
- Setting up ViArt for localhost email Functionality
In order to run ViArt on a localhost and have the email function work correctly, you will need to edit
your php.ini file as shown below. It is important to note that, when creating ViArt accounts, or
submitting Support Tickets, a real email address must be used, else the localhost will simply product an error.
- Setting the SMTP Server
Your SMTP Server will need to be configured if you want the mail() function to send out email when you test your own PHP scripts.
To do this, search your "php.ini" for the section beginning "[mail function]" (search without the quotes).
You should see a section that looks like this, or which is pretty much identical to it:
[mail function]
; For Win32 only
SMTP = localhost
; For Win32 only
sendmail_from = me@localhost.com
Now you need to change the "localhost" reference to point to your SMTP server and email account.
For example, if your SMTP server is "mail.viart.com" and your email address is "youremail@yourdomain.com", you would change the code to:
[mail function]
; For Win32 only
SMTP = mail.viart.com
; For Win 32 only
sendmail_from = youremail@yourdomain.com
Note:
- After doing this, any script using the mail() function will need to be connected to your ISP to run correctly.
- You must also stop your local Apache Server service and start it again for the changes to take place.
PhpMyAdmin and Viart Shop
In order to manage your databases on a remote server we would recommend to use PhpMyAdmin.
It is a web interface to the popular database MySQL, and is written in PHP.
It comes installed with many web hosting accounts, but can be installed yourself if not.
PhpMyAdmin allows you to login to an administration 'panel' and manage your databases,
browse their data, run SQL commands, and backup the structure and data stored in your MySQL databases.
Because of PhpMyAdmin's power (including the ability to drop SQL tables and delete databases),
you must ensure the password is set correctly.
You might also want to protect the directory using .htaccess files too. More information on these is available here.
If your web host has not pre-installed phpMyAdmin it may be downloaded from the official PhpMyAdmin website.
How to use PHP MyAdmin with Viart Shop?
As your Site's Web was the provider of your version, you are best advised to read the documentation specific to your install; briefly however, the two main things phpMyAdmin will do for you are:
- Allow you to easily create a blank MySQL Database
- Allow you to set your folder permissions on your ViArt Includes folder to protect them from hackers (see section 2.5).
|
|
|
 |
 |
|
|