Security Image Does Not Display

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
jackter
Posts: 4
Joined: Mon Apr 21, 2008 10:09 am

Security Image Does Not Display

Post by jackter »

Script URL: gbook.php
Version of script: v1.6
Hosting company: ipower.com
URL of phpinfo.php: http://www.rao-osan.com/gbook/test/
URL of session_test.php: http://www.rao-osan.com/gbook/test/
What terms did you try when SEARCHING for a solution: security image

Write your message below:

When testing Sign Guestbook on my XAMPP testbed, the security image displays properly. After uploading the files to my web host, the security image does not display. I ran gd_test.php and that works properly. The uploaded files have not been modified. The entries are in oldstuff.txt and chmod has been set to 666.
Still Serving in Korea
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

IPower doesn't have PHP sessions enabled by default. Try this:

1. If it's not there already create a folder called "tmp" in your cgi-bin folder, for example:
cgi-bin/tmp

2. Upload phpinfo.php to your server:
http://www.phpjunkyard.com/extras/phpinfo.zip
Then open phpinfo.php in your browser and scroll down to "PHP Variables" and you will see the correct path at _SERVER["DOCUMENT_ROOT"]

Copy the path that displays there, should be something like

Code: Select all

home/users/web/****/******/public_html
3. Copy this code and change "YOUR_PATH_HERE" to the path you got above:

Code: Select all

session_save_path('YOUR_PATH_HERE/cgi-bin/tmp'); 
ini_set('session.use_trans_sid',0);
For example:

Code: Select all

session_save_path('home/users/web/****/******/public_html/cgi-bin/tmp'); 
ini_set('session.use_trans_sid',0);
-- NOW YOU HAVE TWO OPTIONS: --

4.1 Open file gbook.php in Notepad or Wordpad and paste this code in line 34, just below

Code: Select all

define('IN_SCRIPT',true);
Do the same in file print_sec_img.php, paste that code at the top, just below

Code: Select all

<?php
- OR -

4.2 instead of that you can create a new empty text file called "htaccess.txt" and paste this inside:

Code: Select all

php_value session.save_path "home/users/web/****/******/public_html/cgi-bin/tmp"
php_flag session.use_trans_sid Off
(don't forget to change the path to your path and end it with /cgi-bin/tmp). Then upload this file to your server inside the GBook folder and rename it to .htaccess (not that the name starts with a dot!)


Then close all browser windows before testing and see if it works.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
jackter
Posts: 4
Joined: Mon Apr 21, 2008 10:09 am

Post by jackter »

The first option resulted in a blank display when I accessed the Guestbook. The second option resulted in "Server Internal Error" response.

Additional information: Ipower default PHP version is 4.4.7. Is this of any signficance?
Still Serving in Korea
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Try the 4.1 again (be careful to copy the exact code exactly where told) and in settings.php delete line

Code: Select all

ini_set('display_errors', 0); 
. It should give an error message now, what does it say?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
jackter
Posts: 4
Joined: Mon Apr 21, 2008 10:09 am

Post by jackter »

The first time I tried using your new instructions, I was able to display the Guestbook without error, but without the Security Image. I rechecked the Ipower instruction for path and that instruction starts with leading forward slash (/home...). That fixed the problem.

Thank you for taking the time to respond so quickly and thank you for an excellent program. As soon as I had downloaded and checked it, I saw that it was worth a donation so I "dropped a dime" via PayPal. Now I've got my money's worth.
Still Serving in Korea
Post Reply