Wordpress Fatal error

I installed phpmyadmin and wordpress apps.

phpmyadmin works good!

But wordpress has fatal errer.

Fatal error : Allowed memory size of 8388608 bytes exhausted (tried to allocate 28672 bytes) in  /mnt/HD/HD_a2/Nas_Prog/WordPress/WordPress/wp-admin/custom-header.php  on line 732

I tried to improve php memory in php5-fpm.conf.

But there is no php5-fpm restart method.

So I selected just reboot system.

And then, All is initialized.

Second.

vi /mnt/HD/HD_a2/Nas_Prog/WordPress/WordPress/wp-config.php

add

define(‘WP_MEMORY_LIMIT’, ‘128M’);

But failed too.

How can I run wordpress site.

You aren’t alone experiencing these issues. Just hours ago someone else reported similar issues for the newly launched My Cloud Mirror model → http://community.wd.com/t5/WD-My-Cloud-Mirror/My-cloud-mirror-problems/m-p/726936#M85

Unfortunately I don’t have any solutions for you but I will be watching what so e of the early adopters experience with their apps. I am hoping to play with some of the apps on my EX2 in the near future so I’m interested to see what the common issues are.

1 Like

Thanks for your reply!

The only way to solve these problems is just wait!!

So sad.

The last line of /etc/php/php-fpm.conf is where the 8 MB value is set. But it is not that simple…if you edit this file and reboot EX2, that file gets overwritten by a fresh, pristine copy from the firmware (which would match the original one you just edited thus wiping all your edit). The only quick and easy approach to make an edited php conf to work might be to kill the php master process (and possibly the child processes if they’re not auto-killed with the master php process) and then restart php-fpm process, without rebooting the EX2. But it might work…it might not…in which case you may have to resort to a more intrepid hack…which is to mod it in the firmware code and then rebuild the firmware and of course that would technically void your warranty.

1 Like

Perhaps a better approach would be to try to remove other stuff from running…remember the EX2 only has 512 MB of memory…so it’s really tiny. And on top of that if you have things like media streaming and iTunes sharing turned on, those processes along with other processes eat up that limited memory quickly. I would turn stuff like that off…anything that you don’t need…at least temporarily should be turned off from the dashboard…then rebooting EX2 might free up some resources.

Also, you should cat /proc/meminfo to see what the memory situation is like on your NAS. My EX2’s MemFree is about 134 MB.

MemTotal: 507220 kB
MemFree: 188168 kB
Buffers: 22084 kB
Cached: 169020 kB
SwapCached: 0 kB
Active: 37468 kB
Inactive: 169960 kB
Active(anon): 20148 kB
Inactive(anon): 3364 kB
Active(file): 17320 kB
Inactive(file): 166596 kB
Unevictable: 4892 kB
Mlocked: 4892 kB
SwapTotal: 2097084 kB
SwapFree: 2097084 kB
Dirty: 16 kB
Writeback: 0 kB
AnonPages: 21232 kB
Mapped: 28280 kB
Shmem: 3392 kB
Slab: 41324 kB
SReclaimable: 10368 kB
SUnreclaim: 30956 kB
KernelStack: 1104 kB
PageTables: 1352 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 2350692 kB
Committed_AS: 148072 kB
VmallocTotal: 1474560 kB
VmallocUsed: 1960 kB
VmallocChunk: 1470320 kB
~ #

I think memory is enough to run wordpress.

Important thing is php’s limited memory, just 8MB.

So, it’s really hard things to increase php’s memory.

I’m so sad.

At what point are you geting the fatal error?

I just installed WordPress on my EX4 (which has the same configuration file set at 8M) and it seems to be working OK…

Install page and First page, dashboard etc…

every pages have that messages.

Same problem here, very-very frustrating. I’ve posted this:

http://community.wd.com/t5/WD-My-Cloud-EX4/Set-up-app-in-my-cloud-ex4/m-p/741356/highlight/false#M1792

Unfortunately, I’ve posted it in the wrong board, however, a reply of Bill_S (thanks Bill):

"However, be that as it may, you cannot update to a later version of Wordpress.  The application, as is, is what you get.

Now, concerning the fatal error that you received, I will have it looked into. Someone may contact you for more information.  If you could help them it would be appreciated."

:angry: No updates of Wordpress? Why isn’t that possible? Security? New functionalities? I really should have bought an external disk or a real NAS.

As  Cybernut1 mentioned the way to get the increased memory from the /etc/php/php-fpm.conf to stick without a reboot and a reset is to kill off and restart the http daemon process.

To do this:

  • SSH into your WD-EX4 - im sure there are loads of tutorials on this topic i wont go into it here.

  • if you haven’t already altered the /etc/php/php-fpm.conf file do so now as mentioned above -

    vi /etc/php/php-fpm.conf

 is one way but a SFTP app with an editor is a much easier way for some.

  • you can see the processes running on the system by typing _ top _ and hit _ q _ to exit back to the prompt. (not needed just a point)

  • now to kill off the http deamon and therefor killing php type killall httpd  - this will stop the Apache server

  • give it a second or so then type in _ httpd _  from the prompt # - this will then restart the http process, it will take another 5 seconds for it to in turn fire the php-fpm processes off.  You can watch this happen again with top  

This will reload the php instating the new config memory limit as i have done on the wordpress 3.9.1 install i have put together, of course after a reboot this work will all be un-done so im looking into trying to write a shell script to alter the php file and also reboot the httpd process as needed on reboot like a cron job or rc.d or something.

All commands (copy and past them all of just use the lines without the sleep lines) - similar to the shell script needed.

killall httpd
sleep 5
httpd
sleep 2
top

Here’s my php memory as Wpress sees it (WP System Health Plugin) obviously i went a bit silly with 1gig since its only got stone age 512Mb :wink:

Server Software lighttpd/1.4.33
PHP Version 5.4.16
MySQL Server 5.1.56
Memory Limit 1 GB

I hope that helps someone out I know its really a temporary fix and like the rest of us I wish WD had of spent more time on research here hopefully they will let us dev’s at it with a good API to fix up some issues but for now all I can do is wait and mutter!

1 Like

Great work Lingoin2014! Thanks for sharing your steps for fixing this issue…and confirming my first suggestion of how to fix it works! If you have come this far, I would encourage you to look into incorporating and automating this completely into the firmware, by downloading the firmware source code (available from Downloads for this product in the support section of WD site) and studying it and then modifying it to meet your needs.

Again, good work on taking my theoretical idea and actually executing it.

1 Like

“The only way to solve these problems is just wait!!” It’s July now, and when will this and the other problems been solved?

Fatal error : Allowed memory size of 8388608 bytes exhausted (tried to allocate 28672 bytes) in  /mnt/HD/HD_a2/Nas_Prog/WordPress/WordPress/wp-admin/includes/schema.php  on line  929

I want to use Wordpress, the latest versions, new plugins, new templates. The EX2 is just a very expensive external disk. :confounded:

I’m running the latest wordpress install no problems if you see the post with info about how.

here’s a simple fix.

And

heres the wp blog updated

Have also now installed and updated to the latest versions of Joomla and phpBB both are working perfectly after the php-rpm update and process restart as mentioned in my previous post I shall also post a comment on how to create a shell script to run after a reboot to change men level from shd ssh session. Hope this helps someone as it seems EX-X products run the same ram disk busybox linux install

Links page for other CMS updated to latest versions.

I was able to do the following and get WP to work. I assume it will be reset if I need to restart the server but its fairly easy to repeat. 

in SSH, edit the php-fpm.config file so the last line is “php_admin_value[memory_limit] = 64M” so that it is 64M or higher. (Default is 8M):

~  # cd /etc/php

/etc/php # vi php-fpm.comf

when you finish editing hit (esc) and then type " : " (colon). This should bring up a prompt at the bottom. Type wq and hit enter. This will save the edit and get you back to ssh prompt.

from here type “killall php-fpm”

give it a few minutes… maybe try to log into phpmyadmin to see if it makes a connection. If it doesn’t type:

“mysql -u admin -p”

input the password and mysql should start up.  From here Word Press should work perfectly.

Enjoy!

Keljon wrote:

 

input the password and mysql should start up.  From here Word Press should work perfectly.

 

Keljon - what is the mysql password you used? I just posted this question 5 minutes ago →   http://community.wd.com/t5/WD-My-Cloud-EX2/Need-help-with-Joomla-install/td-p/774765

I believe I used one I created in phpmyadmin.

I just did a test to verify. I changed my pw to “test” for “admin” in phpmyadmin and then logged into mysql through ssh. It worked. I had an issue like that when trying to install joomla as well. Hope this helps!

1 Like

Keljon wrote:

I believe I used one I created in phpmyadmin.

 

I just did a test to verify. I changed my pw to “test” for “admin” in phpmyadmin and then logged into mysql through ssh. It worked. I had an issue like that when trying to install joomla as well. Hope this helps!

Thanks Keljon - actually I hadn’t installed phpmyadmin app on mine. But reading your post did give me the idea to try and use my SSH password, which I never thought would be used for mysql - but it actually does use the SSH password. So I was able to successfully complete Joomla install. Thanks for your answer which triggered my solution.

No matter what I do or try:  Fatal error : Allowed memory size of 8388608 bytes exhausted (tried to allocate 7168 bytes) in … 

Very very frustating, after all these months I still can’t use the EX2 as I want it :angry:

Karel - Have you even bothered reading the other messages in this thread?? See Keljon’s first post above.

I just spent a very frustrating week with WD technical support on this problem. First, they would not talk to me until I had reconfigured my home network to their liking and then they informed me that they do not support third party apps. They offered to replace my EX2 unit but I refused since I know the problem is not a hardware problem. To me this is an example of false advertisement because they advertise the WordPress app as an option when they know full well that it will not install as delivered. Even if they cannot (or will not) fix the problem, I would expect them to work with WordPress to resolve the problem so the app will install on their product.

Thanks for all the suggestions on how to get it to work but I am not comfortable rooting around in the server files using tools I am not familiar with to resolve this issue. If someone were to document this procedure using standard tools either in writing with a lot of images or as a video on YouTube a lot of us dummies would be very greatful.

Thanks,