Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

LAMP on Android

License

NotificationsYou must be signed in to change notification settings

mayTermux/lampTermux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xshin404/lampTermux

Installation

  • Download or clone the latest release.
git clone https://github.com/mayTermux/lampTermux
  • Move to directory
cd lampTermux
  • Run installer script
./install.sh

Information

  • URL Apachehttp://localhost:8080
  • Default Port Apache8080
  • Default MariaDB Usermysql -u $(whoami)
  • htdocs PATH$HOME/htdocs

Overview

PHP Infophpmyadmin Loginphpmyadmin
phpinfophpmyadmin-loginphpmyadmin

User Configuration

Apache
  • htdocs
Custom PATH 'htdocs'
image

Default PATH htdocs on

246 ...247 ...248 ...249 DocumentRoot"/data/data/com.termux/files/home/htdocs"250<Directory"/data/data/com.termux/files/home/htdocs">251 ...252 ...253 ...
  • Custom extension file that will be at loaded first
Custom extension file
image

Default extension file is

279 ...280 ...281 ...282<IfModule dir_module>283     DirectoryIndex index.php284</IfModule>285 ...286 ...287 ...

If you want custom htdocs or extension file that will be at loaded first, change the configuration on file/data/data/com.termux/files/usr/etc/apache2/httpd.conf

Troubleshooting

Apache & PHP
  • PHP isn't loaded, just showing the code
Like This
phpnotload

Open apache configuration on PATH/data/data/com.termux/files/usr/etc/apache2/httpd.conf

Give comment (#) this text

Comment Text
Screenshot_2022-09-12_21-49-06
64 ...65 ...66 ...67 LoadModule mpm_worker_module libexec/apache2/mod_mpm_worker.so68 ...69 ...70 ...

Uncomment this text

Uncomment Text
image
63 ...64 ...65 ...66#LoadModule mpm_prefork_module libexec/apache2/mod_mpm_prefork.so67 ...68 ...69 ...

Add module on last configuration

Add Module
image
536 ...537 Include etc/apache2/conf.d/*.conf538 ...539# Add module for PHP 8540 LoadModule php_module libexec/apache2/libphp.so541 AddHandler php-script .php

This module forPHP Version 8

Now restart apache withkillall httpd

PHP success loaded
phpload
MySQL
  • Can't login root user because the password didn't know

to fix this, Enable MySQL service

Enable MySQL Service
mysql-start

After enable MySQL Service, now login mysql with root user.

$ mysql -u$(whoami)

After login, type this on MySQL (To use database mysql)

MariaDB [(none)]> use mysql;

Database changed

MariaDB [(none)]>

To

MariaDB [(mysql)]>

Now setting your root password MySQL you want, with

MariaDB [(mysql)]>set passwordfor'root'@'localhost' = password('your_password_here');

After setting password for root login, type

MariaDB [(mysql)]> flush privileges;

Exit MySQL, type

MariaDB [(mysql)]>exit;# or quit;

Now your root password has been changed, to login type

$ mysql -u root -p

The password column filled with the newest password

Picture
setpassword
phpMyAdmin
  • mysqli::real_connect(): (HY000/2002): No such file or directory
Can't Login
phpmyadmin-error

If you get this error, the solution is change value on file/data/data/com.termux/files/usr/etc/phpmyadmin/config.inc.php:

$cfg['Servers'][$i]['host'] ='localhost';

to

$cfg['Servers'][$i]['host'] ='127.0.0.1';
  • Access Denied 403 Forbidden
403 Forbiddenlamp check phpmyadmin
phpmyadmin-forbiddenphpmyadmin-check

If you get this error, change this text on apache configuration/data/data/com.termux/files/usr/etc/apache2/httpd.conf

Require all denied
image
225 ...226 ...227 ...228<Directory />229       AllowOverride none230       Require all denied231</Directory>232 ...233 ...234 ...

To

Require all granted
image
225 ...226 ...227 ...228<Directory />229       AllowOverride none230       Require all granted231</Directory>232 ...233 ...234 ...

Change Require alldenied to Require allgranted

Don't forget to restart apache withkillall httpd


[8]ページ先頭

©2009-2025 Movatter.jp