server

Why am I getting a segmentation fault in my C server program (but only sometimes)?

亡梦爱人 提交于 2019-12-25 15:15:50
问题 Right now, I'm trying to write a simple client/server application in order to measure the round trip time on a LAN for TCP messages of various sizes (I'm doing the timing client side). The program works fine for small packet sizes (> 1000 bytes) but I end up with a segmentation fault: 11 error for inputs of larger magnitude (10KB or greater). int main() { struct sockaddr_in sin; char buf[MAX_LINE]; int len; int s, new_s; /* build address data structure */ bzero((char *)& sin, sizeof( sin));

Prevent users from submitting their own image with ajax?

你说的曾经没有我的故事 提交于 2019-12-25 14:42:03
问题 I've been working on this way for people to draw stuff on canvas and upload it to the server. It works fine except for people being able to insert their own images (my friend tested it) Here's what it does: Person clicks "submit" their canvas is saved into base64 and is sent using $.post() php file in the $.post() runs and saves the file to a file in the server Is there any way from preventing the user to be able to submit their own images, I already check image dimensions and so on but they

Would a public upload folder be a security issue?

為{幸葍}努か 提交于 2019-12-25 14:11:43
问题 On my site, I have an ability for users to upload a file into the server and be able to view all uploaded files in a directory called "public uploads" where users can view all files that's been uploaded by other users. It's the Apache directory page where it says "Index of /uploads". It's sort of a file sharing hub where people can download and share other people's files. Would there be any security issues with this? Can a user, say, upload a malicious PHP script, and execute it from the

Would a public upload folder be a security issue?

Deadly 提交于 2019-12-25 14:11:14
问题 On my site, I have an ability for users to upload a file into the server and be able to view all uploaded files in a directory called "public uploads" where users can view all files that's been uploaded by other users. It's the Apache directory page where it says "Index of /uploads". It's sort of a file sharing hub where people can download and share other people's files. Would there be any security issues with this? Can a user, say, upload a malicious PHP script, and execute it from the

Signalr WebSockets not working on Windows server 2012 R2 + IIS 8.5 with enabled websocket protocol, But works on local development machine (Win 10)

浪子不回头ぞ 提交于 2019-12-25 11:52:39
问题 Signalr WebSockets not working on Windows server 2012 R2 + IIS 8.5 with enabled websocket protocol, But works on local development machine (Win 10). Both set-up as per: https://www.iis.net/configreference/system.webserver/websocket Server (Websockets not working) -Windows 2012 R2 Standard -IIS 8.5 -Websockets enabled -Client Chrome version 58 64bit (Running locally on server just like dev machine - to eliminate load balancer, or network issue) Signal returns TryWebSockets:false (SSE,

Want to add a timer to GlassFish Server, don't know where to start

萝らか妹 提交于 2019-12-25 10:57:12
问题 I'm trying to implement Java EE websockets with a Glassfish server, and I've got the basics down already. As for my current project, I want to implement server "ticks" like in a game, that update the server every few milliseconds so that all sessions connected to the server see the same thing. However, I don't know where to start to make this work with Glassfish. I know that I create a server from scratch and implement a timer method, but I'd rather save myself some work here if possible.

mcrypt is not loading (even after installing)

萝らか妹 提交于 2019-12-25 09:31:35
问题 I have changed mac's builtin version 5.6 of php to 7.0 which works fine but my mcrypt is not working. I have installed it using brew install mcrypt php70-mcrypt . How I can fix this issue? I am using MacOS Sierra. 回答1: First, make sure you restarted PHP. Then, at the command line, type php -v and make sure you're actually using 7.0. If it still doesn't work make a php file and run phpinfo() and see if the extension is loading. If not, please provide any further information you can. 回答2: Have

Can I install a Laravel project in a subdirectory of my server?

[亡魂溺海] 提交于 2019-12-25 08:59:59
问题 I have a website that was built with just good vanilla PHP, no frameworks, etc. I am now needed to add a blog to this website and I am wanting to use Laravel / Statamtic to do so. My question is this: Can I install a Laravel project in a subdirectory of my server? For example, www.mywebsite.com/blog/. Ideally, everything in the blog directory would operate with my Laravel code. Everything outside of the blog directory would just continue to work as is. Is this possible? And if it is possible,

Converting a query to dynamic SQL with linked server variable

只愿长相守 提交于 2019-12-25 08:59:47
问题 I have a stored procedure that I need to convert so that it reads a linked server variable from a table. From what I know, the only way to do so is to use dynamic SQL. The problem is that I'm failing to convert my query. Original query: SET @var1 = '' SELECT @var1 = RECEIVER FROM databse1.dbo.table1 WHERE SAPNUMBER = @var2 Converted query: SET @srv = (SELECT server_name FROM Configuration.dbo.Server_Switch) SET @var1 = '' exec ( 'SELECT ' + @var1 + '= RECEIVER FROM ' + @srv + '.databse1.dbo

FTP directory Upload [closed]

倾然丶 夕夏残阳落幕 提交于 2019-12-25 08:56:55
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'll try and make this quick and simple. It can be hard to search of information on something to your not 100% sure on how you would search for it. So I have a small batch script create to execute powershell ftp access and log me in and all that fun stuff. Basically it's a cron job to upload files to my FTP