B boastrike Member Licensed User Longtime User Dec 22, 2011 #1 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! Code: Copy 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 Code: Copy 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 Code: Copy $databasehost = "localhost"; $databasename = "B4AServerDB"; $databaseusername ="root"; $databasepassword = "xxxx";
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! Code: Copy 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 Code: Copy 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 Code: Copy $databasehost = "localhost"; $databasename = "B4AServerDB"; $databaseusername ="root"; $databasepassword = "xxxx";
B boastrike Member Licensed User Longtime User Dec 23, 2011 #2 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
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
Erel B4X founder Staff member Licensed User Longtime User Dec 23, 2011 #3 The board service should run the PHP script and should be accessible from the device and the desktop. Upvote 0
The board service should run the PHP script and should be accessible from the device and the desktop.
B boastrike Member Licensed User Longtime User Dec 23, 2011 #4 Erel, Thanks for responding. Can the board server run on that same desktop that you are developing and testing on? Thanks, boa Upvote 0
Erel, Thanks for responding. Can the board server run on that same desktop that you are developing and testing on? Thanks, boa
Erel B4X founder Staff member Licensed User Longtime User Dec 25, 2011 #5 Thanks for responding. Can the board server run on that same desktop that you are developing and testing on? Thanks, boa Click to expand... Yes. Upvote 0
Thanks for responding. Can the board server run on that same desktop that you are developing and testing on? Thanks, boa Click to expand... Yes.