linux php with apache and html on armv7 - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Wednesday, August 23, 2023

linux php with apache and html on armv7

I installed apache and php on a armv7 board. I wanna use apache to run php scripts. I made a simple script in php to run and depending on how i debug the script in console i got different outputs. I I run: php-cgi test.php i got this output:

X-Powered-By: PHP/8.2.8
Content-type: text/html; charset=UTF-8

1

instead if I run: php test.php I only got:

1

How can I know which php is running apache? Im asking because easch time I tried to run the script throwgh html i got "empty string". It seems like is not getting this "1". I tried to remove this X-Powered and Content-type by modifying php.ini but Im still getting this weird char ^M and don't know where to remove this char. Is there a way I can setup apache to run only php and not run php-cgi? Is there a way i can test what appache is getting running this apache script? Could this be something related to POST apache php? Gastón

I alredy tried runing script with: #!/usr/bin/php I check that running from terminal php-cgi -q test.php I only got the "1" like running php test.php I modified php.ini to remove Content-type and Xpowered but getting this weird ^M that I tried to remove by remove_header in php script.



source https://stackoverflow.com/questions/76955854/linux-php-with-apache-and-html-on-armv7

No comments:

Post a Comment