WordPress.org

Ready to get started?Download WordPress

Forums

wp_photo blues (5 posts)

  1. markalot
    Member
    Posted 10 years ago #

    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 :)

  2. markalot
    Member
    Posted 10 years ago #

    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 ...
    :)

  3. markalot
    Member
    Posted 10 years ago #

    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.

  4. markalot
    Member
    Posted 10 years ago #

    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. :)

  5. xtool
    Member
    Posted 10 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.