|
|
|
Re: some really important questions [message #17911 is a reply to message #17910] |
Sat, 24 April 2004 22:09 ![Go to previous message Go to previous message](/forum/theme/default/images/up.png) ![Go to next message Go to next message](/forum/theme/default/images/down.png) |
Ilia
![Canada Canada](/forum/images/flags/ca.png) Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
lahoo wrote on Sat, 24 April 2004 17:58 |
An alternative way is if you tell me if and how I can create the themes manually. Which folders should be duplicated, in which manner and what else needs to be done?
In other words, how do I manage themes and templates manually if there's no easy way around the permission problems?
|
You can create a template set manually by making a copy of the default directory inside the thm/ directory. Creating a theme manually is not something I would advise doing, however if you need to do, the methods for doing so can be found inside include/theme.inc, you can see how they are used from admthemes.php.
Quote: |
Is such information available?
|
What information are you looking for specifically. The basic gist of it is that the compiler.inc takes templates, i18n files and php source code and based on that generates the final files. This of course involves resolving various parts of the templates to text & PHP variables.
Quote: |
Do you regard FUD forum to be installable and managable under these cicumstances with continous permission related failures when managin themes plus the server running PHP in safe mode?
|
Sure, FUDforum is not affected by safe_mode, it'll work just fine on safe_mode system. If you need to change files outside of FUDforum it may be more difficult then on a system without safe mode. However, by unlocking the forum files, you can still download them via FTP and consequently replace them manually. The operation of the forum itself is not at all hindered by safe_mode restrictions.
FUDforum Core Developer
|
|
|
|
|
Re: some really important questions [message #17914 is a reply to message #17913] |
Sun, 25 April 2004 06:35 ![Go to previous message Go to previous message](/forum/theme/default/images/up.png) ![Go to next message Go to next message](/forum/theme/default/images/down.png) |
lahoo
![Sweden Sweden](/forum/images/flags/se.png) Messages: 62 Registered: April 2004
Karma: 0
|
Member |
|
|
About theme management
Citat: | The permission issue can be mostly resolved by "unlocking files" option in the admin control panel. Doing so will reset the forum's file permissions in such a way as to allow manual access to them.
|
I've reviewed this setting and it said, in large red text, that my files were currently unlocked. To make sure that they were really unlocked I used the feature to unlock them. After doing so I went back to the theme management and tried creating a new theme based on default. The result was exactly the same as the one I stated in the initial message in this thread.
Your answer then was that
Citat: | This is not a forum bug, but rather how PHP/Apache works. The installer is being ran from PHP/Apache and consequently all files created via the web are owned by PHP/Apache. There is no way to avoid that, unless your ISP uses PHP-CGI in which case PHP runs under your user.
|
... and later you said
Citat: | Creating a theme manually is not something I would advise doing
|
Which is your recommendation to me on how to manage themes?
What's left if there's no way around the PHP/Apache limitation that makes it impossible to use the theme management in admin control panel and creating them manually is not recommended?
If you feel a sence of desperation in my questions you're probably right. I really hope that there is a solution that I have overlooked but hopelessness is starting to set in...
Is it a prerequisite for FUDforum that my "ISP uses PHP-CGI"? I haven't found anything in the documentation about system requirements other than regarding versions of PHP, MySQL and PostgreSQL.
About installation
Citat: | While there have been problems in the past with safe_mode installs, if you follow the instructions listed in the installer to the letter you should be able to go through it without any difficulties. The only tricky part is the creation of the initial directory.
|
I did, in fact, follow the instructions in the manuals installation chapter to the point. Since safe_mode is enamled I created a temporary folder named install, copied the install.php file there and ran it from that URL. Neither forum data root nor server root resdes in or as decendant to install/. Did I overlook or misinterprete anything?
By the way, there is an interpretation/language issue with the manual when it comes to the chapter http://fudforum.org/doc/d/html/install.script.html
First it says
Citat: | It is recommended to copy the script into the web directory where you intend to install the forum. To begin the installation of the forum, use your browser to access the install.php file.
|
... and then
Citat: | Important
If your PHP has safe_mode enabled, you'll see an indicator that it is enabled in red on top of the install wizard. If safe_mode is enabled, you CAN NOT use specify the directory where you've placed install.php as Server Root or Forum Data Root.
|
Firstly it would be an improvement if you in the inital quote could include a reference to the special case for safe_mode. You might add "This recommendation doesn't apply to users that have PHP safe_mode, see below."
Secondly the wording marked in red is strange. I think it would be wise to revise it into either "MUST NOT use" or "MUST NOT specify" since use and specify says the same thing.
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: some really important questions [message #17989 is a reply to message #17987] |
Wed, 28 April 2004 15:27 ![Go to previous message Go to previous message](/forum/theme/default/images/up.png) ![Go to next message Go to next message](/forum/theme/default/images/down.png) |
lahoo
![Sweden Sweden](/forum/images/flags/se.png) Messages: 62 Registered: April 2004
Karma: 0
|
Member |
|
|
Citat: | PHP's mkdir() makes files as httpd:httpd because that's the user:group of the webserver, since PHP runs as the webserver user, all of the files it creates are owned by the webserver.
|
Yes, but then, when trying to write files to that directory it impersonates our account. Further, issuing a mkdir() in PHP with specified permissions of the resulting folder doesn't set that permission on the folder.
I made a test script to demo this to the support group of my WSP:
<html>
<body>
<?php
echo 'create123 - ';
if (mkdir('123', 0777))
echo 'ok';
else
echo 'not ok';
echo '<br>create 123/456 - ';
if (mkdir('123/456', 0777))
echo 'ok';
else
echo 'not ok';
?>
</body>
</html>
I placed this piece of code as mkdir.php in a folder named _test/ and chmod:ed _test to 755. _test is owned, just like all other files/folders in our webplace, by xyz:xyz where xyz is our account.
When mkdir.php is run under these conditions I get
"Warning: mkdir(123): Permission denied in [...]/_test/mkdir.php on line 5"
If I chmod _test/ to 777 and try again mkdir.php will create the folder 123 as being owned by httpd:httpd. Despite specifying 0777 the folder created has rwxr-xr-x
When the second mkdir() is executed I get
"Warning: mkdir(): SAFE MODE Restriction in effect. The script whose uid is 107299 is not allowed to access .../_test/123 owned by uid 398 in .../_test/mkdir.php on line 12"
So... the script is run by 107299 but the folder is created by 398.
If I knew about the amount of problem this odd behaviour would cause me prior to getting the great idea to install FUDforum I would never have bothered. On the paper the system specs matched. I put all the blame on the WSP.
[Updated on: Wed, 28 April 2004 15:30] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|