What files can I remove from my installation. The install is taking up a large amount of my allowed hosting space. Especially under the modules directory. Can I safely remove things like /modules/core/po or modules/core/locale? I only need english. How about the install directory? I shouldnt need that again. I could always re add it. What about the modules I dont plan on using like Nokia.
Thanks
Gallery version = 2.1.1 core 1.1.0.1
PHP version = 4.3.11 apache
Webserver = Apache/1.3.33 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.11 FrontPage/5.0.2.2634a mod_ssl/2.8.22 OpenSSL/0.9.7a
Database = mysql 4.0.25-standard, lock.system=flock
Toolkits = ArchiveUpload, Exif, Getid3, Thumbnail, Gd
Acceleration = none, none
Operating system = Linux
Posts: 8601
you can remove all the things you mention.
- all po dirs can be removed, not used when G2 is running (only to build locale dirs)
- you can remove locale/* dirs for any languages you aren't using.. if using only english, you can remove locale entirely
- you can remove the install dir after install
- you can remove the module/* or themes/* dir for any module/theme that you don't need AND is not currently install in your G2 (don't remove any dir for any inactive plugin.. make sure to uninstall completely)
- you can remove lib/tools if you have it
Posts: 37
Hmm, I'd like to delete uneeded files too because my provider says that I have too many files.
Would it be possible for someone who knows PHP to make a script (or help me make one) that iterates through the directory tree and removes all /po and /locale folders?
Pseudo code:
Loop through directories [
If folder name /po or /locale
Delete
]
Posts: 37
Update:
I have been working on a script. Everything (i.e. searching and isolating po and locale dirs) works except removing directory part. I know rmdir() doesn't work on non-empty directories so I'm using the purge() function from http://www.devshed.com/c/a/PHP/File-And-Directory-Manipulation-In-PHP-part-2/9/
I'm guessing it's a permissions problem because I get:
Warning: unlink(/home/acc_name/public_html/gallery2/modules/albumselect/locale/af/LC_MESSAGES/modules_albumselect.mo): Permission denied in /home/acc_name/public_html/gallery2/diriter.php on line 69
But getmyuid() in diriter.php and UID of files I want to remove is the same. I am not able to chmod(), I get: Warning: chmod(): Operation not permitted in /home...
Anyone have any suggestions?
Posts: 8601
rm -r */po */*/po */locale */*/locale
Posts: 37
Thanks, that's very short and pretty.
I don't have ssh access, so I tried that command using PHP's shell_exec but nothing happens. I did ls -l, which showed that my username is the owner of those files. whoami or id -un didn't return anything, so I couldn't verify which user the script is running under.
Got any ideas? Thanks.