Giter Site home page Giter Site logo

lamptermux's Introduction

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 Apache http://localhost:8080
  • Default Port Apache 8080
  • Default MariaDB User mysql -u $(whoami)
  • htdocs PATH $HOME/htdocs

Overview

PHP Info phpmyadmin Login phpmyadmin
phpinfo phpmyadmin-login phpmyadmin

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.php
284 </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.so
68 ...
69 ...
70 ...

Uncomment this text

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

Add module on last configuration

Add Module
image
536 ...
537 Include etc/apache2/conf.d/*.conf
538 ...
539 # Add module for PHP 8
540 LoadModule php_module libexec/apache2/libphp.so
541 AddHandler php-script .php

This module for PHP Version 8

Now restart apache with killall 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 password for '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 Forbidden lamp check phpmyadmin
phpmyadmin-forbidden phpmyadmin-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 none
230       Require all denied
231 </Directory>
232 ...
233 ...
234 ...

To

Require all granted
image
225 ...
226 ...
227 ...
228 <Directory />
229       AllowOverride none
230       Require all granted
231 </Directory>
232 ...
233 ...
234 ...

Change Require all denied to Require all granted

Don't forget to restart apache with killall httpd

lamptermux's People

Contributors

armandwipangestu avatar nihsx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lamptermux's Issues

The .htaccess file does not work! Help me please!

Hello, dear developers! Thank you very much for your project lampTermux. Everything works except the .htaccess files. When running a project with a .htaccess file, it is either ignored or a 500 error is displayed. Help me please! Thanks You!

Unable to Login: Phpmyadmin

After following the Phpmyadmin login guide, I'm still getting the error and not being able to log in to it.

Please help - Not able to connect to mysql

Fatal error: Uncaught mysqli_sql_exception: No such file or directory in /storage/emulated/0/htdocs/classes/DBConnection.php:18 Stack trace: #0 /storage/emulated/0/htdocs/index.php(18): mysqli->__construct('localhost', 'root', Object(SensitiveParameterValue), 'users_db')

How to uninstall

Dear Developer, How do i uninstall the LAMP that has been installed? thank you.

php8 opcache inactive

Hi, How to enable opcache in php?
I tried to create php.ini in lib folder with contents:

[opcache]
opcache.enable = 1
zend_extension=opcache.so

but no luck...

error log:
Failed loading /data/data/com.termux/files/usr/lib/php/opcache.so: dlopen failed: cannot locate symbol "zend_signal_globals" referenced by "/data/data/com.termux/files/usr/lib/php/opcache.so"...

on php cli works fine:
php -i | grep opcache
opcache.enable => On => On

Not working with php 7.4

Hello, i downgraded php 8.x to 7.4.33 and its not working. The current project i am working with has a php 7.4 limitation. Kindly help me using lamp with php 7.4.

lamp: permission denied

Hi developers, I seem to have an error after installing the app. The error message is as follows

WhatsApp Image 2023-03-11 at 22 31 16

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.