Jump to content

Warning: Invalid argument supplied for foreach()


Recommended Posts

Downloaded PrestoShop  0.9.2 . ftp'd contents of folder to server, ran install and  received the following error message.

 

Warning: Invalid argument supplied for foreach() in

/usr/local/www/rocketdocs.ca/install/index.php on line 179

 

I looked through  the docs could see anything on this.

Link to comment
Share on other sites

Hi Ken! Welcome to the PrestaShop Forum :)

 

We had not encountered this problem and cannot reproduce it.  Can you provide us with more information?

 

Does this block installation completely?  Most of the time, warnings do not prevent functionality.

 

Also, did you modify the following file, and if so, can you please copy/paste its contents in a reply here?

 

Root > Install folder > Langs folder > list.xml

 

Also/or, you may want to download and install the latest version, 0.9.5 RC1, which seems very stable so far.

Link to comment
Share on other sites

http://www.rocketdocs.ca/install/

 

No I did not modify any files. Download, unzip, ftp to server, run install...

 

 

still won't install, same error. More detail included below. see next reply.

 

 

Warning: simplexml_load_file() [function.simplexml-load-file]: /usr/local/www/rocketdocs.ca/install/langs/list.xml:16: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0x88 0xDF 0x61 0x69 in /usr/local/www/rocketdocs.ca/install/classes/LanguagesManager.php on line 21

 

Warning: simplexml_load_file() [function.simplexml-load-file]: <lang id="1" label="Fran��ais (French)" trad_file="/../langs/fr.php" > in /usr/local/www/rocketdocs.ca/install/classes/LanguagesManager.php on line 21

 

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /usr/local/www/rocketdocs.ca/install/classes/LanguagesManager.php on line 21

Link to comment
Share on other sites

The install doesn't halt, I can look ahead to see a permission problem.

 

 

Contents of  list.xml file

 

<?xml version="1.0" encoding="UTF-8"?>

<languages>

 

<lang id="0" label="English" trad_file="/../langs/us.php">

<flags>

<url>../img/flags/gb.png</url>

<url>../img/flags/en.png</url>

</flags>

<isos>

<iso>en-us</iso>

</isos>

<idLangPS>en</idLangPS>

</lang>

 

 

<lang id="1" label="Français (French)" trad_file="/../langs/fr.php" >

<flags>

<url>../img/flags/fr.png</url>

</flags>

<isos>

<iso>fr-fr</iso>

<iso>fr</iso>

</isos>

<idLangPS>fr</idLangPS>

</lang>

 

</languages>

Link to comment
Share on other sites

Hi Ken,

 

Try downloading and installing the latest PrestaShop build, v0.9.5; numerous bugs have been fixed since your last post.

 

If that doesn't work, we can't give you a sure-fire solution to your problem, but it seems like the problem may be with your hosting server and how it is interpreting the UTF-8 encoding.

 

I found this document that describes a similar problem to yours; scroll down to "Introducing Encoding", page 8.

 

We hope you can find a solution to your error. If you do, please report back and share your knowledge with us.

 

Good luck! :)

Link to comment
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...