Page 1 of 1

Security Code not working

Posted: Sun Nov 09, 2008 11:18 pm
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

Posted: Sun Nov 09, 2008 11:52 pm
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

Worked like a gem - Security Code Image-

Posted: Mon Nov 10, 2008 4:12 am
by itny11234
Thank you very much, you guys are great!
It worked perfectly! :D

Posted: Tue Nov 18, 2008 12:59 am
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!

Posted: Tue Nov 18, 2008 6:12 pm
by Klemen
Your sessions aren't working so yes, try that.

Posted: Tue Nov 18, 2008 6:40 pm
by BerylM
Thanks for the reply but I still don't know how to create the line I need to put in the code?

Posted: Tue Nov 18, 2008 7:08 pm
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');

Posted: Tue Nov 18, 2008 8:23 pm
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

Posted: Tue Nov 18, 2008 10:40 pm
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?

Posted: Wed Nov 19, 2008 1:37 am
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

Posted: Wed Nov 19, 2008 1:56 am
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!

Posted: Wed Nov 19, 2008 2:33 am
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

Posted: Wed Nov 19, 2008 3:47 am
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?

Posted: Wed Nov 19, 2008 3:50 am
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?

Posted: Wed Nov 19, 2008 4:33 pm
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