Frequently Asked Questions

From LinphaWiki

Jump to: navigation, search

(fixme -> add links to mentioned programs in FAQ, like apache, mysql, ImageMagick and so on...)

Contents

How can I change the path of pictures storage on Windows NTFS

If you are using OS Windows and you have a harddrive NTFS formatted there is a way how to create symbolic links.
There is no more problem with having album directory on different harddisk in any subfolder then where Linpha installation is. There is no need to modify Linpha sources so one do not have to be worried when upgrading to newer version. All you need is a program that is able to create junctions (symbolic links) under Windows. There are two possibilities: use a utility from bought WIN2K resource kit or Sysinternal's Junction freeware. The latter one is a small and easy to use utility. There is no need to install it.
Usage is like this: junction.exe -s path_to_directory_where_photos_are_located path_to_linpha\albums

How can I create all Thumbnails and Metadata using cron

Install curl (most distris already have it)

Get the CronOthumb script from here and follow these steps...

First, please rename the cronOthumb script and place it in the LinPHA rootdir

  • run curl as follows:

curl --max-time 50000 -d admin=adminname -d pass=adminpass http://localhost/linpha/howYouNamedTheScript.php

  • Optional Settings:
    • -d directories=nothing (to prevent create/update of directories)
    • -d thumbnails=nothing (to prevent create/update of thumbnails)
    • -d exif=nothing (to prevent create/update of EXIF data)
    • -d iptc=nothing (to prevent create/update of IPTC data)
    • -d silent=true (run silent, no debug messages)
    • append '> out_cronOthumb.html' to have output formatted in HTML in a human readable file

NOTE: For security reasons, the recreate of directories is denied!

How can I setup common upload directories for users

here's what todo:
  1. create a new folder uploads within the linpha root dir (/linpha/uploads/) and change mod 777 or even better setup rwx support only for the user under which the Apache Webserver runs at. e.g. www-data on Debian.
  2. open plugins/ftp/includes/config.inc.php
  3. find arround line 22 :

< --- snip --- >
}
else
{
$default['DIRACCESS'] = Array($linpha_dir.'/albums');
$default['STARTDIR_LEFT'] = $linpha_dir.'/albums';
}
and change it to read:
}
else
{
$default['DIRACCESS'] = Array($linpha_dir.'/uploads');
$default['STARTDIR_LEFT'] = $linpha_dir.'/uploads';
}

you are done...

How can I setup a MySQL root password

To set a root password for your DB use the mysqladmin command.

Example:

UNIX --> /path_to_mysqladmin/mysqladmin -u root password secret
Windows --> c:\xampp\mysql\bin\mysqladmin -u root password secret

Replace "secret" with your new password.

Why can't I access my directories created with the Filemmanger later via FTP

When creating a directory in plugins/ftp/index.php this command is used :

case 'createdir': mkdir($_GET['parentdir'] . '/' . basename($_GET['dirname']), 0700); display(); break;
The problem is that with the permission set to 700 the directory can be browsed only by the webserver user (in my case nobody.nobody). If I connect with a ftp client on my host account, I can't change in these directories. So, for my personnal use, I replace 700 with 777, so I can do what I want. I don't know if this 700 restriction is for security purpose, but in my case it was a problem. Hope it can help people meeting same problem.
(NOTEThis is a user contributed workarround, not recommended by the LinPHA developers!)

Client does not support authentication protocol requested by server; consider upgrading MySQL client

short version of this post: [MySQL Forum]

The solution: (Windows related, but my.ini settings are similar on UNIX - Developers note)

My first measure was downloading and installing MySQL Administrator (get it freely at mySQL’s site).

STEP 1 Go to your my.ini file in your mySQL directory (e.g., C:Program FilesMySQLmy.ini), using the Notepad or any editor to open it up. Add the following

#Use old password encryption method (needed for 4.0 and older clients).
old_passwords

Save and close the file. (pay attention to not save it as a .txt! It must be saved as its original extension type, .ini . Select “All files” in the Save as field of the dialog box) Note: I have added it two lines below of

# The TCP/IP Port the MySQL Server will listen on
port=3306

but where you add these lines really doesn’t matter, as it seems.

STEP 2 Use MySQL Administrator to connect to your database and change the root’s password to something other than (none). Press the Apply Changes button.

STEP 3 Edit your phpMyAdmin’s config.inc.php file with any text editor, like Notepad. You’ll go to the line “$cfg['Servers'][$i]['password']” (there are no quotes) and fill in your new password after the equal signal ( = ), inside the two single quotes ( it is ‘’ , should be ‘yourpassword’ ). This password must be the same one you set up in MySQL Administrator. Save and close the file.

STEP 4 Stop Apache and stop mySQL. You can use MySQL Administrator to stop mySQL (the option Service Control) and use Apache Monitor (that sits in your system tray) to stop Apache. The order in which you stop them doesn’t matter.

STEP 5 Restart Apache.

STEP 6 Restart mySQL. Now, if you try to restart mySQL with MySQL Administrator, you’ll get an error message. You have changed mySQL’s password and then stopped the database server, so now even if you put the right password in MySQL Administrator it is, of course, unable to restart mySQL. So, you’ll have to restart the database manually. Go to the Windows’ Start button and click on “Run”. Type “services.msc” (no quotes). Look for mySQL in the list, click once over it with your mouse’s right button, and choose “Start”. Now mySQL should start again. You’ll confirm this looking at the column “Status”, that should show “Started”.

IMPORTANT! Re-start FIRST the Apache Server, and THEN the mySQL Server. If you do it vice-versa, you will continue with the same error.

Note: Now, you should be done. But if the error persists you simply leave everything working (does NOT stop any server) and go to your MySQL Administrator, re-writing the same password and pushing the button “Apply Changes”. Go to your browser, press the reload button, and the problem is gone.

How to fix Fatal Error on SuSE during install

SuSE split out php session support as a module from the php core dist, (for whatever reason). So all you have to do, is to install php4-session. If not already installed, also install php4-exif and php4-gd...

Why does LinPHA fail to detect ImageMagick and what to do

I have installed "ImageMagick" but LinPHA doesn't find it !? Here are some points to look at:

Windows

The path, where ImageMagick is installed, has to be in the system environment variable PATH. Go to Control Panel - System - Advanced - Environment variables - Select "Path" and click edit. Add the path to ImageMagick to this list and save it.

If LinPHA now still does not detect that ImageMagick is installed, or ImageMagick is already in this list, your webserver may be running under a differnt user and doesn't know yet anything about this change. Then a system reboot will do the trick.

Windows running IIS Webserver

On Windows 2003 Server running IIS 6 you may need to grant READ (RX) permission to the iusr_ and iwam_ accounts to C:\Windows\system32\cmd.exe

Force use of ImageMagick

If you are sure ImageMagick is installed correctly, you can force LinPHA to use ImageMagick this way:

LinPHA V1

  1. Finish the installation
  2. Open the linpha_config table in database you have installed LinPHA (best use PHPMyAdmin) and set the path to the ImageMagick executables as value for convert_path (with trailing slash, example: /usr/local/bin/ )
  3. Now force the use of convert by setting use_convert to 1.


LinPHA V2

  1. Finish the installation
  2. Open the admin pages, go to Settings - All
  3. Set the path to the ImageMagick executables in the field sys_im_imagemagick_path
  4. Enable sys_im_use_imagemagick

Install went fine but I can't login, why?

This is often caused by some wrong settings in php.ini. Make sure to set:

  • session.save_path=/tmp (or to whatever your temp is)
  • session.use_cookies=on
  • session.save_handler=files

Configure your browser to accept cookies and remember to restart Apache!

I have choosen language X but LinPHA still shows up in English, why?

Your browser is configured to use English by default (Firebird for example is English only, so...)

Either make sure to change the browser default language, or force the use of your language by disable the LinPHA language auto-detection feature found under General Configuration (advanced options) in the admin section.

Personal tools