How to enable my upload form and php file for my apache server?

0

Im trying to upload files to my apache server over http with curl.

I have a simple upload.php file in the root directory of my server and also a "submit" page on my server that is just a simple upload form.

How can I link the two to work together so that I can upload files onto my server? Or is the .php file enough to upload my file onto the server?

When I execte my curl command with -v I get the following output:

root@glennvds-VirtualBox:/home/glennvds# curl -F 
‘data=@~/home/glennvds/Desktop/link.txt’ http://xx.xx.xx.xx/upload.php -v
Warning: setting file ~/home/glennvds/Desktop/link.txt’  failed!
*   Trying xx.xx.xx.xx...
* TCP_NODELAY set
* Connected to xx.xx.xx.xx (xx.xx.xx.xx) port 80 (#0)
POST /upload.php HTTP/1.1
Host: xx.xx.xx.xx
User-Agent: curl/7.58.0
Accept: /
Transfer-Encoding: chunked
Content-Type: multipart/form-data; boundary=------------------------ 
f226a51eab6734da
Expect: 100-continue


< HTTP/1.1 100 Continue
* read function returned funny value
* stopped the pause stream!
* Closing connection 0
curl: (26) read function returned funny value

THEoneANDonly

Posted 2019-04-02T09:23:32.317

Reputation: 3

Might be a good question for StackOverflow. – HazardousGlitch – 2019-04-03T00:02:35.780

The new "guide" brought me here – THEoneANDonly – 2019-04-03T10:02:27.107

I'm not sure what guide you're referring to but it appears to be a programming question and Super User isn't for them but StackOverflow is. – HazardousGlitch – 2019-04-03T10:42:31.917

No answers