WordPress.org

Support

Support » Plugins and Hacks » wp_photo blues

wp_photo blues

  • Howdy,
    rank newbie to PHP and WP.
    site: markalot.org/weblog
    I’m trying to get wp_photo to work but have been having all kinds of issues. The first issue was creating the table, even though the script in wp-photos-setup.php is correct it refused to run, so i copied the sql into MySql control center and created the table just fine.
    Something is suspect here.
    The second problem is no code I add to the wp php files is working. For example:
    in Edit.php I am supposed to add
    <?php include_once(‘../wp-photos.hack.php’); wpphotos_link(); ?>
    well, I can’t tell if the file is being included correctly or not, but the call to wpphotos_link() dies. As a matter of fact, any call to a wp-photo function (I followed the readme to modify index.php) I make dies!
    This has to be some kind of configuration problem on my end, but what? I’m running Apache 1.3.29 and PHP 4.3.5 on Win2k Pro. WP works perfectly, posting, file uploading, everything, so in that sense PHP seems to be working fine.
    Thanks for any help 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • I found the first problem … I always do after I post 🙂
    for edit.php:
    Including ‘..\wp-photos.hack.php’ which includes ‘wp-photos.config.php’ does not work because wp-photos.config.php is not in the admin directory. I suspect this might be a pathing symptom unique to php on windows? still working on it …
    🙂

    if (!@include(‘wp-photos.config.php’)) {
    if(!@include(‘../wp-photos.config.php’)) {
    die(‘error, could not include WP Photos settings.’);
    }
    }
    .
    .
    The above code is completely failing me. It can’t load the config file. If I change it to :
    .
    if (!@include(‘wp-photos.config.php’)) {
    die(‘error, could not include WP Photos settings.’);
    }
    .
    It will work for for index.php, or at least not complain, but not for wp-admin/edit.php. In either case, I can’t call a function out of the include file even if it appears to load correctly.

    http://www.php.net/manual/en/function.include.php
    I had to remove the includes and instead do a require and copy the config file to both the root and admin directory. According to the PHP docs includes don’t return values unless you explicitly return a value from the included file, so I ssupect this is some kind of behavior change in more recent versions of PHP.
    I had a nice conversation with myself here. 🙂

    Hehe…
    I feel your though sir.
    But if I had an answer I would have replied with something useful. Sorry.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp_photo blues’ is closed to new replies.