Hi, I followed this tutorial https://www.raspberrypi.org/documentation/remote-access/web-server/apache.md to enable PHP to my already working webserver on Neo. Unfortunately, even after installing PHP, if I open from the browser a PHP webpage, I get results only from the HTML part, as if PHP was not running. In OS X I recall that PHP has to be enabled from the Apache .conf files; is there something similar I have to do here?
Be sure that you have moved the web config panel node.js site to another port (81, 8080 etc) or switch it off. It listens to port 80 so could be conflicting with your PHP site. See for instructions http://www.udoo.org/docs-neo/Basic_Setup/Web_Control_Panel.html
the web configuration panel is listening on port 8080. On port 80 I set the webserver, which is working properly, but without PHP support.
Hi @Vinz87, please take a look at the guide concerning chanigng web control panel port: http://www.udoo.org/docs-neo/Cookbook_Linux/Change_Web_Control_Panel_port.html Cheers
<? phpinfo(); ?> test_html This is a file called phpinfo.php, in /var/www/html. When opened with a browser it will output only "test_html".
To verify that the php module is loaded, type: a2query -m php5 if not enabled, then load with: sudo a2enmod php5 and restart apache: sudo service apache2 restart
That was the problem, thanks. Anyway, on my computer (OS X El Capitan, PHP 5.5.38) it doesn't make any difference, php code enclosed by <? and ?> will be correctly interpreted. Is it a matter of PHP version?
If configured it will also parse the short notation: http://php.net/manual/en/language.basic-syntax.phptags.php