PHP safe mode -> install problems?

  • Alexander Hanysz


    I've installed PHPwiki 1.2.11 (with flatfile database), but I'm not seeing any pages. Instead I get error messages as below. My hosting provider tells me that turning off PHP safe mode is not an option. Should PHPwiki work OK with safe mode on? Any suggestions?


    Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit in safe mode in /home/ha/han/ on line 31
    Inserting page AddingPages, version 1 from text file

    Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The script whose uid/gid is 69089/100 is not allowed to access /home/ha/han/ owned by uid/gid 80/80 in /home/ha/han/ on line 106

    Warning: fopen(/home/ha/han/ [function.fopen]: failed to open stream: Illegal seek in /home/ha/han/ on line 106

    Error while writing page 'AddingPages'

    • Alexander Hanysz

      Thanks. The advice I received from the system admin was: "Whenever you have a PHP script on our systems that needs to write to a resource ensure that said resource has its permissions set to 2777 (even if the documentation is set to 777)." Together with removing all the setTimeLimit calls, this seems to have fixed the problem.

    • Bernard Bel

      Bernard Bel - 2009-01-15

      I am a newcomer to PHP, so my reply might not be totally adequate.

      From the messages I understand that the PHP code used for creating the pages, the first time you run PhpWiki, contains a setTimeLimit() call. This function does not work in SAFE mode. It is required because the process of creating pages may take quite a while, and if it fails because of a time limitation you might be in trouble.

      I would request my system admin to remove SAFE mode just for the time of creating the new pages and checking that PhpWiki works. Then set it on again and see whether you still get this type of error message.

      Bernard Bel


Log in to post a comment.