Jump to content


Photo

Apahe and Php On Openpli 4.0

apache php mysql

  • Please log in to reply
60 replies to this topic

Re: Apahe and Php On Openpli 4.0 #41 idealsat

  • Senior Member
  • 232 posts

0
Neutral

Posted 24 September 2014 - 17:33

I recompiling.

 

Maybe when i compile its not found libpam

 

here is log

 

---------------------

NOTE: Tainting hash to force rebuild of task /home/ubuntu/openpli40/openpli-oe-core/meta-openembedded/meta-oe/recipes-devtools/php/php_5.4.14.bb, do_configure
 
WARNING: /home/ubuntu/openpli40/openpli-oe-core/meta-openembedded/meta-oe/recipes-devtools/php/php_5.4.14.bb.do_configure is tainted from a forced run
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
 
WARNING: Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly
NOTE: Tasks Summary: Attempted 423 tasks of which 362 didn't need to be rerun and all succeeded.
----------------------
 
Thanks


Re: Apahe and Php On Openpli 4.0 #42 blzr

  • PLi® Core member
  • 2,269 posts

+118
Excellent

Posted 24 September 2014 - 17:43

I can see libpam_1.1.6-r5_mips32el.ipk here in my mips32el packages

(and if it works and/or if you actually need it, that's another story...)


True sarcasm doesn't need green font...

Re: Apahe and Php On Openpli 4.0 #43 idealsat

  • Senior Member
  • 232 posts

0
Neutral

Posted 24 September 2014 - 18:32

Hi

 

Thanks for your help .

 

i install libpam.

 

Now i running but its not start correctly here is log when i start.

 

-------------------------

 php-fpm start
Usage: php [-n] [-e] [-h] [-i] [-m] [-v] [-t] [-p <prefix>] [-g <pid>] [-c <file>] [-d foo[=bar]] [-y <file>] [-D] [-F]
  -c <path>|<file> Look for php.ini file in this directory
  -n               No php.ini file will be used
  -d foo[=bar]     Define INI entry foo with value 'bar'
  -e               Generate extended information for debugger/profiler
  -h               This help
  -i               PHP information
  -m               Show compiled in modules
  -v               Version number
  -p, --prefix <dir>
                   Specify alternative prefix path to FastCGI process manager (default: /usr).
  -g, --pid <file>
                   Specify the PID file location.
  -y, --fpm-config <file>
                   Specify alternative path to FastCGI process manager config file.
  -t, --test       Test FPM configuration and exit
  -D, --daemonize  force to run in background, and ignore daemonize option from config file
  -F, --nodaemonize
                   force to stay in foreground, and ignore daemonize option from config file
  -R, --allow-to-run-as-root
                   Allow pool to run as root (disabled by default)
--------------------------------
 
Thanks


Re: Apahe and Php On Openpli 4.0 #44 Sjaaky

  • Senior Member
  • 7,443 posts

+41
Good

Posted 24 September 2014 - 18:39

What did you expect to see, when you started php?
My advice is to install php and Apache on a normal pc and try to serve your php page from that pc. When you know how that works, then try it on the xp1000.

Re: Apahe and Php On Openpli 4.0 #45 idealsat

  • Senior Member
  • 232 posts

0
Neutral

Posted 24 September 2014 - 18:43

Hi

 

Actually i running Php and apache i know how it work .

 

Sorry but php-fpm first time using.

 

Always use Php and apache.

 

Many thanks for your help and replies  ;)



Re: Apahe and Php On Openpli 4.0 #46 blzr

  • PLi® Core member
  • 2,269 posts

+118
Excellent

Posted 24 September 2014 - 18:46

and the question is, did you actually installed any webserver as it was your original intention?

 

to be honest, my knowledge in this area is next to nothing, but I guess you just need to install:

a webserver (nginx? apache2) + php-fpm + if you need MySql (MariaDB?),

and configure it all together (there are a dozens of how-to's on the net...)


True sarcasm doesn't need green font...

Re: Apahe and Php On Openpli 4.0 #47 idealsat

  • Senior Member
  • 232 posts

0
Neutral

Posted 24 September 2014 - 18:56

Hi

 

I not required other servers (nginx? apache2) 

 

if Php-fpm can run simple php pages.

 

No required mysql

 

i running scripts in php which i required in box.

 

php-fpm configuration little different.

 

on ubuntu i can enable modules in php.ini

also define www folder where i put pages.

 

server listnening port

etc

 

Here is /etc/php-fpm.conf  this file = to php.ini .?

 

Just little confusion to run.

 

Thanks for your replies.



Re: Apahe and Php On Openpli 4.0 #48 WanWizard

  • PLi® Core member
  • 68,559 posts

+1,737
Excellent

Posted 24 September 2014 - 20:36

php-fpm runs in fastcgi mode, as opposed to sapi mode of the "normal" php version. Both require a webserver to run, so you still need one.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Apahe and Php On Openpli 4.0 #49 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 24 September 2014 - 20:54

Unless you make use php embedded webserver... http://php.net/manua...e.webserver.php


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Apahe and Php On Openpli 4.0 #50 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 25 September 2014 - 08:01

Instead of manually force-feeding hand-picked ipk files to the box, try integrating them into the image.

 

Look for the "my-image.bb" package. Add the apache and php packages to the list of things to install (there are a few examples present).

 

The system will then also automatically build and add the required additional packages, if you build "my-image" instead of "openpli-enigma2-image".

 

Flash the result via an USB stick as usual, and try again from there.


Real musicians never die - they just decompose

Re: Apahe and Php On Openpli 4.0 #51 idealsat

  • Senior Member
  • 232 posts

0
Neutral

Posted 25 September 2014 - 09:45

Hi

 

well i google it and understand php-fpm how it work.

 

You are right i required niginx or apache webserver and link to php-fpm.

 

Now i install apache in my box and php-fpm.

 

Now i try to linking both but no success

 

Here is detail what i doing..

 

i modify this file /etc/apache2/conf.d/php-fpm.conf

 

and put

 

ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/srv/apache/htdocs/

 

but when i try to open on web http://myboxip:9000

 

then its not shown htdocs pages.

 

there is required more configuration for this.?

 

Thanks


Edited by bable, 25 September 2014 - 09:45.


Re: Apahe and Php On Openpli 4.0 #52 blzr

  • PLi® Core member
  • 2,269 posts

+118
Excellent

Posted 25 September 2014 - 10:00

there's dedicated php-fpm-apache2 package, with ready made config included...
and php-fpm.conf looks like this:
LoadModule proxy_module      lib/apache2/modules/mod_proxy.so
LoadModule proxy_fcgi_module lib/apache2/modules/mod_proxy_fcgi.so

ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/usr/share/apache2/htdocs/

True sarcasm doesn't need green font...

Re: Apahe and Php On Openpli 4.0 #53 idealsat

  • Senior Member
  • 232 posts

0
Neutral

Posted 25 September 2014 - 10:09

and did you (correctly) set the build environment already?
did you succeed in compiling a regular openpli image?

to just build requested packages:
cd ~/openpli-oe-core/build
source env.source
MACHINE=xp1000 bitbake php
MACHINE=xp1000 bitbake lighttpd
or
MACHINE=xp1000 bitbake nginx
(*for nginx, you need to add meta-webbrowser layer to the Makefile first)


and if you'd like to add any package to your custom image (or a local feed), the easiest option is to take a look into meta-local/recipes-local/images/my-image.bb
recipe and adjust it according to your needs... (and then: MACHINE=xp1000 bitbake my-image)

 

Hi

 

I try to compiling nginx as you say you need to add meta-webrowser layer the makefile first.

 

i add like this 

 

BBLAYERS ?= \

$(CURDIR)/meta-webbrowser \

 

but when i compile nginx its returning error ( ERROR Nothing PROVIDES nginx )

 

I correctly putting layer in make file or i doing mistake.

 

Thanks



Re: Apahe and Php On Openpli 4.0 #54 idealsat

  • Senior Member
  • 232 posts

0
Neutral

Posted 25 September 2014 - 10:27

there's dedicated php-fpm-apache2 package, with ready made config included...
and php-fpm.conf looks like this:

LoadModule proxy_module      lib/apache2/modules/mod_proxy.so
LoadModule proxy_fcgi_module lib/apache2/modules/mod_proxy_fcgi.so

ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/usr/share/apache2/htdocs/

 

Hi

 

i make configuration as you say but when i go to location /usr:share/ there is i cant see apache2 folder.

 

when i install php-fpm then apache2 not come only conf file come .

 

Now i can install apache which come with php-fpm or nginx

 

Thanks



Re: Apahe and Php On Openpli 4.0 #55 blzr

  • PLi® Core member
  • 2,269 posts

+118
Excellent

Posted 25 September 2014 - 10:54

Hi
 
I try to compiling nginx as you say you need to add meta-webrowser layer the makefile first.
 
i add like this 
 
BBLAYERS ?= \
$(CURDIR)/meta-webbrowser \
 
but when i compile nginx its returning error ( ERROR Nothing PROVIDES nginx )
 
I correctly putting layer in make file or i doing mistake.


after adding a bb layer to Makefile run 'make' command in your openpli-oe-core dir,
and only after this try to build the package...
True sarcasm doesn't need green font...

Re: Apahe and Php On Openpli 4.0 #56 blzr

  • PLi® Core member
  • 2,269 posts

+118
Excellent

Posted 25 September 2014 - 11:39

i make configuration as you say but when i go to location /usr:share/ there is i cant see apache2 folder.


and what exactly apache2 package did you install? you have built it yourself, or it's some 'foreign' package?
in apache2 built here locally, I definitely can see /usr/share/apache2/htdocs/index.html
 

when i install php-fpm then apache2 not come only conf file come .
 
Now i can install apache which come with php-fpm or nginx


not sure, but if you just install correctly (w/ all dependencies etc.) following packages:
apache2
php-fpm
php-fpm-apache
there's a non-zero chance that everything will work 'out of the box'...


True sarcasm doesn't need green font...

Re: Apahe and Php On Openpli 4.0 #57 idealsat

  • Senior Member
  • 232 posts

0
Neutral

Posted 25 September 2014 - 16:50

Hi

 

i reinstall / fresh openpli software in box and reinstall php-fpm as you say 

 

i have two packages

 

php-fpm

php-fpm-apache

 

apache2 ?

 

Here is log which two package i installing..

--------

 

1.opkg install php-fpm_5.4.14-r5.0_mips32el.ipk
Installing php-fpm (5.4.14-r5.0) to root...
 Removing any system startup links for php-fpm ...
Configuring php-fpm.
 Adding system startup for /etc/init.d/php-fpm.
Starting php-fpm  done
 
2.opkg install php-fpm-apache2_5.4.14-r5.0_mips32el.ipk
Installing php-fpm-apache2 (5.4.14-r5.0) to root...
Configuring php-fpm-apache2.
 
---------------
 
 php-fpm-apache2 only come etc config files.
 
Still i cant see apache2 on usr/share/apache2
 
can i install apache2 manually.?
 
Thanks 

Edited by bable, 25 September 2014 - 16:51.


Re: Apahe and Php On Openpli 4.0 #58 idealsat

  • Senior Member
  • 232 posts

0
Neutral

Posted 25 September 2014 - 17:05

 

Hi
 
I try to compiling nginx as you say you need to add meta-webrowser layer the makefile first.
 
i add like this 
 
BBLAYERS ?= \
$(CURDIR)/meta-webbrowser \
 
but when i compile nginx its returning error ( ERROR Nothing PROVIDES nginx )
 
I correctly putting layer in make file or i doing mistake.


after adding a bb layer to Makefile run 'make' command in your openpli-oe-core dir,
and only after this try to build the package...

 

 

Also trying for nginx compile as your instructions

 

here is errors

 

-----------------

MACHINE=xp1000 bitbake nginx
ERROR: Traceback (most recent call last):
  File "/home/ubuntu/openpli40/openpli-oe-core/bitbake/lib/bb/cookerdata.py", line 163, in wrapped
    return func(fn, *args)
  File "/home/ubuntu/openpli40/openpli-oe-core/bitbake/lib/bb/cookerdata.py", line 173, in parse_config_file
    return bb.parse.handle(fn, data, include)
  File "/home/ubuntu/openpli40/openpli-oe-core/bitbake/lib/bb/parse/__init__.py", line 102, in handle
    return h['handle'](fn, data, include)
  File "/home/ubuntu/openpli40/openpli-oe-core/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 120, in handle
    abs_fn = resolve_file(fn, data)
  File "/home/ubuntu/openpli40/openpli-oe-core/bitbake/lib/bb/parse/__init__.py", line 125, in resolve_file
    raise IOError("file %s not found" % fn)
IOError: file /home/ubuntu/openpli40/openpli-oe-core/meta-webbrowser/conf/layer.conf not found

ERROR: Unable to parse /home/ubuntu/openpli40/openpli-oe-core/meta-webbrowser/conf/layer.conf: file /home/ubuntu/openpli40/openpli-oe-core/meta-webbrowser/conf/layer.conf not found
ubuntu@ubuntu-dev:~/openpli40/openpli-oe-core/build$ source env.sourceubuntu@ubuntu-

 

dev:~/openpli40/openpli-oe-core/build$ MACHINE=xp1000 bitbake apache2
ERROR: Traceback (most recent call last):
  File "/home/ubuntu/openpli40/openpli-oe-core/bitbake/lib/bb/cookerdata.py", line 163, in wrapped
    return func(fn, *args)
  File "/home/ubuntu/openpli40/openpli-oe-core/bitbake/lib/bb/cookerdata.py", line 173, in parse_config_file
    return bb.parse.handle(fn, data, include)
  File "/home/ubuntu/openpli40/openpli-oe-core/bitbake/lib/bb/parse/__init__.py", line 102, in handle
    return h['handle'](fn, data, include)
  File "/home/ubuntu/openpli40/openpli-oe-core/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 120, in handle
    abs_fn = resolve_file(fn, data)
  File "/home/ubuntu/openpli40/openpli-oe-core/bitbake/lib/bb/parse/__init__.py", line 125, in resolve_file
    raise IOError("file %s not found" % fn)
IOError: file /home/ubuntu/openpli40/openpli-oe-core/meta-webbrowser/conf/layer.conf not found

ERROR: Unable to parse /home/ubuntu/openpli40/openpli-oe-core/meta-webbrowser/conf/layer.conf: file /home/ubuntu/openpli40/openpli-oe-core/meta-webbrowser/conf/layer.conf not found

---------------------------------

 

Here in Makefile where is adding layer

 

------

TMPDIR = $(TOPDIR)/tmp
DEPDIR = $(TOPDIR)/.deps

BBLAYERS ?= \
    $(CURDIR)/meta-webbrowser \
    $(CURDIR)/meta-openembedded/meta-oe \
    $(CURDIR)/meta-openembedded/meta-filesystems \
    $(CURDIR)/meta-openembedded/meta-multimedia \
    $(CURDIR)/meta-openembedded/meta-networking \
    $(CURDIR)/meta-openembedded/meta-python \

--------------

 

is it correct.?

 

Thanks


Edited by bable, 25 September 2014 - 17:09.


Re: Apahe and Php On Openpli 4.0 #59 Sjaaky

  • Senior Member
  • 7,443 posts

+41
Good

Posted 25 September 2014 - 21:59

It is meta-webserver instead of meta-web browser.



Re: Apahe and Php On Openpli 4.0 #60 blzr

  • PLi® Core member
  • 2,269 posts

+118
Excellent

Posted 25 September 2014 - 22:30

oops, that was my typo, sorry...


True sarcasm doesn't need green font...



Also tagged with one or more of these keywords: apache, php, mysql

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users