Ubuntu Setup and Install Failure

Hi,

So I’m able to get a demo of PulseCMS setup locally with MAMP but am unable to have success when moving it to a Linux box. (Ubuntu 18.04)

The installer goes through with success but I cannot get to the frontend or backend, I get an error 500.

I’ve verified that the .htaccess file is present.
I’ve even gone as far as providing -R 777 permissions to the entire directory. I can load regular .html or .php files easily and the backend and front page still throw the same errors.

I’ve tried on Ubuntu 16.04 up to 19.04 and I get the same errors.

I’ve made www-data the owner of the root directory and all subdirectories/files.

Logs show the following:

tail -f /var/log/apache2/error.log
[Mon Apr 29 12:46:18.089230 2019] [php7:warn] [pid 11164] [client 192.168.79.1:51317] PHP Warning: file_put_contents(/var/www/mydomain.com/html/config.php): failed to open stream: Permission denied in /var/www/mydomain.com/html/pulsecore/install/config.php on line 31
[Mon Apr 29 12:46:18.089282 2019] [php7:warn] [pid 11164] [client 192.168.79.1:51317] PHP Warning: file_put_contents(/var/www/mydomain.com/html/pulsecore/storage/config.json): failed to open stream: Permission denied in /var/www/mydomain.com/html/admin/install.php on line 49
[Mon Apr 29 12:46:18.089320 2019] [php7:error] [pid 11164] [client 192.168.79.1:51317] PHP Fatal error: Uncaught LogicException: Unable to create a default JSON configuration file in /var/www/mydomain.com/html/pulsecore/dbc.php:12\nStack trace:\n#0 /var/www/mydomain.com/html/admin/install.php(51): pulsecore\invariant(false, ‘Unable to creat…’)\n#1 {main}\n thrown in /var/www/mydomain.com/html/pulsecore/dbc.php on line 12
[Mon Apr 29 12:46:20.202624 2019] [php7:warn] [pid 10671] [client 192.168.79.1:51318] PHP Warning: file_put_contents(/var/www/mydomain.com/html/config.php_20190429214620.bkup.php): failed to open stream: Permission denied in /var/www/mydomain.com/html/pulsecore/install/config.php on line 25
[Mon Apr 29 12:46:20.202921 2019] [php7:warn] [pid 10671] [client 192.168.79.1:51318] PHP Warning: file_put_contents(/var/www/mydomain.com/html/config.php): failed to open stream: Permission denied in /var/www/mydomain.com/html/pulsecore/install/config.php on line 31
[Mon Apr 29 12:46:20.202994 2019] [php7:warn] [pid 10671] [client 192.168.79.1:51318] PHP Warning: file_put_contents(/var/www/mydomain.com/html/pulsecore/storage/config.json): failed to open stream: Permission denied in /var/www/mydomain.com/html/admin/install.php on line 49
[Mon Apr 29 12:46:20.203032 2019] [php7:error] [pid 10671] [client 192.168.79.1:51318] PHP Fatal error: Uncaught LogicException: Unable to create a default JSON configuration file in /var/www/mydomain.com/html/pulsecore/dbc.php:12\nStack trace:\n#0 /var/www/mydomain.com/html/admin/install.php(51): pulsecore\invariant(false, ‘Unable to creat…’)\n#1 {main}\n thrown in /var/www/mydomain.com/html/pulsecore/dbc.php on line 12

Hi, it is definitely an issue with your permission settings of the Apache user in your VM.

1 Like

Right, I understand that. According to what I’ve posted I’ve clearly given away the farm as far as permissions are concerned and that’s the problem. I’ve run several clean installs with similar permissions.
777 permissions and www-data user/group.

Is there a secret pulse user that needs to be added to the www-data group? my local user is already added to the www-data group.

This seems like a really silly problem to have, especially when I’ve given away the farm with permissions and i have the .htaccess file available.

[30-Apr-2019 05:19:23 Asia/Tokyo] PHP Warning: fileperms(): stat failed for /var/www/mydomain.com/html/pulsecore/storage/config.json in /var/www/mydomain.com/html/admin/install.php on line 324
[30-Apr-2019 05:19:23 Asia/Tokyo] PHP Warning: fileperms(): stat failed for /var/www/mydomain.com/html/pulsecore/storage/config.json in /var/www/mydomain.com/html/admin/install.php on line 324
[30-Apr-2019 05:19:31 Asia/Tokyo] PHP Fatal error: Uncaught Error: Call to undefined function mb_internal_encoding() in /var/www/mydomain.com/html/pulsecore/bootstrap.php:368
Stack trace:
#0 /var/www/mydomain.com/html/config.php(77): pulsecore\set_i18n(‘Asia/Tokyo’, ‘english’)
#1 /var/www/mydomain.com/html/admin/install.php(54): require_once(’/var/www/exempl…’)
#2 {main}
thrown in /var/www/mydomain.com/html/pulsecore/bootstrap.php on line 368
[30-Apr-2019 05:20:02 Asia/Tokyo] PHP Fatal error: Uncaught Error: Call to undefined function mb_internal_encoding() in /var/www/mydomain.com/html/pulsecore/bootstrap.php:368
Stack trace:
#0 /var/www/mydomain.com/html/config.php(77): pulsecore\set_i18n(‘Asia/Tokyo’, ‘english’)
#1 /var/www/mydomain.com/html/admin/index.php(10): require_once(’/var/www/exempl…’)
#2 {main}
thrown in /var/www/mydomain.com/html/pulsecore/bootstrap.php on line 368
[30-Apr-2019 05:20:05 Asia/Tokyo] PHP Fatal error: Uncaught Error: Call to undefined function mb_internal_encoding() in /var/www/mydomain.com/html/pulsecore/bootstrap.php:368
Stack trace:
#0 /var/www/mydomain.com/html/config.php(77): pulsecore\set_i18n(‘Asia/Tokyo’, ‘english’)
#1 /var/www/mydomain.com/html/index.php(7): require_once(’/var/www/exempl…’)
#2 {main}
thrown in /var/www/mydomain.com/html/pulsecore/bootstrap.php on line 368

Your “basic” VM misses a “basic” PHP function.

Check your PHP installation.

https://www.php.net/manual/en/function.mb-internal-encoding.php

1 Like

Thanks @wtmio - please make sure you have PHP installed correctly. MAMP obviously comes bundled with this so please ensure your Virtual Machine does also.

I’ve hidden part of your post above so your permissions are no longer visible.

We installed on x2 Digital Ocean boxes last week and it works fine with PHP correctly installed :slight_smile:

Thank you, I appreciate the help however I'm a bit confused as to what need installed and configured.
Based on the Pulse documentation it says that I need only to have PHP 5.6 or greater installed.
So I've done this:
sudo apt install php libapache2-mod-php
IF that's not all that needs installed is there any way that I can be told what modules need installed or what a preferred PHP installation looks like?

1 Like

Yes Pulse 5.6 or higher, but PHP 7+ is recommended for security

  • Did that work?

You can also try these:

For specific commands, when we installed on an Nginx Digital Ocean server the first few commands looked like this:

pkg-static install -f pkg
sudo pkg install php73
sudo pkg install php73-extensions
sudo pkg install php73-curl
sudo pkg install php73-json
sudo pkg install php73-gd
sudo pkg install php73-mbstring
sudo pkg install php73-xml
sudo pkg install php73-zip

We'll ideally come up with a tutorial at some point on this but most users have a server with PHP pre-installed so not necessary in 99% of cases :slight_smile:

Thank you for that, I appreciate it greatly.
Now my site loads the home page but no links. I'm using a basic blocs template multi page template as a dummy and any link that goes to another page just gives me a basic:
404
Any other advise?
I should note that I have the stock .htaccess file and I've installed all suggested PHP modules from above.

You mean links in the navigation?

Go to settings > Save settings and refresh your page

Right.. I think.

What I mean is in my menu bar I have several pages for example:
home, about, services, contact etc.
All go do a different physical page.

The home page loads just fine, when I click on about for example it takes me to mylocalsite.com/about and then presents a 404. I have the stock .htaccess file that pulse provides and have installed all PHP modules that you suggested.

I should also note that if I attempt to preview a new page that I've created in Pulse it gives me the same 404 error.

Does your Apache installation contain the mod_rewrite module?

1 Like
  • This is because the URL is not set in the Admin > Settings, this has to be added manually
  • As @instacks mentions for the nav, have you the mod_rewrite module installed?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.