Cyberpanel + Opencart installation

Hello,
Maybe I can find somewhere a guide how to install Opencart with Cyberpanel? I face quite a lot of troubles to install it, maybe it would be better if I can follow some guideliness.

Cyberpanel as itself installs normally. I can enter it and add websites etc. The main problem emerges when uploading opencart files to directory. I get these problems:

Warning : fopen(/home/DOMAI/public_html/system/storage/session//sess_958a8f2b6acc863db4cb649ef1): failed to open stream: Permission denied in /home/boardgame.lt/public_html/system/library/session/file.php on line 29 Warning : flock() expects parameter 1 to be resource, bool given in /home/boardgame.lt/public_html/system/library/session/file.php on line 31 Warning : fwrite() expects parameter 1 to be resource, bool given in /home/boardgame.lt/public_html/system/library/session/file.php on line 33 Warning : fflush() expects parameter 1 to be resource, bool given in /home/boardgame.lt/public_html/system/library/session/file.php on line 35 Warning : flock() expects parameter 1 to be resource, bool given in /home/boardgame.lt/public_html/system/library/session/file.php on line 37 Warning : fclose() expects parameter 1 to be resource, bool given in /home/boardgame.lt/public_html/system/library/session/file.php on line 39

I know that there are problem with PHP 8.1 and Opencart 3.3.8 version (this version does not support PHP 8). However I have installed PHP 7.4 for this and it’s the default PHP right now. So the problem is not with PHP. I also added all permissions to opencart folder, however not sure what it’s the problem. The installation of opencart just cannot start.

Welcome @doviis Happy you are here

fix permissions: Go to WebsitesList WebsitesFile Manager and Fix Permissions

Thanks. It worked. However new issue is that cURL should be enabled to install Opencart. I have installed it and it’s working, however it does not work and shows that’s is off.

What I have made:

  1. uncommented extension=curl under php.ini (most common suggestion on forums).
  2. Restarted php
  3. Restarted openlitespeed

Not sure if I am the only one who is facing problems with cURL. Maybe any suggestions?

@doviis Try install it directly like yum install lsphp74-curl -y

Run php -v post result here

Dear Joseph,
Thanks for support.

I managed to install it. Actually it’s really strange with PHP.

On CyberPanel I have selected PHP 7.4. You can even run www [dot] boardgame [dot] lt/phpinfo.php and you will see that the php version is 7.4. However when I connect to root CMD and type php -v I get this:

PHP 8.1.12 (cli) (built: Oct 28 2022 17:39:57) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.12, Copyright (c) Zend Technologies
with Zend OPcache v8.1.12, Copyright (c), by Zend Technologies

So it’s really strange how it actually works. IN CMD I have installed PHP 7.4 and selected as default - then my website cannot load at all. If I leave in CMD 8.1 version it works. However in directmyadmin and Cyberpanel and even in this phpinfo page shows 7.4 version.

The thing is now is actually that opencart does no load icons and some things. I believe that this is basically regarding PHP issues but not sure what’s wrong.

fix permissions: Go to WebsitesList WebsitesFile Manager and Fix Permissions

Fixed. Nothing happens. Still admin not functioning.
You can see that it does not load well.

Can you see anything in the error logs for OC System > Error Logs or you cannot even clieck any sidebar option?

Also can you change folder permissions manually via ssh terminal for the whole installation:

 chmod 0777 config.php
 chmod 0777 admin/config.php

Go to system/config/default.php

Find:

$_['error_display'] = true;

Replace with:

$_['error_display'] = false;

Likely it’s PHP issues

Done everything what you suggested. Still admin side does not work properly.
I cannot press anything on admin panel side, once clicked it automatically closes. Cannot check error log there.

Sorry to hear.

Post the contents of https://<IP Address>:8090/serverstatus/cyberCPMainLogFile

I have changed my actual domain to in order to reduce the chance for google to index it for later on. Not sure if it will work or not haha.

Since I am new user, I cannot share more than 2 links. There are more in this log, so I pasted it on external website. Please follow this link for the last 50 lines: Nov 11, 2022 - Codeshare

Sadly the log has nothing we can use for this issue.

Show me logs from here system-> storage-> logs-> error.log in your OC installation

Dear Joseph,
Thank you for support. Really appreciate it.
Here is the link from error log: Nov 11, 2022 - Codeshare

Check this out MariaDB / MySQL Tweaks As Default & Option

Basically run nano /etc/my.cnf use the keyboard shortcut CTRL+W to search for skip-name-resolve and comment it out. Restart mariadb systemctl restart mysqld

Joseph, for the clarification. Where should I put all the info from that tweak link (for MYSQL?) to which file?

Nano /etc/my.cnf opens empty file - nothing too look there for.

I added all this information from the link to /etc/my.cnf because it was empty before.

P.S. No news - opencart admin still does not work…

Optimize MariaDB installation nano /etc/my.cnf

[mysqld_multi]
mysqld = /usr/bin/mysqld_safe

[mysqld]
user= mysql
pid-file= /var/lib/mysql/mysql.pid
socket= /var/lib/mysql/mysql.sock
port= 3306
datadir= /var/lib/mysql

open_files_limit=50000
max_allowed_packet=268435456

innodb_buffer_pool_size=1G

innodb_log_file_size=256M
innodb_flush_method=O_DIRECT
innodb_io_capacity=1000
innodb_old_blocks_time=1000
innodb_open_files=5000

key_buffer_size=16M
read_buffer_size=256K
read_rnd_buffer_size=256K
query_cache_size=256M
query_cache_limit=5M
join_buffer_size=4M
sort_buffer_size=4M
max_heap_table_size=64M
tmp_table_size=64M
table_open_cache=4500
table_definition_cache=4000
thread_cache_size=50

[mysqld1]
user= mysql
pid-file= /var/lib/mysql1/mysql.pid
socket= /var/lib/mysql1/mysql.sock
port= 3307
datadir= /var/lib/mysql1

open_files_limit=50000
max_allowed_packet=268435456

innodb_buffer_pool_size=1G

innodb_log_file_size=256M
innodb_flush_method=O_DIRECT
innodb_io_capacity=1000
innodb_old_blocks_time=1000
innodb_open_files=5000

key_buffer_size=16M
read_buffer_size=256K
read_rnd_buffer_size=256K
query_cache_size=256M
query_cache_limit=5M
join_buffer_size=4M
sort_buffer_size=4M
max_heap_table_size=64M
tmp_table_size=64M
table_open_cache=4500
table_definition_cache=4000
thread_cache_size=50

Can you open browser console while you are on the admin panel and copy paste what you see in browser console here

Dear Joseph, wow, actually. I was all time using OPERA and it does not work there (liek in photo). However I opened Chrome and all seems working there. Even for Opera I tried to delete cache a few times!
So seems that there is no problem !

Now the last thing to solve is that website with www prefix is not loading, but without www it’s fine. I have added to Cloudflare A type with name www redirection to my server IP address but it’s not working (maybe it needs more time to setup). So I have to dig deeper how to make the web accessible by www and without it.

Thank you for all the support. Really appreciate it!