Home > database >  server 500 err when runing a github cloned project on lampp stack ubuntu
server 500 err when runing a github cloned project on lampp stack ubuntu

Time:06-04

just started working on Ubuntu 22.04 I just installed lamp stack on my Ubuntu pc and it is working fine but the problem is when i clone a repo from GitHub when i try to run the project by a browser i see a "localhost is currently unable to handle this request." 500 server err i can create a simple file in projects directory and run it with no errors and i can't either use localhost/phpmyadmin i basically get the same error heres my ls -la log result for var/www/html

drwxr-xr-x  3 root      root       4096 Jun  3 16:00 ..
-rw-rw-r--  1 www-data  www-data  10671 Jun  3 16:31 index.html
-rw-rw-r--  1 root      root         20 Jun  3 15:32 info.php
lrwxrwxrwx  1 root      root         21 Jun  3 16:01 phpmyadmin -> /usr/share/phpmyadmin
drwxrwxr-x 10 mrmirzaee mrmirzaee  4096 Jun  3 17:13 Todo

Heres my error.log file for apache2 while trying to open localhost/phpmyadmin [Fri Jun 03 18:30:05.279825 2022] [php:error] [pid 82981] [client ::1:44972] PHP Fatal error: Uncaught Error: Call to undefined function mb_strpos() in /usr/share/phpmyadmin/libraries/classes/Url.php:263\nStack trace:\n#0 /usr/share/phpmyadmin/libraries/classes/Url.php(213): PhpMyAdmin\\Url::getArgSeparator()\n#1 /usr/share/phpmyadmin/libraries/classes/Url.php(176): PhpMyAdmin\\Url::getCommonRaw()\n#2 /usr/share/phpmyadmin/libraries/classes/Core.php(752): PhpMyAdmin\\Url::getCommon()\n#3 /usr/share/phpmyadmin/libraries/classes/Core.php(339): PhpMyAdmin\\Core::linkURL()\n#4 /usr/share/phpmyadmin/libraries/classes/Core.php(366): PhpMyAdmin\\Core::getPHPDocLink()\n#5 /usr/share/phpmyadmin/libraries/classes/Core.php(994): PhpMyAdmin\\Core::warnMissingExtension()\n#6 /usr/share/phpmyadmin/libraries/common.inc.php(131): PhpMyAdmin\\Core::checkExtensions()\n#7 /usr/share/phpmyadmin/index.php(15): require_once('...')\n#8 {main}\n thrown in /usr/share/phpmyadmin/libraries/classes/Url.php on line 263

and heres the access log for that ::1 - - [03/Jun/2022:18:30:05 0430] "GET /phpmyadmin/ HTTP/1.1" 500 185 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36" ::1 - - [03/Jun/2022:18:30:56 0430] "-" 408 0 "-" "-"

the same log files while opening my projects : access log : ::1 - - [03/Jun/2022:18:35:12 0430] "GET /Todo/ HTTP/1.1" 500 185 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36"

error log : [Fri Jun 03 18:35:12.880098 2022] [php:warn] [pid 82977] [client ::1:44978] PHP Warning: include(E:/xampp/htdocs/todo/bootstrap/config.php): Failed to open stream: No such file or directory in /var/www/html/Todo/Bootstrap/init.php on line 3 [Fri Jun 03 18:35:12.880251 2022] [php:warn] [pid 82977] [client ::1:44978] PHP Warning: include(): Failed opening 'E:/xampp/htdocs/todo/bootstrap/config.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/Todo/Bootstrap/init.php on line 3 [Fri Jun 03 18:35:12.880319 2022] [php:warn] [pid 82977] [client ::1:44978] PHP Warning: include(E:/xampp/htdocs/todo/vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/html/Todo/Bootstrap/init.php on line 4 [Fri Jun 03 18:35:12.880337 2022] [php:warn] [pid 82977] [client ::1:44978] PHP Warning: include(): Failed opening 'E:/xampp/htdocs/todo/vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/Todo/Bootstrap/init.php on line 4 [Fri Jun 03 18:35:12.880385 2022] [php:warn] [pid 82977] [client ::1:44978] PHP Warning: include(E:/xampp/htdocs/todo/libs/helpers.php): Failed to open stream: No such file or directory in /var/www/html/Todo/Bootstrap/init.php on line 5 [Fri Jun 03 18:35:12.880433 2022] [php:warn] [pid 82977] [client ::1:44978] PHP Warning: include(): Failed opening 'E:/xampp/htdocs/todo/libs/helpers.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/Todo/Bootstrap/init.php on line 5 [Fri Jun 03 18:35:12.880457 2022] [php:warn] [pid 82977] [client ::1:44978] PHP Warning: Undefined variable $db_config in /var/www/html/Todo/Bootstrap/init.php on line 7 [Fri Jun 03 18:35:12.880470 2022] [php:warn] [pid 82977] [client ::1:44978] PHP Warning: Attempt to read property "host" on null in /var/www/html/Todo/Bootstrap/init.php on line 7 [Fri Jun 03 18:35:12.880482 2022] [php:warn] [pid 82977] [client ::1:44978] PHP Warning: Undefined variable $db_config in /var/www/html/Todo/Bootstrap/init.php on line 7 [Fri Jun 03 18:35:12.880492 2022] [php:warn] [pid 82977] [client ::1:44978] PHP Warning: Attempt to read property "db_name" on null in /var/www/html/Todo/Bootstrap/init.php on line 7 [Fri Jun 03 18:35:12.880506 2022] [php:warn] [pid 82977] [client ::1:44978] PHP Warning: Undefined variable $db_config in /var/www/html/Todo/Bootstrap/init.php on line 7 [Fri Jun 03 18:35:12.880537 2022] [php:warn] [pid 82977] [client ::1:44978] PHP Warning: Attempt to read property "user" on null in /var/www/html/Todo/Bootstrap/init.php on line 7 [Fri Jun 03 18:35:12.880548 2022] [php:warn] [pid 82977] [client ::1:44978] PHP Warning: Undefined variable $db_config in /var/www/html/Todo/Bootstrap/init.php on line 7 [Fri Jun 03 18:35:12.880558 2022] [php:warn] [pid 82977] [client ::1:44978] PHP Warning: Attempt to read property "pass" on null in /var/www/html/Todo/Bootstrap/init.php on line 7 [Fri Jun 03 18:35:12.880730 2022] [php:error] [pid 82977] [client ::1:44978] PHP Fatal error: Uncaught Error: Call to undefined function diePage() in /var/www/html/Todo/Bootstrap/init.php:10\nStack trace:\n#0 /var/www/html/Todo/index.php(3): include()\n#1 {main}\n thrown in /var/www/html/Todo/Bootstrap/init.php on line 10 IDK why it's returning so much errs i literally use the same project on my windows xampp

CodePudding user response:

I would suggest to check the PHP version and use a compatible one. You can use command php --version on linux. I see that you are trying to run PHPmyadmin, its advised to go through its version notes and check which PHP versions it supports.

CodePudding user response:

I Fixed the problem despite my project's problem which a false addressing in files was causing it the PhpMyAdmin was not Responding because I hadn't installed an E called mbstrings as you can see in errors there is an undefined function mbstrops() which actually needs the mbstring Extension to run correctly i just installed the package which was compatible with my php version (8.0.1) and i got everything working correctly in order to see how to install mbstrings Extesion see this : Askubuntu

  • Related