Security Code not working

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
itny11234
Posts: 2
Joined: Sun Nov 09, 2008 10:55 pm

Security Code not working

Post by itny11234 »

Script URL:
Version of script:Version: 1.6
Hosting company:ipowerweb.com
URL of phpinfo.php:
http://www.stefanopriante.com/gbook/php/phpinfo.php
URL of session_test.php:
http://www.stefanopriante.com/gbook/php ... n_test.php
http://www.stefanopriante.com/gbook/php ... _test2.php
What terms did you try when SEARCHING for a solution:
Security Code
Write your message below:
Sorry for posting the same topic as many others, I have tried the tips posted, I just hope I did them right, but up to this moment I still can not get the security code to show up in any browser, in ie and chrome i do not see anything at all, in ff i see an image that reads security.
Any help is appreciated, great job guys.
Thanks
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

As the session test indicates, sessions are not working on your server.

I think this post could be helpful to you
viewtopic.php?t=2152
In your case the path would be

Code: Select all

 session_save_path('/home/users/web/b2294/ipw.steftech718/public_html/gbook/tmp');
instead of the path described in that post

Greatings,
Henrie
itny11234
Posts: 2
Joined: Sun Nov 09, 2008 10:55 pm

Worked like a gem - Security Code Image-

Post by itny11234 »

Thank you very much, you guys are great!
It worked perfectly! :D
BerylM
Posts: 6
Joined: Mon Nov 17, 2008 7:19 pm

Post by BerylM »

Script URL:
Version of script:Version: 1.6
Hosting company:easyspace.com
URL of phpinfo.php:
http://www.thecobhamband.org/guestbook/ ... hpinfo.php
URL of session_test.php:
http://www.thecobhamband.org/guestbook/ ... n_test.php

I too would like to know how to create that line of code from the details given in phpinfo.php - I've been through my file several times and I can't see how it's put together!

Whilst I would be grateful if someone would do for me as for the earlier people and simply post what my line of code should be, I would be even more grateful if they would tell me how they got it, too!

And just to confirm - we just need to put the url in the session_save_path line and add it to the beginning of print_sec_img.php, yes?

Many thanks in advance for any assistance!
Beryl I McMillan
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Your sessions aren't working so yes, try that.
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
BerylM
Posts: 6
Joined: Mon Nov 17, 2008 7:19 pm

Post by BerylM »

Thanks for the reply but I still don't know how to create the line I need to put in the code?
Beryl I McMillan
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Create a "tmp" folder inside your GBook folder, make sure it's writable by PHP scripts (IIS internet guests) and use this code:

Code: Select all

session_save_path('E:\\webs\\berylm.com\\html\\cobham\\guestbook\\gbook16\\tmp');
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
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hi Beryl,

You asked how you could find the used string yourself.
  • The easiest way is to use the phpinfo.php file
  • Place it in the gbook folder
  • Open the phpinfo.php file in your browser like in your case http://www.thecobhamband.org/guestbook/ ... hpinfo.php
  • Scroll down the file to the section PHP Variables
  • Find the variable _SERVER["SCRIPT_FILENAME"]
  • Remove phpinfo.php at the end of the given value and replace it with tmp to be used as the name for your temp folder to write the sessions to.
    session_save_path('<path without phpinfo.php>tmp');
Greetings,
Henrie
BerylM
Posts: 6
Joined: Mon Nov 17, 2008 7:19 pm

Post by BerylM »

Thanks, Henrie and Klemen (especially Henrie, for telling me *how* to find that string!) and I've now put the string in the file - but I'm still just getting the text line "Security image" where the graphic is supposed to be showing!

Is there anything else I can try?
Beryl I McMillan
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

I don't have any experience with windows IIS.
But what comes to mind is, have you set write permissions for the tmp folder?

Greetings,
Henrie
BerylM
Posts: 6
Joined: Mon Nov 17, 2008 7:19 pm

Post by BerylM »

Hi Henrie, I haven't done so specifically, but you may have gathered I'm a rank newbie to php so could you tell me how, please? Many thanks!
Beryl I McMillan
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

It is not a php function to set write permissions.
In linux environment, chmod is used.
In Windows IIS it has to be done with however Windows sets write permissions. I do not know how because i have never used Windows IIS.

Greetings,
Henrie
BerylM
Posts: 6
Joined: Mon Nov 17, 2008 7:19 pm

Post by BerylM »

Unfortunately, nor have I, as such - I work in html or frontpage and simply copy or publish to the webspace (in a Windows environment, so presumably IIS)!

I'll see if it's an ordinary thing to do with a folder, but if it's not - could someone who knows how post how to set the permissions for this tell me how, please?
Beryl I McMillan
BerylM
Posts: 6
Joined: Mon Nov 17, 2008 7:19 pm

Post by BerylM »

Looks like it's done some other way - choosing 'properties' for the folder by rightclicking just gets a message saying I can't change file permissions.

Anyone able to help, please?
Beryl I McMillan
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Could you for testing purposes disable the security code ( $settings['autosubmit']=0; ).
This is to test if you can write to the entries.txt file. To check if you have write permissions at all. Otherwise, you will have to set these first


If you don't have write permissions, i read for you http://www.phpjunkyard.com/ftp-chmod-tutorial.php
Last paragraph:
CHMOD on Windows servers

Not all platforms understand the CHMOD command, Windows servers for example don't support CHMOD. Most Windows hosting plans come with a folder called "cgi-bin" or "cgi" which is pre-configured to allow files being writable by scripts. If you are having trouble installing your scripts on a Windows server (get an "Please CHMOD to 666" error) try installing the script within your "cgi-bin" directory!
You could also try Google ( http://www.google.nl/search?q=write+permission+iis )
I found for example:
http://www.phdcc.com/findinsite/instperm.htm
http://coppermine-gallery.net/tutorial/ ... ns/iis.php

Greetings,
Henrie
Post Reply