Login or Register

RSS IconRecent posts in this topic

avatar
nokati on Apr 23. 2007. 12:53 am
I recently dumped my old AC install (0.7 updated to 0.71) to start fresh - Im noticing something very odd occuring with Install Step 2 related to:

# OK: PHP version is 5.0.5
# OK: 'mysql' extension is loaded
# OK: 'gd' extension is loaded
# OK: 'simplexml' extension is loaded
# OK: /config/config.php is writable

# Error: /public/files is not writable
# Error: /cache is not writable
# Error: /upload is not writable

Its worth noting that config.php suffered the same issues but the chmod was recognized on the specific file - but not for any of the directories - I suspect this is a bug in the .71 installer (and even manually setting config.php doesnt allow for functioning due to same priv checks) as it is the same box, process, etc I used successfully for .7 and .71 upgrade previous to this fresh install.

Here are the insanely liberal perms:

root@xxx(activecollab)# la activecollab
drwxrwxrwx 2 www www 512 Apr 22 19:46 cache
drwxrwxrwx 2 www www 512 Dec 22 18:03 config
drwxrwxrwx 2 www www 512 Apr 22 19:46 upload

root@xxx(activecollab)# la activecollab/public
drwxrwxrwx 2 www www 512 Apr 22 19:46 files

essentially after many attempts resorted to chown -R www.www activecollab \ chmod -R 777 activecollab

Any advice would be great - I didnt have anything like this previously and these are the loosest perms avail and the php installer steps still dont detect the change so im at a lose.
avatar Staff
Ilija Studen on Apr 23. 2007. 4:38 am
In order to check if file is writable or not activeCollab will:

1. For file - open it for writing.
2. For folder - try to write a small txt file into a folder.

So, if activeCollab prints that specific folder is not writable it means that it failed to actually write in it. PHP need to be enabled to write in a specific directory in order for this to work.
activeCollab Team Member
avatar
nokati on Apr 23. 2007. 4:58 am
Yep, understood - but Im still baffled as to why it cannot do this right now (remembering this is the same server that used to house another AC install successfully - the only key difference being I started with .7 and then upgraded to .71 rather than doing this straight-up .71 install).

if its helpful http is running as user "www":
www 8104 0.0 3.6 6964 9324 ?? I 10:42PM 0:09.19 httpd: child (httpd)

Thanks for your help - feeling frustrated and stupid I cant get this a second time around, I can chmod/chown till the cows come how and AC installer still says they are unwritable for unknown reasons.
avatar
nokati on Apr 23. 2007. 5:03 am
Basically I guess what Im asking is: do you have any idea how I could do something like this to my AC webdir:

root@xxx# chmod -R 777 activecollab/

and still come up with these results from the installer:

* OK: PHP version is 5.0.5
* OK: 'mysql' extension is loaded
* OK: 'gd' extension is loaded
* OK: 'simplexml' extension is loaded
* OK: /config/config.php is writable
* Error: /public/files is not writable
* Error: /cache is not writable
* Error: /upload is not writable
avatar
nokati on Apr 23. 2007. 5:15 am
OK, a little more info - because I do think there is something up with your installer.

To test this I wrote a very simple php script to try writing a small textfile there and it *did* work on the dir successfully:

root@xxx(activecollab)# la cache/
-rw-r--r-- 1 www www 0 Apr 23 00:12 test.txt

root@xxx(activecollab)# cat writetest.php
<code>
<?
function write_file($file, $content) { $fp = fopen ("$file", "wb"); fwrite($fp, $content); fclose($fp); }
$path = '/home/www/app.bin/activecollab/';
write_file($path."cache/test.txt","hello world");
?>
</code>
avatar Staff
Ilija Studen on Apr 23. 2007. 7:42 am
It is possible. Try manual installation.
activeCollab Team Member
avatar
nokati on Apr 23. 2007. 8:27 am
Yep, tried that and go the db setup and now were to the autoload/cache problems:

Caught Exception in AutoLoader: exception 'Exception' with message 'Could not write to "/home/www/app.bin/activecollab/cache/autoloader.php". Make sure, that your webserver has write access to it.' in /home/www/app.bin/activecollab/environment/classes/AutoLoader.class.php:144 Stack trace: #0 /home/www/app.bin/activecollab/environment/classes/AutoLoader.class.php(127): AutoLoader->createIndexFile() #1 /home/www/app.bin/activecollab/environment/classes/AutoLoader.class.php(86): AutoLoader->createCache() #2 /home/www/app.bin/activecollab/environment/classes/AutoLoader.class.php(111): AutoLoader->loadClass('DB') #3 /home/www/app.bin/activecollab/application/functions.php(33): AutoLoader->loadClass('DB') #4 /home/www/app.bin/activecollab/init.php(98): __autoload('DB') #5 /home/www/app.bin/activecollab/index.php(9): require('/home/www/app.b...') #6 {main}

It seems as long as AC believes that it cannot write to this dir theres going to be trouble - ive tried from freshly downloaded zip/tar.gz 3x now with the exact same result - this as far as it gets.

Thoughts? (Thanks again so much!)
avatar
nokati on Apr 23. 2007. 9:24 am
looking back this is identical to a problem that occured in 0.6->0.7 for several people (i.e. install, do proper chmod's, get permission/writable bases issues): http://www.activecollab.com/forums/topic/730/

Could this be a recurring bug in how you test the writable nature of directories rearing its hear? I really hate to say it but everythings proper on this end and the box has run AC in the past and nothing config-wise has changed (OpenBSD/Apache/PHP5/MySQL5) so I feel like Im going crazy :)
avatar
nokati on Apr 24. 2007. 4:10 am
still no luck - now stuck with autoloader & and an AC that thinks it can write to writable dirs (even though my php test script proves otherwise) - just pinging this thread up.
avatar
nokati on Apr 27. 2007. 4:44 am
OK, there is definitely something up with the .71 installer Ilija - tried several types of installs, including manual and it all boils down to the installer thinking 777'd dirs arent writable and/or autoloader.php issues.

Just to drive this home:
<?php if (is_writable('/home/www/app.bin/activecollab/cache/')) { print "yay"; } else { print "boo"; } ?>

Yet we always have:
OK: /config/config.php is writable
Error: /public/files is not writable
Error: /cache is not writable
Error: /upload is not writable

showing that whatever test you are doing on directories fails on certain os's or php installs somehow (this is an openBSD/php5/mysql5 box that previously hosted a .70 to .71 install quite well).

Could you point me to which php's/classes you are doing these tests and checks at so I can try to modify/fix this?

Thanks in advance

RSS IconRecent posts in this topic