Skip to Content
It is currently June 21st, 2018, 8:09 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: October 21st, 2008, 1:27 pm 
Offline
New User
New User

Joined: October 21st, 2008, 12:58 pm
Posts: 4
Hello everybody!

1st, sorry for my English, I normally speak French....

I have spend long hours and night on the forum, but I need your help!

So here is what's happend:
1) SAM is installed with MySql on a PC at place "ABC"; database is on this PC.
2) we create a website for the radio and would like to include on a part of it samPHPweb; website is hosted at place "XYZ".

Port check is done as following:
Incoming port 80 at XYZ = OK
Outgoing port 3306 at XYZ = OK
Outgoing port 1221 at XYZ = no - hoster wan't to open it for hack reason!
Incoming port 3306 at ABC = OK
Incoming port 1221 at ABC = OK

SAMBC.core.xml file at ABC:
<CONFIG application="SAM" version="4.3.6">
<Database>
<Driver>MYSQL</Driver>
<Host>localhost</Host>
<Port>3306</Port>
<Database>SAMDB</Database>
<Username>xxuserxxx</Username>
<Password>xxpassxxx</Password>
<ServerMode>LOCAL</ServerMode>
</Database>

dbconfig.xml.php file at XYZ:
<?/*
<CONFIG application="SAM" version="4.3.2">
<Database>
<Driver>MYSQL</Driver>
<Host>84.72.205.202</Host>
<Port>3306</Port>
<Database>SAMDB</Database>
<Username>xxuserxxx</Username>
<Password>xxpassxxx</Password>
<ServerMode>LOCAL</ServerMode>
</Database>
</CONFIG>

*/?>

config.php file at XYZ:
<?php

/* ## ======================================== ## */
$commonpath = "./common";

//Station general details
$station = "xxxRadioxxx";
$email = "info@xxx";
$logo = "images/logo.gif";

$stationid = 0; //The ID of your registered station on AudioRealm.com
$sam["host"] = "84.72.205.202"; //The IP address of the machine SAM is running on (DO NOT use a local IP address like 127.0.0.1 or 192.x.x.x)
$sam["port"] = "1221"; //The port SAM handles HTTP requests on. Usually 1221.


//General options
$privaterequests = true; //If False, AudioRealm.com will handle the requests
$showtoprequests = true; //Must we show the top 10 requests on the now playing page?
$requestdays = 30; //Show the top10 requests for the last xx days

$showpic = true; //Must we show pictures in now playing section?
$picture_dir = "pictures/"; //Directory where all your album pictures are stored
$picture_na = $picture_dir."na.gif"; //Use this picture if the song has no picture

//Row colors used
$darkrow = "#dadada";
$lightrow = "#F6F6F6";

/* ## ======================================== ## */

$metabasepath = "$commonpath/metabase";
require("$metabasepath/metabase_interface.php");
require("$metabasepath/metabase_database.php");

require_once("common/form.php");
require_once("common/db.php");
require_once("common/functions.php");

// Load EGPCS vars into globals (emulates register_globals = On in php.ini)
if (!empty($HTTP_ENV_VARS)) while(list($name, $value) = each($HTTP_ENV_VARS)) $$name = $value;
if (!empty($HTTP_GET_VARS)) while(list($name, $value) = each($HTTP_GET_VARS)) $$name = $value;
if (!empty($HTTP_POST_VARS)) while(list($name, $value) = each($HTTP_POST_VARS)) $$name = $value;
if (!empty($HTTP_COOKIE_VARS)) while(list($name, $value) = each($HTTP_COOKIE_VARS)) $$name = $value;
if (!empty($HTTP_SERVER_VARS)) while(list($name, $value) = each($HTTP_SERVER_VARS)) $$name = $value;


$db = new DBTable();

//Your REMOTE MySQL database login details
//IMPORTANT: This is the database login details for the database located on the WEBSERVER.
$db->ReadXMLConfig("dbconfig.xml.php");

//Your LOCAL MySQL database login details
//This is the login details the webserver will use to contact the local database on the SAM Broadcaster server.
//This is only used for making dedications from the request window.
//$db->ReadXMLConfig("samdb.xml.php");
$samlogin = $db->login; //In most cases the remote database will be the same as the local database.

//Finally connect to the database
$db->connect();
?>

Then the error is:
status=err
SQL error=Access denied for user 'xxuserxxx'@'80.74.147.207' to database 'samdb'

It's for me logical with the configuration on dbconfig.xml.php!
80.74.147.207 is the IP of the website host.
Database "samdb" is not on this!
So I think it could not be in <ServerMode>LOCAL</ServerMode>

But I don't understand which change (and where) I must do.....
I have try different thinks following different post on this forum, but nothing work...

Could you please help me?

Thank you in advance
Isabelle


Top
 Profile  
Reply with quote  
PostPosted: October 22nd, 2008, 6:34 am 
Offline
New User
New User

Joined: October 21st, 2008, 12:58 pm
Posts: 4
Hi everybody,

As I don't have any help for the moment, I continue to check possibilities....

Here is some more information:

Check is done on SAM PC > User Admin
Select - Insert - Update are "Apply".
MySQL was restarted

One more question
On MySQL Administraor (following your guide on http://www.scottgiles.com/sam/saminstructions/) at point 11. "Add Host":
The "WebServer's IP Address" is 1) the SAM PC at ABC or 2) website serveur at XYZ?

Nice to read somebody soon ;-)


Top
 Profile  
Reply with quote  
PostPosted: October 22nd, 2008, 8:03 am 
Offline
Junior User
Junior User

Joined: October 4th, 2008, 12:35 pm
Posts: 39
Location: Kaufbeuren, Germany
roseline wrote:
SQL error=Access denied for user 'xxuserxxx'@'80.74.147.207' to database 'samdb'


The mySQL at place »ABC« (your SAM PC) doesn’t allow the remote access from your web host (running samPHPweb). You have to add a remote user into your local mySQL so that your local mySQL will honour requests from your (samPHPweb) web site.

2nd post, »one more question«: The answer is (2).

Choose a secure password! Your mySQL is open to the world and there are a lot of script kiddies out there running »mySQL database hack scripts«—I sometimes have hundreds of attack attempts a day here.

Also, it’s perfectly enough for SAM use to GRANT only SELECT, INSERT and UPDATE rights to the new user you create. (In some rare cases, it might be needed to also GRANT DELETE rights.)

Hope that helps—good luck.

N.B.: You might still get problems if your hoster won’t allow outgoing traffic on port 1221. SamPHPweb simply needs to be able able to talk to both the mySQL and the SAM at location »ABC«. It’s easy and simple setting this up in a secure way. You might want to change your hoster.

Or come up with some »workaround«: You might ask your hoster for another port to use on the »XYZ« server for SAM access instead and have your local router do a »port forwarding« from said port to port 1221 on your local machine.

_________________
Moonbase: The Problem Solver
I will not give any support for unlicensed or pirated software.


Last edited by Moonbase on October 22nd, 2008, 8:26 am, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: October 22nd, 2008, 8:16 am 
Offline
New User
New User

Joined: October 21st, 2008, 12:58 pm
Posts: 4
Thank you Moonbase for your answer, I feel a little bit less stupid ;-)

I will try to add a new user and give you news asp!


Top
 Profile  
Reply with quote  
PostPosted: October 22nd, 2008, 1:05 pm 
Offline
New User
New User

Joined: October 21st, 2008, 12:58 pm
Posts: 4
Hi dear!

So, I have contact our hoster and he don't want to open the connection.

So I have do a quick test by putting the folder samPHPweb on an other website hosted somewhere else, and.... IT'S WORK !

Then I must buy a new hosting for the radio website and do the configuration on the machine running SAM !

Thank you very much for your help :P
Ich wünsche Dir ein schöne Nacht


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group