Php 7.2.15 doesn't load correctly

General Tech Bugs & Fixes 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I have been having problems with Apache2 loading php. First it printed raw code to the screen. Then I ran sudo apt-get install php libapab.com/tag/c">che2-mod-php and sudo a2enmod mpm_prefork && sudo a2enmod php7.0. The 2nd command appeared to be unneeded but the 1st moved the issue forward slightly.

Running this test file in the browser (from /var/www/html):

// http://lob.com/tag/c">calhost/test.php

shows this:

1024) //{ // $bandwidth = round($bandwidth / 1024 , 2); 
// $bandwidth .= " MB"; //} //else //{ // $bandwidth .= " KB";
 //} // //switb.com/tag/c">ch (@$_GET['download']) { //b.com/tag/c">case 'resume_speed':
 //b.com/tag/c">case 'noresume_speed': //b.com/tag/c">case 'resume': //b.com/tag/c">case 'noresume': 
// $objeb.com/tag/c">ct->set_byfile($FILENAME); // if ($_GET['download'] == 
'noresume' || $_GET['download'] == 'noresume_speed') 
$objeb.com/tag/c">ct->use_resume = false; // if ($_GET['download'] ==
 'resume_speed' || $_GET['download'] == 'noresume_speed' )
 $objeb.com/tag/c">ct->speed = 100; // $objeb.com/tag/c">ct->download(); //break; 
//b.com/tag/c">case 'data': //b.com/tag/c">case 'dataresume': // $data = implode('' ,
 file($FILENAME)); // $objeb.com/tag/c">ct->set_bydata($data); // if 
($_SERVER['download'] != 'dataresume') $objeb.com/tag/c">ct->use_resume = 
false; // $objeb.com/tag/c">ct->filename = basename($FILENAME); 
// $objeb.com/tag/c">ct->download(); //break; //b.com/tag/c">case 'auth': 
// $objeb.com/tag/c">ct->set_byfile($FILENAME); // $objeb.com/tag/c">ct->use_auth = 
true; // $objeb.com/tag/c">ct->handler['auth'] = "test_auth"; // $objeb.com/tag/c">ct-
>download(); //break; //b.com/tag/c">case 'url': // $objeb.com/tag/c">ct-
>set_byurl('http://www.php.net/get/php_manual_b.com/tag/c">chm.zip/from/b.com/tag/c">cr.
php.net/mirror'); // $objeb.com/tag/c">ct->download(); //break; //} // //if 
($objeb.com/tag/c">ct->bandwidth > 0) //{ // error_reporting(E_NONE); // $b 
= intval(implode('',file('bandwidth.txt'))) + $objeb.com/tag/c">ct-
>bandwidth; // $f = fopen('bandwidth.txt','wb'); // 
fwrite($f,$b); // fb.com/tag/c">close($f); // exit; //} // //funb.com/tag/c">ction 
test_auth($user,$pass) { //test b.b.com/tag/c">com/tag/authentib.com/tag/c">cation">authentib.com/tag/c">cation funb.com/tag/c">ction // if 
($user == 'user' && $pass == 'pass') return true; // return
false; //} // //?> -->

Blab.com/tag/c">ck text on white bab.com/tag/c">ckground. No formating.

Going to the root of a wordpress direb.com/tag/c">ctory (with an index.php file) shows this (blab.com/tag/c">ck text white bab.com/tag/c">ckground):

b.com/tag/c">cation. This file doesn't do anything, but loads
 * wp-blog-header.php whib.com/tag/c">ch does and tells WordPress to load the theme.
 *
 * @pab.com/tag/c">ckage WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );

/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );

I've tried to remove/purse and install both apab.com/tag/c">che2 and php several times. I also tried stopping and restarting the apab.com/tag/c">che2 servib.com/tag/c">ce.

Does anyone know what the issue b.com/tag/c">could be?

Here are my versions:

owner@G700:/var/www/wptest1$ apab.com/tag/c">che2 -v
Server version: Apab.com/tag/c">che/2.4.29 (Ubuntu)
Server built:   2018-10-10T18:59:25

owner@G700:/var/www/wptest1$ php -v
PHP 7.2.15-0ubuntu0.18.04.1 (b.com/tag/c">cli) (built: Feb  8 2019 14:54:22) ( NTS )
Copyright (b.com/tag/c">c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (b.com/tag/c">c) 1998-2018 Zend Teb.com/tag/c">chnologies
    with Zend OPb.com/tag/c">cab.com/tag/c">che v7.2.15-0ubuntu0.18.04.1, Copyright (b.com/tag/c">c) 1999-2018, by Zend Teb.com/tag/c">chnologies

I'm on Lubuntu 18.04

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.