Go Back   Novahq.net Forum > phphq.Net > phphq.Net Forums
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-17-2004, 03:03 PM
stevis
Unregistered

Posts: n/a

I fixed a problem with IIS 6

I installed phShoutBox without a hitch - it's a wonderful, simple solution for what I was looking for - thanks!

However, whenever I hit the "Shout It Out" submit button it would write that shout 100 times into the MySQL database and the phshoutbox.php file would return a CGI Error with a message about an incomplete set of headers.

I'm running IIS 6/PHP 4.3.4/MySQL 4.0.16

After debugging a while I found that in phshoutbox.php there is a line that reads:
PHP Code:
header("Location: $_SERVER[PHP_SELF]?cmd=$phsb[cmd]"); 
...that I changed to an absolute URL so that it read:
PHP Code:
header("Location: [url]http://www.example.com/directory-where-i-have-it-installed/phshoutbox.php?cmd=[/url]$phsb[cmd]"); 
That seemed to fix the CGI Error on form submit and the writing it 100 times to MySQL. I hope this helps someone else.
Reply With Quote
  #2  
Old 08-27-2004, 11:47 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

An automatic way to do the header would be

header("Location: http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?cmd=".$phsb[cmd]);

Ill include this into future scripts. Thanks!
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #3  
Old 10-03-2004, 06:19 AM
katana*GFR* is offline katana*GFR*

Join Date: May 2002
Location: North Sea
Posts: 2,421

Send a message via ICQ to katana*GFR* Send a message via MSN to katana*GFR*
ok old topic i know, but cant you better use Apache instead of IIS? Ive been busy with PHP and stuff and from what ive read and heard Apache works better then IIS.
But i guess you have a reason for using it. Just a thought from me
__________________
<- Sponsored by Chris



Found on Youtube:
Quote:
And if Newton Faulkner's voice can be described as "R&B" then Kurt Cobain must be a member of Boyz II Men.
Link here
Reply With Quote
  #4  
Old 01-14-2006, 04:25 PM
Guest
Unregistered

Posts: n/a

It don't woyk.

When I open phShoutbox.php to view, in IE, it opens the file. What gives? :?
Reply With Quote
  #5  
Old 02-16-2006, 02:06 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

Quote:
Originally posted by Katana*GFR*
ok old topic i know, but cant you better use Apache instead of IIS? Ive been busy with PHP and stuff and from what ive read and heard Apache works better then IIS.
But i guess you have a reason for using it. Just a thought from me
IIS performs much better then apache on a windows based server..

Quote:
Originally posted by Guest
It don't woyk.

When I open phShoutbox.php to view, in IE, it opens the file. What gives? :?
Most likely your php is not installed correctly or you do not have a MIME type for the php extension, check with your host
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixed sizes Chrispy Sigs and Graphics 9 01-12-2008 06:00 PM
Must Have Fixed Today! General Nuisance Tech Support 13 09-11-2005 02:18 AM
I fixed it up legit1 Sigs and Graphics 2 01-29-2005 12:20 AM
Your DFLW Elevation Problem is fixed... ArcticWolf Delta Force 2 04-21-2002 02:26 PM


All times are GMT -5. The time now is 06:19 PM.




Powered by vBulletin®