C. Troubleshooting Gallery
Prev | Frequently Asked Questions | Next

### C. Troubleshooting Gallery

C.1. When I try to access the configuration wizard, I get a 500 Internal Server Error. What's up?
C.2. I've installed Gallery and all seems well. But when I try to upload an image it says Unable to make thumbnail(0) or Invalid image. What gives?
C.3. My ISP has a really old version of PHP, something before 4.0.4pl1, which Gallery can't work with. What do I do?
C.4. Whenever I try to upload grayscale JPEG images I get a Unable to make thumbnail error. Why?
C.5. Whenever I try to upload an image in Gallery, I get all these errors about safe mode. How can I fix this?
C.6. Why can't I upload big files (over a megabyte or two)?
C.7. When I try to run configure.sh, I get an error like this: chmod: getting attributes of `setup\r': No such file or directory How do I fix that?
C.8. When I try to click on the "[login]" link on the Gallery page, nothing happens (no window pops up). What's wrong?
C.9. When I try to login, everything seems to go correctly, but Gallery doesn't log me in?
C.10. Why do I see Warning: Undefined variable: GALLERY_BASEDIR... at the top of the page?
C.11. I can successfully upload photos, but when I look in my album all I see are broken image icons. Why?
C.12. Why do I get Failed opening 'html_wrap/inline_albumthumb.header.default'
C.13. Why do I see this error: jpegtopnm: WRITING PPM FILE option `--quality' doesn't allow an argument?
C.14. Why, when I try to upload images, does it say No images uploaded ?
C.15. Why do I get this error: Warning: fopen(".../albums/team/album.dat.lock","a+") or Your Userfile is not writeable?
C.16. Why do I get the error Allowed memory size of Xxx bytes exhausted ?
C.17. Why do I get pnmtojpeg: No such file or directory when uploading images?
C.18. Why do I get this warning: Your script possibly relies on a session side-effect which existed until PHP 4.2.3?
C.19. Why, when I try to upload a .htaccess and chmod it with my FTP client, it "disappears"?
C.20. Why does uploading pictures on my RedHat 8.0 system result in an error or scewed picture?
C.21. Why doesn't Gallery work correctly on my RedHat 9.0 system?
C.22. How do I use Gallery both from inside my LAN and the internet?
C.23. I'm running Gallery 1.3.4, PHP 4.0.4 and I get Call to undefined function: array_search() in view_photo.php?
C.24. Why, when I edit an album or photo's text, do quotation marks appear as \' (e.g. John Doe\'s Album)?
C.25. I can't extract a .tar.gz file on my Windows machine. Why not?
C.26. Why do I get an EOF / read error reading magic number error when uploading pictures with NetPBM?
C.27. Why do I get errors like this: Warning: open_basedir restriction in effect. File is in wrong directory in /home/johndoe/public_html/gallery/platform/fs_unix.php on line 53?
C.28. Why do I get this error: Warning: write failed: No space left on device (28) in Unknown on line 0?
C.29. Why do I get this error: Warning: exec() has been disabled for security reasons?
C.30. Why can't I upload images using ImageMagick on FreeBSD?
C.31. How do I put my Gallery into debug mode?
C.32. I have uploaded the NetPBM or ImageMagick binaries to my site, but I don't know the absolute path to specify in the configuration wizard. What do I do?
C.33. When I try to enter an album, I get a 404 error. What's up?
C.34. I changed a value on Step 3 of the configuration wizard (or in config.php), but the change isn't taking effect. What's going on?
C.35. Can I host images on another server to conserve space?
C.36. Why do I get errors with email on Windows?
C.37. I've forgotten my admin password! How can I reset it?
C.38. Why are my picture frames screwed up?
C.39. Why do I get this error: Fatal error: session_start(): Failed to initialize storage module: user...?
C.40. I need to remove my albums directory, but I can't since the webserver user owns the files. What can I do?
C.41. Why is my Gallery blue?!
C.42. When I open Gallery inside Mambo, i get "Gallery seems to be inside Mambo, but we couldn't get the necessary info." What am i or my visitors doing wrong?

C.1. | When I try to access the configuration wizard, I get a `500 Internal Server Error`. What's up?

This is because your webserver doesn't allow you to use certain `.htaccess` overrides. The Gallery setup script tries to set some PHP settings, but this requires you to set `AllowOverride Options FileInfo` or disable the overrides. If you have access to your `httpd.conf` file, add this to it:

            <Directory "/path/to/your/gallery/directory">
             AllowOverride Options FileInfo
            </Directory>

If you don't have access to your `httpd.conf`, delete the `.htaccess` file in the `setup/` directory.

C.2. | I've installed Gallery and all seems well. But when I try to upload an image it says `Unable to make thumbnail(0)` or `Invalid image`. What gives?

This is a very common problem. It's usually because the image manipulation program isn't getting called correctly, and this can happen for a number of reasons. To diagnose the problem, follow these steps:

1. Verify that the binaries (NetPBM or ImageMagick) are installed correctly and are chmodded 0755 (including the directory they are in).

   One common installation mistake is to put the executable in a path that contains spaces. This happens often on Windows, if either package is installed in `Program Files`. The executables must not be installed in a path that contains spaces.

2. Put Gallery back into configuration mode (see the tutorials earlier in the manual for details)

3. Re-run the configuration wizard. On step 2, select the option to put Gallery into debug mode. Finish the configuration wizard and secure Gallery (this is described in the configuration wizard tutorial).

4. Attempt to upload a picture using the web form interface, not the applet. There will be a whole lot more debugging messages now, and it will help to diagnose the problem. Possible issues are listed below:

If you see any of the following messages, the solutions are listed below

- Error in loading shared libraries -- Indicates that your dynamic library loader can't find a library that it needs. On Linux you can add the directory containing the appropriate library to `/etc/ld.so.conf` and then run ldconfig -v as root to fix this. If you don't have root access to the server, either contact your host for help or download a new version of ImageMagick or NetPBM and use the new install instead.

- Abort trap or Segmentation Fault or Cannot execute binary file -- probably means you installed the wrong binaries for your system (e.g. installed the FreeBSD binaries on a Linux system) or you uploaded the binaries in `ASCII FTP mode` instead of `BINARY FTP mode`.

- Permission Denied -- More than likely, your NetPBM directory or the actual NetPBM binaries are not chmodded 0755. It could also mean that your host has disallowed you from executing programs; if this is the case, you must talk to them in order to get it resolved.

- /usr/bin/convert: Not a JPEG file: starts with 0x0a 0x4d (/home/uspalmer/public_html/gallery/AUTHORS). -- This is a bug that has been fixed with the latest version of Gallery, please upgrade.

- /usr/local/bin/convert: no delegate for this image format (/home/sites/home/web/albums/album_01/IMGP0215.jpg) -- This means ImageMagick doesn't have the appropriate libraries to handle a type of image format (in this case JPEG). If you have root access, make sure the appropriate image libraries are installed or ask your host to verify this. If not, you can try using NetPBM from the Gallery Download Page, which has all major image formats already included. If you are using FreeBSD and installed ImageMagick from the ports collection, see FAQ C.30.

- Status: (expected 0) -- This means that Gallery is unable to get a status message from PHP, which it relies on. One possible solution is that your host has disabled some needed php functions. To determine if they have create a PHP file containing

      <?php
      echo ini_get("disable_functions");
      ?>

  If the output displays exec() see FAQ C.29.

If you still can't find a solution, try asking in the Gallery Support Forums.

C.3. | My ISP has a really old version of PHP, something before 4.0.4pl1, which Gallery can't work with. What do I do?
| First, send them a quick email and ask them if they are willing to upgrade. They should considering a PHP version this old is years and years old, and probably contains security problems. Your only other good option is to install PHP as a CGI, as in FAQ B.3
C.4. | Whenever I try to upload grayscale JPEG images I get a `Unable to make thumbnail` error. Why?
| This is a bug in some versions of NetPBM that cause it to choke on grayscale images. This is fixed in the version of NetPBM available on the Gallery download page.
C.5. | Whenever I try to upload an image in Gallery, I get all these errors about `safe mode`. How can I fix this?

This is an unfortunate situation, because Gallery cannot run in safe mode. You have three options, listed below (try them in that order).

1. Email your host asking them to turn off safe mode. They are providing a service to you, and safe mode puts severe limits on that. If they are a good host, they should listen

2. Try FAQ B.3, where you can use PHP as a CGI. This is usually pretty difficult, if you don't know exactly what you're doing.

3. Find another host that doesn't use safe mode. Some are listed in the Gallery Hosting Referrals Page

C.6. | Why can't I upload big files (over a megabyte or two)?

Craig Goranson wrote a very informative email about how to fix this.

### Note

Gallery tries to override the `upload_max_filesize` and `post_max_size` directives in its `.htaccess` file. This means that changing the setting globally may still result in it being overridden at the .htaccess level, so you may want to just change the directive there instead of globally. Gallery tries to set both of the directives to about 20 megabytes, so this will only affect you if you're going to upload files over that size.

If you're using Apache 2, especially with something like RedHat, you may need to edit another directive, `LimitRequestBody`, as described in this forum post. Setting this directive to 0 (i.e. `LimitRequestBody 0`) will allow you to upload as big a file as you want (until you hit `upload_max_filesize` and/or `post_max_size` -- see the above email link for more information).

C.7. | When I try to run configure.sh, I get an error like this: `chmod: getting attributes of `setup\r': No such file or directory` How do I fix that?
| The answer is to simply upload the `configure.sh` file in `ASCII FTP mode`
C.8. | When I try to click on the "[login]" link on the Gallery page, nothing happens (no window pops up). What's wrong?

The most common reason for this is that you have JavaScript disabled or limited in your browser. Make sure that JavaScript is allowed to open windows, or else you may not be able to login to Gallery.

The number two reason for this problem is that your login page has a slightly different hostname than the one you used for your gallery. You can check this by right clicking on the login page and selecting Properties to see what its URL is. The common cause for this is that you used a variation on the standard URL to get to your Gallery, and then the browser thinks that the JavaScript popup is actually on a different host and it causes a security exception when the popup tries to control the main window. For example, if you've told Gallery in the config wizard that your gallery is at http://www.menalto.com/photos and then you actually access the Gallery by going to http://menalto.com/photos (note the "www" is missing), you'll still see your Gallery, but you'll experience this problem. The solution is to pick one hostname and stick with it.

C.9. | When I try to login, everything seems to go correctly, but Gallery doesn't log me in?

There could be a few reasons why this doesn't work. Here are some of them

- If you are on Windows, you need to edit your `session.save_path` directive in `php.ini` to a valid directory. This defaults to `/tmp` which isn't a valid directory on Windows. Change it to a valid temp folder, such as `c:\winnt\temp`. Then restart your webserver.

  If you don't have access to `php.ini`, add this to the `.htaccess` file in your gallery directory.

                php_value session.save_path "c:\winnt\temp"

- Locate the temporary directory specified in php.ini, or as specified in the paragraph above, and remove the sess_* files. If Apache/PHP leave stale session files in the temporary directory, errors can occur when trying to create the session, and not logging in is the symptom.

- Make sure that the `session.use_cookies` setting is on in `php.ini`. It defaults to on, but your host may have turned it off. You can verify the setting by putting Gallery into configuration mode and visiting the `setup/phpinfo.php` page in your browser. Search for that directive.

- Verify that it is not FAQ C.8

- Verify that your browser is configured to accept cookies. If you have this functionality turned off, please turn it back on, or Gallery will not work.

- Put Gallery back into configuration mode and visit the `setup/ session_test.php` script. Refresh the page and see if the number increases. If it doesn't, you have a problem with sessions. If you have done all of the above steps, you may need to contact your host for help.

- Ensure that you are logging in using the same URL that you specified during Gallery's configuration. If your host responds to "www.myhost.com" and "myhost.com", you need to use the one that is specified in your configuration. If you use the one that's not specified, you may be unable to login. Another remedy for this issue is to follow the instructions in FAQ C.22

C.10. | Why do I see `Warning: Undefined variable: GALLERY_BASEDIR...` at the top of the page?

Gallery 1.x generates a ton of warnings. We're fixing this in the next release. In the meantime, you need to turn down the error reporting level in your `php.ini` file so that you don't see these warnings. You can do that by setting error_reporting = E_ALL & ~E_NOTICE in `php.ini`. Then restart your Apache server.

If you don't see a change after doing this, it's possible that you're editing the wrong php.ini file. Go to `gallery/setup/phpinfo.php` in your web browser and it will tell you (near the top of the file) where it thinks your `php.ini` file is located. After making the change, phpinfo() should say that your error_reporting level is "2039".

You can also add this line to your `.htaccess` file

            php_value error_reporting 2039

C.11. | I can successfully upload photos, but when I look in my album all I see are broken image icons. Why?
| You've specified an incorrect path to your albums directory in the config wizard. You can fix this by re-running the config wizard and correcting the Albums URL value or you can edit the `config.php` file and fix the $gallery->app->albumDirURL variable.
C.12. | Why do I get `Failed opening 'html_wrap/inline_albumthumb.header.default'`

If you unzipped/untarred the Gallery script on a Mac running OS 9.2.1 or less (ie, non OS X), once its uploaded, three files need to be renamed. They are in the HTML_Wrap folder - `inline_albumthumb.footer.default` , `inline_albumthumb.header.default`, and `inline_gallerythumb.frame.default`. The last few characters at the end of these file names will get truncated on the Mac so Gallery won't be able to find them (there will be an error message above and below each photo). Adding the 't' at the end in FTP or Telnet will solve this. This is only a problem if its untarred/gzipped on a Mac. If they are unzipped on the server they will work fine. [Thanks James O'Donnell]

C.13.

Why do I see this error:

            jpegtopnm: WRITING PPM FILE
            option `--quality' doesn't allow an argument?

This problem is caused by one of two things:

1. You have safe mode enabled. Gallery can't run in this environment. See FAQ C.5 for more information

2. Your NetPBM binaries have a bug. Please use the NetPBM binaries found on the Gallery Download Page.

C.14. | Why, when I try to upload images, does it say `No images uploaded` ?

This can be caused by one of two things:

1. FAQ C.6

2. Your PHP configuration has file uploads disabled. Put Gallery in config mode and open `gallery/setup/phpinfo.php` in your web browser and search for the `file_uploads` row. If `file_uploads` isn't enabled, then you won't be able to upload images to Gallery, and you should talk to your system administrator.

C.15. | Why do I get this error: `Warning: fopen(".../albums/team/album.dat.lock","a+")` or `Your Userfile is not writeable`?

This typically happens when your ISP makes a change in your environment (like upgrading PHP or moving things around) without telling you about it. In a nutshell, some of Gallery's files wind up being owned by the wrong user and their permissions become set such that Gallery can no longer write to them. I've never found this to be the result of a bug in Gallery. To fix this, you can change the permissions on your Gallery data files so that Apache can read the files again. This should only happen on Unix. If you have shell access, you can fix it like this:

            cd /path/to/albums
            cd ..
            chmod -R 777 albums

If you don't have shell access, you can use your FTP client to recursively (every file and every directory) chmod the albums directory 777. Make sure you chmod the `.users` directory, which can sometimes be hidden from view. See FAQ C.19 for more details

C.16. | Why do I get the error `Allowed memory size of Xxx bytes exhausted` ?

[answered by Vallimar] You are exhausting the available memory that PHP has access to. In `php.ini` there is a config variable named `memory_limit` that by default is set to 8MB. I quickly exhausted this after uploading a couple thousand images and had to increase it. Edit `php.ini` and increase it to a larger value (restart Apache afterwards). If you don't have access to `php.ini`, you can add this line to your `.htaccess` file.

            php_value memory_limit [new memory limit]

### Note

When adding that line to `.htaccess`, you must use a number, in bytes. For example, 8MB would be about 8000000 bytes.

C.17. | Why do I get `pnmtojpeg: No such file or directory when uploading images`?

In version 9.19 of NetPBM, they changed the name of the ppmtojpeg binary to pnmtojpeg. It's the same binary and serves the same purpose, but it's got a different name. The precompiled binaries provided on the Gallery download page come with ppmtojpeg . The newer stuff that you might get comes with pnmtojpeg . Gallery tries really hard to figure out which one you have available and use it. However, security restrictions can make it impossible for us to tell for sure. So, it's possible that you have one version of the binary and Gallery expects the other. There are several easy solutions (you only need to do one of these):

1. Copy ppmtojpeg to pnmtojpeg (or vice versa, as the case may be).

2. Edit your `config.php` and change $gallery->app->pnmtojpeg to `"ppmtojpeg"` (or `"pnmtojpeg"`, whichever you have).

3. Upgrade to Gallery v1.3.4 which lets you specify which one you have in the config wizard.

C.18. | Why do I get this warning: `Your script possibly relies on a session side-effect which existed until PHP 4.2.3`?

In PHP 4.2.3, they made a change to the way that the session code works that results in PHP generating a warning when a session is created. In order to resolve this, we have to update some code in Gallery. This warning has no effect, except that it shows up on screen. You can make it go away by editing your php.ini and setting

            session.bug_compat_warn to off

and restart Apache.

If you don't have access to `php.ini`, add this line to your `.htaccess`

            php_flag session.bug_compat_warn off

This should be fixed in future versions of Gallery.

C.19. | Why, when I try to upload a `.htaccess` and chmod it with my FTP client, it "disappears"?
| This is because on some FTP clients, the default setting is to hide files that begin with a dot. The file may actually be on the server, but your FTP client isn't programmed to display it. To make these files "reappear", you must change some settings. PixelPoet has written a tutorial for WS_FTP available here: Quick Tips for Chmod with WS_FTP. If you use CuteFTP, see this thread in the forums.
C.20. | Why does uploading pictures on my RedHat 8.0 system result in an error or scewed picture?

In RedHat 8.0, the default web server is Apache 2.0. Unfortunately, PHP and Apache 2 aren't very stable together yet, though current versions of PHP and Apache 2 do work relatively well together. However, there is a bug in the version of PHP distributed with RedHat 8.0 that can corrupt uploads. For information on how to fix these errors or scewed pictures, see this thread in the forums. Keep in mind that these are merely workarounds. The best option is to upgrade your PHP version to the latest from http://www.php.net/

C.21. | Why doesn't Gallery work correctly on my RedHat 9.0 system?

As in Red Hat Linux versions since 8.0, the default web server is Apache 2. Apache 2.0 uses a totally different module API, making it necessary to rewrite all modules for this new version. Unfortunately, the PHP version that Red Hat 9.0 is distributed with has a very buggy interface with Apache 2.0. Some of these bugs have been fixed with the latest version of PHP. Please download the latest version from http://www.php.net/. See this forum post for information on how to compile PHP.

C.22. | How do I use Gallery both from inside my LAN and the internet?

### Note

There is a fix planned for future versions of Gallery to allow the config wizard to use relative URLs. Stay tuned.

There are two ways to do this; both are shown below:

- The easiest way to do this is to use relative URLs in `config.php`.

  ### Note

  You will have to redo this each time you run the config wizard, since the config wizard won't accept relative urls.

  You need to edit `config.php` manually. There are two URLs in that file. Change each of them as follows:

  From: `http://www.example.com/gallery` `http://www.example.com/gallery/albums` To: `/gallery` `/gallery/albums` (change these URL's to match your Gallery setup)

- The second method does not require any server-side changes, as the changes you make are made on the client. This may not be the most efficent solution, especially if you have many client computers.

  You need to edit a file called HOSTS on your client machine. The HOSTS file is a ip-address to domain-name mapping file. Adding a line to this file, will make your client look for a local ip instead of an external ip, even if you use a fully qualified domain name.

  Add a line similar to this:

                 10.0.0.2	example.com www.example.com

  This line will make all requests to example.com (and www.example.com) request the server at 10.0.0.2 (replace this with your server's real LAN IP address).

  Depending on your client's operating system, the HOSTS file will be in a different place. Also note that on Windows clients, you will need to reboot the system for the changes to take place.

  - Windows 95/98/ME `C:\windows\hosts`

    ### Note

    By defaults this file in called `hosts.sam`. It must be renamed `hosts` for everything to work.

  - Windows NT/2000/XP Pro `c:\winnt\system32\drivers\etc\hosts`

  - Windows XP Home `c:\windows\system32\drivers\etc\hosts`

  - Linux/Unix `/etc/hosts`

C.23. | I'm running Gallery 1.3.4, PHP 4.0.4 and I get `Call to undefined function: array_search() in view_photo.php`?

This is a function that was introduced in PHP 4.0.5. You can upgrade your version of PHP, or if you prefer, make the following change to `view_photo.php`

Insert the following at line 57 in view_photo.php

    if (!function_exists('array_search')) {
            function array_search($needle, $haystack) {
                    for ($x=0; $x < sizeof($haystack); $x++) {
                            if ($haystack[$x] == $needle) {
                                    return $x;
                            }
                    }
                    return NULL;
            }
    }

### Note

This has been fixed in Gallery 1.4.0

C.24. | Why, when I edit an album or photo's text, do quotation marks appear as `\'` (e.g. `John Doe\'s Album`)?

Your host has `magic_quotes_gpc` enabled in `php.ini` This causes form variables with quotes to be escaped with backslashes. Gallery tries to turn off this functionality, but in your case, this didn't succeed. You'll need to contact your host and ask them to turn this directive off, at least just for your site.

### Note

As of Gallery 1.4.0, Gallery will strip the slashes from fields so that this does not happen, even if `magic_quotes_gpc` is on.

C.25. | I can't extract a `.tar.gz` file on my Windows machine. Why not?

You need to use WinZip twice. (WinZip is a bit weird when it comes to `.tar.gz` archives).

1. Unzip, with WinZip, like you have done.

2. Rename the extracted file (in this example, `netpbm1.1-gallery1.0-linux2.2-redhat6.2-intel`) from `netpbm1.1-gallery1.0-linux2.2-redhat6.2-intel` to `netpbm1.1-gallery1.0-linux2.2-redhat6.2-intel.tar`.

3. Unzip once more

C.26. | Why do I get an `EOF / read error reading magic number` error when uploading pictures with NetPBM?
| Please see FAQ c.2
C.27. | Why do I get errors like this: `Warning: open_basedir restriction in effect. File is in wrong directory in /home/johndoe/public_html/gallery/platform/fs_unix.php on line 53`?
| This is caused by a PHP directive called open_basedir. Basically, your host has misconfigured this directive and not added the directory where Gallery is located to the directories where PHP can access and modify files. You'll need to contact them and ask them to add the directory where your website files are located.
C.28. | Why do I get this error: `Warning: write failed: No space left on device (28) in Unknown on line 0`?
| Your host setup a quota for the web server user. Though your account may still have space left, the quota for the web server user has been overrun. Basically, you'll need to contact your host and ask them to cleanup the filesystem and/or adjust the quota. If you are your host, adjust the quota using edquota.
C.29. | Why do I get this error: `Warning: exec() has been disabled for security reasons`?
| Basically, this is a form of safe mode. Gallery requires functions like `exec()` to perform operations on images. The steps to "fix" this problem are the same as in FAQ C.5.
C.30. | Why can't I upload images using ImageMagick on FreeBSD?

The default install of ImageMagick on FreeBSD doesn't seem to compile with some important image support (e.g. JPEG), so you must explicitly tell it to. There are two ways of doing this.

1. Compile ImageMagick using this command: cd /usr/ports/graphics/ImageMagick/ && make -DWITH_JPEG -DWITH_TIFF -DWITH_PNG install clean

2. Add the following lines to `/etc/make.conf`:

                  WITH_JPEG=yes
                  WITH_TIFF=yes
                  WITH_PNG=yes

   Then uninstall ImageMagick via ports (make deinstall clean) and reinstall it (make install clean)

C.31. | How do I put my Gallery into debug mode?

There are two ways, each pretty much equal in simplicity.

- Put your Gallery into configuration mode. On Step 2, there will be an option to turn on debug mode. Make sure this is "on" and complete the wizard.

- Edit `config.php` manually (use the first option if you are not comfortable modifying PHP files yourself). Change this line

                 $gallery->app->debug = "no";

  to

                 $gallery->app->debug = "yes";

Sometimes it is also helpful to enable `devMode`. Find this line in `config.php`

            $gallery->app->devMode = "no";

And change "no" to "yes" This will enable some extra debugging features and turn up PHP's error reporting level.

C.32. | I have uploaded the NetPBM or ImageMagick binaries to my site, but I don't know the absolute path to specify in the configuration wizard. What do I do?

Upload a file named `test.php` to your NetPBM or ImageMagick directory. The contents of this file should be

    <?php
    print getcwd ();
    ?>

View this file via the web (for example: http://www.example.com/gallery/ netpbm/test.php). It will tell you the absolute path to specify.

C.33. | When I try to enter an album, I get a 404 error. What's up?

One of two things in happening

- The Gallery URL you specified during the configuration wizard is incorrect. Verify that the value you specified does indeed point to where Gallery is installed.

- mod_rewrite is not working. Edit your `config.php` file and change this line:

      	   $gallery->app->feature["rewrite"] = 1;

  to

      	   $gallery->app->feature["rewrite"] = 0;

  Voila! The URLs should work correctly now.

C.34. | I changed a value on Step 3 of the configuration wizard (or in `config.php`), but the change isn't taking effect. What's going on?

These values are defaults. They take effect for new top-level albums, but do not affect already existing albums. If you want to change the value of these parameters for already existing albums, edit each album's properties. You can access album properties by logging in as admin and going into the album in question. Select "properties" from the <<admin options>> pulldown. Then, in the popup window you will be able to change the properties for that album.

C.35. | Can I host images on another server to conserve space?

The straight answer is no. Gallery must have the images on the local server in order to manipulate (i.e. resize, rotate, etc..) them. There is no fast, easy, and widely available way to manipulate (i.e. edit) files on remote servers (there are a few, but none fit all 3 criteria).

It is possible, however, to host your images on multiple servers in order to distribute the bandwidth. For instance, if you have a server that doesn't support PHP, but has lots of bandwidth, you can host the images on that server (as well as the local server) and Gallery will attempt to use the images on the server with lots of bandwidth, so that the local server doesn't suffer so much. More information is available in the mirroring tutorial.

C.36. | Why do I get errors with email on Windows?

If you go to http://www.example.com/gallery/setup/check_mail.php and it gives you the following errors:

             "Error! sendmail_path not set"
             and/or
             "Error! SMTP not set"

you will have to do some changes to your php installation. If you get the "Error! sendmail_path not set" you can safely ignore it on Windows, since it disregards the sendmail_path anyway. To fix the other potential problem, locate your php.ini (probably under C:\Program Files\php or C:\windows), open it with a texteditor and find "[mail function]".

It should look something like this:

             [mail function]
             ; For Win32 only.
             SMTP =
             ; For Win32 only.
            sendmail_from =
            ; For Unix only.  You may supply arguments as well (default: 'sendmail -t -i').
            ;sendmail_path =

Change SMTP to whatever smtp-server you can use that doesn't need authentication and sendmail_from to an email address. Example:

             SMTP = smtp.server.com
             sendmail_from = youremail@server.com

C.37. | I've forgotten my admin password! How can I reset it?

Version 1.4.3 or below: Resetting your admin password is easy; just set your Gallery into config mode, rerun the configuration wizard and specify a new password on step 2.

Version 1.4.4 and above:

1. Create a file named

       resetadmin

   in your /gallery/setup directory.

2. Visit the configuration wizard in your browser

3. Follow the instructions on the page

4. Specify a new password in step 2 of the configuration wizard

The config wizard will give you a special piece of information, and you will be required to edit the resetadmin file, add the string, save, and refresh your browser. This is a security measure to prove that you are an administrator.

C.38. | Why are my picture frames screwed up?

If you have a file called gallery/css/embedded_style.css (ie without the ".default" ending) you should update it. Download your version, open it in Notepad, and cut and paste the contents of gallery/css/embedded_style.css.diff to the end. You can configure the new classes if you want to, and then upload the new version to your website.

You do not need to make any changes to standalone.css. Since version 1.4.1 Gallery also has configurable image frames. If you have customized frames for your images, they should still work with 1.4.1.

However, if you would like to use the new frames, you will need to remove the following files, as appropriate:

            html_wrap/inline_albumthumb.frame   html_wrap/inline_photo.frame
            html_wrap/inline_gallerythumb.frame html_wrap/inline_photothumb.frame
            html_wrap/inline_moviethumb.frame

If you didn't touch the CSS or frame files, this probably means that you didn't override the files upon upgrade. Make sure that your FTP client overrides the old files and upgrades to the new ones.

C.39. | Why do I get this error: `Fatal error: session_start(): Failed to initialize storage module: user...`?

Some other application has setup PHP to use a user-defined session handler. Gallery, however, doesn't run its own handler and relies on PHP to handle things. To correct for this, add this line to the end of your `.htaccess` file:

            php_value session.save_handler "files"

This should fix it if you host allows you to edit PHP directives in `.htaccess`. If not, you may need to contact them to get it changed globally.

C.40. | I need to remove my albums directory, but I can't since the webserver user owns the files. What can I do?
| Bharat has made a simple script to chmod all the files in your albums directory 0777, so you can easily delete them with your FTP client. Download his script here: Gallery Utilities ("Bharat's Cleanup Script"). Instructions are included in the top of the file.
C.41. | Why is my Gallery blue?!

As of Gallery 1.5, the CSS system has changed. There is a `base.css` which is loaded anytime. Then, there is `screen.css` which is loaded when you use a skin (or the default) and your gallery is not embedded in another program. Finally, there is `embedded.css` which loads when your gallery is embedded in another program. To change the color of your gallery, you can edit the appropriate CSS file or select a skin in the configuration wizard.

C.42. | When I open Gallery inside Mambo, i get "Gallery seems to be inside Mambo, but we couldn't get the necessary info." What am i or my visitors doing wrong?
| The reason is described in FAQ C.8 in the second part.

Prev | Up | Next
B. Configuring Gallery | Home | D. Migrating Gallery