Trouble converting B4AServer from sample board server to local PC

boastrike

Member
Licensed User
Longtime User
I am working on switching my code from using the B4A test server for the board server to my own PC. I am running into issues replacing the sample URL with my local IP (See code below). If I put 172.16.xx.xx in place of b4aserver.basic4ppc.com, I get URL not found. If I use 'localhost' I get connection refused.

When I run the sample as it is, it works fine! :)

Do I need to have a PHP Service like XAMPP running (hasn't helped so far but may not be setting it up correctly) or am I just not referencing my PC properly?

I have installed MySQL and have created an empty database to configure the b4a_server.php parameters if I can get that far.

Any help would be appreciated!

B4X:
If FirstTime Then
      'B4AServer.Initialize("http://b4aserver.basic4ppc.com/b4a_server.php", ServerName, "Main")
      B4AServer.Initialize("http://172.16.xx.xx/b4a_server.php", ServerName, "Main")
   End If

B4X:
If FirstTime Then
      'B4AServer.Initialize("http://b4aserver.basic4ppc.com/b4a_server.php", ServerName, "Main")
      B4AServer.Initialize("http://localhost/b4a_server.php", ServerName, "Main")
   End If

B4X:
$databasehost = "localhost";
$databasename = "B4AServerDB";
$databaseusername ="root";
$databasepassword = "xxxx";
 

boastrike

Member
Licensed User
Longtime User
I am wondering if part of my problem is using DHCP on my pc. Do I have to assign it a static IP to make it work as a server to test with?

Thanks, boa
 
Upvote 0

boastrike

Member
Licensed User
Longtime User
Erel,

Thanks for responding. Can the board server run on that same desktop that you are developing and testing on? Thanks, boa
 
Upvote 0
Top