2009-03-04 6 views
3

J'envoie une requête à mon application PHP via une requête ajax codée en JSON (processus de formulaire). Une post-requête avec une longueur de caractères de 4174 est traitée avec succès et le résultat est reçu correctement. En ajoutant un caractère supplémentaire à la requête, mon application boucle en boucle jusqu'à Apache2 seg-faults. Il n'y a que 2 champs, un pour un identifiant à 3 chiffres, et le reste est du texte d'une zone de texte.json post demande taille limite (maintenant un php-mysqli bug vérifié)

J'utilise le Zend Framework pour conduire mon application, Apache2.2.3, PHP 5.2.8, version plug-in JSON 1.2.1, MySQL 5.0.77

Quelqu'un a des idées ...

voici une autre mise à jour :: dépisté ce problème à PAS un problème de demande json, mais un problème avec la requête que je cours. J'effectue une requête INSERT ON DUPLICATE KEY UPDATE qui gonfle la taille du texte de la requête. Je peux lancer cette requête à partir de la ligne de commande, mais de PHP ça échoue. En cours d'investigation sur le problème. Toute personne intéressée pourrait voir la requête ici.

** Ceci est un bug avec les plugins mysqli pour php, pour une raison quelconque, le gestionnaire db n'aime pas ce code. Si/quand j'ai le temps de tester correctement, vous verrez mes résultats. **

INSERT INTO element_attribute_values (ElementAttributeId,ElementId,value) VALUES (1,'553','444st text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this itext this itext this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test tex this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is sotext this ime test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test tex tesxthis is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is fsome test texttext this i this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is sometext this i test text this is some test text this is some test text this is sothis is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text thisf iffffffff4444') ON DUPLICATE KEY UPDATE value='444st text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this itext this itext this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test tex this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is sotext this ime test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test tex tesxthis is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is fsome test texttext this i this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is sometext this i test text this is some test text this is some test text this is sothis is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text this is some test text thisf iffffffff4444' 
+0

S'il vous plaît faire un rapport lorsque vous en savez plus! – Evert

+0

Bien sûr, un crash d'Apache signifie probablement qu'il y a un bug dans le module PHP. Vous voulez probablement savoir quelle fonction PHP plante et trouver une solution de contournement. Pouvez-vous suivre quelle ligne dans votre code est celle qui fait tout planter? –

Répondre

0

Je ne sais pas si cela est lié ou non, mais j'utilisais jQuery récemment en utilisant la .ajax $() méthode pour soumettre des données POST d'un champ de texte à un script php. Le script php analysait alors les données (XML) pour les bits d'information dont j'avais besoin. J'ai remarqué une erreur sur ma sortie firephp qu'il était incapable d'analyser le XML à partir du formulaire POSTed. Je l'ai ensuite fait sortir le strlen() et les données et j'ai remarqué qu'il le coupait d'environ 7k octets à 268 (ou 256 ou quelque chose que j'oublie le montant exact). Cela en a fait une pile de données XML incomplète et non valide. J'ai corrigé ceci en utilisant la méthode $ .post() à la place. Travaillé parfaitement.

0

Vous pouvez simplement vérifier la longueur de votre chaîne, et si elle dépasse la limite, divisez-la. Exécutez la première partie de l'insertion, puis effectuez une mise à jour += sur le champ avec la deuxième partie. C'est un peu brut, mais ça contourne le bug.