Notifications
Clear all

[Closed] Path issue with sub-domain installation

6 Posts
2 Users
0 Likes
639 Views
Posts: 10
Topic starter
(@rubiconcsl)
Active Member
Joined: 2 years ago

Hi all.

I'm reasonably new to wpForo.  I want to move my phpBB forum, as I find it a bit basic and also rather a pain to update - WP updates are so much simpler i.e. click a button or even make it automatic.

I've installed to a sub-directory below my pubic_html directory called wpforum and created a sub-domain to access it as wpforum.mydomain....  When I'm logged in, I constantly get the following error message displayed.

Warning: session_start(): open(/var/cpanel/php/sessions/ea3/sess_3a5b3eccbe5a9392bda442b83a1d0a33, O_RDWR) failed: No such file or directory (2) in /home/pompeybb/public_html/wpforum/wp-content/plugins/go2wpforo/Main.php on line 60

Warning: session_start(): Failed to read session data: files (path: /var/cpanel/php/sessions/ea3) in /home/pompeybb/public_html/wpforum/wp-content/plugins/go2wpforo/Main.php on line 60

Is this due to it being a sub-domain?  Do I need to configure something to make this work correctly - a path somewhere perhaps?  Presumably it is trying to locate a file called: /var/cpanel/php/sessions/ea3/sess_3a5b3eccbe5a9392bda442b83a1d0a33.

Thanks.

Edit: I have checked session.save_path in cPanel -> MultiPHP INI Editor.

It is set to: /var/cpanel/php/sessions/ea-php80

Why is /var/cpanel/php/sessions/ea3/ being used as a path, instead of /var/cpanel/php/sessions/ea-php80?

Is this configurable somewhere?  /var/cpanel/php/sessions/ea3/ does not exist.

5 Replies
Posts: 10
Topic starter
(@rubiconcsl)
Active Member
Joined: 2 years ago

Getting somewhere with this I think. 

phpinfo() shows:-

Directive Local Value Master Value
session.save_path /var/cpanel/php/sessions/ea3 /var/cpanel/php/sessions/ea-php80

 

In .htaccess in the root path of the main domain (not the wpforum.mydomain...) it is setting session.save_path.  I am assuming though, that even if this file was found, this would only kick in if I'm using php version 5.x and I'm using 8.0.27: -

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation ( https://go.cpanel.net/EA4ModifyINI) 
<IfModule php5_module>
   php_flag asp_tags Off
   php_flag display_errors On
   php_value max_execution_time 1200
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 128M
   php_value post_max_size 12M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea3"
   php_value upload_max_filesize 12M
   php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit
dimalifragis
Posts: 2568
(@dimalifragis)
Famed Member
Joined: 4 years ago

You can't have a subdomain INSIDE a domain. Subdomains have their own root directory, above public_html or whatever the name of the main domain is.

Otherwise it is not a subdomain but a site in a subfolder and from that several issues arrise.

I see you use Cpanel, and Cpanel creates the subdomains just fine.

Posts: 10
Topic starter
(@rubiconcsl)
Active Member
Joined: 2 years ago
Aha! I went into MultiPHP INI Editor for the wpforum subdomain, changed nothing, but clicked "Apply". That has now generated a .htaccess file in /home/pompeybb/public_html/wpforum, with the correct save_path and it now appears to work 🙂

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation ( https://go.cpanel.net/EA4ModifyINI) 

php_flag display_errors Off
php_value max_execution_time 30
php_value max_input_time 60
php_value max_input_vars 1000
php_value memory_limit 128M
php_value post_max_size 60M
php_value session.gc_maxlifetime 1440
php_value session.save_path "/var/cpanel/php/sessions/ea-php80"
php_value upload_max_filesize 60M
php_flag zlib.output_compression Off


php_flag display_errors Off
php_value max_execution_time 30
php_value max_input_time 60
php_value max_input_vars 1000
php_value memory_limit 128M
php_value post_max_size 60M
php_value session.gc_maxlifetime 1440
php_value session.save_path "/var/cpanel/php/sessions/ea-php80"
php_value upload_max_filesize 60M
php_flag zlib.output_compression Off

# END cPanel-generated php ini directives, do not edit

Not sure if that's the best solution, but it appears to work.  I guess now there is a .htaccess file at the subdomain level, it doesn't walk up the tree to the .htaccess file for the main domain.

 
Posts: 10
Topic starter
(@rubiconcsl)
Active Member
Joined: 2 years ago

@dimalifragis

Thanks for the reply.  Maybe I've set the whole thing up incorrectly!  I will check with my hosting company.

I look to have got round the problem though, which maybe is a good thing - or maybe not if I've now caused potential issues!

Page 1 / 2