server

Apache2 not working with routes PHP

Deadly 提交于 2020-01-07 01:22:34
问题 I am developing an app with PHP 7.0 and implementing routes with MVC. My root folder ('/') is the 'public' directory. When I access the address 'localhost' I am redirected to index.php with have the routes available. But when I try another url to access another route, like 'localhost/contact' the server doesn't find the entry and give this message: Not Found The requested URL /contact was not found on this server. I am pretty sure that the problem in on my server config (apache2 on linux mint

Apache2 not working with routes PHP

亡梦爱人 提交于 2020-01-07 01:21:20
问题 I am developing an app with PHP 7.0 and implementing routes with MVC. My root folder ('/') is the 'public' directory. When I access the address 'localhost' I am redirected to index.php with have the routes available. But when I try another url to access another route, like 'localhost/contact' the server doesn't find the entry and give this message: Not Found The requested URL /contact was not found on this server. I am pretty sure that the problem in on my server config (apache2 on linux mint

ASIO async_read doesn't work while async_read_until works on server

眉间皱痕 提交于 2020-01-06 20:19:21
问题 Observation I built a demo application according to this server example using ASIO after I used C++11 std to replace everything originally in boost . The server can show that class member tcp_session::start() is called only after the client connects which is good indication that the server accepts the connection from the client. However, I saw nothing received by handle_read while the clients sends a lot of data. I got some std::cout in handle_read and stop. I put the timeout to be 6 seconds

Upload a file from Android to the server via PHP

别等时光非礼了梦想. 提交于 2020-01-06 20:18:18
问题 Can anyone help me to make my code work, i.e. upload a file from Android to the server via PHP? I tried it in many different ways but it won't work. I get HTTP Response 200 but the files aren't uploaded on server. The PHP script I'm using for upload is: <?php $uploaddir = 'uploads/'; $uploadfile = $uploaddir . basename($_FILES['uploaded_file']['name']); if (move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else {

Upload a file from Android to the server via PHP

倖福魔咒の 提交于 2020-01-06 20:16:38
问题 Can anyone help me to make my code work, i.e. upload a file from Android to the server via PHP? I tried it in many different ways but it won't work. I get HTTP Response 200 but the files aren't uploaded on server. The PHP script I'm using for upload is: <?php $uploaddir = 'uploads/'; $uploadfile = $uploaddir . basename($_FILES['uploaded_file']['name']); if (move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else {

ASIO async_read doesn't work while async_read_until works on server

无人久伴 提交于 2020-01-06 20:16:08
问题 Observation I built a demo application according to this server example using ASIO after I used C++11 std to replace everything originally in boost . The server can show that class member tcp_session::start() is called only after the client connects which is good indication that the server accepts the connection from the client. However, I saw nothing received by handle_read while the clients sends a lot of data. I got some std::cout in handle_read and stop. I put the timeout to be 6 seconds

rmi java.security.policy access denied

吃可爱长大的小学妹 提交于 2020-01-06 15:57:06
问题 I am new to RMI topic in java and i wana to create client server applicaiton using RMI, i followed this tutorial found in this link : RMI Tutorial using eclipse but i am using netbeans ,and here is server code: import java.rmi.*; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import java.rmi.server.*; public class AdditionServer { public static void main (String[] argv) { try { if (System.getSecurityManager() == null) { System.setSecurityManager(new

rmi java.security.policy access denied

霸气de小男生 提交于 2020-01-06 15:56:59
问题 I am new to RMI topic in java and i wana to create client server applicaiton using RMI, i followed this tutorial found in this link : RMI Tutorial using eclipse but i am using netbeans ,and here is server code: import java.rmi.*; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import java.rmi.server.*; public class AdditionServer { public static void main (String[] argv) { try { if (System.getSecurityManager() == null) { System.setSecurityManager(new

NodeJS - securely connect to external redis server

主宰稳场 提交于 2020-01-06 15:18:56
问题 On my main server , I fetch data from an external/seperate redis server which is accessed through an api https://localhost:7000/api/?token=**** which works. However token and api is not secure. And since I want to have redis server to be separate, this technique isn't suited for my case. In my case I want to have 2 independent servers A and B . A should load data from B without using an api or url call... Instead it should use port (e.g. //server:123 ). This way server B can only be accessed

NodeJS - securely connect to external redis server

主宰稳场 提交于 2020-01-06 15:18:56
问题 On my main server , I fetch data from an external/seperate redis server which is accessed through an api https://localhost:7000/api/?token=**** which works. However token and api is not secure. And since I want to have redis server to be separate, this technique isn't suited for my case. In my case I want to have 2 independent servers A and B . A should load data from B without using an api or url call... Instead it should use port (e.g. //server:123 ). This way server B can only be accessed