[SOLVED] Wordpress, MySQL, Lighttpd on DDWRT (R7800)

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Goto page 1, 2  Next
Author Message
StillBlue
DD-WRT User


Joined: 11 Apr 2009
Posts: 257
Location: UK

PostPosted: Mon Aug 15, 2022 12:06    Post subject: [SOLVED] Wordpress, MySQL, Lighttpd on DDWRT (R7800) Reply with quote
I am running lighttpd on a R7800, and had hoped to install wordpress for a local wordpress site I wanted to trial.

Currently the issue I get is:

Code:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.


Has anybody had any experience of getting wordpress up and running on a DD-WRT webserver?

Thanks
Sponsor
StillBlue
DD-WRT User


Joined: 11 Apr 2009
Posts: 257
Location: UK

PostPosted: Mon Aug 15, 2022 12:44    Post subject: Reply with quote
My assumption is I need to install Entware and then MySQL via that?
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Mon Aug 15, 2022 12:47    Post subject: Reply with quote
That sounds like a reasonable deduction. Related Entware FTW https://github.com/Entware/Entware/issues/83

PS. Problem maybe the version they provide will likely not be the version wordpress expects depending on the WP version you're going for and you may need to tell wordpress where to find SQL at install time.

Other than that you're roses, but adding this to DD-WRT manage your expectations as it may not happen at all.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
StillBlue
DD-WRT User


Joined: 11 Apr 2009
Posts: 257
Location: UK

PostPosted: Tue Aug 16, 2022 12:59    Post subject: Reply with quote
Installing Entware was easy enough:

https://wiki.dd-wrt.com/wiki/index.php/Installing_Entware

But although MySQL appears to be built in to it as MariaDB, can I get the service to run. No I can't. Laughing

Fine this far

Code:
opkg install mariadb-server \
             mariadb-client \
             php8-mod-pdo-mysql


But then all goes to pot here

Code:
mysql_install_db --force
StillBlue
DD-WRT User


Joined: 11 Apr 2009
Posts: 257
Location: UK

PostPosted: Tue Aug 16, 2022 13:02    Post subject: Reply with quote
Actually, I am a little further now.

Code:
mysql_install_db --force
Could not find plugin directory.
Will continue with "/opt/lib/mariadb/plugin".
mysql.user table already exists!


Seem to be failing when I am trying to create a password

Code:
/opt/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't create a new thread (errno 11 "Resource temporarily unavailable"); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug'


I will keep plugging away at it. The fun is in the trying right?
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Tue Aug 16, 2022 13:15    Post subject: Reply with quote
Do or do not, there is no try. Doing is more fun than trying.

Some helpful reading https://www.educba.com/mariadb-wordpress/ https://wordpress.org/support/topic/mariadb-3/

The errors are great to share but it would be good to know what syslog router side if anything is being output here.

Some reading and if you google the error https://www.percona.com/blog/2013/02/04/cant_create_thread_errno_11/

However on my travels I stumbled upon this https://snippets.khromov.se/installing-wordpress-on-a-tiny-wireless-router/ so it seems there maybe hope for you yet.

Also router side, it would be better if you were running the latest build as it includes many services/processes improvements.

http://ftp.dd-wrt.com/dd-wrtv2/downloads/betas/2022/08-15-2022-r49741/

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
StillBlue
DD-WRT User


Joined: 11 Apr 2009
Posts: 257
Location: UK

PostPosted: Wed Aug 24, 2022 7:55    Post subject: Reply with quote
Just my notes at the moment. Now the router has access to swap, MariaDB installed OK and appears to work although it does have a number of complaints about:

[Warning] InnoDB: Linux Native AIO disabled.

phpinfo.php isn't showing that PHP has access to MariaDB yet though, so somewhere a path seems to be missing there.

Trying to install actual MySQL through Entware just installs a non working version of MariaDB, which I can't quite understand.

Anyway, I am still playing at the moment.



MariaDB2.png
 Description:
 Filesize:  55.49 KB
 Viewed:  2205 Time(s)

MariaDB2.png




Last edited by StillBlue on Wed Aug 24, 2022 9:01; edited 2 times in total
StillBlue
DD-WRT User


Joined: 11 Apr 2009
Posts: 257
Location: UK

PostPosted: Wed Aug 24, 2022 8:56    Post subject: Reply with quote
It seems my only issue now I think is getting PHP to see that MariaDB is there.

phpinfo.php shows no information at all that MariaDB is present.
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Wed Aug 24, 2022 8:58    Post subject: Reply with quote
I have given you a couple of posts further up where there is a similar setup at https://snippets.khromov.se/installing-wordpress-on-a-tiny-wireless-router/ so study that and see what can be done. DD-WRT includes PHP8.x, but for your purposes, you can try following that setup only with newer packages skipping what you already have and that guide uses sqlite but hey, if that guy could do it... It's not DD-WRT but that matters not.
_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
StillBlue
DD-WRT User


Joined: 11 Apr 2009
Posts: 257
Location: UK

PostPosted: Wed Aug 24, 2022 10:25    Post subject: Reply with quote
I think the issue is along the lines of the original link you posted.

https://github.com/Entware/Entware/issues/83

It just appears no matter what I do, PHP does not wish to see the PDO driver for MySQL, even though it is installed.

I have started from afresh a couple of times, removing PHP, installing the driver first, then reinstalling PHP, but so far, no good.

PHP is quite happy with SQLite, so I may end up going that way if I cannot get PHP to see MariaDB.



phpmodules.png
 Description:
 Filesize:  48.39 KB
 Viewed:  2194 Time(s)

phpmodules.png


StillBlue
DD-WRT User


Joined: 11 Apr 2009
Posts: 257
Location: UK

PostPosted: Thu Aug 25, 2022 13:58    Post subject: Reply with quote
Yes, I think some of my confusion is both DD-WRT and Entware running PHP8.

I have been trying to tweak the Entware one, which likely isn't even running.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12839
Location: Netherlands

PostPosted: Thu Aug 25, 2022 13:59    Post subject: Reply with quote
I have seen more users with the problem that PHP8 was not compatible with some packages and they installed PHP from Entware which I assume is PHP7
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
StillBlue
DD-WRT User


Joined: 11 Apr 2009
Posts: 257
Location: UK

PostPosted: Thu Aug 25, 2022 14:16    Post subject: Reply with quote
Entware is also PHP8, although I am sure I could downgrade it. I may look that route too.
userrox
DD-WRT Novice


Joined: 11 May 2019
Posts: 16

PostPosted: Fri Aug 26, 2022 5:31    Post subject: Reply with quote
I have mariadb running on my R7800. I also have php7 installed from entware. In your screenshot of php -m output I think you are actually showing the output of dd-wrt's php8 and not the entware version, hence the missing modules. Here is the output on my router from php-fpm which I also have accessible via fast-cgi from lighttpd. I can then make database accesses in php using the MySQL PDO driver.

Code:

opkg install php7-fpm php7-pdo-mysql php7-mod-json


/opt/bin# php-fpm -m
[PHP Modules]
cgi-fcgi
Core
date
hash
libxml
mysqlnd
openssl
pcre
PDO
pdo_mysql
posix
Reflection
SPL
standard
zlib

[Zend Modules]
StillBlue
DD-WRT User


Joined: 11 Apr 2009
Posts: 257
Location: UK

PostPosted: Fri Aug 26, 2022 8:30    Post subject: Reply with quote
Yes, I have come to the conclusion that I am still showing DD-WRTs PHP modules, and that Lighttpd is also using DD-WRTs PHP instead of the Entware versions I have installed.

It is great that you have it up and running as it proves I am doing something wrong rather than it not working. I will get back to the drawing board.

Currently all the PHP packages in Entware appear now to be PHP8.
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum