Author

Topic: BitWasp Script Kurulumu, 0,1BTC Ödeme Yapacağım (Read 656 times)

jr. member
Activity: 69
Merit: 4
Bekliyorum hocam..

[Edit] Günceldir... İlgilenen arkadaşlar yazabilir...
full member
Activity: 154
Merit: 100
Öm atıyorum hocam bi bak zamanında birçok script kurulumunda bulunmuştum .
jr. member
Activity: 69
Merit: 4
Arkadaşlar, Localhost üzerine BitWasp kurmaya çalışıyorum fakat;

İnstall Sayfasında Chmod ve Composer kurulum uyarısı alıyorum. Zira hepsini hallettim kayboldu uyarılar.
Ama şu Yenileme uyarısını ne yaptıysam geçemedim.

Bana bu scripti hakkıyla kuracak olan, yada bu safhayı geçmeme yardımcı olacak arkadaşa, 0,1 Bitcoin ödeme yapacağım...

İnstall.PHP içeriği; (F5 olayı 130. Satırda yer alıyor)

Code:
error_reporting(E_ALL); //Setting this to E_ALL showed that that cause of not redirecting were few blank lines added in some php files.
// Determine filesystem path to the necessary files.
$basedir explode("/"dirname(__FILE__));
$installdir implode("/"array_splice($basedir0count($basedir)-1));
$database_config_file $installdir.'/application/config/database.php';
$bitcoin_config_file $installdir.'/application/config/bitcoin.php';
$config_config_file $installdir.'/application/config/config.php';
$storage_directory $installdir.'/application/storage/';
// Die if there appears to be contents in the config files.
if(strlen(@file_get_contents($config_config_file)) > 20 && strlen(@file_get_contents($bitcoin_config_file)) > 20 && strlen(@file_get_contents($database_config_file)) > 20 && $_SERVER['QUERY_STRING'] !== 'end')
die();
// Modules which must be installed.
$check['mcrypt_module' = ( ! function_exists('mcrypt_encrypt')) ? FALSE TRUE;
$check['gmp_module'] = ( ! function_exists('gmp_init')) ? FALSE TRUE;
$check['curl_module'] = ( ! function_exists('curl_init')) ? FALSE TRUE;
$check['openssl_module' = ( ! function_exists('openssl_random_pseudo_bytes')) ? FALSE TRUE;
$check['gd_module' = ( ! (extension_loaded('gd') && function_exists('gd_info'))) ? FALSE TRUE;
$check['gpg_module' = ( class_exists('gnupg') && function_exists('gnupg_init')) ? TRUE FALSE;
// Files which need to be writable
$check['storage_directory_writable' = ( ! is_writable($storage_directory)) ? FALSE TRUE;
$check['database_config_file_writable'] = ( ! is_writable($database_config_file)) ? FALSE TRUE;
$check['bitcoin_config_file_writable' = ( ! is_writable($bitcoin_config_file)) ? FALSE TRUE;
$check['config_config_file_writable' = ( ! is_writable($config_config_file)) ? FALSE TRUE;
$check['composer_directory_exists'] = TRUE;
if(!
is_dir($installdir.'/vendor'))
$check['composer_direxists'] = FALSE;

// Work out if the environment is ready for the installer.
$environment_check TRUE
foreach(
$check as $key => $outcome) {
$environment_check &= $outcome;
}
?>







Install | BitWasp





    

Install


        // Do sanity checks on the environment first. 
    
if($environment_check == FALSE) { ?>

    


$commands = array();

foreach($check as $key => $outcome) { 
$errors = array();
if($outcome == FALSE) {
// Work out which error to display, and what command will fix it.
$a explode("_"$key);
$last $a[count($a)-1];
if($last == 'direxists') {
echo "You must run composer!

"
;
$cmd "curl -s http://getcomposer.org/installer | php && php composer.phar install";
echo "$ ".$cmd;
$commands[] = $cmd;
}

if($last == 'writable') {
$type $a[count($a)-2];
$name implode(" "array_slice($a0count($a)-2));
echo "You must make the $name $type writable!

"
;

$ref implode("_"array_slice($a0count($a)-1));
if($type == 'directory') {
$cmd 'chmod 777 '.$$ref;
echo '$ '.$cmd;
$commands[] = $cmd;
}
if($type == 'file') {
$cmd 'touch '.$$ref.' && chmod 777 '.$$ref;
echo '$ '.$cmd;
$commands[] = $cmd;
}

}
?>



Press F5 once you're done.


if(count($commands) > 1) { ?>
Copy/paste this box into your terminal to run all of these at once:


?>


    
    } else { 

// Environment passes sanity check.

// Complete installation?
if(isset($_GET['end'])) { ?>

Your installation is now complete, but there are a number of things to do before you go live.




                    
  • You must update your database now by running `php echo $installdir?>/index.php db`

  • You can bookmark this page until you are finished. When you are done delete the /install directory.



  • Edit your bitcoin.conf and crontab entry and remove the # symbols.



  • Configure tidy URLs?

    Create a .htaccess file, and ensure your server has AllowOverride set to All.



  • Set up categories for items
    Admin Panel -> Items tab -> Edit button



  • Set up custom locations, if you want to tailor the system to your locality
    Admin Panel -> Edit -> Custom Locations



  • Set up fee's to charge for orders.
    Admin Panel -> Items -> Configure Fees



  • Enable two factor authentication?
    Account -> Edit -> Configure Two Factor Authentication



  • Set up a PGP key for your admin user?
    Account -> Edit -> Add a PGP Key



  • Force incoming messages to be PGP encrypted?
    Account -> Edit -> Force PGP Messages



  • Set critical directories to read-only:
    $ chmod 755 echo $installdir?> -R && chmod 777 echo $installdir?>/application/storage/



  • Click here to see your new Bitwasp install!



// Starting installation process?
} else if(!isset($_GET['start'])) { ?>

Check that your bitcoin.conf looks similar to the following. Note down whatever rpcuser, rpcpassword, rpcport you have.


Only remove the # symbols once you have finished the install procedure, and bitcoind is fully up-to-date.

rpcuser=bitcoinrpc
rpcpassword=change_me
daemon=1
checkblocks=5
#blocknotify=/usr/bin/php echo $installdir?>/index.php callback block %s
#alertnotify=/usr/bin/php echo $installdir?>/index.php callback alert
txindex=1
rpcport=8332
rpcconnect=127.0.0.1



Run 'crontab -e' without the quotes, and add the following. Again, don't remove the #'s until you have finished the guide.



#*/1 * * * * /usr/bin/php echo $installdir?>/index.php callback autorun
#*/1 * * * * /usr/bin/php echo $installdir?>/index.php callback process


Click here to continue

} else { 
// User on install form.
// Only load the classes in case the user submitted the form
if($_POST && $_POST['install'] == 'Install') {
// Load the classes and create the new objects

require_once('includes/database_class.php');
require_once('includes/jsonrpcclient.php');
require_once('includes/core_class.php');
$database = new Database();
$core = new Core();
// Validate the post data
if($core->validate_post($_POST) == true)
{
$btc_conn_url = ((isset($_POST['ssl']) && $_POST['ssl'] == '1') ? 'https://' 'http://').$_POST['btc_username'].':'.$_POST['btc_password'].'@'.$_POST['btc_ip'].':'.$_POST['btc_port'].'/';
$bitcoin = new Jsonrpcclient(array('url' => $btc_conn_url));

$data $_POST;
$data['encryption_key'] = $core->random_key_string();

// First create the database, then create tables, then write config file
if ($bitcoin == NULL || $bitcoin->getinfo() == NULL) {
$message "Unable to make connection to the bitcoin daemon. Is it running? Are your settings correct?";
 
} else if($database->create_database($data) == false) {
$message $core->show_message('error',"The database could not be created, please verify your settings.");

} else if ($database->create_tables($data) == false) {
$message $core->show_message('error',"The database tables could not be created, please verify your settings.");

} else if ($core->write_database_config($data) == false) {
$message $core->show_message('error',"The database configuration file covuld not be written, please chmod application/config/database.php file to 777");

} else if ($database->add_config_entries($data) == false) {
$message $core->show_message('error','error db config');
} else if ($core->write_config_config($data) == false) {
$message $core->show_message('error',"Unable to write config.");

} else if ($core->write_bitcoin_config($data) == false) {
$message $core->show_message('error',"The bitcoin configuration file could not be written, please chmod application/config/bitcoin.php file to 777");
}
// If no errors, redirect to registration page
if(!isset($message)) {
$redir = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" "http");
$redir .= "://".$_SERVER['HTTP_HOST'];
$redir .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
$redir .= '?end';
    header'Location: ' $redir '' ) ;
}
}
else {
$message $core->show_message('error','Not all fields have been filled in correctly. ');
}
}
 if(isset($message)) {echo '$message '

'
;} 
?>


 
echo $_SERVER['PHP_SELF']; ?>?start">

          Database settings

          

          


          

          


          

          


          

          

        

        


        

          Bitcoin settings

          

          


          

          


          

          


          

          

          Select if bitcoind is using SSL

          
        


          Bitwasp Configuration

          

          This password is for the 'admin' account, the default account with administrative powers - make it a good one. This account is required.
          



          

          This is used to create determinstic addresses without needed private keys on the server. This MPK will receive fee's from orders and registrations, and will also be used to create public keys for multi-signature order addresses.
          





 

 If you would like to remove index.php from your URL's, select Yes. For this setting to work you must copy htaccess.sample to .htaccess, and make the following change:

    Yes
No




 

 This will ask your users to enter a password before viewing or sending a message, but if enabled they will encrypted with RSA.

Yes
No



 If you choose to enable this option, provide a password to protect your message keys:
   


 
 

 Turning this setting on will force users to register and login before they can see items.

    Yes
No




 

 Turning this setting on will force vendors to upload a PGP public key, which will allow for client-side encryption of messages, for ultimate privacy.

    Yes
No



 
        


          
 


 } } ?>





Şimdiden teşekkür ediyorum.
Jump to: