Search…

X3 Photo Gallery Support Forums

Search…
 
jm26200
Experienced
Topic Author
Posts: 39
Joined: 19 Jul 2008, 02:30

error with other language same other language only english

18 Jul 2012, 13:59

hi

i don't understand when i change language i have error

* Cannot create folder iv-config/language/

and when you see site on every screen a box appears with this message


ty for help ;)
Attachments
navigate.png
when navigate
navigate.png (100.48 KiB) Viewed 10200 times
open_site.png
open site
open_site.png (58.11 KiB) Viewed 10200 times
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

Re: error with other language same other language only engli

19 Jul 2012, 03:50

This looks like some sort of permissions issue, you need to change the permission on iv-config folder so Imagevue could create files inside. Here is an article describing this in details:

https://www.photo.gallery/documentation/sett ... rmissions/
firedev.com
 
Eightkiller
Experienced
Posts: 116
Joined: 15 Jul 2012, 14:34

Re: error with other language same other language only engli

19 Jul 2012, 05:51

Hy, I'm encountering the same problem, unfortunately, giving chmod 777 permissions to the folder iv-config (and all of its subfolders and files) on my ftpclient, doesn't solve the problem.

I also contacted the service hosting my site, the deactivated the phpsafe mod, and checked the permissions too, for them it's ok, they told me to check which php function is used to create the folders.

Any other ideas?

Thanks in advance.
Last edited by Eightkiller on 19 Jul 2012, 06:11, edited 1 time in total.
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

Re: error with other language same other language only engli

19 Jul 2012, 06:10

You might have to contact your hosting support and ask for their assistance. I've seen hosts where the files uploaded by ftp are unaccessible for PHP without divine intervention from admin.
firedev.com
 
Eightkiller
Experienced
Posts: 116
Joined: 15 Jul 2012, 14:34

Re: error with other language same other language only engli

19 Jul 2012, 06:12

I also contacted the service hosting my site, the deactivated the phpsafe mod, and checked the permissions too, for them it's ok, they told me to check which php function is used to create the folders.

The difference for me is that i don't have to change the language, i just go to my site adress, and then the error appears right away.

it seems that this is this part of the code that is raising the error,

if (!($res = mkdirRecursive(self::_getCustomLanguagesDir(), 0777))) {
ivMessenger::add(ivMessenger::ERROR, 'Cannot create folder iv-config/language/');
}

and the function:

/**
* Recursively makes directory, returns TRUE if exists or made
*
* @param string $path The directory path
* @param integer $mode
* @return boolean TRUE if exists or made or FALSE on failure
*/

function mkdirRecursive($path, $mode = 0777)
{
$result = true;
if (!file_exists($path)) {
$result &= @mkdir($path, $mode, true);
}
$result &= iv_chmod($path, $mode);
return $result;
}

Don't know why the directories can't be created, in my case the directory with the file "french.xml" already exists

Logically it is the instruction iv_chmod($path, $mode) that is not working with my host or something like that, probably returning a $result = false.

cf. the code of the function : /**
* Error-free chmod function
*
* @param string $filename
* @param integer $mode
* @return boolean
*/
function iv_chmod($filename, $mode)
{
if (file_exists($filename) && is_writable($filename)) {
ivErrors::disable();
$result = @chmod($filename, $mode);
ivErrors::enable();
return $result;
}

return false;
}
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

Re: error with other language same other language only engli

20 Jul 2012, 02:30

Well I understand that this is permissions issue, however I am not sure what to recommend. You can create the folder manually, that should solve it. But it is strange that Imagevue would try to create the language folder right off the bat.

If you could provide FTP login to your server I would like to take a closer look at what is going on.
firedev.com
 
Eightkiller
Experienced
Posts: 116
Joined: 15 Jul 2012, 14:34

Re: error with other language same other language only engli

20 Jul 2012, 04:09

I did some tests to look at the the $mode value when i launch my site, and it is always 511 ( seems to be equivalent to 0777 octal value),

I just added some ivMessenger instructions to look the value of the $mode and $ filename

So it seems that, even when you are specifying the 0777 value for the mode in the call of the function, it is still using the 511 value, that may be the problem but i don't see how to solve it, maybe it comes from the hosting company, but i don't know what to tell them extactly, you know the hotline is delocated in Morrocco so they are not very efficient :p

EDIT: I also thought that maybe the conversion between octal value and decimal value was not done properly, so i forced 777 value instead of 0777, thinking that the 511 may come from this, but it is still the same. same error (attached file number 2)

Here are the changes i made:

Code
/**
 * Recursively makes directory, returns TRUE if exists or made
 *
 * @param  string  $path The directory path
 * @param  integer $mode
 * @return boolean       TRUE if exists or made or FALSE on failure
 */
function mkdirRecursive($path, $mode = 0777)
{
	$result = true;
	[b]$mode = 0777;[/b]
	[b]ivMessenger::add(ivMessenger::ERROR, '$mode in mkdirRecursive = '.$mode);[/b]
	if (!file_exists($path)) {
[b]		ivMessenger::add(ivMessenger::ERROR, '$path = '.$path.' does not exists');[/b]
		$result &= @mkdir($path, $mode, true);
	}
	$result &= iv_chmod($path, $mode);
	return $result;
}

function iv_chmod($filename, $mode)
{
	if (file_exists($filename) && is_writable($filename)) {
		ivErrors::disable();
		$result = @chmod($filename, $mode);
[b]		ivMessenger::add(ivMessenger::ERROR, '$filename = '.$filename.' - $mode dans iv_chmod= '.$mode.' - $result de iv_chmod = '.$result);[/b]
		ivErrors::enable();
		return $result;
	}

	return false;
}
Maybe that will enlighten you on what i should do :p

Thanks in advance.
Attachments
errors_when_launching_2.png
errors_when_launching_2.png (8.93 KiB) Viewed 10170 times
errors_when_launching.png
errors_when_launching.png (10.5 KiB) Viewed 10170 times
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

Re: error with other language same other language only engli

20 Jul 2012, 09:14

Well this is strange, because 511 is equivalent of 0777, I don't know why it doesn't work but I can suggest a workaround.

Create the iv-config/languages/ folder and copy iv-includes/include/lang.xml (for english) or any other language from iv-includes/language/ to that folder, and edit it manually. You can rename the file if you want and it will be recognized in the Imagevue Admin Panel
firedev.com
 
Eightkiller
Experienced
Posts: 116
Joined: 15 Jul 2012, 14:34

Re: error with other language same other language only engli

21 Jul 2012, 05:24

Yes, your idea fixed the problem, but it is only a temporary solution, because i'm unfortunately seeing that i can't do anything in the admin panel, when i change a title or a description of a photo or anything, then i save, i can see "folder data saved" and so on but, none of my changes are saved it rolled back to the way it was before i clicked on the save button, so there must be a permission problem :s. I can put all my directories in 777 mode but it is not the safest way :s, or i can edit the files manually :s (folders.xml, foldersData.xml, ...) but too bad not using the admin panel :s
I also don't understand why i'm only seeing 2 icon (16x16) in front of the name of my categories in my menu. They all match the following text :
[folder_toto_16.png] MyMenuText
But it only shows up 2 icons in my menu of 8 item menu.
Of course everything works on my localhost, it only bugs on the published site( by the way the site is hosted by "Netissime")

Thanks.
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

Re: error with other language same other language only engli

22 Jul 2012, 23:41

Oh, so you can use 777? Then do it, you don't need to chmod ALL files, just iv-config, content folder and their contents. It's not making your site less secure anyway.

The missing menu icons are most likely caused by missing or unreadable files. Could you provide a link to your site please? It is hard to tell what is going on just by guessing.
firedev.com
 
Eightkiller
Experienced
Posts: 116
Joined: 15 Jul 2012, 14:34

Re: error with other language same other language only engli

23 Jul 2012, 04:14

Here is the link to my site http://www.insightspirit.com
You can see that a lot of icon are invisible :p
 
Eightkiller
Experienced
Posts: 116
Joined: 15 Jul 2012, 14:34

Re: error with other language same other language only engli

23 Jul 2012, 04:29

Unfortunately, there is still a problem with my language. Here is the errors i see when trying to modify the french language in the admin panel.
Even if my file "french.xml" contains every words in french. In the site and in the admin panel only half of the words are french words, the rest are in english.You can look the attached file for the error.

here is the code of my french.xml
Code
<?xml version="1.0" encoding="UTF-8"?>
<lang>
	<next_image>Image suivante</next_image>
	<previous_image>Image précédente</previous_image>
	<next_thumbnails>Page suivante</next_thumbnails>
	<previous_thumbnails>Page précédente</previous_thumbnails>
	<popup>Ouvrir dans une fenêtre pop-up</popup>
	<window>Ouvrir dans une nouvelle fenêtre</window>
	<download>Télécharger l'image</download>
	<zoomin>Zoom avant</zoomin>
	<zoomout>Zoom arrière</zoomout>
	<play>Jouer le diaporama</play>
	<stop>Arrêter le diaporama</stop>
	<showimage>Montrer le diaporama</showimage>
	<showthumbnails>Montrer les vignettes</showthumbnails>
	<imageinfo>Description de l'image</imageinfo>
	<mainmenu>Menu de la galerie</mainmenu>
	<sendemail>Envoyer l'image</sendemail>
	<login>Ouvrir la session</login>
	<logout>Fermer la session</logout>
	<open>Ouvrir</open>
	<copylocation>Copier l'adresse de l'image</copylocation>
	<enterfullscreen>Afficher en plein écran</enterfullscreen>
	<exitfullscreen>Sortir du mode plein écran</exitfullscreen>
	<videofullscreen>Voir en plein écran</videofullscreen>
	<yourname>Votre nom/prénom</yourname>
	<youremail>Votre adresse e-mail</youremail>
	<yourfriendsemail>L'adresse e-mail de votre ami</yourfriendsemail>
	<send>Envoyer</send>
	<sent>Votre message a bien été envoyé. Merci !</sent>
	<input_password>Entrez le mot de passe</input_password>
	<incorrect_password>Mauvais mot de passe</incorrect_password>
	<contact>Me contacter</contact>
	<sendlink>Envoyer l'image</sendlink>
	<purchase>Acheter maintenant !</purchase>
	<link>Lien</link>
	<sfx>Activer le son</sfx>
	<empty_message>Message vide</empty_message>
	<bad_email>Adresse email invalide</bad_email>
	<cannot_open_template>Ne peut pas ouvrir le modèle</cannot_open_template>
	<could_not_mail>Ne peut pas envoyer l'email</could_not_mail>
	<email_disabled>Veuillez activer l'email dans les options</email_disabled>
	<no_such_pic>Image indisponible</no_such_pic>
	<path_is_empty>Le chemin d'accès est vide</path_is_empty>
	<share>Partager cette page</share>
	<html>Voir en HTML</html>
	<fotomoto>Acheter maintenant !</fotomoto>
</lang>
Thanks in advance :)
Attachments
error_language.png
error_language.png (9.58 KiB) Viewed 10147 times
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

Re: error with other language same other language only engli

23 Jul 2012, 04:55

I believe you didn't say the file in UTF-8 encoding. All XML files must use UTF-8. I strongly encourage you to fix the permissions however so Imagevue will be able to write to files.
firedev.com
 
Eightkiller
Experienced
Posts: 116
Joined: 15 Jul 2012, 14:34

Re: error with other language same other language only engli

23 Jul 2012, 07:05

What do you think by " I did'nt say the file in UTF-8 encoding" ? In the french.xml file, it is said that it is in UTF-8 no?
Code
<?xml version="1.0" encoding="UTF-8"?>
I must talk with my host provider for the permissions issue.

And what do you think for the icon not visible? (http://www.insightspirit.com

Thanks in advance.

P.S. : Sorry to ask so many questions :p, but i guess i have no luck with my hosting provider lol
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

Re: error with other language same other language only engli

25 Jul 2012, 08:49

Hello again, after seeing the same issue on the other server I think we might have a workaround for "iv-config/languages" issue. Please check it on your server. Replace iv-includes/include/functions.inc.php with the file included and see if it will work for you.
Attachments
functions.inc.php.zip
(7.15 KiB) Downloaded 443 times
firedev.com