omar wrote:

Whan can we expect a version thet workos on pun 1.1.3

It work for version 1.* of PunBB.

Changed the first post, should have done that loooong ago.

Edit: Done! Uploaded a new file to PunRes (It's nothing new, just updated the installer)

Hehe, it's a mystery in the beginning :)

Always fun to be of any use :P

"the account that I installed MySQL on"

^^ As in a normal computer account (as in for example an unix username), or did you create an account when you installed the mysql-server?

554

(3 replies, posted in Feature requests)

Hm, true.

It could be visible only to the ones at the same IP-number as the admin used recently...

Jansson's crappy server is down again... I've uploaded the file here instead.

556

(9 replies, posted in Programming)

Does someone know how much pointers and such stuff a child and a parent shares? The program should fork, and the child handle the file (sending it), and the parent all the connections.

The problem is that the child don't know which connections that are active =/ Can someone see what's wrong? (The code around "printf(" >> %d", i);" in the child outputs only the process id (3), and the parent outputs all connections (as the child should do also)).

...includes, process() and checkpasswd()...

int main (int argc, char **argv){

    ...alot of init code...

    // Initialize the active sockets
    FD_ZERO (&master);
    FD_ZERO (&read_fds);
    FD_SET (sock, &master);

    if( fork() == 0 ){
        // Child process    
        ...
        printf("Child!\n");

        // Open the file
        pos = 0;
        while(true){

            read_fds = master;
            printf("Child sockets:");
            for( i = 0; i < FD_SETSIZE; i++){
                if (FD_ISSET (i, &read_fds) > 0)
                    printf(" >> %d", i);           <----------------------
            }
            printf("\n");

            // Sleep for a while
            sleep(2);
        }

        printf("No more child =(\n");

        fclose(fp);
        exit(0);
    }

    else{
        // Parent process

        while (true){
            read_fds = master;

            printf("Active sockets:");
            for( i = 0; i < FD_SETSIZE; i++){
                if (FD_ISSET (i, &read_fds) && i != sock)
                    printf(" >> %d", i);            <----------------------
            }
            printf("\n");

            // Wait for an active socket
            printf("\nWaiting...\n");
            if (select (FD_SETSIZE, &read_fds, NULL, NULL, NULL) < 0){
                perror ("Select error");
                exit(1);
            }

            // Loop through all sockets
            for (i = 0; i < FD_SETSIZE; i++){

                if (FD_ISSET (i, &read_fds)){

                    // Got a new connection on the original socket
                    if (i == sock){
                        ...FD_SET...
                    }

                    // Data arriving on an "old" socket -> process the data
                    else{
                        ...
                    } // end if (i==sock)

                } // end if (FD_ISSET)

            } // end for (FD_SETSIZE)

        } // inf loop

    } // end (fork)

    close(sock);
    return(0);

}

... I doubt anyone understand what I want though... should sleep instead.

557

(9 replies, posted in Programming)

sverrir wrote:

Hehe, my bad, have to sleep some more ;)
You should be able to use "GetSystemTime, stopTime" from my other example.

Yah, I solved the problem uring sleep(int seconds) =) Easy solution! But with one problem solved, another one comes along: I must send the data to all clients...

It should be in lang-directory named: en_pms.php.

559

(9 replies, posted in Programming)

sverrir wrote:

Timer

...

The program

...

One problem with this code... I'm making the program in C/C++ :)

560

(9 replies, posted in Programming)

Jansson wrote:

You can make it check for something new every 5 mins or something. Maybe there is a better solution but it would work :)

Yeay, I thought of that too. Maybe use fopen/fseek each second and send all new lines. But then I need a timer :)

sverrir wrote:

Here is a thread program I did for a course in operating systems.
I think it should answear your questions on how to handle the sleep issue.

...

Great! I'll have a look at it when I'm home from school.

There's a problem with the installer if you don't have PunPoll installed. Cange line 20 in _start.php to:

@$db->query($sql);

I'm uploading a new ver to punres when it's up again.

1) The databases must be on the same computer, and at the same "database-account". It does not work on dump-files.


2)Oh, sorry, my mistake.

Change line 21 in _start.php to:

@$db->query($sql);

I'm uploading a new ver to punres when it's up again.

563

(9 replies, posted in Programming)

I'm working on a server which should continously read a file and send it to a bunch of clients. The server <-> client thing works fine, but the file-reading is not. How do I read the file without the program raking 100% CPU?

The file is a log from another server, so it's actually "endless".

z0rglub wrote:
Chacmool wrote:

z0rglub: Would be great if you could try this one. The guest-id-problem should be solved... hopefully :P

Too late, I converted my IPB 1.1 forum to punBB 1.1.3. See PhpWebGallery forum :-)

Hehe, okay :) Did you use the old phpbb-converter then? Was all the anonymous/guest-posts/topics converted properly?

565

(5 replies, posted in PunBB 1.2 bug reports)

You can't enter usernames longer than 25 signs when you're registering to the forum :)

kpimichael wrote:

Hi, I am new to the board.   Just installed and really like the product....but like everything else...i want to tweak.

I want to incorporate some of my own code....but I want to keep the integrity of the punbb packages intact so that i can easily keep up with new releases.

For instance, I would like to add some drop downs in the posts or creating an external table that would contain more detailed profile. 

Any suggestions as to how i can do mods and still not mess up a great program?

Thanks, Michael

A simple solution is to keep as much code as possible in your own files, and then include the files in the PunBB-code. I've done this is PunPoll and the personal message system, and It's _alot_ easier to install now! (PunPoll went from 60 to 40 steps by doing this and merge some steps.)

Andy wrote:

Will the password conversion problem ever be solved? Or is it impossible?

It is impossible.

Is it better to write a mod than having all users get a new password (through the "I forgot my password"-feauture)? (It's times like this I miss a poll-system...)

Added private-messages-support to. This version will probably work much better than 1.x, I've found alot of minor bugs and tweeks :) Download from PunRes.

z0rglub: Would be great if you could try this one. The guest-id-problem should be solved... hopefully :P

New release out... made some minor changes. The converter now adds a lock-file to prevent users from running it again if the admin forgets to remove the files.

z0rglub:

I've rewritten the conveter so it have the nice PunBB-style (it's the same "system" as the InvPB-converter now). As PunRes doesn't work, the file can be downloaded here. Please report any bugs... hopefully there much less problems with ' and " now.

Edit: Found something I must change... removed the url temporary.

z0rglub wrote:
Chacmool wrote:
z0rglub wrote:

I think I'll simply debug phpBB to punBB converter...

phpBB?

Yes... the converter from IPB 1.1 to phpBB 2.0.x exists and is easy to use. Once I have phpBB 2.0 database, I use phpBB to punBB converter (see problems I encountered in Converter: PhpBB2 -> PunBB1.1 topic)

Oh, nice solution! It should work fine yes :)

Edit: I've missed your huge post, I'll look at it right away. Rewriting some parts of the PhpBB->PunBB converter (found much better solutions for a converter when I made the IPB -> PunBB-converter :)).

Edit2: Done with the other converter... see it's topic for more information-

z0rglub wrote:

:-/ Even after searching, I don't know how to migrate from my IPB 1.1 to 2.0 !

I think I'll simply debug phpBB to punBB converter...

phpBB?

I thought they shipped an updater with their install package... I'll look closer at it.

Edit: Found some info in a topic at the IPB forum:

There will be an upgrade script for 1.3 to 2.0 when version 2 reaches a stable release.

(Matt @ Apr 16 2004, 12:49 PM) wrote:

We've almost completed IPB 2.0.0 PDR and we should be ready for a release early next week.

They seems to release v.2.0.0 soon (It's only "Public Development Release" now), and then you can convert to v2.0.

z0rglub wrote:

It seems I have to first migrate from IPB 1.1.2 to IPB 2 :-(

Yes. Seems pointless to make a converter from an old version of IPB... they've probably changed alot in the database between the versions.

z0rglub wrote:

InvPB2-PunBB1_beta1.rar

Could you propose the same archive but compressed with a free compression format, or at least with zip ? (I can't use it by now, I don't have WinRAR)

Done!

I've uploaded a public beta to PunRes. Would be happy if people could test it for me. Only use this to help me make the converter! If there's some bugs, I won't help anyone by making a fix for an already converted forum.

Not being able to login into PunBB after the converter is done is not a bug. It's just not possible to convert the passwords beqause InvPB and PunBB handles tha passwords differently, like this:

InvPB:
$hash = md5( md5( $salt ) . md5( $password ) );

PunBB:
$hash = md5( $password );

Read this thread for more info about the password-problem.

Note: BACKUP your database before using it!