Author Topic: Captcha not working on IIS and PHP 5.2.5  (Read 4880 times)

0 Members and 1 Guest are viewing this topic.

Offline orgler

  • Pre-Newbie
  • Posts: 1
    • View Profile
Captcha not working on IIS and PHP 5.2.5
« on: May 08, 2008, 03:45:19 PM »
Hi,
ich weiss nicht ob es besser ist hier auf deutsch oder englisch zu schreiben, deshalb hier beide Varianten:

I tried to install 4images 1.7.6 on IIS using PHP 5.2.5 via fast-cgi. Most things seem to work, but I cannot use captchas: Neither IE nor Firefox is displaying the image. Manually pointing the browser to http://localhost/captcha.php doesn't show me an image.
I then tried to download the captcha using wget. This returns a file, but gimp cannot open this file, stating it would not start with the jpeg header but with 0x0d0a
When I manually inspected the file, I saw that the file starts with hex: 0d0affd8
So there is a CR/LF before the real data starts. When I delete this leading CR/LF the image gets displayed.

I think PHP/IIS is somewhere injecting a newline where it should not? Any ideas?


===============================
Ich habe versucht 4images 1.7.6 auf IIS6 oder IIS7 mit PHP 5.2.5 über fast-cgi zu installieren. Das funktioniert auch, bis auf die captchas. Die werden nicht angezeigt (weder in Firefox noch im IE). Dann habe ich mit wget die datei http://localhost/captcha.php runtergeladen und festgestellt dass sie mit 0x0d0affd8 beginbt, daher es gibt nen initialen CR/LF bevor die eigentlichen jpeg-magic-bits beginnen. Ist das Problem irgendwie bekannt? Die Forensuche konnte mir leider nicht helfen.

Gruß
orgler

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Captcha not working on IIS and PHP 5.2.5
« Reply #1 on: May 08, 2008, 04:06:48 PM »
hallo orgler und willkommen im forum,

könntest du mal deine phpinfo (hättest im 4images Admin CP) posten?
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline justintjacob

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: Captcha not working on IIS and PHP 5.2.5
« Reply #2 on: December 22, 2011, 04:09:08 AM »
I also same problem

Check my site

http://www.spicynet.in

captcha not showing

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Captcha not working on IIS and PHP 5.2.5
« Reply #3 on: December 22, 2011, 04:35:37 AM »
In your case one or more files you've edited were saved in UNICODE/UTF8 encoding with BOM. You'll need edit these files again and save them either in single byte encoding (ASCII) or UNICODE/UTF8 without BOM.

If your text editor doesn't allow you control encoding and/or BOM, then you'll need change the editor. Windows Notepad/Wordpad are no good for such things.

Good luck.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)