Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004

    php safe_mode on and /usr/lib/php/DB.php error - pear

    I got 2 servers running php in safe mode. on one of them script:


    require_once 'DB.php';


    wokrs fine!!

    but on another
    Warning: main(): SAFE MODE Restriction in effect. The script whose uid is 32003 is not allowed to access /usr/lib/php/DB.php owned by uid 0 in /home/hubs5/public_html/a.php on line 3

    Warning: main(DB.php): failed to open stream: Permission denied in /home/hubs5/public_html/a.php on line 3

    Fatal error: main(): Failed opening required 'DB.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hubs5/public_html/a.php on line 3

    DONT WORK. I compared chowns and chmods between 2 servers. No diffrence. Why on 1 server it is working while on another not

  2. #2
    It seems like that your /home/hubs5/public_html/a.php is owned by uid 32003 but /usr/lib/php/DB.php is owned by root (uid 0).
    You should try to use safe_mode_gid if you want to ignore UID compare check when opening files.

Posting Permissions

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