Fatal error again
-
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 1024 bytes) in (my path) on line 162
It keeps doind that. I dont know how to find my .htaccess file neither my php.ini and I use wordpress in french so my wp-config isnt the same as the english one… Someone told me to put that line in wp-config:
define('WP_MEMORY_LIMIT', '64M');but I think I dont set it right because it makes an error in my top webpage when I insert it.(over the header) Someone have an idea? Or can you explain what i have to do with more details please?I requested and increase to 64m from my web hoster so maybe they will answer.
-
Just in case you don’t have them, here are the official instructions from the Codex:
* Increase the amount of memory a PHP script may consume. Note: If using a shared hosting service, you may need to ask your host to increase the limit.
1. Increase the memory limit setting in php.ini (e.g. memory_limit = 64M ;). Many hosts may not allow this.
2. Increase the memory limit via .htaccess (e.g. php_value memory_limit 64M). Many hosts may not allow this.
3. Increase the memory limit via wp-config.php (e.g. define(‘WP_MEMORY_LIMIT’, ’64MB’);)You may wish to give them a try (I’m not sure about the French issue), but your web host will be the one that is most likely to solve this.
Alright. I send a request this morning to the web hoster and still dont have an answer.
I’ll try to shoot all the wp-config here if it not too big for a post:
<?php /** * La configuration de base de votre WordPress. * * Ce fichier contient les réglages de configuration suivants : réglages MySQL, * préfixe de table, clefs secrètes, langue utilisée, et ABSPATH. * Vous pouvez en savoir plus à leur sujet en allant sur * {@link http://codex.ww.wp.xz.cn/Editing_wp-config.php Modifier * wp-config.php} (en anglais). Vous devez obtenir les codes MySQL de votre * hébergeur. * * Ce fichier est utilisé par le script de création de wp-config.php pendant * le processus d'installation. Vous n'avez pas à utiliser le site web, vous * pouvez simplement renommer ce fichier en "wp-config.php" et remplir les * valeurs. * * @package WordPress */ // ** Réglages MySQL - Votre hébergeur doit vous fournir ces informations. ** // /** Le nom de la base de données de WordPress. */ define('DB_NAME', 'shh secret'); /** Utilisateur de la base de données MySQL. */ define('DB_USER', 'shh secret'); /** Mot de passe de la base de données MySQL. */ define('DB_PASSWORD', 'shh secret'); /** Adresse de l'hébergement MySQL. */ define('DB_HOST', 'localhost'); /** Jeu de caractères à utiliser par la base de données lors de la création des tables. */ define('DB_CHARSET', 'utf8'); /** Le type de collabtion de la base de données. * N'y touchez qui si vous savez ce que vous faites. */ define('DB_COLLATE', ''); /**#@+ * Clefs uniques d'authentification. * * Remplacez les valeurs par défaut par des phrases uniques ! * Vous pouvez générer des phrases aléatoires en utilisant * {@link https://api.ww.wp.xz.cn/secret-key/1.1/ Le service de clefs secrètes de ww.wp.xz.cn}. * Vous pouvez modifier ces phrases à n'importe quel moment, afin d'invalider tous les cookies existants. * Cela forcera également tous les utilisateurs à se reconnecter. * * @since 2.6.0 */ define('AUTH_KEY', 'put your unique phrase here'); define('SECURE_AUTH_KEY', 'put your unique phrase here'); define('LOGGED_IN_KEY', 'put your unique phrase here'); define('NONCE_KEY', 'put your unique phrase here'); /**#@-*/ /** * Préfixe de base de données pour les tables de WordPress. * * Vous pouvez installer plusieurs WordPress sur une seule base de données * si vous leur donnez chacune un préfixe unique. * N'utilisez que des chiffres, des lettres non-accentuées, et des caractères soulignés! */ $table_prefix = 'wp_'; /** * Langue de localisation de WordPress, par défaut en Anglais. * * Modifiez cette valeur pour localiser WordPress. Un fichier MO correspondant * au langage choisi doit être installé dans le dossier wp-content/languages. * Par exemple, pour mettre en place une traduction française, mettez le fichier * fr_FR.mo dans wp-content/languages, et réglez l'option ci-dessous à "fr_FR". */ define ('WPLANG', 'fr_FR'); /* C'est tout, ne touchez pas à ce qui suit ! Bon blogging ! */ /** Chemin absolu de WordPress vers le dossier WordPress. */ if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); /** Réglage des variables de WordPress et de ses fichiers inclus. */ require_once(ABSPATH . 'wp-settings.php');Now, where do I put the define memory limit 64m?
Use this:
<?php define('WP_MEMORY_LIMIT', '64M'); define('DB_NAME', 'shh secret'); define('DB_USER', 'shh secret'); define('DB_PASSWORD', 'shh secret'); define('DB_HOST', 'localhost'); define('DB_CHARSET', 'utf8'); define('DB_COLLATE', ''); define('AUTH_KEY', 'put your unique phrase here'); define('SECURE_AUTH_KEY', 'put your unique phrase here'); define('LOGGED_IN_KEY', 'put your unique phrase here'); define('NONCE_KEY', 'put your unique phrase here'); $table_prefix = 'wp_'; define ('WPLANG', 'fr_FR'); if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); require_once(ABSPATH . 'wp-settings.php'); ?>Alright thank you! I will try this.
Ok I tried and there is a problem with the hoster since it doesnt work. Now the website wont load and it tells a warning session start:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at my path) in (my path) on line 281 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at (my path) in (my path) on line 281 Warning: Cannot modify header information - headers already sent by (output started at (my path) in (my path) on line 868I will have to remove it untill the web hoster set it at 64 m I guess.
Hmm, I don’t know what that error is from…..
Well i have all these problems since I updated WordPress from 2.8.6 to 2.9.1 and now I can’t even load wp-admin and log in lol :
Warning: Cannot modify header information - headers already sent by my pathAnyway. I have a backup so. I think I’ll just reinstall WordPress v2.8.6 everything was alright then.
Thanks to you for your appreciated help.
You don’t need to reinstall 2.8.6 just yet. Revert wp-config.php to the old version above. Be sure you’re using a plain text editor: Answers – headers Already Sent -Troubleshooting « WordPress Codex.
The topic ‘Fatal error again’ is closed to new replies.