TYPO3 v9 using Microsoft SQL Server 2016 - typo3

PHP 7.3
pdo_sqlserver_73_nts (installed)
sqlserver_73_nts (installed)
I'm trying to connect a new install of TYPO3 (v9.5.7) to an instance of SQL Server 2016 running on the same box.
I'm able to establish a connection to the database, using the example from php.net: https://www.php.net/manual/en/function.sqlsrv-connect.php so I'm confident the server is accessible.
A similar question has been asked for v8 here Install TYPO3 8.7.7 with SQL Server on IIS and it's recommend that you ammend the DB settings in LocalConfiguration when the installer is at stage 2 and essentially "trick" the installer to connect to SQL Server.
I've done that and for some reason it won't connect,
'DB' => [
'Connections' => [
'Default' => [
'charset' => 'utf-8',
'dbname' => 'typo3_db',
'driver' => 'sqlsrv',
'host' => 'localhost',
'password' => 'password',
'port' => 1433,
'user' => 'username',
],
],
],
Is there anything wrong with this connection string? I can't seem to find any other working example.
Thanks as always,

i had the same problem.
Try to set the full name of your mssql server:
'host' => 'COMPUTERNAME/DBNAME',

Related

Php PEAR and outlook.office365.com imap

I am trying to connect to outlook application of office365 using the php PEAR framework. Below are the details of imap
IMAP Host: outlook.office365.com
IMAP Port: 993
Encryption: SSL
IMAP Username: (my Office365 username)
IMAP Password: (my Office365 password)
But i am unable to establish connection to it. Firewall for the port 993 is already opened from the server i am trying. Can someone help me where i am going wrong.
Error:
(
[0] => Array
(
[code] => 1
[params] =>
[package] => Mail_IMAPv2
[level] => error
[time] => 1543397738.02
[context] => Array
(
[file] => /app/lib/PEAR/Mail/IMAPv2.php
[line] => 713
[function] => connect
[class] => Mail_IMAPv2
)
[message] => Unable to build a connection to the specified mail server.
)
)
Our old Imap connection looks like this
imap://{$user}:{$pass}#hostname:port/{$Folder}#notls
We have replaced this format using php inbuilt function
imap_open("{hostname:port/imap/ssl/novalidate-cert/authuser=$user/user=$user}", $user ,$pass);
It is working for us now.

Yii Database connection error

I am using an application in Yii and Postgres database. When I run the application on live server(not local system) I am getting this error
CDbConnection failed to open the DB connection: SQLSTATE[08006] [7] could not connect to server: No buffer space available (0x00002747/10055) Is the server running on host "localhost" and accepting TCP/IP connections on port 5432?"
When I contact with server support team they told to close the db connection after each transaction. I would like to know how to close database connection after each transaction in yii with PostgreSQL?
This is my database connection code in main.php
'db'=>array( 'class'=>'CDbConnection', 'connectionString' => 'pgsql:host=localhost;port=5432;dbname=crescent_6', 'emulatePrepare' => true, 'username' => 'postgres', 'password' => 'root', 'charset' => 'utf8', ), 'cache' => array ( 'class' => 'system.caching.CDbCache', ),

no access to proxy resurces(DB, LDAP)

I'm working on jee app. At home I'm using proxy to access company DB and LDAP servers. At work my config works fine but when i want to develop at home wildfly don't have access to proxied resources.
I can connect to DB using pgAdmin at home(the same situation is with LDAP), so i this is clearly widfly limitation.
Do you know what could be a problem? I have no idea why using DB client i have access but widfly got exception(i'm using the same url).
Unexpected HTTP response: 500
Request {
"address" => [
("subsystem" => "datasources"),
("data-source" => "mmDS")
],
"operation" => "test-connection-in-pool" }
Response
Internal Server Error {
"outcome" => "failed",
"failure-description" => "JBAS010440: failed to invoke operation: JBAS010447: Connection is not valid",
"rolled-back" => true }

With email parameter , which ends with dot com, can't get Result from Restful Web Service by using Perl LWP

I want to use perl with Module LWP to get the XML info from Restful Webservice.
Here is the Code:
my $ua = LWP::UserAgent->new;
$ua->proxy(['http','https'],'http://proxy:3128');
$ua->default_header('Accept-Charset'=>'utf-8');
$ua->default_header('Accept'=>'application/*********; version=1');
my $url= 'https://user:password#mailbox.********.net/mailboxes/?emailaddress=name#domain.net';
print Dumper($ua->get($url));
It works always good for all the email address like .eu, .org or .net, except for the email address ends with .com. (For example: name#domail.com)
The error message is:
The following error was encountered while trying to retrieve the URL:
https://user#mailbox.******.net/mailboxes/?
Access Denied.
Access control configuration prevents your request from being allowed at this time.
Please contact your service provider if you feel this is incorrect.
Your cache administrator is *****#**.**
The corresponded Response HEAD:
'_headers' => bless( {
'connection' => 'close',
'client-response-num' => 1,
'date' => 'Wed, 19 Nov 2014 15:53:45 GMT',
'x-squid-error' => 'ERR_ACCESS_DENIED 0',
'client-peer' => '****:3128',
'content-length' => '3502',
'client-date' => 'Wed, 19 Nov 2014 15:53:45 GMT',
'content-type' => 'text/html',
'mime-version' => '1.0',
'title' => 'ERROR: The requested URL could not be retrieved',
'server' => 'squid/3.1.12',
'x-cache' => 'MISS from proxy',
'x-cache-lookup' => 'NONE from proxy:3128'
}, 'HTTP::Headers' ),
I have tested with SoapUI and curl, they didn't meet this problem. That means .com works also with SoapUI and cuil. Only in perl with LWP, it gets problem.
Anyway when I added a dummy parameter like
https://**/mailboxes/?emailaddress=name#domain.com&foo=bar at the end of the link, it works.
I have no idea, if it's a bug in LWP or maybe some incompatible issue between LWP and Proxy Setting.
Access Denied.
Access control configuration prevents your request from being allowed at this time.
Please contact your service provider if you feel this is incorrect.
...
'x-squid-error' => 'ERR_ACCESS_DENIED 0',
There is an ACL in the proxy you use which denies your request.
If you have access to the proxy configuration check there, otherwise contact you cache administrator with your problem.

How to send email with Zend FrameWork 2 and Hostgator

I've got a code I made myself for sending email using Zend Framework2 via gmail SMTP, my code works flawlessly in local host and in some free hosting sites but when running from Hostgator I get this:
File: vendor/zendframework/zendframework/library/Zend/Mail/Protocol/AbstractProtocol.php:225
Message: Connection refused
This is my Code:
use Zend\Mail\Transport\SmtpOptions;
use Zend\Mail\Message;
use Zend\Mail\Transport\Smtp;
$options = new SmtpOptions(array(
'name' => 'Gmail.com',
'host' => 'smtp.gmail.com',
'port'=> 587,
'connection_class' => 'login',
'connection_config' => array(
'username' => 'user#gmail.com',
'password' => 'password',
'ssl'=> 'tls',
),
));
$message = new Message();
$message->addTo('him#gmail.com')
->addFrom('user#gmail.com')
->setEncoding("UTF-8")
->setSubject('test')
->setBody('test');
$transport = new Smtp();
$transport->setOptions($options);
$transport->send($message);
I contacted Hostgator support and they solved my problem, the thing is hostgator servers does not allow smtp relay, so you just have to use an email account that exists within the hostgator server (one created for your domain I suggest). And thats all the problem was about :)