WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: LAMP environment  (Read 15222 times)

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: LAMP environment
« Reply #45 on: April 25, 2022, 02:57:33 AM »
Hello everyone,

I'm triyng to make php persistent on my rasp.
After I have configure and compile php I have Install php in a folder I have created just for this and now i was wondering if anyone know what folder and wich file to compress with squashfs-tools to have a php7.tcz php7-dev.tcz and php7-doc.tcz
I'am using this version of php http://tinycorelinux.net/8.x/armv7/tcz/src/php7/
It's fine

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: LAMP environment
« Reply #46 on: April 25, 2022, 06:54:32 AM »
Update :
 Juanito link a script to build php for x86_64 and I was wondering how can i adapt this script fo piCore or is there an existing php script for piCore ?
(link : http://www.tinycorelinux.net/10.x/x86_64/tcz/src/php/build-php.sh)
Thanks in advance.
It's fine

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11220
Re: LAMP environment
« Reply #47 on: April 25, 2022, 07:04:23 AM »
Hi MrToga
Looking at what andyj did for TC8 x86_64:
Code: [Select]
----- Snip -----
EXT=php7
TCZ=/tmp/$EXT/TCZ
 ----- Snip -----
make
 ----- Snip -----
make install INSTALL_ROOT=$TCZ-dev
 ----- Snip -----
He tells the make process where to install the results.
After that, he proceeds to remove what does not belong in  -dev  into other extensions.
Found here:
http://www.tinycorelinux.net/8.x/x86_64/tcz/src/php7/build-php.sh

That build script is x86_64 specific so I would not try to run it directly.
Try adding this after  make -j4  in your build script:
Code: [Select]
EXT=php7
TCZ=/tmp/$EXT/TCZ
make install INSTALL_ROOT=$TCZ-dev
If that works, you can try copying everything after  make install INSTALL_ROOT=$TCZ-dev  from andyj script.

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: LAMP environment
« Reply #48 on: April 25, 2022, 07:21:08 AM »
Hi Rich

I found a php.config script (here :http://www.tinycorelinux.net/8.x/armv7/tcz/src/php7/php7.config) but when I run it I get this error
It said that I don't have apxs but I already have the apx command but I don't know where to find it.
It's fine

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11220
Re: LAMP environment
« Reply #49 on: April 25, 2022, 07:32:38 AM »
Hi MrToga
According to this,  apxs  should be in the apache extension you built:
http://tinycorelinux.net/8.x/armv7/tcz/apache2.4.tcz.list

Also, is  perl5.tcz  loaded?

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: LAMP environment
« Reply #50 on: April 25, 2022, 07:37:19 AM »
Yes perl5.tcz is loaded and I have apxs
It's fine

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: LAMP environment
« Reply #51 on: April 25, 2022, 07:39:34 AM »
I think apxs is in another folder than /usr/local/bin because in this folder i don't find apachectl neither wich work
It's fine

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: LAMP environment
« Reply #52 on: April 25, 2022, 07:47:22 AM »
Nevermind I found apxs it in the usr/local/bin folder
It's fine

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11220
Re: LAMP environment
« Reply #53 on: April 25, 2022, 07:47:48 AM »
Hi MrToga
I think apxs is in another folder than /usr/local/bin ...
If it's present, this will tell you where it is:
Code: [Select]
which apxs

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: LAMP environment
« Reply #54 on: April 26, 2022, 12:27:36 AM »
Hi Rich,

I found it using which apxs and it return :

/usr/local/bin/apxs
It's fine

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: LAMP environment
« Reply #55 on: April 26, 2022, 01:42:29 AM »
« Last Edit: April 26, 2022, 02:06:51 AM by MrToga »
It's fine

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: LAMP environment
« Reply #56 on: April 26, 2022, 06:15:01 AM »
Hello guys,

I finally have php7 persistent but I tried to run php code on my apache server but apache doesn't interpret php
How can I fix that?
It's fine

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11220
Re: LAMP environment
« Reply #57 on: April 26, 2022, 07:06:26 AM »
Hi MrToga
I know nothing about Apache or PHP, but I do know this, secrecy is not a good strategy when seeking assistance. You
are literally our eyes since we can not see your screen so we don't know what you've tried or what kind of errors
may have been displayed.

Possible information to provide may include but is not limited to:
Post your php code.
Tell us where you placed the file containing that code.
Changes you made to http.conf.
Changes you made to php.ini.
Changes you made to any other  .conf/.ini  files.
Error messages you received.

This is the  .info  file for an old php5 extension. It has some notes on apache that might be useful:
http://tinycorelinux.net/10.x/x86/tcz/php5.tcz.info

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: LAMP environment
« Reply #58 on: April 26, 2022, 07:28:22 AM »
Hi Rich,

I tried to do a make install INSTALL_ROOT=/tmp/php7 and now i'm searching in this repertory and I don't find php.ini nor libphp5.so needed for interpretation.
(link here :https://www.php.net/manual/fr/install.unix.apache2.php)
I also used this script to compile.
« Last Edit: April 26, 2022, 07:38:28 AM by MrToga »
It's fine

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11220
Re: LAMP environment
« Reply #59 on: April 26, 2022, 09:43:54 AM »
Hi MrToga
See if the attached file runs without errors.
If it does, attach the  php7.list  file to your next post.
If it doesn't, post the errors.