{"action":"created","issue":{"url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2352","labels_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2352/labels{/name}","comments_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2352/comments","events_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2352/events","html_url":"https://github.com/symphonycms/symphony-2/issues/2352","id":57574408,"number":2352,"title":"Server connection Issues with uncommon hostname","user":{"login":"twiro","id":870227,"avatar_url":"https://avatars.githubusercontent.com/u/870227?v=3","gravatar_id":"","url":"https://api.github.com/users/twiro","html_url":"https://github.com/twiro","followers_url":"https://api.github.com/users/twiro/followers","following_url":"https://api.github.com/users/twiro/following{/other_user}","gists_url":"https://api.github.com/users/twiro/gists{/gist_id}","starred_url":"https://api.github.com/users/twiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twiro/subscriptions","organizations_url":"https://api.github.com/users/twiro/orgs","repos_url":"https://api.github.com/users/twiro/repos","events_url":"https://api.github.com/users/twiro/events{/privacy}","received_events_url":"https://api.github.com/users/twiro/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-13T09:00:18Z","updated_at":"2015-02-20T15:28:44Z","closed_at":"2015-02-18T15:21:41Z","body":"I am currently setting up a symphony page on a **Strato**-server that has the following hostname for its database:\r\n\r\n    localhost:/tmp/mysql5.sock\r\n\r\nStrato is a quite popular hosting company in germany, so I guess others might have this issues too:\r\n\r\n**1. Problem: The installer doesn't accept this format**\r\nI worked around this by simply not using it and setting up a manually configured copy of the page.\r\n\r\n**2. Problem: I can't establish a working database connection with this format**\r\nTrying to access the page after configuring it manually throws the following error:\r\n\r\n    Warning: mysqli_connect(): (HY000/2002): Connection refused in .../symphony/lib/toolkit/class.mysql.php on line 315\r\n    Warning: mysqli_ping() expects parameter 1 to be mysqli, boolean given in .../symphony/lib/toolkit/class.mysql.php on line 260\r\n\r\nI solved this problem by setting the hostname as \"localhost\" and followed [this guide](http://blog.markusheisterberg.de/webdesign/1und1-server-und-mysqli/) in declaring the sockets separate in the **index.php**:\r\n\r\n    ini_set ( 'mysql.default_socket', '/tmp/mysql5.sock' );\r\n    ini_set ( 'mysqli.default_socket', '/tmp/mysql5.sock' );\r\n\r\nThat worked - though it felt hacky.\r\n\r\nI could establish a working database connection, everything seemed to work as expected and I nearly forgot about it... until a few days later I tried to use JIT and couldn't get a single image to show up - no matter what I tried, 500 Server Errors all around. I finally followed @brendo's advice in [this thread](http://www.getsymphony.com/discuss/thread/96848/1/) and changed the error-settings.\r\n\r\nTurned out to be the server connection again:\r\n\r\n    Warning: mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2) in .../symphony/lib/toolkit/class.mysql.php on line 315\r\n    Warning: mysqli_ping() expects parameter 1 to be mysqli, boolean given in .../symphony/lib/toolkit/class.mysql.php on line 260\r\n\r\nJIT doesn't seem to use the seetings in the **index.php**, so I included them in the **image.php**-file of the JIT-extension too.\r\n\r\nThat worked too - but felt even more hacky.\r\n\r\nSo I decided to post this as an official issue and ask for advice if there either already is a clean way to handle such uncommon hostnames or - if not - if symphony's database-setup could be updated to accept a hostname like this."},"comment":{"url":"https://api.github.com/repos/symphonycms/symphony-2/issues/comments/75256099","html_url":"https://github.com/symphonycms/symphony-2/issues/2352#issuecomment-75256099","issue_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2352","id":75256099,"user":{"login":"nitriques","id":771169,"avatar_url":"https://avatars.githubusercontent.com/u/771169?v=3","gravatar_id":"","url":"https://api.github.com/users/nitriques","html_url":"https://github.com/nitriques","followers_url":"https://api.github.com/users/nitriques/followers","following_url":"https://api.github.com/users/nitriques/following{/other_user}","gists_url":"https://api.github.com/users/nitriques/gists{/gist_id}","starred_url":"https://api.github.com/users/nitriques/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nitriques/subscriptions","organizations_url":"https://api.github.com/users/nitriques/orgs","repos_url":"https://api.github.com/users/nitriques/repos","events_url":"https://api.github.com/users/nitriques/events{/privacy}","received_events_url":"https://api.github.com/users/nitriques/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T15:28:43Z","updated_at":"2015-02-20T15:28:43Z","body":"> It doesn't look like the host supports a custom php.ini\r\n\r\nMost I am aware of do. That's sad :(."}}