partkeepr / PartKeepr

Open Source Inventory Management
http://www.partkeepr.org
GNU General Public License v3.0
1.38k stars 401 forks source link

Setup: Check for correct DB encodings #73

Closed Drachenkaetzchen closed 12 years ago

Drachenkaetzchen commented 13 years ago

If using mysql, the defaults need to be UTF-8 for virtually anything, especially the settings in my.cnf and the db collation

Drachenkaetzchen commented 13 years ago

Hi Martijn,

make sure your php.ini has set:

magic_quotes_gpc = Off magic_quotes_runtime = Off

That should do the trick without changing code.

If that doesn't work, it would be nice if you report back so we can figure out why it doesn't work correctly on your machine.

cheers, Felicitus

On 02.08.2011 14:37, MartijnKuipers wrote:

Perhaps this is what causes an error at my installation. I think I have utf-8 everywhere, but... I am running the "2fe0aec#" version (Checkout Aug. 2, 2011) and the 2.0.0 version of Symfony.

PartManager.php is telling me that I am returning invalid json, which is true as I receive a PHP warning on the foreach statement in line 100 of the same file. The returned string has the quotes (") with double backslashes, which breaks my the foreach.

I changed this: $sortArray = json_decode($sort, true); into this: $sortArray = json_decode(str_replace("\","",$sort), true);

Ugly, but it seems to work (not suggested to be a patch).

Thanks, Martijn

MartijnKuipers commented 13 years ago

Hi Felicitus,

Sorry, I already deleted my github comment. I am confused, it seems my machine has a Symfony1/Symfony2 mix, so before asking you to do something I will do my homework first :-)

Thanks, the program looks amazing.

Kind regards, Martijn P.S. Now following the DEBIAN-6.0 install notes to the letter....

On Aug 2, 2011, at 13:51 PM, timoahummel wrote:

Hi Martijn,

make sure your php.ini has set:

magic_quotes_gpc = Off magic_quotes_runtime = Off

That should do the trick without changing code.

If that doesn't work, it would be nice if you report back so we can figure out why it doesn't work correctly on your machine.

cheers, Felicitus

On 02.08.2011 14:37, MartijnKuipers wrote:

Perhaps this is what causes an error at my installation. I think I have utf-8 everywhere, but... I am running the "2fe0aec#" version (Checkout Aug. 2, 2011) and the 2.0.0 version of Symfony.

PartManager.php is telling me that I am returning invalid json, which is true as I receive a PHP warning on the foreach statement in line 100 of the same file. The returned string has the quotes (") with double backslashes, which breaks my the foreach.

I changed this: $sortArray = json_decode($sort, true); into this: $sortArray = json_decode(str_replace("\","",$sort), true);

Ugly, but it seems to work (not suggested to be a patch).

Thanks, Martijn

Reply to this email directly or view it on GitHub: https://github.com/partkeepr/PartKeepr/issues/73#issuecomment-1708713

MartijnKuipers commented 13 years ago

Hi,

Thanks for your feedback. After removing all of pear (seemed the easiest to get rid of all symfony things) and reinstalling following the Debian 6 installation notes everything worked as expected. Kind regards, Martijn On Aug 2, 2011, at 14:01 PM, Martijn Kuipers wrote:

Hi Felicitus,

Sorry, I already deleted my github comment. I am confused, it seems my machine has a Symfony1/Symfony2 mix, so before asking you to do something I will do my homework first :-)

Thanks, the program looks amazing.

Kind regards, Martijn P.S. Now following the DEBIAN-6.0 install notes to the letter....

On Aug 2, 2011, at 13:51 PM, timoahummel wrote:

Hi Martijn,

make sure your php.ini has set:

magic_quotes_gpc = Off magic_quotes_runtime = Off

That should do the trick without changing code.

If that doesn't work, it would be nice if you report back so we can figure out why it doesn't work correctly on your machine.

cheers, Felicitus

On 02.08.2011 14:37, MartijnKuipers wrote:

Perhaps this is what causes an error at my installation. I think I have utf-8 everywhere, but... I am running the "2fe0aec#" version (Checkout Aug. 2, 2011) and the 2.0.0 version of Symfony.

PartManager.php is telling me that I am returning invalid json, which is true as I receive a PHP warning on the foreach statement in line 100 of the same file. The returned string has the quotes (") with double backslashes, which breaks my the foreach.

I changed this: $sortArray = json_decode($sort, true); into this: $sortArray = json_decode(str_replace("\","",$sort), true);

Ugly, but it seems to work (not suggested to be a patch).

Thanks, Martijn

Reply to this email directly or view it on GitHub: https://github.com/partkeepr/PartKeepr/issues/73#issuecomment-1708713

Drachenkaetzchen commented 12 years ago

The web setup is done and checks now for correct DB encodings. However, the CLI version is missing those tests, which need to be added.