WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] sams-whois, php gd, (4 posts)

  1. allanit
    Member
    Posted 2 years ago #

    Hi

    To start with I installed the sams-whois php script on a non wordpress site and got it working correctly. The 4 digit code security image is displayed properly every time.

    Now I am trying to get sams-whois working on a wordpress site. The two sites are on the same server so php gd is definitely installed and working. However when the page with sams-whois in wordpress loads, the 4 digit code security image is just a black line instead of a 4 digit code security image.

    I have tried everything I can think of the get the 4 digit code security image to display but no luck. The sams-whois script can be downloaded from http://www.phpace.com/scripts/sams-whois in case anyone wants to have a look at the code.

    The code I am having the problem with is in samswhois.inc.php on line 262 <img align="absmiddle" src="swsecureimage.php" class="swSecureImage" /> when I inspect elements with firebug and run my mouse over the problem spot a popup message says ‘Failed to load the given URL’.

    Do you have any ideas of how I can troubleshoot this error message?

  2. ClaytonJames
    Member
    Posted 2 years ago #

    Did you have a chance to try replacing src="swsecureimage.php" with the absolute path to the file? Example: src="http://yoursite.com/swsecureimage.php"

  3. allanit
    Member
    Posted 2 years ago #

    Hi ClaytonJames

    Thanks for the great suggestion, you were absolutely correct the absolute path was the problem thanks for your help.

    For the benefit of anyone else here is the changed code to make it more transportable

    <img align="absmiddle" src= <?php echo 'http://'.$_SERVER["SERVER_NAME"].'/wp-content/plugins/php-execution-plugin/includes/swsecureimage.php'; ?> class="swSecureImage" />

  4. ClaytonJames
    Member
    Posted 2 years ago #

    You're welcome, glad it worked.

Topic Closed

This topic has been closed to new replies.

About this Topic