Forum Replies Created

Viewing 15 replies - 1 through 15 (of 33 total)
  • Forum: Fixing WordPress
    In reply to: backup and restore
    Thread Starter percepts

    (@percepts)

    just to follow up. I dumped the database using phpMyAdmin and loaded that in local setup and it has worked fine.

    Also checked that dumped data and there are no duplcayes in it.

    So I don’t why I got them before. It should not be possible to have duplicate primary keys. Could be something to do with the WP Backup plugin but I really don’t know.

    That delete duplicate post plugin is dangerously mis-leading. Attachments are entered in posts table. So a post and attachment can have the same title quite validly. And in fact that is the case for me but I don’t want those duplicate title records deleting because they are valid. It needs to look for duplicate post table ID which is a corruption of the table.

    Anyhow problem is resolved. I will use phpMyAdmin for table dumps.

    Thanks

    Forum: Fixing WordPress
    In reply to: backup and restore
    Thread Starter percepts

    (@percepts)

    the backup sql has table drops in it. But the first time it failed I thought there may be some cross table referential integrity so I did a manual drop of all tables then ran the import from the sql and it failed with same duplicate error on posts. So I deleted dup recs from backup sql and ran and it worked. But when I went to look at blog it was totally screwed.
    So then I ran import of backup from local system which restored to how it was.

    Then resorted to using tools/export of xml posts file. Manually deleted posts from local blog and imported xml posts which seems to hve worked OK.
    But how come I have dup records in SQL backup? This should not happen or am I wrong about that?

    Thread Starter percepts

    (@percepts)

    yes I do but that means understanding the database structure 100% and I was hoping that there might be a module already available which would save me time.

    But any hints on what needs to be done would be helpful.

    switch off permalinks and try that. If it works then switch them back on again and see if that works.

    I run my development wordpress on windows 2000 and it works fine…

    You should be aware that if you put redirects in WP to make it load itself inside a frame, google may not index the wp page. Not 100% sure about this so you should check.

    And any link you follow in your mainsite must have as its target window the frame in which the main site is running.

    You can also do it using an iframe in a wrapper page but its still a pain to implement.

    Create your wp site inside a framed site. One window for the music and another for your main site.
    But when someone finds a page of your main site in a search engine and follows the link to it, it will load outside of the frame wrapper so the page has to redirect to the framed page telling it to load that page in the main site window. It’s a pain to implement which is why no one does it.

    There are two other places where wp tries to set memory limit.

    wp-admin/inludes/image.php
    wp-admin/inludes/file.php

    in my version it uses 256M

    if -enable-memory-limit is not set in your php config (compile time options) then these will fail without an error message but if php.ini says 256M then you should be OK

    And note how its sets WP_MEMORY_LIMIT to an integer value as the manual says it should be meaning no M after it. The M works in php.ini but not in php code.

    I know you’ve said you have done this but please look at wp-settings.php right at the very top where it says:

    if ( !defined(‘WP_MEMORY_LIMIT’) )
    define(‘WP_MEMORY_LIMIT’, ’32M’);

    if ( function_exists(‘memory_get_usage’) && ( (int) @ini_get(‘memory_limit’) < abs(intval(WP_MEMORY_LIMIT)) ) )
    @ini_set(‘memory_limit’, WP_MEMORY_LIMIT);

    let us know what it says in there…

    uploads will be using the GD library functions to process images (unless you have some plugin using imagemagick).

    GD functions can be memory intensive and will grab plenty, especially for bigger images such that even doing a copyresampled will cause it to fail. And the reason it fails is because hosting providers put a limit on how much memeory each script can grab.

    There are several ways to up that limit but not all of them will work depending on other restrictions your host puts on your account.

    You can either change memory_limit in your php-ini file but this is not recommended because it means any script you run can grab that amount of memory.

    You can put it in your .htacess file but this won’t work unless your host has enabled it and is not recommended for same reason as changing php_ini.
    To check if yuor host has enabled it you need to run a script on your host which calls php_info() and check the the configuration which should include -enable-memory-limit.
    If it doesn’t include that enable command then you are stuffed unless you can change php-ini.

    If it does include that enable, then the best way to increase memory is to include the following in the script causing the problem.

    <?php ini_set(memory_limit,64); ?>

    note that there is no M after the amount of memory.

    also note that if you are on shared hosting and strting grabbing lots of memory your host might kick you off which is why they limit memory so there is plenty for everyone.

    Simplest answer of all is to resize images before upload to sensible sizes and then GD function won’t blow its guts.

    Thread Starter percepts

    (@percepts)

    Thanks, I’ve started looking at modifying/hacking the plugin “Resize at Upload Plus” to do it in there so I don’t have to hack core WP code.
    Maybe even release it as a modified plugin but that will be a lot more work as there would need to be extra form fields for control of sharpening amount and jpeg quality level.

    Thread Starter percepts

    (@percepts)

    I have installed that plugin which gives better control of max image width and max image height and resizes image at upload. Thinking about it, I may try and modify the plugin to pick up the media settings for large file size which would make life simple.

    Thanks

    Thread Starter percepts

    (@percepts)

    will that prevent the upload or resize the image?

    I have just found a plugin “Resize at Upload Plus” which you have to set options for. I was hoping there might be one which uses the media settings large values so that you don’t have to keep two sets of size options in sync.

    Thread Starter percepts

    (@percepts)

    Thanks,

    I just spotted that and have been playing…

Viewing 15 replies - 1 through 15 (of 33 total)