<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX Processors中的主题 Re: PHP Apache2 not serving *.php files</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/PHP-Apache2-not-serving-php-files/m-p/2062934#M235157</link>
    <description>&lt;P&gt;Hope the &lt;A href="https://askubuntu.com/questions/1130051/why-cant-apache2-look-outside-var-www-html-for-a-php-file" target="_self"&gt;reference&lt;/A&gt;&amp;nbsp;be helpful for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Harvey&lt;/P&gt;</description>
    <pubDate>Mon, 17 Mar 2025 09:29:41 GMT</pubDate>
    <dc:creator>Harvey021</dc:creator>
    <dc:date>2025-03-17T09:29:41Z</dc:date>
    <item>
      <title>PHP Apache2 not serving *.php files</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PHP-Apache2-not-serving-php-files/m-p/2061720#M235079</link>
      <description>&lt;P&gt;Got yocto to build with php and apache2 as show here&lt;/P&gt;&lt;P&gt;&lt;A title="installing-PHP/" href="https://community.nxp.com/t5/i-MX-Processors/Need-help-installing-PHP/m-p/2060957/emcs_t/S2h8ZW1haWx8dG9waWNfc3Vic2NyaXB0aW9ufE04NlhVRkUzMUZQSDdPfDIwNjA5NTd8U1VCU0NSSVBUSU9OU3xoSw" target="_blank" rel="noopener"&gt;installing-PHP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my conf/local.conf i have set this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IMAGE_INSTALL:append = " php-dbg php-cli php-cgi php-fpm php-fpm-apache2 php-dev php-doc php"
PACKAGECONFIG:append:pn-php = " apache2 mysql sqlite3"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Flashed the image and in console php -v works. But the apache2 server cannot serve any .php files. It returns 'File not found. '&lt;/P&gt;&lt;P&gt;I uploaded my own php file to '/usr/share/apache2/default-site/htdocs'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// /usr/share/apache2/default-site/htdocs/info.php
&amp;lt;?php
phpinfo();
?&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to access it, browser returns 'File not found.' index.html and plain text .txt files work, so I can confirm apache is server files from the folder.&lt;/P&gt;&lt;P&gt;Found the file in '/usr/lib/php8/build' and ran it. Below is the output.&lt;/P&gt;&lt;PRE&gt;root@imx8mpevk:/usr/lib/php8/build# php run-tests.php

=====================================================================
PHP         : /usr/bin/php
PHP_SAPI    : cli
PHP_VERSION : 8.2.20
ZEND_VERSION: 4.2.20
PHP_OS      : Linux - Linux imx8mpevk 6.6.52-lts-next-ge0f9e2afd4cf #1 SMP PREEMPT Tue Nov 19 23:01:49 UTC 2024 aarch64
INI actual  : /etc/php/apache2-php8/php.ini
More .INIs  :
---------------------------------------------------------------------
PHP         : /usr/bin/php-cgi
PHP_SAPI    : cgi-fcgi
PHP_VERSION : 8.2.20
ZEND_VERSION: 4.2.20
PHP_OS      : Linux - Linux imx8mpevk 6.6.52-lts-next-ge0f9e2afd4cf #1 SMP PREEMPT Tue Nov 19 23:01:49 UTC 2024 aarch64
INI actual  : /etc/php/apache2-php8/php.ini
More .INIs  :
---------------------------------------------------------------------
CWD         : /usr/lib/php8/build
Extra dirs  :
VALGRIND    : Not used
=====================================================================
TIME START 2025-03-13 05:46:32
=====================================================================
No tests were run.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 02:55:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PHP-Apache2-not-serving-php-files/m-p/2061720#M235079</guid>
      <dc:creator>intosite</dc:creator>
      <dc:date>2025-03-14T02:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: PHP Apache2 not serving *.php files</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PHP-Apache2-not-serving-php-files/m-p/2062934#M235157</link>
      <description>&lt;P&gt;Hope the &lt;A href="https://askubuntu.com/questions/1130051/why-cant-apache2-look-outside-var-www-html-for-a-php-file" target="_self"&gt;reference&lt;/A&gt;&amp;nbsp;be helpful for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Harvey&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 09:29:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PHP-Apache2-not-serving-php-files/m-p/2062934#M235157</guid>
      <dc:creator>Harvey021</dc:creator>
      <dc:date>2025-03-17T09:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: PHP Apache2 not serving *.php files</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PHP-Apache2-not-serving-php-files/m-p/2063366#M235187</link>
      <description>&lt;P&gt;It still does not work.&lt;/P&gt;&lt;P&gt;I've changed to serve the files from /var/www/html, static *.html files works, but *.php files return 'File not found. ' error&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 03:19:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PHP-Apache2-not-serving-php-files/m-p/2063366#M235187</guid>
      <dc:creator>intosite</dc:creator>
      <dc:date>2025-03-18T03:19:27Z</dc:date>
    </item>
  </channel>
</rss>

