months ago, I copied a gallery of free pictures to my serendipity installation. Over time some pictures were added to the media database. When I now try to update the preview, I get a
Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 24 bytes) in /srv/www/deimeke.net/dirk/blog/include/db/mysql.inc.php on line 135
I think it is a php setting. Which value do I have to increase to get rid of the message?
Second: How can I find out which pictures (of some thousand) are used in my blog?
This can happen if the automatic media synchronisation of s9y is executed and needs to parse all pictures inside your directory tree. This might require a lot of RAM, depending on your picture files.
You can increase the php.ini setting "memory_limit" to get rid of that. Remember to restart apache if you change it to be sure that it gets applied.
Second: How can I find out which pictures (of some thousand) are used in my blog?
S9y offers a way to track referenced images. But you would need to have used that before -- it will not work if you enable that now.
So the only way for you is to check your serendipipity_entries DB table and see which images you linked to. You could automate that with a small PHP script that matches all your <img> links and looks them up if they match in the DB...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
garvinhicking wrote:You can increase the php.ini setting "memory_limit" to get rid of that. Remember to restart apache if you change it to be sure that it gets applied.
Ok. Thanks for that.
garvinhicking wrote:S9y offers a way to track referenced images. But you would need to have used that before -- it will not work if you enable that now.
What do I have to enable for a new blog?
garvinhicking wrote:So the only way for you is to check your serendipipity_entries DB table and see which images you linked to. You could automate that with a small PHP script that matches all your <img> links and looks them up if they match in the DB...
Ok. Perfect. That is what I thought about too.
I am better in Perl, so I will write a perl script.
Is there any tool section, where I can upload it? Just to five others the chance to do the same.
That's quite complex and too lengthy to write up here. But I've written it all up in my book....
Is there any tool section, where I can upload it? Just to five others the chance to do the same.
I'd propose to paste the script here? And I could then link to it from the FAQ section on s9y.org?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Lux wrote:Question: Does s9y use relative paths everytime?
s9y generally does not prepend the HTTP hostname. You'll be safe if you preg_match to .*uploaddir/picture.jpg.*
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/