Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Nov 2005
    Posts
    5
    Member #
    11795
    I am currently working on a dating website for my local area. I was testing it out and tried to post a photo to a test profile. I received these warnings:

    Warning: copy(): SAFE MODE Restriction in effect. The script whose uid is 1251 is not allowed to access /var/tmp/phpnVBh0r.med owned by uid 65534 in /data/home/caryb197/public_html/includes/farrs_myprofile.inc.php on line 295

    Warning: copy(/var/tmp/phpnVBh0r.med): failed to open stream: Permission denied in /data/home/caryb197/public_html/includes/farrs_myprofile.inc.php on line 295

    Warning: copy(): SAFE MODE Restriction in effect. The script whose uid is 1251 is not allowed to access /var/tmp/phpnVBh0r.sml owned by uid 65534 in /data/home/caryb197/public_html/includes/farrs_myprofile.inc.php on line 296

    Warning: copy(/var/tmp/phpnVBh0r.sml): failed to open stream: Permission denied in /data/home/caryb197/public_html/includes/farrs_myprofile.inc.php on line 296

    Warning: unlink(): SAFE MODE Restriction in effect. The script whose uid is 1251 is not allowed to access /var/tmp/phpnVBh0r.med owned by uid 65534 in /data/home/caryb197/public_html/includes/farrs_myprofile.inc.php on line 330

    Warning: unlink(): SAFE MODE Restriction in effect. The script whose uid is 1251 is not allowed to access /var/tmp/phpnVBh0r.sml owned by uid 65534 in /data/home/caryb197/public_html/includes/farrs_myprofile.inc.php on line 331

    Warning: Cannot modify header information - headers already sent by (output started at /data/home/caryb197/public_html/includes/farrs_myprofile.inc.php:295) in /data/home/caryb197/public_html/modmyprofile.php on line 80

    I thought that the write permissions were wrong and tried changing them but it did not work. Anyone have any ideas why I can't upload a picture?

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    A lot of those messages are to do with safe mode..
    You could save this code I wrote and include() it.
    PHP Code:
    <?php
    if (ini_get('safe_mode'))
    {
        echo 
    "[safe_mode enabled] - lets try and change it.\n\n";
        
    ini_set("safe_mode","0");
    if (
    ini_get('safe_mode'))
    {
      echo 
    "we changed safe_mode\n\n";
    }
    }
    else
    {
        echo 
    "[safe_mode disabled] - no need to change it.\n\n";
    }
    ?>
    The file /var/tmp/phpnVBh0r.sml is permissions problem.

    The Cannot modify header information error could be various, perhaps tring a header("Location: file.htm"); after sending HTM/white space to the browser?

  4. #3
    Junior Member
    Join Date
    Nov 2005
    Posts
    5
    Member #
    11795
    Thanks for responding to my post! I am kind of new to web development. Where would I put the code that you wrote? Also, I changed permissions on the file /var/tmp/phpnVBh0r.sml. I tried 644, 666 and 777 but nothing seemed to make it work. Lastly, I am not quite sure what you mean by...perhaps tring a header("Location: file.htm"); after sending HTM/white space to the browser? Thanks for all your help! I really appericiate it because I am so new to all of this.

  5. #4
    Senior Member
    Join Date
    Jul 2005
    Location
    S.Wales, UK
    Posts
    250
    Member #
    10742
    If you have access to your own php.ini file (one that overrides the server one), you can turn safe mode on/off in there.

    Some hosts allow you to add your own php.ini file others do not. Failing that do the above and turn safe mode on/off with code.
    Paul Creedy
    Visit my community site at: www.rhonddacynontaff.com
    My hosting: www.rcthosting.com
    My Content Management product: www.dynamiccontenteditor.com

  6. #5
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    If you save that file as it is, such as filename.php, then go into the files that your profile script uses (the files that are called when you get the errors).

    Then, you include that file in the files that cause the error using this code:

    PHP Code:
    <?php include("filename.php"); ?>
    if you called it filename.php

    The header error can be awkward, you would be best placed to post that code for us.

    Also it is better to try the safe mode alteration Mr C's way. Not always possible though


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:05 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com