a/ Run your editor as administartor -> Right click on Editor executable file (.exe) and choose option “Run as administartor”.
b/ Edit your file and save changes.
2014/10/16
2014/10/04
How to install OpenCard on PHP host
1/ Downolad archive OpenCard from http://myopencart.com/downlaod -> http://sourceforge.net/projects/ocstore/files/latest/download
2/ Unzip and copy all its content to public_html folder (or any subfolder of that folder)
3/ Run page http://host/install/index.php
If it is not seen then you sholud change names of 3 php.ini files
/php.ini -> php.ini.txt
/admin/php.ini -> /admin/php.ini.txt
/install/php.ini -> /install/php.ini.txt
4/ On 1st screen
Confirm agreement terms
5/ On 2nd screen
change names of config files:
/config-dest.php -> config.php
/admin/config-dest.php -> /admin/config.php
6/ on 3rd screen give
database host: (sholudn't be localhost but external url)
database name:
database user:
user password:
if you don't yet created database then do it now
give credentials for admin account of the OpenCard
login: admin
password: .. (set this)
email: (set this)
7/ remove install directory
8/ If needed add:
DirectoryIndex index.html index.php
to .htaccess in main directory
to point that this is your default page.
9/ Download this file:
and copy to /system/database/
Give it this name: mmysqli.php
and change 2 lines in
/config.php
/admin/config.php
from define('DB_DRIVER', 'mysql');to define('DB_DRIVER', 'mmysqli');
2/ Unzip and copy all its content to public_html folder (or any subfolder of that folder)
3/ Run page http://host/install/index.php
If it is not seen then you sholud change names of 3 php.ini files
/php.ini -> php.ini.txt
/admin/php.ini -> /admin/php.ini.txt
/install/php.ini -> /install/php.ini.txt
4/ On 1st screen
Confirm agreement terms
5/ On 2nd screen
change names of config files:
/config-dest.php -> config.php
/admin/config-dest.php -> /admin/config.php
6/ on 3rd screen give
database host: (sholudn't be localhost but external url)
database name:
database user:
user password:
if you don't yet created database then do it now
give credentials for admin account of the OpenCard
login: admin
password: .. (set this)
email: (set this)
7/ remove install directory
8/ If needed add:
DirectoryIndex index.html index.php
to .htaccess in main directory
to point that this is your default page.
9/ Download this file:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
final class mMySQLi { | |
private $link; | |
public function __construct($hostname, $username, $password, $database) { | |
$this->link = new mysqli($hostname, $username, $password, $database); | |
if ($this->link->connect_error) { | |
trigger_error('Error: Could not make a database link (' . $this->link->connect_errno . ') ' . $this->link->connect_error); | |
} | |
$this->link->set_charset("utf8"); | |
$this->link->query("SET SQL_MODE = ''"); | |
} | |
public function query($sql) { | |
$query = $this->link->query($sql); | |
if (!$this->link->errno) { | |
if ($query instanceof mysqli_result) { | |
$data = array(); | |
while ($row = $query->fetch_assoc()) { | |
$data[] = $row; | |
} | |
$result = new stdClass(); | |
$result->row = isset($data[0]) ? $data[0] : array(); | |
$result->rows = $data; | |
$result->num_rows = $query->num_rows; | |
$query->close(); | |
return $result; | |
} else { | |
return true; | |
} | |
} else { | |
trigger_error('Error: ' . $this->link->error . '<br />Error No: ' . $this->link->errno . '<br />' . $sql); | |
} | |
} | |
public function escape($value) { | |
return $this->link->real_escape_string($value); | |
} | |
public function countAffected() { | |
return $this->link->affected_rows; | |
} | |
public function getLastId() { | |
return $this->link->insert_id; | |
} | |
public function __destruct() { | |
$this->link->close(); | |
} | |
} | |
?> |
Give it this name: mmysqli.php
and change 2 lines in
/config.php
/admin/config.php
from define('DB_DRIVER', 'mysql');to define('DB_DRIVER', 'mmysqli');
Subscribe to:
Posts (Atom)