Jump to content

Recommended Posts

[Thu Oct 15 16:20:50.457460 2015] [:error] [pid 672:tid 1072] [client ::1:59528] script 'C:/Servers/Apache24/htdocs/prestashop/install/sandbox/anything.php' not found or unable to stat, referer: http://localhost/prestashop/install/index.php

Well, that's the error I'm facing when try to install prestashop (1.6.1.0).

 

I really don't understand what's going on, I already install it in other computer. The only thing that's different is that this PC is behind a proxy.

 

The error shown in page is that "was not possible to install "Português (Brazil)" language

 

Apache 2.4 + PHP 5.4

 

 

Any help?

Share this post


Link to post
Share on other sites

Install in English first and then load other localization packages. I've had the same problem with other language.

Share this post


Link to post
Share on other sites

Install in English first and then load other localization packages. I've had the same problem with other language.

Same.

And now it only tells me that "an error ocurred" at 23%.

Share this post


Link to post
Share on other sites

After some research I found this
 
1- Even I select United States as country, PS Install still looking for 'BR' code.
2- The table ps_lang is empty, so when install process will look for the country, there's nothing there.
 

The error occurrs in "install.php" file at "installLanguages" function and the exact point is in "if (!$id_lang = Language::getIdByIso($iso, true)){."
 

 

Some help?

 

 
write_log function was add by me.

	public function installLanguages($languages_list = null)
	{
		write_log("installLanguages --start");
	
		if ($languages_list == null || !is_array($languages_list) || !count($languages_list))
			$languages_list = $this->language->getIsoList();

		$languages_available = $this->language->getIsoList();
		$languages = array();
		foreach ($languages_list as $iso)
		{
			write_log("installing $iso");
			if (!in_array($iso, $languages_available))
				continue;
			if (!file_exists(_PS_INSTALL_LANGS_PATH_.$iso.'/language.xml'))
				throw new PrestashopInstallerException($this->language->l('File "language.xml" not found for language iso "%s"', $iso));

			if (!$xml = @simplexml_load_file(_PS_INSTALL_LANGS_PATH_.$iso.'/language.xml'))
				throw new PrestashopInstallerException($this->language->l('File "language.xml" not valid for language iso "%s"', $iso));

			$params_lang = array(
				'name' => (string)$xml->name,
				'iso_code' => substr((string)$xml->language_code, 0, 2),
				'allow_accented_chars_url' => (string)$xml->allow_accented_chars_url
			);

			if (InstallSession::getInstance()->safe_mode)
				Language::checkAndAddLanguage($iso, false, true, $params_lang);
			else
				Language::downloadAndInstallLanguagePack($iso, _PS_INSTALL_VERSION_, $params_lang);

			Language::loadLanguages();
			Tools::clearCache();
				write_log("iso=$iso");
			write_log('!$id_lang = Language::getIdByIso($iso, true)');
			if (!$id_lang = Language::getIdByIso($iso, true)){
				write_log("id_lang=$id_lang ;;;; ".'getIdByIso '.Language::getIdByIso($iso, true));
				throw new PrestashopInstallerException($this->language->l('Cannot install language "%s"', ($xml->name) ? $xml->name : $iso));
				}
				
			$languages[$id_lang] = $iso;

			// Copy language flag
			if (is_writable(_PS_IMG_DIR_.'l/'))
				if (!copy(_PS_INSTALL_LANGS_PATH_.$iso.'/flag.jpg', _PS_IMG_DIR_.'l/'.$id_lang.'.jpg'))
					throw new PrestashopInstallerException($this->language->l('Cannot copy flag language "%s"', _PS_INSTALL_LANGS_PATH_.$iso.'/flag.jpg => '._PS_IMG_DIR_.'l/'.$id_lang.'.jpg'));
		}

		return $languages;
	}

Edited by lcssanches (see edit history)

Share this post


Link to post
Share on other sites

Finally I got it working!!!!!!!!!

:D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D

 

For those who had same problem change

if (InstallSession::getInstance()->safe_mode)
                Language::checkAndAddLanguage($iso, false, true, $params_lang);
            else
                Language::downloadAndInstallLanguagePack($iso, _PS_INSTALL_VERSION_, $params_lang);

To

//if (InstallSession::getInstance()->safe_mode)
				Language::checkAndAddLanguage($iso, false, true, $params_lang);
			//else
				//Language::downloadAndInstallLanguagePack($iso, _PS_INSTALL_VERSION_, $params_lang);
  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

Hi, its 2020 and the problem occurred to me as well while trying to install v1.6.1.6 stable.

The file that solved that is not there for me to tweak any ideas?

 

Br,

Share this post


Link to post
Share on other sites
On 10/16/2015 at 4:49 PM, lcssanches said:

Finally I got it working!!!!!!!!!

:D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D

 

For those who had same problem change


if (InstallSession::getInstance()->safe_mode)
                Language::checkAndAddLanguage($iso, false, true, $params_lang);
            else
                Language::downloadAndInstallLanguagePack($iso, _PS_INSTALL_VERSION_, $params_lang);

To


//if (InstallSession::getInstance()->safe_mode)
				Language::checkAndAddLanguage($iso, false, true, $params_lang);
			//else
				//Language::downloadAndInstallLanguagePack($iso, _PS_INSTALL_VERSION_, $params_lang);

Where is this file ??

 

Share this post


Link to post
Share on other sites
On 10/28/2020 at 11:59 AM, Joris Riguidel said:

Where is this file ??

 

/src/PrestaShopBundle/Install/Install.php
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More