Hi,
I am trying to host a php web app with below uhttpd configuration,
I am not able to run it using http://192.168.1.1:8182/
onfig uhttpd 'newweb'
list listen_http '0.0.0.0:8182'
list interpreter ".php=/usr/bin/php-cgi"
option redirect_https '0'
option home '/mnt/sda1/phpweb/website'
option rfc1918_filter '1'
option max_requests '3'
option max_connections '100'
option script_timeout '60'
option network_timeout '30'
option http_keepalive '20'
option tcp_keepalive '1'
option ubus_prefix '/ubus'
I am on PHP 8
root@OpenWrt:~# php-cgi -v
PHP 8.1.15 (cgi-fcgi) (built: Feb 18 2023 18:31:16)
Copyright (c) The PHP Group
Zend Engine v4.1.15, Copyright (c) Zend Technologies
Please do the needful.
Thanks
Which files are in /mnt/sda1/phpweb/website ?
You confirmed, that php-cgi can be run from CLI ?
Yes, it contains a simple page which will print hello world
<!DOCTYPE html>
<html>
<body>
<h1>My first PHP page</h1>
<?php
echo "Hello World!";
?>
</body>
</html>
Also I have tried below configuration with html, its also not working
onfig uhttpd 'testhtml'
list listen_http '0.0.0.0:8181'
option home '/www/testphp'
it has simple html page as below
<!DOCTYPE html>
<html>
<body>HTML, Hello World!</body>
</html>
might be something is missing in configuration.
Please suggest
Thanks
I applied below configuration and its working, but now i am facing another issue
config uhttpd 'newweb'
list listen_http '0.0.0.0:8182'
list interpreter ".php=/usr/bin/php-cgi"
option home '/mnt/sda1/phpweb/website'
option index_page 'index.php'
Please suggest
Thanks
Its resolved after update below variable path in php.ini
doc_root = ''
Thanks
system
Closed
March 9, 2023, 4:17am
6
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.