Jump to content


Photo

Image Upload Script Help


  • Please log in to reply
26 replies to this topic

#21 Bubblychaz

Bubblychaz

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts

Posted 20 November 2012 - 06:43 AM

Bubblychaz, I encourage you to study the code that you have been given so that you may find some of these errors yourself instead of asking as soon as you are thrown an error.

Make sure that you have error_reporting() set to -1 and display_errors() set to 1 or 'on'. That way PHP will let you know when and where something goes wrong so you can debug the code yourself.


How do I set up the error_reporting?

#22 Bubblychaz

Bubblychaz

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts

Posted 20 November 2012 - 07:04 AM

I think the issue is the $_SERVER['DOCUMENT_ROOT']

in my addon.php i have
$ip=$_SERVER['REMOTE_ADDR'];
$baseurl = "http://www.spardel.com";
$_SERVER['DOCUMENT_ROOT'] = "/home4/spardelc/";


Am I missing something?

#23 Bubblychaz

Bubblychaz

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts

Posted 20 November 2012 - 07:09 AM

I fixed it.. I think..

Im unsure if this is the correct way around it but

I took
$_SERVER['DOCUMENT_ROOT'] = "/home4/spardelc/";


off the addon.php

and put it at the top of my script, But I also checked my file manager to see exactly what my root was called which and added this to the top of my script

$_SERVER['DOCUMENT_ROOT'] = "/home4/spardelc/public_html/";


#24 Adam

Adam

    Advanced Member

  • Gurus
  • 5,693 posts
  • LocationSheffield / UK

Posted 20 November 2012 - 07:29 AM

Unless the domains point to the same server, or the servers can talk to each other and transfer the file in the background through some other process, you won't be able to do that.

#25 Adam

Adam

    Advanced Member

  • Gurus
  • 5,693 posts
  • LocationSheffield / UK

Posted 20 November 2012 - 07:32 AM

Hmm hang about. Something went a bit crazy then and your last three posts only just showed up. What I meant in my previous post was directed at you saying you wanted to upload from one domain to the other. In response to the document root stuff, I don't really understand what you're trying to fix?

#26 AyKay47

AyKay47

    Sick!

  • Members
  • PipPipPip
  • 3,287 posts
  • LocationEast Coast, U.S.
  • Age:24

Posted 20 November 2012 - 07:47 AM

How do I set up the error_reporting?


error_reporting
Hola!
I'm not going to hold your hand and write the code for you - ain't nobody got time for that!

#27 Bubblychaz

Bubblychaz

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts

Posted 20 November 2012 - 09:27 AM

The upload form is a in staff folder which is a subdomain so staff.spardel.com

the images folder is in the main domain which is spardel.com/images




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com