Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Mar 2006
    Posts
    200
    Thanks
    27
    Thanked 2 Times in 2 Posts

    move-uploaded-file problem

    Hello,

    I am uploading files to my server. It worked perfectly 2 weeks ago with no problems. However, now my script isn't uploading the files to the server...and even more oddly, it's not outputting any errors either! Usually the move-uploaded-file function throws all sorts of errors back at you if you're doing something wrong!!

    My hosts say that they have updated the php on the servers to php 4.4.7 and PHP5 5.2.3. Apparently this can't cause a problem, but something must have changed. This has worked without error before.

    Thanks,

    Nicola

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,147
    Thanks
    2
    Thanked 333 Times in 325 Posts
    You would need to post your code for anyone here to be able to see what about it might be affected by a PHP version change.

    Typically, 99.5% of the time when code works on one server and not another (or before/after a PHP version upgrade) it is because of PHP settings. The other .5% of the time it is because of PHP version differences.

    In your case I suspect that the register_globals setting got changed or they did not setup the temp folder for uploads (or they did set it up but to a folder that does not exist or to one where the permissions are not correct) and/or the PHP error reporting got turned off or the error reporting level got changed.

    Also, I assume that you have error checking, error reporting, and error recovery in your code to get your program to tell you if there are any upload errors - http://www.php.net/manual/en/feature...oad.errors.php or if the $_FILES array is not set due to the POST_MAX_SIZE - http://www.php.net/manual/en/feature...n-pitfalls.php
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •