SuExec + FastCGI + Joomla Cookies disables Problem

Discussion in 'General' started by jribeiro, Apr 18, 2011.

  1. jribeiro

    jribeiro New Member

    Hi there,

    I have PHP globally turned off, and session.save_path set to /tmp in my php.ini file.

    Site configured to run with PHP suexec and Fast-CGI.

    I've uploaded joomla files through ftp but when I try to install Joomla I get something like:

    "Cookies do not appear to be enabled on your browser client. You will not be able to install the application with this feature disabled. Alternatively, there could also be a problem with the server's session.save_path. If this is the case, please consult your hosting provider if you don't know how to check or fix this yourself."

    I searched for this problem and I saw some users that solved this by changing the session.save_path to /tmp. I did this, restarted httpd but no luck.

    I use Centos 5.5.

    Any sugestions?

    Thanks!!

    ps: without suexec I can install Joomla but it can't write the files into the server even if it has ftp mode on (?!)
     
  2. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Please undo that. The temp directory for the website is inside the website root and it is set as parameter to the php binary in the fcgi starter script by ispconfig automatically and not in the php.ini. The global /tmp dir should not be used as this would allow otherw ebsites to steal cookie data.

    Thats correct, Suexec is required. Otherwise the php scripts wont run under the website user permissions and dont have write access to the website.

    Back to your original problem, please check if you get any error in the error.log file of the website.
     
  3. jribeiro

    jribeiro New Member

    Ok! changed php.ini back to original state

    Code:
    session.save_path = "/var/lib/php/session"
    
    Sorry but how can I check that error log? Sorry...

    Ok found the file under:
    /var/log/ispconfig/httpd/domain/error.log

    opened it with nano (with root user) but the file doen't open or ate least it doesn't present anything!
     
    Last edited: Apr 18, 2011
  4. jribeiro

    jribeiro New Member

    Ok error file:

    Code:
    [Mon Apr 18 16:49:46 2011] [warn] mod_fcgid: stderr: PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: open(/var/www/clients/client2/web2/tmp/sess_9b3188cd54e975575d6ba8b37f0467d7, O_RDWR) failed: Permission denied (13) in /var/www/clients/client2/web2/web/libraries/joomla/session/session.php on line 411
    [Mon Apr 18 16:49:46 2011] [warn] mod_fcgid: stderr: PHP Warning:  include() [<a href='function.include'>function.include</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/clients/client2/web2/web:/var/www/clients/client2/web2/tmp:/var/www/sostudent.com/web:/srv/www/sostudent.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in /var/www/clients/client2/web2/web/libraries/joomla/application/component/view.php on line 606
    [Mon Apr 18 16:49:46 2011] [warn] mod_fcgid: stderr: PHP Warning:  require() [<a href='function.require'>function.require</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/clients/client2/web2/web:/var/www/clients/client2/web2/tmp:/var/www/sostudent.com/web:/srv/www/sostudent.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in /var/www/clients/client2/web2/web/libraries/joomla/document/html/html.php on line 405
    [Mon Apr 18 16:49:46 2011] [warn] mod_fcgid: stderr: PHP Warning:  session_write_close() [<a href='function.session-write-close'>function.session-write-close</a>]: open(/var/www/clients/client2/web2/tmp/sess_9b3188cd54e975575d6ba8b37f0467d7, O_RDWR) failed: Permission denied (13) in /var/www/clients/client2/web2/web/libraries/joomla/session/session.php on line 542
    [Mon Apr 18 16:49:46 2011] [warn] mod_fcgid: stderr: PHP Warning:  session_write_close() [<a href='function.session-write-close'>function.session-write-close</a>]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/www/clients/client2/web2/tmp) in /var/www/clients/client2/web2/web/libraries/joomla/session/session.php on line 542
    [Mon Apr 18 16:49:48 2011] [warn] mod_fcgid: stderr: PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: open(/var/www/clients/client2/web2/tmp/sess_9b3188cd54e975575d6ba8b37f0467d7, O_RDWR) failed: Permission denied (13) in /var/www/clients/client2/web2/web/libraries/joomla/session/session.php on line 411
    [Mon Apr 18 16:49:48 2011] [warn] mod_fcgid: stderr: PHP Warning:  require() [<a href='function.require'>function.require</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/clients/client2/web2/web:/var/www/clients/client2/web2/tmp:/var/www/sostudent.com/web:/srv/www/sostudent.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in /var/www/clients/client2/web2/web/libraries/joomla/document/html/html.php on line 405
    [Mon Apr 18 16:49:48 2011] [warn] mod_fcgid: stderr: PHP Warning:  session_write_close() [<a href='function.session-write-close'>function.session-write-close</a>]: open(/var/www/clients/client2/web2/tmp/sess_9b3188cd54e975575d6ba8b37f0467d7, O_RDWR) failed: Permission denied (13) in /var/www/clients/client2/web2/web/libraries/joomla/session/session.php on line 542
    [Mon Apr 18 16:49:48 2011] [warn] mod_fcgid: stderr: PHP Warning:  session_write_close() [<a href='function.session-write-close'>function.session-write-close</a>]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/www/clients/client2/web2/tmp) in /var/www/clients/client2/web2/web/libraries/joomla/session/session.php on line 542
    
    Had to tail the error.log 'cause it was causing memory crashing with nano and vi!!
     
  5. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Seems as if you started the joomla installation without suexec and then switched to suexec without closing the webbrower in the meantime. This causes that joomla has written a session that belongs to the apache user first and then is not able to change it as web user.

    There are several solutions:

    a) Close all browser windows.
    b) run:

    rm -f /var/www/clients/client2/web2/tmp/sess_*

    to remove all sessions.

    For logfiles, you should use always tail and not an editor to view it.
     
  6. jribeiro

    jribeiro New Member

    Ok. Closed the browser and it all works fine now.

    Thanks once again. Problem solved!!
     

Share This Page