note 118381 added to pdo.connections

From: Date: Wed, 25 Nov 2015 13:55:43 +0000
Subject: note 118381 added to pdo.connections
Groups: php.notes 
Request: Send a blank email to php-notes+get-204228@lists.php.net to get a copy of this message
As http://stackoverflow.com/questions/17630772/pdo-cannot-connect-remote-mysql-server points out; sometimes when you want to connect to an external server like this: <?php $conn = new PDO('mysql:host=123.4.5.6;dbname=test_db;port=3306','username','password'); ?> it will fail no matter what. However if you put a space between mysql: and host like this: <?php $conn = new PDO('mysql: host=123.4.5.6;dbname=test_db;port=3306','username','password'); ?> it will magically work. I'm not sure if this applies in all cases or server setups. But I think it's worth mentioning in the docs. ---- Server IP: 72.52.91.14 Probable Submitter: 2001:983:374c:1:315c:cc:6540:52f7 ---- Manual Page -- http://php.net/manual/en/pdo.connections.php Edit -- https://master.php.net/note/edit/118381 Del: integrated -- https://master.php.net/note/delete/118381/integrated Del: useless -- https://master.php.net/note/delete/118381/useless Del: bad code -- https://master.php.net/note/delete/118381/bad+code Del: spam -- https://master.php.net/note/delete/118381/spam Del: non-english -- https://master.php.net/note/delete/118381/non-english Del: in docs -- https://master.php.net/note/delete/118381/in+docs Del: other reasons-- https://master.php.net/note/delete/118381 Reject -- https://master.php.net/note/reject/118381 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#204228) next »