Gossamer Forum
Home : Products : Gossamer Links : PHP Front End :

Re: [Dan Kaplan] some template problems

Quote Reply
Re: [Dan Kaplan] some template problems In reply to
In Reply To:
[27-Jun-2002 18:10:48] PHP Warning: SAFE MODE Restriction in effect. The script whose uid is 41925 is not allowed to access /path/to/cgi-bin/links/admin/templates/default_php/compiled/globals.txt.php owned by uid 98 in /path/to/www/pages/PHP/Links.inc.php on line 351

[27-Jun-2002 18:10:48] PHP Warning: file("/path/to/cgi-bin/links/admin/templates/default_php/compiled/globals.txt.php") - Success in /path/to/www/pages/PHP/Links.inc.php on line 351

[27-Jun-2002 18:10:48] PHP Warning: Bad arguments to join() in /path/to/www/pages/PHP/Links.inc.php on line 351

[27-Jun-2002 18:10:48] PHP Parse error: parse error in /path/to/www/pages/PHP/Links.inc.php(353) : eval()'d code on line 1

These errors are all due to the first error. Because PHP on your server's running in safe mode, scripts can't access files which are owned by other users. In this case, the PHP front end caches the converted Perl dumps of configurations, globals, etc. They are saved to file, but your webserver is saving them as owned by nobody (or whatever user the webserver is run as). That's fine, but then the script itself is owned by you and therefore doesn't match the user that owns the cached files.

In Reply To:
but it looks like another reason why the PHP scripts should not be installed in the cgi-bin...

That's got nothing to do with it being installed in the cgi-bin. Being installed in cgi-bin makes no difference unless your webserver is configured to treat everything in cgi-bin as a cgi script.

In Reply To:
Any way around it short of moving the /Links/PHP/ directory and changing all the include paths?

There's no need/reason to move those files. If you want to move page.php out of cgi-bin, just move that single file to whereever you want, and update the db_php_url setting in the admin.

In Reply To:
An unrelated question: I've read that any PHP code should work just fine in the templates

Yes, PHP code should work fine in the templates (remember you need to put the code inside <? ?>).

In Reply To:
but it appears global variables cannot be defined within functions in the templates. Is this correct?

Can you clarify on this? I'm not sure what you mean.

Adrian
Subject Author Views Date
Thread some template problems Dan Kaplan 13798 Jun 27, 2002, 4:33 PM
Thread Re: [Dan Kaplan] some template problems
brewt 13602 Jun 27, 2002, 5:01 PM
Thread Re: [brewt] some template problems
Dan Kaplan 13544 Jun 27, 2002, 5:25 PM
Thread Re: [Dan Kaplan] some template problems
brewt 13577 Jun 27, 2002, 6:12 PM
Post Re: [brewt] some template problems
Dan Kaplan 13563 Jun 27, 2002, 6:26 PM
Post Re: [brewt] some template problems
Dan Kaplan 13537 Jul 2, 2002, 5:02 PM
Thread Re: [brewt] some template problems
Dan Kaplan 13534 Jul 10, 2002, 9:41 AM
Thread welcome to Dan's chop shop...
Dan Kaplan 13506 Jul 15, 2002, 7:56 AM
Post Re: [Dan Kaplan] welcome to Dan's chop shop...
brewt 13512 Jul 18, 2002, 2:48 AM
Thread Re: [Dan Kaplan] some template problems
brewt 13524 Jul 18, 2002, 2:45 AM
Thread Re: [brewt] some template problems
Dan Kaplan 13455 Jul 18, 2002, 7:26 AM
Thread Re: [Dan Kaplan] some template problems
Dan Kaplan 13463 Jul 18, 2002, 7:46 AM
Post Re: [Dan Kaplan] some template problems
Dan Kaplan 13450 Jul 18, 2002, 9:18 AM
Post Re: [Dan Kaplan] some template problems
brewt 13493 Jul 18, 2002, 9:26 AM
Thread Re: [Dan Kaplan] some template problems
Alex 13475 Jul 18, 2002, 5:07 PM
Thread Re: [Alex] some template problems
Dan Kaplan 13465 Jul 18, 2002, 5:22 PM
Thread Re: [Dan Kaplan] some template problems
Alex 13433 Jul 18, 2002, 5:31 PM
Thread Re: [Alex] some template problems
Dan Kaplan 13452 Jul 18, 2002, 6:05 PM
Thread Re: [Dan Kaplan] some template problems
brewt 13502 Jul 18, 2002, 6:13 PM
Post Re: [brewt] some template problems
Dan Kaplan 13423 Jul 18, 2002, 6:26 PM
Thread Re: [brewt] some template problems
Dan Kaplan 13565 Jul 18, 2002, 6:54 PM
Thread Re: [Dan Kaplan] some template problems
brewt 13439 Jul 18, 2002, 9:21 PM
Thread Re: [brewt] some template problems
Dan Kaplan 13422 Jul 18, 2002, 9:33 PM
Thread Re: [Dan Kaplan] some template problems
shackman 13401 Jul 24, 2002, 8:33 AM
Post Re: [shackman] some template problems
Alex 3140 Jul 24, 2002, 9:48 AM
Thread Re: [Dan Kaplan] some template problems
Alex 3150 Jul 24, 2002, 9:54 AM
Post Re: [Alex] some template problems
Dan Kaplan 3133 Jul 24, 2002, 2:24 PM
Post Re: [Dan Kaplan] some template problems
Alex 13457 Jul 18, 2002, 6:15 PM