Topic: returned to install.php after filling out install.php form

Hookais... I'm sure I've forgotten to do something...

I try to install the board and it just returns me to the install.php form, over and over again hmm Never reall uses any CPU after submitting the form data ~.~ I have lighttp web server, php5, and php5-sqlite all in a chroot jail and sqlite outside the jail. I ldd'ed php5 and such and got all the libs. Copied the /etc/php5 /usr/bin/php* /usr/lib/php5 directories into the jail. Then I did this:

$ tar -xhjf punbb1.2.12.tar.bz2
$ mv ./punbb1.2.12/<i forget? punbb i think?> /home/www-user/www/pages/music/forum
$ firefox ddns.hostname/music/forum/install.php

lighttp is chroot'ed to /home/www-user. Any request to ddns.hostname is served up with /home/www-user/www/pages as it's root. I stored the sqlite (v2.8.x) database in /home/www-user/data/db/music_forum.db (-rw-r--r-- 1 www-user www-user     0 2006-09-05 03:01 music_forum.db).

I entered this info into the "install.php" form:

DatabaseType: SQLite
Database server hostname: localhost
Database name: /data/db/music_forum.db (also tried ../../../../data/db/music_forum.db)
Administrator username: private
Password: *******
Conf Password: *******
Administrator's e-mail: private@private.private
Base URL: http://ddns.hostname/music/forum (also tried http://localhost/music/forum and http://localhost/www/pages/music/forum)

Anyone have any ideas? I sure it's not the permissions because lighttp ignores "execute" permissions (all files ending in ".php" are configured to be run by "/bin/php"; don't even need the #!/usr/bin/php line); also I do see the php file displayed as an html file and not as random php source. Thanks in advance.

echo "deadram"; echo; fortune;

Re: returned to install.php after filling out install.php form

You return to install.php to copy the information needed in config.php

Re: returned to install.php after filling out install.php form

Bekko: He means it returns him to the form, not that it gives him the config.php screen

Could we get a link?

Re: returned to install.php after filling out install.php form

Yah, it's install.php that keeps showing up, as if no form was filled and no submit was pressed, never get to config.

@smartys: Sorry, I'm a litle paranoid. I'd prefer not to give someone write access to my HD (currently forums folder is set with www-user as owner; normally it's set as my default local logon account). No link for yous ;P

Humm, a litle more info: I tried to make an error, like mismatched passwords, and a javascript message box shows up. So I disabled javascript and tried again, and the same thing. Empty form, full form, invalid data in the form; it always just goes back to install.php as if nothing happend hmm

echo "deadram"; echo; fortune;

Re: returned to install.php after filling out install.php form

Do you get anything in your webserver error log?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: returned to install.php after filling out install.php form

When I first install php5 into the chroot, I forgot a few libs and got some errors (ohh and the page never actually displayed correctly). After fixing that (and now the page does display correctly) there hasn't been an errors in the logs hmm

I might have forgotten to mention that I've set the owner to www-user:www-user 755 for the forum directory (and sub directories); www-user:www-user 644 for all the files. This is the way lighttp works (it ignores run permissions; If it can read the file, and it's extention is "XXX", then it's run by program "Y"; lighttp is run as www-user:www-user).

I've also tried with the database created with sqlite, or sqlite3; and without any database created.

echo "deadram"; echo; fortune;

Re: returned to install.php after filling out install.php form

Try this. Open up install.php and look for:

if (!isset($_POST['form_sent']))

At the beginning of that code block, add

dump($_POST);

Then try to install. It won't work, but we will at least know if PHP is aware of that information was POST:ed.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: returned to install.php after filling out install.php form

I did this instead because "dump" function call doesn't exists?

<body onload="document.getElementById('install').req_db_type.focus()">

<?php
  echo ($_POST);
  foreach ($_POST as $postdata)
    echo $postdata;
?>

<div id="puninstall" style="margin: auto 10% auto 10%">

And each time I try it (including when I first open the install page) I get this html:

<body onload="document.getElementById('install').req_db_type.focus()">

Array
<div id="puninstall" style="margin: auto 10% auto 10%">

Looks like that might be the problem... Maybe I'm missing some libs/php mods? I've only install the debian php5 package and the debian php5-sqlite package.

also this code:

<?php
  echo $_POST['form_sent'];
?>

print this:
Notice: Undefined index: form_sent in /www/pages/music/forum/install.php on line 115

Both on first load and after submitting the info.

echo "deadram"; echo; fortune;

Re: returned to install.php after filling out install.php form

Forget the instructions I gave you. I instructed you to put them in the wrong place and dump() isn't even defined in that scope smile I'm a moron.

It appears as if, when you submit the form, it never gets posted. I can't believe this has anything to do with PunBB. Have you successfully run any other PHP scripts that include forms?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: returned to install.php after filling out install.php form

> It appears as if, when you submit the form, it never gets posted. I can't believe this has anything to do with PunBB.

Agreed. Probably something wrong with my php install hmm

> Have you successfully run any other PHP scripts that include forms?

Nope, but I've done perl forms successfully.

I'll play around a bit with my php install and see what comes up. Hopefully I can get $_POST variable to hold some data in another simple php script. Thanks Rickard and others for the effort and help big_smile

echo "deadram"; echo; fortune;

Re: returned to install.php after filling out install.php form

Did a litle playing around with my configuration and found out that I was exicuting /bin/php but should have been running /bin/php-cgi. I managed to get this error now big_smile Again, thanks for the help (I should be able to manage from here on out) wink

An error occured on line 57 in file /www/pages/music/forum/include/dblayer/sqlite.php.

PunBB reported: Unable to create new database './/data/db/music_forum.db'. Permission denied
echo "deadram"; echo; fortune;