Posted: Tue Jan 10, 2006 6:22 pm Post subject: Problems with PHP 5.1.1
Hello,
the Amazon-Module is really fine and it runs without any problems until today. Now, my server has gotten an PHP-Upgrade from 4.3.8. to 5.1.1 and the nice modules is nearly empty, see it at: http://www.picdownloads.de
Also the block, normally shown at the index.php, does not work - sometimes it showes the books, sometimes not all 4 but 3 oder 1 and most of the time it shows nothing!
Does anybody have an idea how to fix this emptyness?
For this url: /modules.php?name=Amazon&op=click&asin=B000B3KD8K
I got this.
Quote:
Picdownloads: Zugriff verweigert
schnell !
Stop ! - Dir fehlt die Berechtigung, diese Seite anzusehen.
Du hast jedoch folgende Optionen:
* Du bist Mitglied und kannst Dich jetzt hier einloggen.
* Du hast Deine Logindaten verloren. Versuche in diesem Fall, Dir das Passwort zusenden zu lassen.
* Du möchtest Dich gerne ein wenig umsehen - bitte beachte Du als Gast viele Bereiche nicht betreten kannst.
[ Zurück ]
Sorry cant help if I can't get access.
Is the module active?
What do you mean on not showing the books. Is it the images not showning? Sometimes the images are not shown for various reasons but mainly because Amazon returns an invalid image address.
TIP: Use the show XML option and look at the link XML output to see if the items are valid. _________________ ~Edgardo
PrecioGasolina.com | E.J. Stores
Sorry EJDiaz, now the module is free for all again.
The XML is ok and does not show any problems.
Like you will see by visiting the module is, that the content is missing. Between the Amazon-Search and the Categories is nothing! I use the module with all my CPortal (Nuke-) sites, it works at fife several URLs - but its the same problem, the content failed after the PHP-Upgrade to 5.1.1.
Your problem is that
- php 5.x XML support has been improved an it now correctly detect the data send by Amazon as been UTF-8 encoded because they have the
Code:
<?xml version="1.0" encoding="UTF-8"?>
header. Previously PHP 4.x defaulted to ISO-8859-1 despite the header.
- but the problem is that amazon uk, de, fr don't really encode data as UTF-8, a lot of data are in fact ISO-8859-1 encoded (for instance amazon.co.uk send the pound character as one byte, amazon.fr send all accented characters as one byte)
so the php 5 XML parser is unable to correctly parse the data and the output is empty.
Edgardo, I'm the guy who ported NukeAmazon to PostNuke under the name AmaZone (but retaining your full credits !!)
I would love to discuss this issue and a lot of others (and also share fr and ca sql files with you and NukeAmazon users, it's justice to give back if I can)
You can mail me at vedrine _AT__ vedrine __DOT- net if you want.
I have a temporary fix for this problem.
Don't work for all pages but for quite a lot.
Currently don't work with japanese Amazon webservices
In the file, change
This may seems silly as I replace all utf-8 encoded characters with their ISO-6659-1 equivalent and after that re-ncode the whole string as UTF-8 but it works.
It would be a lot better to write a regular expression to encode all characters from the x80-xFF range that aren't preceeded by a xC2 or xC3 char to UTF-8 directly but I am no good enought at regular expressions to do that.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum