I have problem with Owncloud. After creating a new user, email sended to that user was with private IP address, not with domain name. Example verification link:
http://192.168.3.103:4490/index.php/index.php/settings/users/setpassword/form/728851077702434409735/some.username
I would like to repair that. It need to be in format
https://cloud.mydomain.pl:4490/index.php/index.php/settings/users/setpassword/form/728851077702434409735/some.username
Owncloud config below
$CONFIG = array (
'instanceid' => 'xxx',
'passwordsalt' => 'xxx',
'secret' => 'xxx',
'trusted_domains' =>
array (
1 => 'mydomain',
2 => 'cloud',
3 => 'https://cloud.mydomain.pl:44900',
4 => '192.168.3.103:4490',
),
'datadirectory' => '/var/www/html/data',
'overwrite.cli.url' => 'https://cloud.mydomain.pl:44900',
'overwritecondaddr' => '^192\\.168\\.3\\.103$',
'dbtype' => 'sqlite3',
'version' => '10.6.0.0',
'logtimezone' => 'UTC',
'installed' => true,
'loglevel' => 0,
// LOGGING
// "log_type" => "owncloud",
// "logfile" => "owncloud.log",
// "loglevel" => "0",
// "logdateformat" => "F d, Y H:i:s",
// "mail_smtpdebug" => true;
'maintenance' => false,
'theme' => '',
'mail_domain' => 'mydomain.pl',
'mail_from_address' => 'admin',
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'ssl',
'mail_smtpauth' => 1,
'mail_smtpauthtype' => 'LOGIN',
'mail_smtphost' => 'mydomain.pl',
'mail_smtpport' => '465',
'mail_smtpname' => 'admin#mydomain.pl',
'mail_smtppassword' => 'xxx',
);
Right after 'overwrite.cli.url' add:
'overwritehost' => 'cloud.mydomain.pl',
Related
All data in array like this
<?php
$sub_arr = array();
$sub_arr[] = array(
'sr_nm' => 1,
'recept_number' => 3019,
'adm_number' => 3434,
'student_name' => 'amit',
'class' => 'LKG',
'pay' => 'online',
'cheq_nm' => '',
'adm_fee' => '',
'consolidated' => '',
'sec.fee' => '',
'dev.charge' => 5000,
'school_fee' => 1300,
'subling' => '-3400',
'transport' => 2300,
'late_fee' =>'total' => 35006
);
$sub_arr[] = array('sr_nm' => 1,
'recept_number' => 3019,
'adm_number' => 3434,
'student_name' => 'amit',
'class' => 'LKG',
'pay' => 'online',
'cheq_nm' => '',
'adm_fee' => '',
'consolidated' => '',
'sec.fee' => '',
'dev.charge' => 5000,
'school_fee' => 1300,
'subling' => '-3400',
'transport' => 2300,
'late_fee' => '',
'total' => 35006
);
And my excel file:
I want to insert new data from A4 shell after loading the file.
when I add multiple solr server as endpoint and using a single solarium client to fire query on any solr server;
I add replication master/slave to solr. for now I taste when the server for onecore(master or slave) is failed the client/solarium must use the available endpoint.
I get this ERROR:
Message: Solr HTTP error: HTTP request failed, Failed connect to 127.0.0.1:8983; No error
because i stop solr in port 8983 and solr is running at slave core in port 9000, in this case iam looking for to connect to localhost2 if localhost is not running.
This is my code:
$config = array(
"endpoint" => array("localhost" => array("host"=>"127.0.0.1",
"port"=>"8983", "path"=>"/solr", "core"=>"master",),
"localhost2" => array("host"=>"127.0.0.1",
"port"=>"9000", "path"=>"/solr", "core"=>"slave",)
) );
$client = new Solarium\Client($config);
$ping = $client->createPing();
$client->ping($ping,"localhost2");
$client->getEndpoints();
when the key localhost is not running and the key localhost2 is runing in port 9000 i get this Message
Solr HTTP error: HTTP request failed, Failed connect to 127.0.0.1:8983; No error
ANd the output of $client->getEndpoints();
object(Solarium\Client) {
[protected] options => array(
'adapter' => 'Solarium\Core\Client\Adapter\Curl',
'endpoint' => array(
'localhost' => array(
'host' => '*****',
'port' => '*****',
'path' => '/solr',
'core' => 'master'
),
'localhost2' => array(
'host' => '*****',
'port' => '*****',
'path' => '/solr',
'core' => 'slave'
)
)
)
[protected] queryTypes => array(
'select' => 'Solarium\QueryType\Select\Query\Query',
'update' => 'Solarium\QueryType\Update\Query\Query',
'ping' => 'Solarium\QueryType\Ping\Query',
'mlt' => 'Solarium\QueryType\MoreLikeThis\Query',
'analysis-document' => 'Solarium\QueryType\Analysis\Query\Document',
'analysis-field' => 'Solarium\QueryType\Analysis\Query\Field',
'terms' => 'Solarium\QueryType\Terms\Query',
'suggester' => 'Solarium\QueryType\Suggester\Query',
'extract' => 'Solarium\QueryType\Extract\Query',
'get' => 'Solarium\QueryType\RealtimeGet\Query'
)
[protected] pluginTypes => array(
'loadbalancer' => 'Solarium\Plugin\Loadbalancer\Loadbalancer',
'postbigrequest' => 'Solarium\Plugin\PostBigRequest',
'customizerequest' => 'Solarium\Plugin\CustomizeRequest\CustomizeRequest',
'parallelexecution' => 'Solarium\Plugin\ParallelExecution\ParallelExecution',
'bufferedadd' => 'Solarium\Plugin\BufferedAdd\BufferedAdd',
'prefetchiterator' => 'Solarium\Plugin\PrefetchIterator',
'minimumscorefilter' => 'Solarium\Plugin\MinimumScoreFilter\MinimumScoreFilter'
)
[protected] eventDispatcher => object(Symfony\Component\EventDispatcher\EventDispatcher) {
[private] listeners => array()
[private] sorted => array()
}
[protected] pluginInstances => array()
[protected] endpoints => array(
'localhost' => object(Solarium\Core\Client\Endpoint) {
[protected] options => array(
'host' => '*****',
'port' => '*****',
'scheme' => 'http',
'path' => '/solr',
'core' => 'master',
'timeout' => (int) 5,
'key' => 'localhost'
)
},
'localhost2' => object(Solarium\Core\Client\Endpoint) {
[protected] options => array(
'host' => '*****',
'port' => '*****',
'scheme' => 'http',
'path' => '/solr',
'core' => 'slave',
'timeout' => (int) 5,
'key' => 'localhost2'
)
}
)
[protected] defaultEndpoint => 'localhost'
[protected] adapter => null
}
This is how I manage to toggle between 'endpoints':
$endpoints=[
'endpoint' => [
'foo' => [
'host' => '127.0.0.1',
'port' => '9000',
'path' => 'foo',
'core' => 'foo',
'timeout' => 15
],
'baz' => [
'host' => '127.0.0.1',
'port' => '7464',
'path' => 'baz',
'core' => 'baz',
'timeout' => 15
],
]
];
$solrClient = new Solarium\Client($config);
$solrClient->setDefaultEndPoint('baz');
And the function setDefaultEndPoint will do the magic
setDefaultEndPoint
`
This is used to make multiple solr connection in PHP frameworks.
To add the below code in your config folder
<?php
$config['endpoint1'] = array( // endpoint1 is a FIRST connection.
'endpoint' => array(
'localhost' => array(
'host' => 'host_name', // localhost or www.host.com
'port' => 'port_value', //Default 8983 or 8080 etc,
'path' => '/solr/',
'core' => 'solr_core_name' // core1 or movie1 or etc,
)
)
);
$config['endpoint2'] = array( // endpoint2 is a secound connection.
'endpoint' => array(
'localhost' => array(
'host' => 'host_name', // localhost or www.host.com
'port' => 'port_value', //Default 8983 or 8080 etc,
'path' => '/solr/',
'core' => 'solr_core_name' // core1 or movie1 or etc,
)
)
);
?>
And add connection link in __construct() method
public function __construct() {
parent::__construct();
$this->config->load('solarium');
$this->endpoint1 = new Solarium\Client($this->config->item('endpoint1'));
$this->endpoint2 = new Solarium\Client($this->config->item('endpoint2'));
}
If any doubt to setup solr and thier connection refer to this Github repository.
When i try to send this request then i get error "id: 0 500 Internal Server Error - SoapFault".
My request:
$client = new SoapClient( 'xxx', array('trace' => 1));
$client -> soap_defencoding = 'utf-8';
$client -> decode_utf8 = FALSE;
$a = array( 'user_name' => 'xx', 'user_password' => 'xx' );
$response = $client->__soapCall( 'adeLogin', $a );
$session = get_object_vars($response)['session'];
$aCPrep = array(
'rname1' => 'Pan',
'rname2' => 'Jan',
'rname3' => 'test',
'rcountry' => 'PL',
'rzipcode' => '00-950',
'rcity' => 'Warszawa',
'rstreet' => 'ul. Kwieciska 15',
'quantity' => '1',
'rphone' => '1500-100-900',
'rcontact' => 'Antoni',
'weight' => '100',
'date' => '2012-01-01',
'references' => 'by WebAPI ',
'notes' => 'by Thomi (thest 4)',
'srv_ade' => 'asd',
'pfc' => 'Magazyn',
'sendaddr' => array( 'name1' => 'Firma z Francji', 'name2' => 'firma', 'name3' => 'firma2','country' => 'FR', 'zipcode' => '14117', 'city' => 'Arromanches', 'street' => 'Pl. du Six Juin 1944' ),
'srv_daw' => array( 'name' => '','building' => '','floor' => '','room' => '','phone' => '','altrec' => ''),
'srv_ident' => array( 'name' => '','country' => '','zipcode' => '','city' => '','street' => '','nation' => '','date_birth' => '','identity' => '','ident_doctype' => '','spages' => '','ssign' => '','sdealsend' => '','sdealrec' => ''),
'srv_ppe' => array( 'sname1' => '','sname2' => '','sname3' => '','scountry' => '','szipcode' => '','scity' => '','sstreet' => '','sphone' => '','scontact' => '','rname1' => '','rname2' => '','rname3' => '','rcountry' => '','rzipcode' => '','rcity' => '','rstreet' => '','rphone' => '','rcontact' => '','references' => '','weight' => ''),
'srv_bool' => array( 'cod' => '1', 'cod_amount' => '200', 'exw' => '0', 'rod' => '0', 'pod' => '0', 'exc' => '0','ident' => '0','daw' => '0','ps' => '0','pr' => '0','s10' => '0','s12' => '0','sat' => '0','ow' => '0','srs' => '0',),
'parcels' => array( '0' => array( 'weight' => '15', 'reference' => 'paczka duza','number' => '','srv_ade' => '', 'srv_bool' => array( 'cod' => '1', 'cod_amount' => '200', 'exw' => '0', 'rod' => '0', 'pod' => '0', 'exc' => '0','ident' => '0','daw' => '0','ps' => '0','pr' => '0','s10' => '0','s12' => '0','sat' => '0','ow' => '0','srs' => '0')))
);
$aCMsg = array( 'session' => $session, 'consign_prep_data' => $aCPrep );
$aClient = $client->__soapCall( 'adePreparingBox_Insert', $aCMsg );
It is error from my soap server or from symfony ? Anybody know what is wrong ?
How can i show the XML ?
it's response from SOAP server
Try
echo "REQUEST:\n".$client->__getLastRequest()."\n";
echo "RESPONSE:\n".$client->__getLastResponse()."\n";
In my program,I called getParams() method,but only got 10 parameters.In my main.php configuration file,there is more,why?
Here is the params part of the main.php
'params'=>array(
'adminEmail'=>'webmaster#example.com',
'AccountDB' => 'db_account_dev',
'orderDB' => 'db_order_dev',
'staticPath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR,
'commonDB' => 'db_common',
'payDB' => 'db_pay_dev',
'crmDB' => 'db_crm_dev',
'queue' => array(
'email' => array(
array(
'host' => '127.0.0.1',
'port' => 11300,
),
),
'sms' => array(
array(
'host' => '127.0.0.1',
'port' => 11330,
),
),
'sale_record' => array(
array(
'host' => '192.168.0.201',
'port' => 11300,
),
),
),
'discuz' => array(
'DBName' => 'db_ultrax',
'TablePrefix' => 'pre_',
'authKey' => '00fefan5JEvKdiEQ',
),
'freight' => require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'freight.php'),
'allowCheckTaskSubId' => 224,
'allowCheckEmail' => 242,
'allowCheckPass' => 243,
'codFee' => 10,
'cancelFee' => 10,
)
However,the method only returns some items
adminEmail=>webmaster#example.com
orderDB=>db_order_dev
payDB=>db_pay
AccountDB=>db_account
commonDB=>db_common
freight=>Array
codFee=>10
saleRoleId=>9
saleManager=>11
growth=>Array
I have got the answer.
The configuration file of console application is protected/config/console.php
while the configuration file of web application is protected/config/main.php
They are different!
The above codes from a console application
I am working on a project which is auction site and it is actually
clone of www.swoop.com.
This clone is developed on CakePHP platform and I have a issues there.
I purchase that script from http://www.moneymakersnetwork.info/products/Swoopo-Clone-PHP-Script.html and there is a demo: http://demo.bidscout.net (username: demo, password: password1).
In that cms there is FCKEditor integrated and it is not working. It is
gives me that following error message:
The requested URL /js/fckeditor/editor/fckeditor.html was not found on
this server.
Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.
And if I add new category it is come to a drop down list box and those
links are broken.
Ok, my host is like this: http://demosite.org/mysite/.
App and webroot folders are located in http://demosite.org/mysite/app and http://demosite.org/mysite/app/webroot.
I have a cofig.php file and it is look like this (http://demosite.org/mysite/app/config):
<?php
$config = array(
'Database' => array(
'driver' => 'mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'myuser',
'password' => 'mypassword',
'database' => 'mydb',
'prefix' => ''
),
'App' => array(
'encoding' => 'UTF-8',
'baseUrl' => '',
'base' => '',
'dir' => 'app',
'webroot' => 'webroot',
'name' => 'mysite',
'url' => 'http://demo.org/mysite/',
'timezone' => 'Asia/Jakarta',
'language' => 'en',
'email' => 'test#demo.com',
'theme' => 'ddbids',
'currency' => 'USD',
'pageLimit' => 100,
'bidHistoryLimit' => 10,
'remember_me' => '+30 days',
'auctionUpdateFrequency' => 1,
'timeSyncFrequency' => 9,
'gateway' => true,
'demoMode' => false,
'noAutobids' => false,
'cronTime' => 1,
'Image' => array(
'thumb_width' => 100,
'thumb_height' => 100,
'max_width' => 340,
'max_height' => 230
),
'Dob' => array(
'year_min' => date('Y') - 100,
'year_max' => date('Y') - 17
)
),
'Paypal' => array(
'url' => 'https://www.paypal.com/cgi-bin/webscr',
'email' => '',
'lc' => 'GB'
),
'Email' => array(
'delivery' => 'smtp',
'sendAs' => 'both',
'host' => 'localhost',
'port' => 25,
'timeout' => 60,
'username' => '',
'password' => ''
),
'Cache' => array(
//'disable' => true,
'check' => false,
'time' => '' // relative time such as +1 day, +2 months, +3 minutes
),
'debug' => 1
);
?>
I am very new to the CakePHP. Please help me.
Your problem is that (probably) the links are hard coded and expect your site to be at:
http://demosite.org/ instead of http://demosite.org/mysite/
this way your /js/fckeditor/editor/fckeditor.html can be found.
At least that's how it sounds to me this problem.
Just try this.
put the whole FCK folder in js FOLDER of in APP ie., APP/webroot/js/Editor