webenvironment 0.4 (webserver,php,mysql,phpmyadmin)

Stuff that has yet to be sorted into a category.
Message
Author
User avatar
klhrevolutionist
Posts: 1121
Joined: Wed 08 Jun 2005, 10:09

questions

#31 Post by klhrevolutionist »

Okay I tried it from the live-cd, by the way I am klhkentucky as well.

As far as running the installer went I liked how you made it pop up into http://localhost But maybe think of creating a rox-app so that the person can start & stop the darn thing and to edit .conf files more easily.

Not sure why usr_webenviro.sfs was in root though ? Does it install to root ?
Maybe on the live-cd only ? Suggest you place it elsewhere. As people might have root cluttered up enough already.

As for your little template help page, it's a starter! But when I went to look at everything I started noticing a lot of check marks to be checked or unchecked.
Not sure what that was all about?

As for the package I give it a ten out of ten. But this however is probably geared more towards those with knowledge of these things. But at the same time, is a great tool to learn from if that person(s) is going to be using these kinds of applications. I however will stick with trusty ole' azureus.
Heaven is on the way, until then let's get the truth out!

costal martignier
Posts: 198
Joined: Sat 28 Jan 2006, 15:55

Re: questions

#32 Post by costal martignier »

As far as running the installer went I liked how you made it pop up into http://localhost But maybe think of creating a rox-app so that the person can start & stop the darn thing and to edit .conf files more easily.
hmmm, there is no need for that, make a link/bookmark in you favorite browser to http://localhost, the webenv starts allways with the whole puppy and runs allways...
Not sure why usr_webenviro.sfs was in root though ? Does it install to root ?
Maybe on the live-cd only ? Suggest you place it elsewhere. As people might have root cluttered up enough already.
its there because it's the only place where it works for ALL installation methods puppy is capable.., and i think this one file more don't disturb anyone, and also when we do a remaster, it is automaticaly in the new puppy (i think)
As for your little template help page, it's a starter! But when I went to look at everything I started noticing a lot of check marks to be checked or unchecked.
Not sure what that was all about?
sorry, my poor english, i absolutley dont undersatnd what you mean? what for checkmarks? where you see that... ???????????????
As for the package I give it a ten out of ten.
yepaa, thx
But this however is probably geared more towards those with knowledge of these things. But at the same time, is a great tool to learn from if that person(s) is going to be using these kinds of applications. I however will stick with trusty ole' azureus.
hmmm, it is a package for peoples who know what a webserver and a database is/are.. but also for beginners it's so easy to use...
put files in /root/www, as example puppy.iso and you can share your root folder with other by giving them your ipadress of puppy... but formerly thsi package is intended to be a real webenvironment for webapplications, or databases with a webfrontend. a real server....


regards and many thx for testing
costal

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#33 Post by Pizzasgood »

In other words, it is for hosting/testing websites, not file sharing (though that is possible too).

Checking this out is on my to-do list. I've just been chrooting the apache in my Vector install, but having it working in Puppy would be nice, especially since I don't ever use Vector anymore. And, when I get my new computer, I'm not going to bother putting Vector on it, so Puppy will need to be able to handle it itself.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#34 Post by MU »

You can create a folder /root/www/files

Save this "index.php" there:

Code: Select all

<html><head></head><body>

<blockquote>
<?
$topdir=getcwd();


$thebasedir = $_SERVER["DOCUMENT_ROOT"] ;
#print "<b>$thebasedir</b><p>";
$webuserdir = ereg_replace("httpdocs","web_users" ,$thebasedir);


$topdir = ereg_replace($thebasedir,"" ,$topdir);
$topdir = ereg_replace($webuserdir,"" ,$topdir);
print "<b>$topdir</b><p>";

$verzeichnisse=array();
$dateien=array();

$handle=opendir(".");

while ($file= readdir ($handle)) {
#print $file;
    if ($file != "." && $file != "..") {
        if (is_dir($file)){
         #echo "V-$file<br>n";
         array_push($verzeichnisse,$file);
        }
        if (is_file($file)){
         #echo "D-$file<br>n";
         array_push($dateien,$file);
        }
    }
    if ($file==".." && (dirname($startverz)!=$wurzel)){
         #array_push($verzeichnisse,$file);
    }
}
closedir($handle);

asort($verzeichnisse);
asort($dateien);

 print "<table border=0>";
  print "<tr><td>[DIR] <a href=\"../\">..</a></td></tr>";

foreach ($verzeichnisse as $verz){
  print "<tr><td>[DIR] <a href=\"$verz/\">$verz</a>";
        $status=stat("$verz");
        #echo date("l, F dS",$modified[9]);
        $groesse = $status[7];
        $zeitstempel=date("l, d.m.y, H:i",$status[9]);
  print "</td><td><font color=\"#66FF66\">$groesse</font> </td><td><font color=\"#66FF66\">kb</font> </td><td> $zeitstempel</td></tr>";
}
print "<tr><td> </td></tr>";
foreach ($dateien as $datei){
  print "<tr><td>[FILE] <a href=\"$datei\">$datei</a>";
        $status=stat("$datei");
        #echo date("l, F dS",$modified[9]);
        $groesse = $status[7];
        $zeitstempel=date("l, d.m.y, H:i",$status[9]);
  print "</td><td><font color=\"#66FF66\">$groesse</font> </td><td><font color=\"#66FF66\">b</font> </td><td> $zeitstempel</td></tr>";
}

print "</table>";
?>

</blockquote>

</body></html>
Now when someone visits http://123.123.123.123/files, he will see such a list displaying all files:
http://dotpups.de/miniicons/

Mark

costal martignier
Posts: 198
Joined: Sat 28 Jan 2006, 15:55

#35 Post by costal martignier »

ok, thx mark

i put this or something similar into the next release, also i change my default webpage a little bit newbee friendlyer..

perhaps adding a media share frontend/database written in php/mysql with a simple frontend.. where the user can select with checkboxes witch folders to share with or without a password...

if i find nothing i programm one my self :)


regards
costal

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#36 Post by Pizzasgood »

I just installed it, fed it a backup of my website, and it worked perfectly. Good stuff. When I get in the mood to start upgrading my site again, I'll be able to do it 100% within Puppy. That was without a doubt the easiest server I've ever installed. It took longer to copy my website over from my Vector partition than it did to install the actuall environment.

I even used it to host the install file for an antivirus program so I could transfer it to my sister's computer in the next room. So far, we've repaired 600 files and deleted 125, and it's still going stong. Her machine was a mess. I don't know if it was her or our uncle, but the thing has more horses than the mongols, and so many backdoors there isn't a wall. She must have left the Windows open :roll:
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

costal martignier
Posts: 198
Joined: Sat 28 Jan 2006, 15:55

#37 Post by costal martignier »

Pizzasgood wrote: That was without a doubt the easiest server I've ever installed. It took longer to copy my website over from my Vector partition than it did to install the actuall environment.

yeaaah coool, reaally big fun for me reading this...

many thx for your test :)

regards
costal

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#38 Post by MU »

I encountered 2 problems (with my frugal install).

1.
At reboot, /.webenv can not be unmounted.
Like this, also pup001 is not unmounted - after reboot a filesystem-check is run.

I think the reason is this line from /etc/rc.d/rc.webenv:

Code: Select all

    # try to add it to an existing unionfs on usr
    unionctl /usr --add --after $last --mode ro /.webenv > /dev/null 2>&1
So I think I must find out the syntax for
unionctl /usr --remove

Then I can add
killall lighttpd
sleep 2
unionctl /usr --remove ...WhatEver...
umount /.webenv
to /etc/rc.d/rc.reboot
to cleanly unmount at reboot.

--------------------------
2.
When I run /etc/rc.d/rc.webenv in X in a Consolewindow, I get this:

Code: Select all

# /etc/rc.d/rc.webenv
create mountpoint /.webenv
create new loop device /dev/loop7
mount /root/usr_webenv.sfs on /dev/loop7
mount /dev/loop7 on /.webenv
run ldconfig and update /etc/ld.so.cache
start mysql (as root for the moment, sorry 4 that)
start webserver with php
webenvironment startet
# touch: /var/db//puppypc.err: No such file or directory
chown: /var/db//puppypc.err: No such file or directory
Starting mysqld daemon with databases from /var/db/
/usr/local/bin/mysqld_safe: 332: cannot create /var/db//puppypc.err: Directory nonexistent
eval: 1: cannot create /var/db//puppypc.err: Directory nonexistent
STOPPING server from pid file /var/run/mysqld/mysqld.pid
tee: /var/db//puppypc.err: No such file or directory
060206 05:09:55  mysqld ended
tee: /var/db//puppypc.err: No such file or directory
So there isa prob with /var for mysql.

Greets, Mark

costal martignier
Posts: 198
Joined: Sat 28 Jan 2006, 15:55

#39 Post by costal martignier »

hey mark,

you're using an old version is this right?

nothing is located in /var anymore, everything is in /root ...
pleasse uninstall everything first before using the the installer again...

(check manualy that erverything is removed )
remove all this revoursively...

/var/www
/var/db
/root/db
/var/www
/etc/lighttpd.conf
/etc/my.cnf
/etc/myadmin.conf
/root/usr_webenv.sfs
/etc/rc.d/rc.webenv
/var/run/mysql/
/var/run/lighttpd.pid



and reinstall the whole.. i think your problem are because of nt properly removing the pre-alpha version..

regards
costal

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#40 Post by MU »

ok, I just installed 0.3 over 0.1 without uninstalling first.
I will remove it, and test it again this evening.
Thanks, Mark

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#41 Post by MU »

Now I removed all old files.
Then installed 0.3.

MySQL works now.
But the other problem remains.
At reboot, loop7 can not be unmounted, what leads to a filesysemcheck of pup001 at next boot.
Does no one else experience this?
Mark

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#42 Post by Pizzasgood »

I've been out of the room while Puppy booted the last couple times. I'll come back the next time I reboot.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

costal martignier
Posts: 198
Joined: Sat 28 Jan 2006, 15:55

#43 Post by costal martignier »

no need to check it, i've allready fixed this bug by creating a shutdown script. but a bug in the sysinit script from puppy prevents me from releasing it.

attention, now it gets complicated ;)
a bug in the bugfix for the bug in the puppy initscripts from G2 prevents me to prevent the bug in my package ?!?!?! loooooooool
(ok it's not a bug, but a really bad workarround (the fix from G2))

so no release with the bugfix from my site until G2 takes his bugfix back or he creates a new one that fixes the problem correctly, or creates a workarround that really works...

i don't want to harm others computer with my programming...
but many thx for your intersest and for your help...

regards
costal

costal martignier
Posts: 198
Joined: Sat 28 Jan 2006, 15:55

#44 Post by costal martignier »

new version 0.4 released

http://www.murga.org/~puppy/viewtopic.php?p=35443#35443

the last version before the first final version...
the shutdown problems should now be fixed..

please test this and report if the bug is fixed..

have fun
costal

User avatar
paullecorde
Posts: 62
Joined: Fri 17 Jun 2005, 11:52
Location: Lexington, KY USA
Contact:

#45 Post by paullecorde »

First, thank you for making this web environment for Puppy. It is great. Let's me start by saying that I haven't been working with mysql or php very long. Please forgive me if my questions sound stupid.

The dot.pup installed correctly. I was able to access myadmin and everything looks good, but I have a message saying I need to add a password to mysql. Can you tell me how to do this? I found the database called mysql and the table called users. I added passwords for root and puppypc there, but that didn't seem to make any difference. Can you tell me where to go to add the password and once the password is added, where else will I need to put it (config for myadmin?).

The reason I am looking at the web environment is I want to use a program called phProjekt to do project management. In order to use this program (it's made of php scripts and possible a java script or two), where do I need to put it? Is there a directory for the web server somewhere? I have tried opening the index file of phprojekt and what I see is script... does this web server run php script? Is there something special I need to do to make it run the php instead of showing the script?

I appreciate any answers you can give me for these questions. As I said, I'm a newbie to mysql and php and also to running a local web server. I know how to write html and upload it to someone else's server but I don't know where it should go for a local server.

Thanks again.

Paul

costal martignier
Posts: 198
Joined: Sat 28 Jan 2006, 15:55

#46 Post by costal martignier »

hi paul..

ok, these questions are not really belong to my webenvironment, these are generic questions, and you will find answers normaly in the web for setting mysql passwords...

here are all answers to the password question:
http://dev.mysql.com/doc/refman/5.0/en/ ... leges.html

in short (do this in the terminal/shell):

Code: Select all

mysqladmin -u root password PASS
mysqladmin -u root -h HOST password PASS 
replace PASS with the password, and HOST with your puppy hostname!
after the second command it asks you about a password, its the one you set before..

your webroot (where you put your files) is located in /root/www/ (but this is allready mentioned in the README of my dotpup)

after changing/setting the mysqlpassword you need to change the config file for phpmyadmin, this is located in /etc/myadmin.conf (also mentioned in the README)

when you only run your phproject localy, and dont access it from outside of your local network, you can leave the passwort for mysql empty, and therfore use the puppy firewall to prevent access from outside of your local network..

also the php files get only exeuted when they are in the webserver webroot, outside you will only see the xcripttext like you mentioned

perhaps it's better first to uninstall de webenv.pup totaly (rerun installation and select uninstall) because you changed the mysql database the wrong way...

hope this helps
costal

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

PHP.ini

#47 Post by raffy »

I've been trying to find php.ini, but perhaps I should learn how to do a better search :(

It concerns the use of large files for reloadable content in education, which are uploaded via PHP scripts. The default file size is perhaps 2 MB (or is this being set via lighttpd?). A larger file upload size is needed.

A note about PHP_SELF - in Apache, the GET parameters (that is, after index.php) seem to be ignored, but in lighttpd, the GET parameters are included in the next click. Anyway, just a nuisance to lazy coders like me :)

costal martignier
Posts: 198
Joined: Sat 28 Jan 2006, 15:55

#48 Post by costal martignier »

hy raffy..

when you have installed my latest dotpup (and you really should, but first complete delete the old one) you will see in my defaulthomepage some help. there is mentioned that php uses complete defaults compiled in. when you want to change the php.ini you can create one in /etc/php.ini..

hope this helps


regards
costal

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

Submit gives blank page

#49 Post by raffy »

Submitting the editing form in DokeOS (in platform admin - configure homepage) gives a blank page. This happens in hard disk install in both versions 0.3 and 0.4. However, the changes in the form were saved. Here is the last URL before and after the submission:

configure_homepage.php?action=edit_top

(DokeOS is easy to install as it is automatically launched from index.php.)

Thanks.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#50 Post by MU »

Installed version 0.4 in KDE-3.5.0-Puppy107 from KlhR.
Right after installation I had to reboot, as some applications stopped working.
But this is not critical, that can happen when installing to /root/.usr

After the reboot, PHP worked great. I had no look at mySql yet.

This Site I created in your webenv:
http://aikido.htb65.de

It ran on the productive Apache-Server immedeatly without any changes.

Very good :P

Thanks for this nice Dotpup, it is really nice to have such a small PHP-capable Webserver.
This may give me back interest in trying things out in PHP.
Mark

Post Reply