NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

#1 04-19-2006 03:56:51

rainbow
Member

A new problem...

When I'm not logged in to my oekaki, I'm getting warning messagess stating that the first should be a array and that headers cannot be modified, because they have already been sent. This has to to with the following seven files below:

1. delpics.php
Warning: extract(): First argument should be an array in /home/rainbow/public_html/delpics.php on line 15
Warning: Cannot modify header information - headers already sent by (output started at /home/rainbow/public_html/delpics.php:15) in /home/rainbow/public_html/delpics.php on line 23


2. delcomments.php
Warning: extract(): First argument should be an array in /home/rainbow/public_html/delcomments.php on line 14
Warning: Cannot modify header information - headers already sent by (output started at /home/rainbow/public_html/delcomments.php:14) in /home/rainbow/public_html/delcomments.php on line 21


3. editnews.php
Warning: extract(): First argument should be an array in /home/rainbow/public_html/editnews.php on line 14
Warning: Cannot modify header information - headers already sent by (output started at /home/rainbow/public_html/editnews.php:14) in /home/rainbow/public_html/editnews.php on line 17


4. editbanner.php
Warning: extract(): First argument should be an array in /home/rainbow/public_html/editbanner.php on line 14
Warning: Cannot modify header information - headers already sent by (output started at /home/rainbow/public_html/editbanner.php:14) in /home/rainbow/public_html/editbanner.php on line 17


5. editnotice.php
Warning: extract(): First argument should be an array in /home/rainbow/public_html/editnotice.php on line 14
Warning: Cannot modify header information - headers already sent by (output started at /home/rainbow/public_html/editnotice.php:14) in /home/rainbow/public_html/editnotice.php on line 17


6. mailread.php
Warning: extract(): First argument should be an array in /home/rainbow/public_html/mailread.php on line 14
Warning: Cannot modify header information - headers already sent by (output started at /home/rainbow/public_html/mailread.php:14) in /home/rainbow/public_html/mailread.php on line 16


7. mailout.php
Warning: extract(): First argument should be an array in /home/rainbow/public_html/mailout.php on line 14
Warning: Cannot modify header information - headers already sent by (output started at /home/rainbow/public_html/mailout.php:14) in /home/rainbow/public_html/mailout.php on line 17


How do I fix this? Infact, I'm about to delete the flagchk.php file from the server, because it's totally useless since I updated by board to Wax Poteto 5.5.8.

Offline

#2 04-19-2006 07:46:15

Waccoon
Administrator

Re: A new problem...

I really hate the extract() command.  It's bad, and OekakiPoteto uses it everywhere.  But, it's a pain to fix, and poses no security threat, since all data is forwarded to and processed by functions.php.  I got rid of all calls to extract() in that script, for security reasons.

What's happening here is that the board tries to get information on the person trying to view the page, and then extracts() that information into variable names.  If a member name is not set (when logged out), you get this error.  People who are logged in get "authorization required" error messages.  People who are not logged in get these dumb errors.

To fix this requires replacing all variables "$var" with a keyed array fetched from the database, like "$array['var']".  I went through all that trouble with Wacintaki, but I won't do it to Wax.

Offline

#3 04-19-2006 10:44:35

rainbow
Member

Re: A new problem...

So for example, in line 14 of the mailout.php file reads:
extract(mysql_fetch_array($result));

How would I replace that?

I don't want to end up with parse errors though.

I'm stuck and I don't know what to do. sad

Last edited by rainbow (04-19-2006 16:19:56)

Offline

#4 04-20-2006 05:33:19

Waccoon
Administrator

Re: A new problem...

Try replacing the line with extract() in it with this:

Code:

if ($result && mysql_num_rows($result) > 0) {
   extract(mysql_fetch_array($result));
}

This ensures that variables will be extracted only if the database returns information.

Offline

#5 04-20-2006 16:54:34

rainbow
Member

Re: A new problem...

It worked!

One last question though.

Is it okay to delete the flagchk.php file? If not which of the following files still rely on the flagchk.php file?

Offline

#6 04-21-2006 05:37:29

Waccoon
Administrator

Re: A new problem...

For 5.5.6 and up, the following files may be deleted (the updater is supposed to do this):

redirect.php
arecover.php
flagchk.php

Offline

#7 04-21-2006 14:00:21

rainbow
Member

Re: A new problem...

Thanks for the concern. ^_^

Offline

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB