[PHP] Uploading files

gerwim

New Member
Messages
6
Reaction score
0
Points
0
Hi there,

I'd like to know if it's possible to upload images to a x10hosting package. I'm building a website for a client, which has webhosting here. I'm using the exact same script on my own server, and then the image is uploaded. phpinfo() is also blocked here so I'm not able to look for anything which may cause this.

TL;DR: Am I able to upload files using PHP?

Thanks in advance.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Yes. But any images you upload must be part of the site. This is not imageshack or photobucket.
 

gerwim

New Member
Messages
6
Reaction score
0
Points
0
Thanks.

Yes, it is a part of the site. But how will this be done? Do I need to contact x10hosting to enable uploading of my domain?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
There is nothing blocking uploads. Nothing has to be enabled.

If your script is not working, it is because it has an error in it when run here. You didn't say if there were error messages. Many scripts turn off error messages, which makes debugging hard, if not impossible.
 

gerwim

New Member
Messages
6
Reaction score
0
Points
0
Hi,

That's correct, although I have stated that the very same script works on my own server though.

I'm trying to upload into an SQL database.

With
<?php
print_r($_FILES);
?>
I'm not getting any output. According to php.net (commentary) this is because due to a blocked server configuration.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
I don't show a hosting account linked to your Forum username, so I don't know what server you are on.

But I have a test account on Chopin. Running Drupal. And it uploads images fine.

Due to the load balancing and multi-user set up here, many things that run on home computers, or even on other hosts, do not work here without adjustment to the script.
 

bidzey75

New Member
Messages
53
Reaction score
0
Points
0
always check the error log files it will tell you what's going on. If the same script works on another server my best guess is it's a permission issue
 
Last edited:
Top