Howto install a webserver, php and mysql

Please put your howto's and guides here

error in first step for my setup

Postby mbirrell » 13 Aug 2006 13:05

I found that when I did:
cat >> /opt/etc/ipkg.conf
src openmss http://ipkg.openmss.org/bryan
{Press: ctrl+d}

ipkg install libc6

I could not install the package. To fix this I had to edit ipkg.conf:
vi /opt/etc/ipkg.conf

and # the first line of the file - it seems that ipkg only reads the first line of the file!
mbirrell
Newbie
 
Posts: 4
Joined: 13 Aug 2006 10:33
Location: Canberra, Australia

mysql

Postby valentijn_venus » 13 Aug 2006 15:46

How do i get to the mysql program? After following the ipkg install instructions on the first page of this guide I tried:

./mysql --user=root mysql


I get this error message, which tells me something with the binary is wrong:

./mysql: cannot execute


I want to create a new database, or is there a standard database already?

Another issue:

when running mysqlmanager from /shares/mss-hdd/__opt/usr/local/mysql/libexec (first set to executable):


./mysqlmanager: error while loading shared libraries: ./mysqlmanager: symbol rea
ddir64_r, version GLIBC_2.2 not defined in file libc.so.6 with link time referen
ce


Any ideas?

Cheers, Valentijn
valentijn_venus
Junior Member
 
Posts: 6
Joined: 09 Aug 2006 18:25

Re: mysql

Postby max » 13 Aug 2006 22:38

valentijn_venus wrote:How do i get to the mysql program? After following the ipkg install instructions on the first page of this guide I tried:

./mysql --user=root mysql


I get this error message, which tells me something with the binary is wrong:

./mysql: cannot execute


I want to create a new database, or is there a standard database already?

Another issue:

when running mysqlmanager from /shares/mss-hdd/__opt/usr/local/mysql/libexec (first set to executable):


./mysqlmanager: error while loading shared libraries: ./mysqlmanager: symbol rea
ddir64_r, version GLIBC_2.2 not defined in file libc.so.6 with link time referen
ce


Any ideas?

Cheers, Valentijn



First have you rebooted your MSS and then checked that the mysql daemon was running? you should have something like:
Code: Select all
# ps -ef
[...]
  263 root       1060 S   /opt/usr/local/mysql/bin/mysqld --user=mysql_user
[...]


Second: I've solved all my problems with mysql handling by installing PhpMyAdmin. Since the guide provided by Bryan allows to run a Web Server and PHP, I think it's the best solution to manage your database engine (quite slow on MSS but is works).
May I suggest you to install PhpMyAdmin?
Try it (open source): http://www.phpmyadmin.net/home_page/index.php
max
Junior Member
 
Posts: 16
Joined: 12 Aug 2006 15:12
Location: Lyon, France

How to setup PhpMyAdmin?

Postby Nippey » 14 Aug 2006 13:25

##EDIT: The "Edit Post" Page was open since jesterday, I see max wrote, he got it, I'll ask him##

I want to install PhpMyAdmin on my Webserver,
but I cant get it to work..

That what I filled in, must no be right, I experimented a bit.. :?

http://nippey.homeip.net:81/Images/HowToConfig.PNG

The Database is completely empty, i will try to build up an image libary on my own, so i need something do observe the database..

Thank you for your help
Nippey
Member
 
Posts: 26
Joined: 09 Mar 2006 01:19

Re: How to setup PhpMyAdmin?

Postby max » 14 Aug 2006 20:33


Sorry but the link is broken for me: can't see what you wanted to show me...

Basicly the steps to install PhpMyAdmin are:
0/ Check your mysql daemon is running on your MSS (see my post above)
1/ Download and extract the tarball from http://www.phpmyadmin.net/ into the Public folder of your MSS drive (you can do it under Windows: there's no rights issue at this point). Let us say you name this folder "phpmyadmin".
2/ There you have to configure your access to the mysql database engine. You have a setup.php file in scripts/ folder but it's very easy to do it by hand. For a beginning you should create a text file named config.inc.php with the following line inside:
Code: Select all
<?php
/*
* Generated configuration file
* Generated by: phpMyAdmin 2.8.2.1 setup script by Michal Čihař <michal@cihar.com>
* Version: $Id: setup.php,v 1.23.2.10.2.1 2006/08/01 14:01:37 lem9 Exp $
* Date: Mon, 14 Aug 2006 18:17:13 GMT
*/

/* Servers configuration */
$i = 0;

/* Server localhost (config:root) [1] */
$i++;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';

/* End of servers configuration */

?>

3/ Now it's not yet over since you can't run phpmyadmin (actually it refuses to load thus) with config.inc.php world-writable (I assume you'll create this file with windows so it will be the case). Telnet or SSH your MSS and change permissions. It'll look like:
Code: Select all
chmod o-w /shares/mss-hdd/Public/phpmyadmin/config.inc.php

(adapt the path to your config).

then you're done:
http://myMSSdriveDNSorIP:myMSSport/phpmyadmin/

Does it help?
max
Junior Member
 
Posts: 16
Joined: 12 Aug 2006 15:12
Location: Lyon, France

php not working

Postby danmurray » 14 Aug 2006 20:45

I have installed and configured all the rpm's as per the guidance given in these instructions and managed to get lighttpd & mysql working fine. Only problem I get is when starting php the following error is displayed.

# php -v
/opt/lib/php5/bin/php5: error while loading shared libraries: /opt/lib/libpthread.so.0: invalid ELF header
#


I have tried starting and stopping the lighttd daemon and this causes a further issue when restarting it

# ./lighttpd
# /opt/lib/php5/bin/php5: error while loading shared libraries: /opt/lib/libpthread.so.0: invalid ELF header
/opt/lib/php5/bin/php5: error while loading shared libraries: /opt/lib/libpthread.so.0: invalid ELF header
2006-08-14 18:43:58: (log.c.75) server started


Any help would be appreciated.

Thanks. :P
-danmurray
danmurray
Newbie
 
Posts: 1
Joined: 13 Aug 2006 21:33

Postby max » 15 Aug 2006 09:40

I'm not sure it'll help but did you copy both ".so.x" AND ".a" files when you copied the libraries in your /opt/lib folder ?

Apparently you've got a problem with libpthread so check that you have the following files and symbolic links in your /opt/lib folder:
Code: Select all
# ls -la /opt/lib/libpthread*
-rwxr-xr-x    1 1000     1000       785351 Mar 29  2004 /opt/lib/libpthread-0.9.so
-rwxr--r--    1 root     root      1556372 Aug 12 15:07 /opt/lib/libpthread.a
lrwxrwxrwx    1 root     root           15 Aug 13 08:13 /opt/lib/libpthread.so -> libpthread.so.0
lrwxrwxrwx    1 root     root           17 Aug 13 08:13 /opt/lib/libpthread.so.0 -> libpthread-0.9.so
-rwxr--r--    1 root     root      1568296 Aug 12 15:07 /opt/lib/libpthread_p.a


And let me know! :roll:


EDIT: you can donwload the libs that I use at:
http://hamster.hd.free.fr/Autre/
It's always up: my MSS drive is answering there!
max
Junior Member
 
Posts: 16
Joined: 12 Aug 2006 15:12
Location: Lyon, France

PHP5 Problem

Postby mbirrell » 21 Aug 2006 12:42

Hi all,
can anyone tell me why I get this error when I execute:

/opt/lib/php5/bin/php5

the error is:
/opt/lib/php5/bin/php5: error while loading shared libraries: cannot open shared object file: cannot load shared object file: No such file or directory

I have been following this thread everything alse seems to be working except for PHP!

Please help!
mbirrell
Newbie
 
Posts: 4
Joined: 13 Aug 2006 10:33
Location: Canberra, Australia

Postby max » 21 Aug 2006 22:31

Give a try to :
Code: Select all
/opt/lib/php5/bin/php.ld /opt/lib/php5/bin/php5

and let me know about what it gives
max
Junior Member
 
Posts: 16
Joined: 12 Aug 2006 15:12
Location: Lyon, France

Postby mbirrell » 22 Aug 2006 13:15

Hi Max,
Thanks for the reply.

Tried that and got the same error.

Could it be looking for a particular library version?

Seems that some of my symbolic links? don't have an absolute path eg:

libxml2.so.2 -> libxml2.so instead of: libxml2.so.2 -> /opt/lib/libxml2.so

I would suspect this is bad?
mbirrell
Newbie
 
Posts: 4
Joined: 13 Aug 2006 10:33
Location: Canberra, Australia

Postby max » 23 Aug 2006 19:28

Yes that is most probably a problem with your libraries versions. Also it can be that you don't have the libs at all.

Have you checked the list of files in your /opt/lib folder? I've posted a listing in the previous page of this thread. You should be able to check that you have all the required libs and the correct versions (and sizes).

If you miss a library you can download it from
http://hamster.hd.free.fr/Autre/

And your symlinks seems to be ok: I've got the same conf in my /opt/lib folder.
max
Junior Member
 
Posts: 16
Joined: 12 Aug 2006 15:12
Location: Lyon, France

It Works!

Postby mbirrell » 24 Aug 2006 13:02

Thanks Max,

After downloading the lib files and putting them in /opt/lib everything works.
Just in case anyone is interested, I am wanting to get a PHP and MySQL based photo album going. I spotted it on the net and it is called "Exhibit Engine" by Pekka Saarinen. It is available for free download at: http://photography-on-the.net/ee/

Regards,

Martin

Last night I managed to get the photo album going. It is a bit slower than the ES7000 I look after at work but it works. :)
mbirrell
Newbie
 
Posts: 4
Joined: 13 Aug 2006 10:33
Location: Canberra, Australia

Postby Bryan » 25 Aug 2006 19:59

Hi all,

Thank you for the feedback! I obviously overlooked libm while building the package. The libpthread problem seems very strange to me however, as I do not have libpthread in my /opt/lib dir. It seems to be working correctly with the libpthread from openmss...

edit: It seems that the problem is that the libpthread of OpenMSS 1.2.2 is not a correct version. Please upgrade these as described in point 3 of the php instructions.
Python 2.5, CTorrent dnh3.2, Busybox 1.2.0
Bryan
Senior Member
 
Posts: 125
Joined: 16 Jun 2006 16:50

/opt/etc/php.ini doesn't work

Postby cventuri » 23 Feb 2007 23:11

I have created the file in object with this line:
Code: Select all
register_globals = On

and then rebooted the MSS.
But that has never changed my phpinfo() result:
Code: Select all
register_argc_argv   On   On
register_globals   Off   Off
register_long_arrays   On   On

Anyone have some ideas?
cventuri
Newbie
 
Posts: 2
Joined: 25 Jan 2007 23:24
Location: Italy

Re: Howto install a webserver, php and mysql

Postby dtt » 12 Apr 2007 05:32

2. Configure lighttpd: lighttpd defaults to running at port 8080, with /opt/bin/lighttpd/var/wwwroot as it's root directory, but you can change that by editting /opt/bin/lighttpd/lighttpd.conf.
For PHP support add or change the following lines in /opt/bin/lighttpd/lighttpd.conf:

Code:

static-file.exclude-extensions = ( ".php" )
index-file.names = ( "index.html", "index.php" )

server.modules = ("mod_fastcgi", )

fastcgi.server = (
".php" => ((
"bin-path" => "/opt/bin/php",
"socket" => "/opt/bin/lighttpd/php.socket",
"max-procs" => 2,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "32"
),
"bin-copy-environment" => ( "PATH", "SHELL", "USER"),
"broken-scriptfilename" => "enable"
))
)

Should this segment of code be inserted in the file "lighttpd.conf"? I try to do so but it doesn't work. If no changes were made to the file "lighttpd.conf", the system works, the only problem is that the ".php" files visited by web will display .any idear?thank you.
dtt
Newbie
 
Posts: 2
Joined: 02 Apr 2007 05:01
Location: china

PreviousNext

Return to Guides

Who is online

Users browsing this forum: No registered users and 2 guests