[SOLVED] Running WCMS locally under the PHP Web Server

Ask for help or provide support to other members.
Post Reply
User avatar
NorfolkGreg
Posts: 106
Joined: Wed Sep 01, 2021 7:50 am

[SOLVED] Running WCMS locally under the PHP Web Server

Post by NorfolkGreg »

I have PHP installed locally at C:\PHP7 drive and use its Web server for the basic sites I maintain that consist of simple PHP includes for header, footer, menu, etc. I need complete beginners help with anything more complex!

I have tried to run WCMS but on launching http://localhost/ I get the error:

Code: Select all

Fatal error: Uncaught Error: Call to undefined function mb_internal_encoding() in E:\Greg\Documents\Web\wondercms\index.php:11 Stack trace: #0 {main} thrown in E:\Greg\Documents\Web\wondercms\index.php on line 11
What do I need to do to cure the error?
Last edited by NorfolkGreg on Tue Oct 12, 2021 2:21 pm, edited 2 times in total.
User avatar
wiz
Posts: 754
Joined: Sat Oct 30, 2010 12:23 am

Re: Running WCMS locally under the PHP Web Server

Post by wiz »

Hey Greg.

This means that the mbstring module is not installed on your server.

WonderCMS requires this module to be enabled on your server level for it to function as expected.

Hopefully this helps:
https://www.phpkb.com/kb/article/how-to ... hp-46.html

Here is the full list of requirements:
https://www.wondercms.com/requirements
User avatar
NorfolkGreg
Posts: 106
Joined: Wed Sep 01, 2021 7:50 am

Running WCMS locally under the PHP Web Server

Post by NorfolkGreg »

Thanks! I hadn't realised this was a PHP extension. I assumed it was calling something internal to WCMS. (Just shows how my PHP knowledge is pretty weak!)

I'm running PHP7 and I guess that accounts for the slight difference in what I found in my php.ini file. The notes at the link say:
Installation on Windows Server
If you have access to the php.ini, just remove the semicolon character (;) in front of the line below.
extension = php_mbstring.dll
I found a line:

Code: Select all

; extension=mbstring
Removing semi-colon to that line did the trick. The Comments above the section that included a large block of similar "extension=" lines talked of old style code that might become deprecated in future updates to PHP. I guess this accounts for the difference.
User avatar
NorfolkGreg
Posts: 106
Joined: Wed Sep 01, 2021 7:50 am

Re: Running WCMS locally under the PHP Web Server

Post by NorfolkGreg »

While removing the semi-colon from "extension=mbstring" got the index file to display, it's still not running.

I've attempted various things (without the faintest idea how I should be tackling the job!) and not got any further forward.

I started with a downloaded copy of WCMS as installed on my server. That ran into problems as I couldn't login, because clicking on the link simply sent me to the version on the server. (No surprise there!)
I edited the database file so the link pointed to "http://localhost/admin" (my login address!) and tried again. Not only did that not work, it seemed to make the "Example" page disappear or, more accurately, make it show the home page, regardless of what was shown in the address bar of my browser.

So then I tried starting again, this time with the raw contents of the "wondercms-master" folder. That complained that "curl" was not installed. I found a line ";extension=curl" in php.ini so I removed the semi-colon. That didn't help! Searching further I found one other line that referenced curl "; curl.cainfo =". I'm not sure what to do with that, if anything!

Any help on getting WCMS to run under the PHP server would be very gratefully received!
User avatar
NorfolkGreg
Posts: 106
Joined: Wed Sep 01, 2021 7:50 am

Re: Running WCMS locally under the PHP Web Server

Post by NorfolkGreg »

wiz wrote: Sat Oct 09, 2021 7:48 am Here is the full list of requirements:
https://www.wondercms.com/requirements
OK! That says:
PHP version 7.2 or greater
cURL extension
mbstring extension
Zip extension
mod_rewrite module enabled
PHP 7.4.8 is installed - Sorted!

mbstring - Appears sorted after your help above!

cURL Extension - I still need advice! Earlier in the topic I said:
That didn't help! Searching further I found one other line that referenced curl "; curl.cainfo =". I'm not sure what to do with that, if anything!
Since then I found some user guidance at https://www.php.net/manual/en/curl.configuration.php Following that I downloaded the suggested .pem file and installed it as suggested in the \extras\ssl folder, but still no joy! Clearly, my lack of basic PHP knowledge means I'm missing something fundamental.

Zip Extension - The PHP documentation tells me this extension is built-in in Windows! Whoopie!

mod_rewrite module enabled - It's there in my .htaccess file! But, as I understand it, they are only used by Apache and won't work with the PHP Server under Windows. Hopefully, you'll tell me that like some other packages it's only used for creating SEO-friendly URLs and won't matter for simple local testing purposes while creating and testing a theme..
User avatar
wiz
Posts: 754
Joined: Sat Oct 30, 2010 12:23 am

Re: Running WCMS locally under the PHP Web Server

Post by wiz »

> mod_rewrite module enabled - It's there in my .htaccess file! But, as I understand it, they are only used by Apache and won't work with the PHP Server under Windows. Hopefully, you'll tell me that like some other packages it's only used for creating SEO-friendly URLs and won't matter for simple local testing purposes while creating and testing a theme..
- You are completely correct, I didn't realize you have a Windows server - for that, there's an additional configuration file to make clean URLs work:
- https://github.com/robiso/wondercms/wik ... ver-config
Post Reply