NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

#1 08-13-2008 17:36:17

rainbow
Member

My oekaki is not working at all.

Hey there, Wac, Long time, no chat.

I've recently upgraded my oekaki from version 5.5.10 to version 5.7.1 citing the discontinuation of the WaxPoteto and if you attempted to look at my page, I've received at least two parse errors when I try to edit the index.php file:

Parse error: syntax error, unexpected '<' in /home/rainbow/public_html/index.php on line 426
Parse error: syntax error, unexpected $end in /home/rainbow/public_html/index.php on line 810

Also, I received this message in other areas of my oekaki too, take the memberlist.php file for example:

Warning: require(boot.php) [function.require]: failed to open stream: No such file or directory in /home/rainbow/public_html/memberlist.phpp on line 13

Fatal error: require() [function.require]: Failed opening required 'boot.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/rainbow/public_html/memberlist.php on line 13

Here's the link to my oekaki and the memberlist in question:

http://ppgrainbow.oekakiart.com
http://ppgrainbow.oekakiart.com/memberlist.php

What have I done wrong? I have neglected to upgrade my oekaki in over a year or so. sad

(If all else fails, I may have to revert back to 5.5.10 since I have a backup copy on my Sandisk 2GB SD card.)

Last edited by rainbow (09-11-2008 13:15:04)

Offline

#2 08-14-2008 01:38:57

Waccoon
Administrator

Re: My oekaki is not working at all.

OK, first, back up the modified files you have.  We'll need to inspect them.  It might be a good idea to make a backup of your "config.php" file, too, just in case.

Next, replace the modified files with the regular files from the [edit: never mind -- I see you're still using Wax].  That will at least get your oekaki working again.  I do hope you followed the upgrade instructions from the readme file in that archive, too.  Basically, you have to move some of the Wax files into the new "resource" folder, such as the ban list, banner, and stuff like that.  It's easy to do, and if you haven't done that yet, you can do it later.  If you haven't done that step, yet, some things won't show up on the index page, but the board should work just fine.  We'll verify that stuff later.

Now, let's look at the error messages:

Parse error: syntax error, unexpected '<' in /home/rainbow/public_html/index.php on line 426
Parse error: syntax error, unexpected $end in /home/rainbow/public_html/index.php on line 810

OK, what this means is that  there is a parse error on line 426 where you either have a PHP tag in the wrong place (<?), or you are trying to use the less-than symbol in HTML, which is not allowed.  This breaks both HTML and PHP.  To use the less-than symbol in HTML, you need to write "&lt;".  In PHP, this symbol can mean a whole bunch of different things.

"Unexpected $end" means that one of the curly brackets ({)is not closed.  It can be a real pain to figure out which one.  Try filling me in on what you are trying to do with the index page (adding Lightbox, for example), and I'll give you some tips.  If you're really stuck, just e-mail me the files and I'll fix the syntax problem when I have some time.

Warning: require(boot.php) [function.require]: failed to open stream: No such file or directory in /home/rainbow/public_html/memberlist.php on line 13

This simply means the "boot.php" file is missing.  Recopy it to the server from the archive.  You might want to recopy all the files from the archive, just to make sure there's nothing else missing.  You won't have to run the installer or updater, so when the board tells you those file are present, just remove them.

Offline

#3 08-14-2008 04:07:51

rainbow
Member

Re: My oekaki is not working at all.

My oekaki which is a heavily modified version of WacPoteto 5.7.1, is appearing again, however. A lot of features on my site are not working properly and what caused the parse error was that I had the piece of data on line 426:

Code:

<acronym title="<?="Image Dimensions: {$imagewidth}&times;{$imageheight}, File Size: {$size} KB";?>">
    <? if ($d_link) { ?>
        <a href="<?=$a_image?>"><img src="<?=$d_image?>" <?=$d_width?> border="0" /></a>
    <? } else { ?>
        <img src="<?=$d_image?>" <?=$d_width?> border="0" />
    <? } ?>
</acronym>
<? } ?>

I'm trying to get the images to display its dimensions (height x width) and the file size and that's what results in the parse error.

Also, I was told that I had to move the banner.php. hosts.txt, ips.txt and notice.php to the "resource" folder...well guess what, while the "resource" folder is existant, I'm getting this garbage in which it contains snippets of the index.php file:

Code:

if (file_not_empty($cfg['res_path'].'/notice.php')) { echo "
\n"; include ($cfg['res_path'].'/notice.php'); echo "\n
\n" ."\n\n\n" ."\n" ."
\n"; } else { echo "\n\n\n" ."\n"; } //

Code:

">  // //  // // // Datatype? // Put our selections together { $master_image = $p_pic.$outerrow['PIC_ID'].'.'.$outerrow['ptype'];
$thumbnail_image = $master_image; if ($use_thumbnail == 2) { $thumbnail_image = $t_pic.$outerrow['PIC_ID'].'.'.$outerrow['ttype']; } elseif
($use_thumbnail == 1) { $thumbnail_image = $r_pic.$outerrow['PIC_ID'].'.'.$outerrow['rtype']; } // Get longest side of picture if
($outerrow['py'] > $outerrow['px']) { $long_mode = 1; $long_side = $outerrow['py']; $short_side = $outerrow['px']; } else { $long_mode = 0;
$long_side = $outerrow['px']; $short_side = $outerrow['py']; } // Set scaling $scale_size = ''; if ($use_scaling && ($long_side > $use_scaling))
{ // No thumbnail. Scale it. if ($long_mode == 1) { // Vertical $scale_size = 'height="'.$use_scaling.'"'; } else { // Horizontal $scale_size =
'width="'.$use_scaling.'"'; } } } // Datatype $applet_mode = ''; if ($outerrow['datatype'] == '0') { $applet_mode = $langop_word_paintbbs; }
elseif ($outerrow['datatype'] == '1') { $applet_mode = $langop_word_oekakibbs; } elseif ($outerrow['datatype'] == '2') { $applet_mode =
$langop_word_shipainter; } elseif ($outerrow['datatype'] == '3') { $applet_mode = $langop_word_shipainterpro; } elseif ($outerrow['datatype']
== '4') { $applet_mode = 'Chibi Paint'; } ?>

I also noticed that no one can register nor log into the oekaki as well. sad

I can e-mail you the index.php file to see what it looks like so far if you want.

(I really hate having to shut down the oekaki for a while like this until I try to get things fixed.)

Edit: E-mail has been sent. You should be able to see my modified index.php file.

Last edited by rainbow (08-14-2008 04:27:37)

Offline

#4 08-14-2008 07:37:28

Waccoon
Administrator

Re: My oekaki is not working at all.

Thanks for the file.  Quite a lot of stuff had to be updated, but it wasn't hard to fix it.  Check your mailbox and let me know how it works for you.

Are you sticking with Wax for now, or do you want to move to Wacintaki?  If you're making the move to Wacintaki, the modifications in the index file will have to be copied to the Wacintaki index file.  Wax and Wacintaki have slightly different index files.

You only need to move those files to the resource folder if you are switching to Wacintaki.  Let's get the index file squared away, and then we'll worry about the resource folder later.

Offline

#5 08-14-2008 13:54:13

rainbow
Member

Re: My oekaki is not working at all.

Waccoon wrote:

Thanks for the file.  Quite a lot of stuff had to be updated, but it wasn't hard to fix it.  Check your mailbox and let me know how it works for you.

Are you sticking with Wax for now, or do you want to move to Wacintaki?  If you're making the move to Wacintaki, the modifications in the index file will have to be copied to the Wacintaki index file.  Wax and Wacintaki have slightly different index files.

You only need to move those files to the resource folder if you are switching to Wacintaki.  Let's get the index file squared away, and then we'll worry about the resource folder later.

You're welcome. I'm staying with the WacPoteto 5.7.1 in which has already been discontinued. WacPoteto 5.7.1 contains some coding from Wacintaki in which it contains some code that contains files that require the use of the /resource directory to store certain files and hacks in.

Update: Wac, the oekaki is displaying the page again but still not working, because I'm getting these warning messages and indication that I cannot login to my own oekaki:

Warning: filesize() [function.filesize]: stat failed for hosts.txt in /home/rainbow/public_html/banscript.php on line 30[/b]

Warning: filesize() [function.filesize]: stat failed for ips.txt in /home/rainbow/public_html/banscript.php on line 91[/b]

Warning: Cannot modify header information - headers already sent by (output started at /home/rainbow/public_html/banscript.php:30) in /home/rainbow/public_html/boot.php on line 39

And this is the error message when I attempt to login to my oekaki and even attempt to activate a account:

Warning: Cannot modify header information - headers already sent by (output started at /home/rainbow/public_html/banscript.php:30) in /home/rainbow/public_html/common.php on line 156

Warning: Cannot modify header information - headers already sent by (output started at /home/rainbow/public_html/banscript.php:30) in /home/rainbow/public_html/common.php on line 156

Warning: Cannot modify header information - headers already sent by (output started at /home/rainbow/public_html/banscript.php:30) in /home/rainbow/public_html/common.php on line 226

To make matters worse, registering for a account at Insomnia Oekaki works, but I get the same warning messages above. I even registered a test account and I got the same warning message referencing to common.php on line 226 even though the account was created.

I was wondering if there is a way to fix this problem so that I can try to at least login again.

Last edited by rainbow (08-14-2008 18:42:02)

Offline

#6 08-15-2008 03:04:33

Waccoon
Administrator

Re: My oekaki is not working at all.

Yeah, it'll be a while before Wacintaki totally replaces Wax (at least a few months), so you're better off sticking with Wax for now.

Now that the index page is fixed and the rest of the board is updated, we need to correct the resource folder.

What's happening is that the "hosts.txt" and "ips.txt" files cannot be found.  Those files are used for banning people.  Wacintaki keeps all of its data files in that folder, but Wax Poteto keeps everything in the root folder.  So, the following files have to be moved from the resource folder back to the root folder, and CHMOD to 664:

banner.php, hosts.txt, ips.txt, notice.php

The hacks.php file and rules.php files should stay in the resource folder.  When you are done, log in as the owner and view the diagnostics page.  That page will tell you if any files are missing or locked.  Locked files are unlocked by CHMODing them so they are writable (664 is the most common number for doing this).

Offline

#7 08-16-2008 16:19:01

rainbow
Member

Re: My oekaki is not working at all.

Waccoon wrote:

Yeah, it'll be a while before Wacintaki totally replaces Wax (at least a few months), so you're better off sticking with Wax for now.

Now that the index page is fixed and the rest of the board is updated, we need to correct the resource folder.

What's happening is that the "hosts.txt" and "ips.txt" files cannot be found.  Those files are used for banning people.  Wacintaki keeps all of its data files in that folder, but Wax Poteto keeps everything in the root folder.  So, the following files have to be moved from the resource folder back to the root folder, and CHMOD to 664:

banner.php, hosts.txt, ips.txt, notice.php

The hacks.php file and rules.php files should stay in the resource folder.  When you are done, log in as the owner and view the diagnostics page.  That page will tell you if any files are missing or locked.  Locked files are unlocked by CHMODing them so they are writable (664 is the most common number for doing this).

Thanks for the tip, Wac. big_smile

The index.php file is okay now and I got the banner.php, hosts.txt, ips.txt all in the root folder, but I still have other problems in other areas of the oekaki.

In the ldelpics.php file, I get these following warning messages when I view the images (including the recent picture):

Warning: filesize() [function.filesize]: stat failed for /133.png in /home/rainbow/public_html/ldelpics.php on line 85   

Warning: getimagesize(/133.png) [function.getimagesize]: failed to open stream: No such file or directory in /home/rainbow/public_html/ldelpics.php on line 92

Also, in the recover.php file, I get these following warning messages when I view the images (including the recent picture):

Warning: filesize() [function.filesize]: stat failed for /123.png in /home/rainbow/public_html/recover.php on line 90

Warning: getimagesize(/123.png) [function.getimagesize]: failed to open stream: No such file or directory in /home/rainbow/public_html/recover.php on line 97

And in the delpics.php file, I get these following warning messages when I view the images (including the recent picture):

Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/rainbow/public_html/delpics.php on line 29

Warning: filesize() [function.filesize]: stat failed for /133.png in /home/rainbow/public_html/delpics.php on line 96

Warning: getimagesize(/133.png) [function.getimagesize]: failed to open stream: No such file or directory in /home/rainbow/public_html/delpics.php on line 103

Warning: getimagesize(/133.png) [function.getimagesize]: failed to open stream: No such file or directory in /home/rainbow/public_html/delpics.php on line 111

It seems that using KDiff3 only caused more annoying problems than fixing it. It seems that nothing should be fixed if it isn't broke, ya know. sad

How do I get images to be displayed properly in the ldelpics.php, recover.php and delpics.php files?

Offline

#8 08-19-2008 05:56:42

Waccoon
Administrator

Re: My oekaki is not working at all.

Newer versions of the oekaki support more than just PNG files.  However, this extra flexibility comes at the price of complexity.  If you're trying to get extra information about the pictures (such as filesize), then you must change how the filename is being sent to the getimagesize() function.

To properly use images, you must use the $p_pic, $t_pic, and $r_pic variables, which control the path for pictures, tiny thumbnails, and large thumbnails, respectively.

Also, you must use the correct file extension.  Old versions of Wax just use PNG.  New versions must use the extension saved in the database.

To read an image, you would use:

Code:

$p_pic . $row['PIC_ID'] . '.' . $row['ptype']

WHERE

          $row = (info about picture slot)
        $p_pic = './pictures/';
        $r_pic = './pictures/r';
        $t_pic = './pictures/t';
$row['PIC_ID'] = (picture number);
           '.' = (dot in filename);
 $row['ptype'] = (file extension for picture);

To read thumbnails, you must use the correct variable names:

Code:

if (!empty ($row['ttype']) {
     $t_pic . $row['PIC_ID'] . '.' . $row['ttype']
}
if (!empty ($row['ttype']) {
     $r_pic . $row['PIC_ID'] . '.' . $row['rtype']
}

Offline

#9 08-19-2008 06:01:57

Waccoon
Administrator

Re: My oekaki is not working at all.

Oh yeah, I tried to send a picture, and it won't let me.  Did you modify the picture save code or "paintsave.php" a lot so you could collect information for your statistics page?  That might be troublesome to fix.

Offline

#10 08-19-2008 12:53:01

rainbow
Member

Re: My oekaki is not working at all.

The paintsave.php file remains unmodified. In order to read the images and thumbnails, would I have to modify the paintsave.php file too?

I did modify the ldelpics.php file and replaced the code between lines 100 and 109 with:

Code:

<? if (($imagewidth) < 64) { ?>
    <img src="<?=$p_pic.$rows['PIC_ID'].'.'.$rows['ptype']; ?>" class="imghover" alt="pic" />
    <?=nifty2_convert($row['title']);?>
<? } else { ?>
    <img src="<?=$p_pic.$rows['PIC_ID'].'.'.$rows['ptype']; ?>" class="imghover" width="64" alt="pic" />
    <?=nifty2_convert($row['title']);?>
<? } ?>
<? $charactercount = nifty2_convert(strlen($rows['title'])); ?>
<? $wordcount = count(explode(" ", nifty2_convert($rows['title']))); ?>
<acronym title="<? echo 'Characters: ', (number_format($charactercount)), ', ', 'Words: ', (number_format($wordcount)); ?>"><a href="<?= $p_pic.$rows['PIC_ID'].'.'.$rows['ptype']; ?>" class="imghover" alt="pic" /><?=nifty2_convert($rows['title']);?></a></acronym>

And I still got this warning message. sad

Do you mind if I send you the ldelpics.php file or not? If so, I'll take a look at it and try modifying the remaining two files as well.

(I evidently got a couple more things to fix before my oekaki is fully functional again.)

Offline

#11 08-20-2008 02:12:09

Waccoon
Administrator

Re: My oekaki is not working at all.

You're using both "$row" and "$rows" in that code, but "ldelpics.php" now uses "$main_row" as the result array.  In each file you're modifying, check for the "mysql_fetch_array()" function to see if the names of the result arrays has changed.  I had to change some names because some parts of the board now deal with images by any member, rather than just the current member, to aid administration.

Also, you might want to consolidate some of the expressions into variables to make things easier, such as $my_image = $p_pic.$row['PIC_ID'].'.'.$row['ptype'];  Just make sure that the variable is cleared or overwritten if you're in a loop, so images are not accidentally printed more than once.

Feel free to e-mail me any files you like.  I can check for some other "gotchas".

Offline

#12 08-25-2008 09:20:14

rainbow
Member

Re: My oekaki is not working at all.

Um, Wac. I have a problem here. There seems to be some sort of a version conflict here. I'm getting an error message when I try to access my oekaki:

Please run the updater.

Config required: v1.3.0
Config present: v

The current version of my heavily modified Wax Poteto is version 5.7.1 and I appearently got this message, when I tampered with the boot.php file, cpanel.php file and the config.php file where the $wax_cfg_ver = "5.5.6"; variable existed.

And when I tried to update the oekaki, it claimed that it was OekakiPoteto 5.0.0 and it was upgrading to Wax Poteto 1.3.0. I'm not upgrading to Wax Poteto 1.3.0.

Wax Poteto updater: v1.3.0

Detected version of OekakiPoteto: 5.0.0

When when I attempted to update the oekaki, I wound up with this error message:

Update from OekakiPoteto 5.x to Wax 5.5.6...
MySQL: Table 'rainbow_ppg.op_oekakichatmodusers' doesn't exist
MySQL: Table 'rainbow_ppg.op_oekakichatmod' doesn't exist
MySQL: Table 'rainbow_ppg.op_oekakichatmod' doesn't exist
MySQL: Table 'rainbow_ppg.op_oekakichatmod' doesn't exist

STOP: Cannot add avatar field to database. Check the database connection and run the updater again

If problems persist, try visiting the NineChime Support Forum.

How can I get the oekaki updated to Wax Poteto 5.7.1 without having to damage the MySQL database?

I worked so hard having to fix up my oekaki from the day where I upgraded it to version 5.7.1 and I'm almost finished.

Offline

#13 08-26-2008 06:42:38

Waccoon
Administrator

Re: My oekaki is not working at all.

I'm not upgrading to Wax Poteto 1.3.0.

I admit this is confusing, but as of Wax Poteto version 5.7.0, the board is now using the Wacintaki 1.3.0 database and config file.  So, the updater says it is updating to 1.3.0.  After you click "Next", however, it will update normally.

The problem is that there are version numbers in the boot.php file, the config file, and the database.  If those numbers are modified manually, the updater can get confused.  I don't think the updater will damage anything since it has a number of sanity checks, but it's pretty clear that one of the version numbers is missing.  You are allowed to put a new value in the "$mod_version" variable, but all other variables must be left alone.

To fix this, you will have to send me a copy of your boot.php file and your config file.  If you have made changes to your common.php and functions.php files, you should send those, too.  Once I patch in the correct version numbers, the updater should work as normal.  The only file that is modified by the updater is the config file.

Basically, the boot.php file should have these version numbers:

$version       = '5.7.1';
$cfg_ver_check = '1.3.0';
$cfg_db_check  = '1.3.12';


But, the config file needs to have this number:

$wax_cfg_ver = "5.5.6";

When making mods to any codebase, it's highly recommended that you group together your changes into blocks when possible, and copy them into the latest version of the code.  Trying to copy the new code into your modified code is a maintenance nightmare.

Offline

#14 08-26-2008 14:03:28

rainbow
Member

Re: My oekaki is not working at all.

Waccoon wrote:

I'm not upgrading to Wax Poteto 1.3.0.

I admit this is confusing, but as of Wax Poteto version 5.7.0, the board is now using the Wacintaki 1.3.0 database and config file.  So, the updater says it is updating to 1.3.0.  After you click "Next", however, it will update normally.

The problem is that there are version numbers in the boot.php file, the config file, and the database.  If those numbers are modified manually, the updater can get confused.  I don't think the updater will damage anything since it has a number of sanity checks, but it's pretty clear that one of the version numbers is missing.  You are allowed to put a new value in the "$mod_version" variable, but all other variables must be left alone.

To fix this, you will have to send me a copy of your boot.php file and your config file.  If you have made changes to your common.php and functions.php files, you should send those, too.  Once I patch in the correct version numbers, the updater should work as normal.  The only file that is modified by the updater is the config file.

Basically, the boot.php file should have these version numbers:

$version       = '5.7.1';
$cfg_ver_check = '1.3.0';
$cfg_db_check  = '1.3.12';


But, the config file needs to have this number:

$wax_cfg_ver = "5.5.6";

When making mods to any codebase, it's highly recommended that you group together your changes into blocks when possible, and copy them into the latest version of the code.  Trying to copy the new code into your modified code is a maintenance nightmare.

The oekaki is working again, but I'm gonna be posting a list of bugs once I'm all finished making modifications to my remaining files in my new forum thread. wink

Offline

#15 08-29-2008 14:19:46

rainbow
Member

Re: My oekaki is not working at all.

Umm, Wac. I need help again. I'm stuck. sad

A couple of days ago, when I added the functionality to toggle between [Thumb] and [Unthumb] I wound up with a parse error on line 555 of index.php in which that was corrected, but now I wound up with a parse error on line 1395:

Parse error: syntax error, unexpected '}' in /home/rainbow/public_html/index.php on line 1395

I've been trying so hard to find ways to correct the problem using various text editors, including having to add the <? and ?> and remove it, but it seems that it's no help at all and I believe that attempting to remove the } on lines 1395 and 1398 will cause the main page of the oekaki to be malformed.

I was hoping that there would a way to correct this error somehow...

I tried to e-mail you the other day, but I haven't got a response yet.

Offline

#16 08-30-2008 02:32:59

Waccoon
Administrator

Re: My oekaki is not working at all.

I got your e-mail and sent a reply, but maybe it didn't go through.  I'll send it again.

Offline

#17 08-31-2008 21:08:08

rainbow
Member

Re: My oekaki is not working at all.

Waccoon wrote:

I got your e-mail and sent a reply, but maybe it didn't go through.  I'll send it again.

Alrighty! I did a lot of tests through my test account to see if the oekaki was functioning and it seems that the oekaki is doing okay now after the upgrade with the exception of a few bugs found elsewhere on the oekaki that still need to be worked out. But it'll eventually have to be worked out one by one. smile

Offline

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB