Click to See Complete Forum and Search --> : Problems with MySQL connect script and SSL
peteyb
04-10-2006, 06:03 AM
I am having problems with mysql_connect script when i implement SSL on my website.
the script works fine and submits the data when SSL is not implemented.
is this a common problem? does anyone have any suggestions?
chazzy
04-10-2006, 07:44 AM
show us how you are trying to connect when in SSL and when not in SSL... was mysql configured for ssl connection? is it on the same server as the web server or not? was a root certificate installed?
peteyb
04-10-2006, 09:45 AM
the guy from the host company isnt avaible til tomorrow but i believe
a) mysql is configured for SSL
b) unsure about the location but the site i upload to is www.tigltd.com and the SSL site is www1.securesiteserver.co.uk.
c) by root certificate is GTE CyberTrust Global Root acceptable?
my code is:
<?php
// This file contains the database access information.
// This file also establishes a connection to MySQL and selects the database.
// Set the database access information as constants.
DEFINE ('DB_USER', 'username');
DEFINE ('DB_PASSWORD', 'password');
DEFINE ('DB_HOST', 'www.tigltd.com');
DEFINE ('DB_NAME', 'sitename');
// Make the connnection.
$dbc = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() );
// Select the database.
@mysql_select_db (DB_NAME) OR die ('Could not select the database: ' . mysql_error() );
?>
chazzy
04-10-2006, 10:32 AM
and what error message comes back? that it couldn't connect?
peteyb
04-10-2006, 11:21 AM
it display the cannot find server page , please refresh.
i cant remember what i did exactly but one time it said cannot pass through '/tmp/sock.tmp' (2)
what does this mean?
chazzy
04-10-2006, 12:26 PM
it means that SSL was not configured properly. can't identify your database connectivity issues until you know that the SSL is working properly. Also, your host isn't merely the server name, you need to pass it a port too, typically. so it would be yourdoamin.com:port# (by default 3306, i think it's supposed to change w/ SSL.)
peteyb
04-10-2006, 02:57 PM
ok, i will speak to the guy tomorrow and see what he says.
is there any specific questions you could suggest that i need to ask to find a resolution?
peteyb
04-11-2006, 04:36 AM
the SSL works fine on all the pages that do not require the MySQL connect script.
peteyb
04-11-2006, 06:26 AM
ive just went onto the help section on the host company and have located the problem.
the server name was incorrect as we use a shared SSL