Results 1 to 12 of 12

Thread: PHP, MySQL, PHPMyAdmin, Serendipity

  1. #1
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336

    Arrow PHP, MySQL, PHPMyAdmin, Serendipity

    Ich möchte unsere Community fragen ob Interesse für ein HowTo besteht, auf unserem (Euren) Router einen kompletten Webserver - Lighttpd mit PHP, Eaccelerator, MySQL, PHPMyAdmin und das tolle Weblog System Serendipity aufzusetzen.
    Da dies natürlich einen ordentlichen Haufen an Schreiberei bedeutet, frage ich natürlich vorher, um mir sinnlose Arbeit zu ersparen.
    Die gesamte Software läuft hier auf einem WL500gP ohne Probleme und sogar relativ flüssig und stabil. Ich denke, dass hier Eaccelerator ordentlich hilfreich ist. Ich hatte es nicht für möglich gehalten ein komplettes Weblog System wie Serendipity auf dem kleinen Router (32MB) sinnvoll installieren zu können.
    Für ganz neugierige User habe ich ein paar Screenshots beigefügt.
    Bitte nicht böse sein, falls nur 1-2 User Interesse haben macht es keinen Sinn, dann kann ich jedoch die relevanten Files posten und nur eine Kurzanleitung erstellen.
    Euer Newbiefan
    Attached Images Attached Images
    Alle HowTo's, all howto's

    RT-N16 1.9.2.7-rtn-r3121, Samba, VSFTP, Lightthpd, PHP, Perl, MySQL, Serendipity, Aria2web, HDD 640GB
    RT-N66U, 16GB MicroSD/ 2 Partitions, 2,5" HDD 1TB, running with Merlin's FW and Entware, 16 Mbit A1,
    Netgear DGND 3700V2, QNAP TS119PII 4 TB, QNAP TS209 2 TB Raid1, Backup Synology DS107+ 1 TB, HP CP1515n

  2. #2
    hi hi


    cool, dass du da was geschafft hast

    meine Versuche mit Wordpress waren grauenhaft - also der zugriff eeeeeeehlend langsam.

    Wir haben doch schon php & mysql tutorials, oder? Ich hatte das damals nach tuts gemacht...

    Ist denn irgendwas zu beachten, was nicht in der Serendipity User Documentation steht?

    vlt. machne wir in der FAQ einfach ne tabelle, was schon erfolgreich getestet wurde (vlt mit Anmerkung, was getan werden musste, damit es wirklich läuft) und was man nicht mehr ausprobieren muss.

    Wordpress war da son ein negativ Beispiel, was zwar läuft aber auf nem wl500gpv1 einfach zu langsam ist. Wie es auf den neuen Routern aussieht, kann ich nicht sagen.
    vg
    RT-N66U TomatoUSB 1.28.0000 MIPSR2-135 K26AC USB AIO-64K running Entware-NG
    pyload 0.4.9
    minidlna 1.1.2
    samba 3.6.5
    openvpn 2.3.10
    ̶W̶L̶5̶0̶0̶g̶P̶ ̶1̶.̶9̶.̶2̶.̶7̶-̶r̶t̶n̶-̶r̶4̶7̶5̶0 retired

  3. #3
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336
    Quote Originally Posted by !gm View Post
    meine Versuche mit Wordpress waren grauenhaft - also der zugriff eeeeeeehlend langsam.

    Wir haben doch schon php & mysql tutorials, oder? Ich hatte das damals nach tuts gemacht...
    Naja, die Indizierung dauert schon etwas, aber danach geht es zügig. Freilich wird der Router bei mehreren Usern (gleichzeitig) in die Knie gehen. Ich habe auch noch wenig in der Datenbank stehen und weiss nicht wie es aussieht, wenn viele Einträge vorhanden sind - das ist aber nicht der Sinn der Sache - ich möchte nur meine Seiten hier in Ruhe ausprobieren.

    Wegen der Tuts.: Freilich gibt es schon viele über MySQL, PHP usw., speziell das von WPTE - aber alle Tuts haben Schwierigkeiten mit dem MySQL - deshalb habe ich nachgefragt (Obwohl es eigentlich einfach ist). Freilich sind auch noch Kleinigkeiten bei Serendipity zu beachten - HowTos sind nach meiner Meinung sowieso nur ein Ersatz für längere Google/Forum Suchaktionen. Richtige Neuigkeiten gibt es hier ohnehin kaum........
    Viel Spass, Newbiefan
    Alle HowTo's, all howto's

    RT-N16 1.9.2.7-rtn-r3121, Samba, VSFTP, Lightthpd, PHP, Perl, MySQL, Serendipity, Aria2web, HDD 640GB
    RT-N66U, 16GB MicroSD/ 2 Partitions, 2,5" HDD 1TB, running with Merlin's FW and Entware, 16 Mbit A1,
    Netgear DGND 3700V2, QNAP TS119PII 4 TB, QNAP TS209 2 TB Raid1, Backup Synology DS107+ 1 TB, HP CP1515n

  4. #4
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by newbiefan View Post
    Wegen der Tuts.: Freilich gibt es schon viele über MySQL, PHP usw., speziell das von WPTE - aber alle Tuts haben Schwierigkeiten mit dem MySQL
    immer noch Schwierigkeiten mit mysql? Ich haben alle repariert, soweit ich weiß?

    meine Versuche mit Wordpress waren grauenhaft - also der zugriff eeeeeeehlend langsam.
    WordPress ist langsam darum hab ich quick cache installiert: http://wordpress.org/extend/plugins/quick-cache/
    Aber für die WL-500 Router ist dass immer noch zu langsam, denke Ich

    Ich möchte unsere Community fragen ob Interesse für ein HowTo besteht, auf unserem (Euren) Router einen kompletten Webserver - Lighttpd mit PHP, Eaccelerator, MySQL, PHPMyAdmin und das tolle Weblog System Serendipity aufzusetzen.
    PhpMyAdmin ist eine gute Idee, und Serendipity ist sicher toll
    Aber entschuldigen Sie mich für Fragen, warum ein andere HowTo für lighttpd?
    vielleicht können wir zusammen auf meinem How-To arbeiten ?

  5. #5
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336
    Quote Originally Posted by wpte View Post
    immer noch Schwierigkeiten mit mysql? Ich haben alle repariert, soweit ich weiß?
    Hi,
    well, your howto is quite good. It solves most of the problems.
    Just in case you need a different database like for serendipity it gets a bit delicate. Further, mysql creates any database by default with a swedish character set. I was pretty close to give up, because for instance serendipity use per default utf8 - it took me days....
    Maybe a MySQL guru is able to solve such a problem within minutes.
    At least I've set serendipity to use the native database character set - I had no other solution. But anyway, I'm on the best way to become a MySQL expert some day......

    PhpMyAdmin ist eine gute Idee, und Serendipity ist sicher toll
    Aber entschuldigen Sie mich für Fragen, warum ein andere HowTo für lighttpd?
    vielleicht können wir zusammen auf meinem How-To arbeiten ?
    Regarding PHPmyAdmin: Is very easy to install, just one small change to make it save and with password. But it's very helpful for non mysql-experts.

    Regarding lighttpd: I have no intention to write an other HowTo for lighty - yours is very good!

    Regarding teamwork on your HowTo: sure, I thought to write a german at first and then to extend yours - if you aggree.
    You know Wouter, I'm always happy to work together.

    I still have one problem to solve - it's MySQL related - sometimes MySQL will not start after a reboot - this would not be a real problem for me , the much bigger one is that in such a case most of the database gets corrupted somehow. no log-entry nothing. This drives me crazy.... Maybe I try to change MySQL.

    In any case, as soon as I achieve a stable installation, I'll contact you in order to put something together. Thanks again for your proposal to put the things together!

    Stay tuned - will come back to you (hopefully) soon
    Helmut
    Alle HowTo's, all howto's

    RT-N16 1.9.2.7-rtn-r3121, Samba, VSFTP, Lightthpd, PHP, Perl, MySQL, Serendipity, Aria2web, HDD 640GB
    RT-N66U, 16GB MicroSD/ 2 Partitions, 2,5" HDD 1TB, running with Merlin's FW and Entware, 16 Mbit A1,
    Netgear DGND 3700V2, QNAP TS119PII 4 TB, QNAP TS209 2 TB Raid1, Backup Synology DS107+ 1 TB, HP CP1515n

  6. #6
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    hehe, I did my best on writing German, but I guess English is easier

    Quote Originally Posted by newbiefan View Post
    Hi,
    well, your howto is quite good. It solves most of the problems.
    Just in case you need a different database like for serendipity it gets a bit delicate. Further, mysql creates any database by default with a swedish character set. I was pretty close to give up, because for instance serendipity use per default utf8 - it took me days....
    Really? for me it's always UTF-8
    I had an A+ for databases, so maybe we can figure something out
    mysql these days is quite easy since of the ipkg script it executes:
    Code:
    if [ -d /opt/var/lib/mysql ] ; then
        chown -R root:root /opt/var/lib/mysql
    fi
    fixes it for any user

    Also I noticed mysql5 is available in the repository these days


    Quote Originally Posted by newbiefan View Post
    Regarding PHPmyAdmin: Is very easy to install, just one small change to make it save and with password. But it's very helpful for non mysql-experts.
    Indeed, I have it running, also great for quickly fixing overhead in the tables

    Quote Originally Posted by newbiefan View Post
    Regarding lighttpd: I have no intention to write an other HowTo for lighty - yours is very good!

    Regarding teamwork on your HowTo: sure, I thought to write a german at first and then to extend yours - if you aggree.
    You know Wouter, I'm always happy to work together.
    Must be my sloppy German
    Sounds great! I was thinking of adding some extra things like ssl and secure login as well to the how-to. I even made webdav working, but the lighttpd implementation is far from complete.

    Quote Originally Posted by newbiefan View Post
    I still have one problem to solve - it's MySQL related - sometimes MySQL will not start after a reboot - this would not be a real problem for me , the much bigger one is that in such a case most of the database gets corrupted somehow. no log-entry nothing. This drives me crazy.... Maybe I try to change MySQL.

    In any case, as soon as I achieve a stable installation, I'll contact you in order to put something together. Thanks again for your proposal to put the things together!

    Stay tuned - will come back to you (hopefully) soon
    Helmut
    Not start? hmm.. never ran in that problem before, but I do know about corrupted tables, just a horror.
    Especially with flashing new firmware I first shut down things like lighty and mysql to be sure nothing will become corrupted
    I'll stay tuned

  7. #7
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336
    Quote Originally Posted by wpte View Post

    Really? for me it's always UTF-8
    I had an A+ for databases, so maybe we can figure something out
    mysql these days is quite easy since of the ipkg script it executes:
    Hey, maybe you can figure out what I'm doing wrong:
    - I use root instead of admin since several months
    - Everything works fine ligthy, php, mysql, phpmyadmin
    - just for safety I recreate the mysql database
    Code:
    1.) rm /opt/var/lib/mysql/mysql/*.*
            rmdir /opt/var/lib/mysql/mysql
    2.) /opt/bin/mysql_install_db
    3.) reboot
    4.) mysql -u root
    5.) use mysql;
    6.) update user set Password = PASSWORD('mypasswd') where User ='root';
    7.) create database serendipity;
    8.) grant ALL PRIVILEGES on serendipity.* to root@localhost;
    9.) set password for root@localhost = password('mypasswd');
    10.)flush privileges;
    11.)exit;
    Then I install and setup serendipity without problems, using database serendipity. Serendipity works fine.

    Following questions:
    How can I set the language in any database?
    Do you see a reason why mysql starts normal, but sometimes not?

    Usually mysql writes to log server.err: mysql started, ready for connection, used socket aso., but when mysql does not start, I get no message at all, just a corrupted database. Then I have to start again with removing database.....
    Maybe the A+ makes the difference...
    Would be nice to solve this issue.
    Helmut
    Alle HowTo's, all howto's

    RT-N16 1.9.2.7-rtn-r3121, Samba, VSFTP, Lightthpd, PHP, Perl, MySQL, Serendipity, Aria2web, HDD 640GB
    RT-N66U, 16GB MicroSD/ 2 Partitions, 2,5" HDD 1TB, running with Merlin's FW and Entware, 16 Mbit A1,
    Netgear DGND 3700V2, QNAP TS119PII 4 TB, QNAP TS209 2 TB Raid1, Backup Synology DS107+ 1 TB, HP CP1515n

  8. #8
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by newbiefan View Post
    Following questions:
    How can I set the language in any database?
    Do you see a reason why mysql starts normal, but sometimes not?

    Usually mysql writes to log server.err: mysql started, ready for connection, used socket aso., but when mysql does not start, I get no message at all, just a corrupted database. Then I have to start again with removing database.....
    Maybe the A+ makes the difference...
    Would be nice to solve this issue.
    Helmut
    Well you can try to create a database with a specific collate:
    CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;
    Also you can enter this lines in my.cfg (config) under [mysqld]
    Code:
    default-character-set=utf8
    default-collation=utf8_general_ci
    or utf8_unicode_ci if you please

    change the database collation en charset:
    alter database dbname charset=utf8;
    alter database dbname collate=utf8_general_ci;
    You can also do this in myphpadmin: http://kb.mediatemple.net/questions/...d+collation#gs
    perhaps backup just to be certain

    Not sure why you get a lot of corruption tho...
    Do you have a lot of file corruption on your drive? I hope it's not a flash drive?

  9. #9
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336

    Not so funny

    Well, seems like an A+ makes the difference.....you found out one of the main-probs within 30 minutes.
    It took me several hours, just to figure out the problem of mysql - which is in my oppinion the stupid default charset setting to latin1_swedish - it would be so easy to ask during nstallation the desired charset, or to set it as default to utf8_unicode. Maybe I write a short script to change the language default settings of mysql after installation. A regular user want to install the applications, nothing else. Most of the users are no database gurus and they often have a very limited linux knowledge. In my point of view such cases are closing the door to beginners - I see it very problematicly - such a user give up and stay far away from linux forever.
    Further, nobody wants to begin a study of a huge manual, they want to install it and forget - thats what makes microsoft successful and not a deep study of a manual just for one application. A usual user is simple not able to detect and determine the errors like a wrong used charset.

    Seriously: I read several articles regarding howto change the default characterset of mysql.

    When something gets corrupted, a way is to reinstall serendipity and database which seems to me to be the most easy way as long as your used database ist almost emty - this is during an install always the case. Further, when you alter the database to an other charset, it shows still the same content of the database (I read it in an article from the reference address).
    Then you have to ensure, that the mysql-client which connects to the socket has the same charset. As the client runs in our installation on localhost, my.cnf needs an extra line (same as server) "default-character-set=utf8" and some more... see at the reference (Sorry, it's in german) http://www.gerd-riesselmann.de/softw...g-teil-1-mysql and my my.cnf

    Well, all this can be solved with the workaround by setting the use of serendipity database to "nativ" without playing around with mysql. But this is not really satisfying when you want to use german chars like äöüß - hence we need a utf8 character set in our database from the beginning. This was my guess, but I'm wrong - now I have everything in utf8 but it will not work proper - when saving something in serendipity with an öäüß (german chars) then I get a fatal error. So I made different settings again with mysql and so on......

    Next thing is: seems luck is with me, maybe I figured out what causes the corrupted database; when installing serendipity with "tar -zxf filename.tar.gz" a folder is created with the rights of user 65534 and group 65534 (see at the pic!!) containing the complete serendipity. I missed this fact completly until today, because I'm user root and therefore I hav'nt waste even a second to this. Why I should use chown when I'm root? But anyway, I learned something the hard way: as long as you are using linux, always have a close look at the rigths of users, groups, folders and files, even when you are root.
    It seems that this was the reason for the corrupted database - not at startup - during shutdown (is my guess, because only this is an
    explanation for me, why the startscript has nothing written to logfile). To be honest, I still do not know exactly why, but since the change of owner from 65534:65534 to root:root it works perfectly, just without utf8. Have to test it for several days. I'm using serendipity-1.5.5-lite.tar.gz


    Well Wouter, I proudly can announce that we shortly can extend your howto - only some tests with serendipity are necessary and maybe some small setups, particulary with sending email. And maybe we are able to solve the issue with utf8 too.
    Thanks again, your teamplayer Helmut
    Man, you made my day!

    EDIT: The problem with charset is solved!!
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by newbiefan; 27-05-2011 at 07:25.
    Alle HowTo's, all howto's

    RT-N16 1.9.2.7-rtn-r3121, Samba, VSFTP, Lightthpd, PHP, Perl, MySQL, Serendipity, Aria2web, HDD 640GB
    RT-N66U, 16GB MicroSD/ 2 Partitions, 2,5" HDD 1TB, running with Merlin's FW and Entware, 16 Mbit A1,
    Netgear DGND 3700V2, QNAP TS119PII 4 TB, QNAP TS209 2 TB Raid1, Backup Synology DS107+ 1 TB, HP CP1515n

  10. #10
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336

    HowTo Email

    Eine Anleitung für Email versenden (am Router) gibt es nun hier:
    http://www.wl500g.info/showthread.php?t=26955

    Für das Weblog System Serendipity gibt es in Kürze ebenfalls eine Anleitung.

    Newbiefan
    Alle HowTo's, all howto's

    RT-N16 1.9.2.7-rtn-r3121, Samba, VSFTP, Lightthpd, PHP, Perl, MySQL, Serendipity, Aria2web, HDD 640GB
    RT-N66U, 16GB MicroSD/ 2 Partitions, 2,5" HDD 1TB, running with Merlin's FW and Entware, 16 Mbit A1,
    Netgear DGND 3700V2, QNAP TS119PII 4 TB, QNAP TS209 2 TB Raid1, Backup Synology DS107+ 1 TB, HP CP1515n

  11. #11
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336

    HowTo install serendipity

    Probleme gelöst, das HowTo gibt es hier:
    http://www.wl500g.info/showthread.php?t=27024

    Viel Spass
    Alle HowTo's, all howto's

    RT-N16 1.9.2.7-rtn-r3121, Samba, VSFTP, Lightthpd, PHP, Perl, MySQL, Serendipity, Aria2web, HDD 640GB
    RT-N66U, 16GB MicroSD/ 2 Partitions, 2,5" HDD 1TB, running with Merlin's FW and Entware, 16 Mbit A1,
    Netgear DGND 3700V2, QNAP TS119PII 4 TB, QNAP TS209 2 TB Raid1, Backup Synology DS107+ 1 TB, HP CP1515n

  12. #12
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by newbiefan View Post
    Probleme gelöst, das HowTo gibt es hier:
    http://www.wl500g.info/showthread.php?t=27024

    Viel Spass
    Looks great man!
    I'll soon check it out

Similar Threads

  1. Ïîäíÿòèå http, php è MySQL ñåðâåðîâ
    By PGBB.RU in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 2
    Last Post: 04-12-2009, 17:19
  2. Apache, Mysql & PHP
    By emailpr in forum WL-700g Q&A
    Replies: 7
    Last Post: 01-03-2008, 00:10
  3. not sticky: mysql
    By wpte in forum WL-500gP Q&A
    Replies: 8
    Last Post: 24-01-2008, 16:32

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •