Problem installing RosCMS on Server.

Suggestions and comments about the ReactOS website

Moderator: Moderator Team

Post Reply

Do you have any ReactOS content on your server?

Yes
4
50%
No
1
13%
It is not http-based, but yes
0
No votes
I have no server
3
38%
 
Total votes: 8

Reacter
Posts: 326
Joined: Tue Feb 06, 2007 9:57 pm
Location: Tornado Alley

Problem installing RosCMS on Server.

Post by Reacter »

I have a small ReactOS fansite set up, just some news/crap for ROS I made, but it is starting to get annoying trying to make each page look the same, like RosCMS does... Trying to install RosCMS, I ran into a small snag: When ever localhost and 127.0.0.1 is the hostname for RosCMS, MySQL can be accessed. If any other hostname is used, including the static IP my router forwards to, RosCMS will not work, and I have no real "domain name" yet, so that won't work either. Naturally, If someone accesses RosCMS on my server that is not on the server, RosCMS tries to connect to a database on their system. Does anyone have a way around this?
More ReactOS, please!
frik85
Developer
Posts: 829
Joined: Fri Nov 26, 2004 7:48 pm
Location: Austria, Europe
Contact:

Post by frik85 »

The "localhost" or IP-address is only used for the mysql database login, check out the "connect.db.php" file in the roscms dir:

http://php.net/mysql_connect
http://php.net/mysql_connect wrote:server
The MySQL server. It can also include a port number. e.g. "hostname:port" or a path to a local socket e.g. ":/path/to/socket" for the localhost.

If the PHP directive mysql.default_host is undefined (default), then the default value is 'localhost:3306'. In SQL safe mode, this parameter is ignored and value 'localhost:3306' is always used.
Hostname examples:
* in most cases it is: 'localhost'
* connect to example.com and port 3307: 'example.com:3307'
* connect to localhost at port 3307: '127.0.0.1:3307'
* connect to localhost and socket e.g. /tmp/mysql.sock: '/tmp/mysql'
* or: 'localhost:/tmp/mysql.sock'
Note: Whenever you specify "localhost" or "localhost:port" as server, the MySQL client library will override this and try to connect to a local socket (named pipe on Windows). If you want to use TCP/IP, use "127.0.0.1" instead of "localhost". If the MySQL client library tries to connect to the wrong local socket, you should set the correct path as mysql.default_host string in your PHP configuration and leave the server field blank.
Reacter
Posts: 326
Joined: Tue Feb 06, 2007 9:57 pm
Location: Tornado Alley

Post by Reacter »

Thanks, you redirected my attention, and RosCMS works now. Thanks!
More ReactOS, please!
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests