I can connect remotely to Xampp page and static but not wp

Problems with the Windows version of XAMPP, questions, comments, and anything related.

I can connect remotely to Xampp page and static but not wp

Postby luctroo » 24. August 2015 20:29

Hello,

My problem is connecting to my wordpress multisite from remote

I can successfully connect remotely to default Xampp page, and other static sites (folders) located inside htdocs.

What do I need to do to be able to connect to database driven website, remotely in the same way?



I am running Win 10.
64 bit
xampp installed on
P:\xampp

My wp-config.php file
--------------------------------
define('DB_NAME', 'cfm');

/** MySQL database username */
define('DB_USER', 'root');

/** MySQL database password */
define('DB_PASSWORD', 'password');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8mb4');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

------------------------------

/* Multisite */
//define( 'WP_ALLOW_MULTISITE', true );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'localhost');
define('PATH_CURRENT_SITE', '/cfm');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

Thank you for your help.
luctroo
 
Posts: 4
Joined: 24. August 2015 19:57
Operating System: windows 10

Re: I can connect remotely to Xampp page and static but not

Postby Altrea » 24. August 2015 20:30

luctroo wrote:define('DOMAIN_CURRENT_SITE', 'localhost');

What do you think does localhost mean from remote?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: I can connect remotely to Xampp page and static but not

Postby luctroo » 24. August 2015 20:34

ok. How do I fix this?
Can I have the site be both accessible locally and remotely at the same time?
I mean, If I change to something like my dyndns.com or my external ip, then my local site won't work, correct?

How do people deal with this?

Thank you.
luctroo
 
Posts: 4
Joined: 24. August 2015 19:57
Operating System: windows 10

Re: I can connect remotely to Xampp page and static but not

Postby Nobbie » 24. August 2015 20:38

luctroo wrote:Can I have the site be both accessible locally and remotely at the same time?


Yes.

luctroo wrote:I mean, If I change to something like my dyndns.com or my external ip, then my local site won't work, correct?


No, It works anyway. But if you wanna have different DocumentRoots for localhost and the dyndns.com Domain, you need to configure VirtualHosts. See Apache Doc how to do.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: I can connect remotely to Xampp page and static but not

Postby luctroo » 24. August 2015 21:27

Ok.
I'm really confused.

I want to basically fix the reason why I can't connect to database remotely.

I'm using a dyndns address to connect like this. cfm.dyndns.com:8080/cfm

Am I suppose to use define('DB_HOST', 'cfm.dlinkddns.com:3306'); ?
luctroo
 
Posts: 4
Joined: 24. August 2015 19:57
Operating System: windows 10

Re: I can connect remotely to Xampp page and static but not

Postby Altrea » 24. August 2015 21:34

No, the database connect is independend of the HTTP request.
The DB_Host must be set dependend of the location the php script which tries to connect is saved.
So if the PHP script is at the same host as the database, than localhost is correct here.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: I can connect remotely to Xampp page and static but not

Postby luctroo » 24. August 2015 21:56

Hello Altrea,

I think you may have misunderstood me in my first message.

Then why can't I connect to database then?
luctroo
 
Posts: 4
Joined: 24. August 2015 19:57
Operating System: windows 10

Re: I can connect remotely to Xampp page and static but not

Postby Altrea » 24. August 2015 22:09

Then your first thread about accessing a database driven webapplication from a remote computer is absolutely misleading.

How do you try to connect to the database? And in which way is wordpress involved?
Where are your wordpress files and where is the database?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 111 guests