Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Writable Session Save Path Not A Valid Directory

  1. #1
    jcoon is offline Member
    Join Date
    Oct 2006
    Posts
    7

    Default Writable Session Save Path Not A Valid Directory

    Problem:
    System Check fails installation with:
    Writable Session Save Path (d:\php\tmp) Not A Valid Directory

    I have searched the forum for this issue and found a ton. Unfortunately none of what I found has helped.

    Environment:
    Windows 2003 Server (Dedicated - full access)
    IIS 6.0
    PHP 5.1.6
    Sugar Suite Version is 4.5.0
    MySQL Version is 4.0.17 -nt

    Me: I am a coder well versed in ASP and Perl, stumble mostly forward in PHP and Java. I am comfortable editing source files if need be (almost started to do it, but thought I might be smart for once and try the forum first).


    Observations:

    1. Other PHP applications are successfully installed and running on this server. ASP, ASP.net, Perl and PHP applications are succesfully using MySql on this server.

    2. Permissions on the d:\php\tmp directory ( and all other paths that have been tried) have been temporarily set to:
    System: Full Permissions
    Anonymous Web User: Full Permissions

    3. Many other combinations of save_path settings have been tried, using single quotes, double quotes, no quotes, with and without subdirectory levels, subdirectory levels set to 0, path within php directory, path within web root, path within sugar directory, using forward slashes, using backward slashes, using double backward slashes, using beginning slash, no beginning slash, etc. If it is a path form issue, we need some better input as to what it might be - because we've tried the obvious stuff.

    4. IIS is restarted after each change to the php.ini file, and the new path is reflected in the system check acceptance screen - so the php.ini file is being read ok.

    5. Sugar is successful in writing to the current save_path directory and many of the previously tried save_path directories - here is an example:
    Contents of d:\php\tmp\sess_job5la9kr4a1fpi0ff11to7rr0:
    language|s:5:"en_us";oc_install|b:0;setup_db_type| s:5:"mysql";setup_site_sugarbeet_automatic_checks| b:1;setup_site_sugarbeet_anonymous_stats|b:1;setup _license_accept|b:1;license_submitted|b:1;test_ses sion|s:22:"sessions are available";

    6. Here are the Current php.ini settings that seem relevant from previous forum discussions:
    session.save_handler = files
    session.save_path="0;d:\php\tmp"
    ;open_basedir =
    safe_mode = Off
    extension_dir = "D:\php\ext"
    extension=php_mbstring.dll
    extension=php_curl.dll
    extension=php_imap.dll

    7. Here is the System Check output from install.php (all green except session save path):

    PHP Version Unsupported PHP Version Installed: ( ver 5.1.6 )
    MySQL Database OK
    MB Strings Module OK
    XML Parsing OK
    PHP Safe Mode Turned Off OK
    PHP Allow Call Time Pass Reference Turned On OK
    PHP Memory Limit >= 32M OK (Unlimited)
    Writable SugarCRM Configuration File (config.php) OK
    Writable Custom Directory OK
    Writable Modules Sub-Directories and Files OK
    Writable Data Sub-Directories OK
    Writable Cache Sub-Directories OK
    Writable Session Save Path (d:\php\tmp) Not A Valid Directory
    Optional Components Status
    IMAP Module OK
    cURL Module OK
    PHP-JSON Module (v 1.1.1) Not found: The PHP-JSON PHP module reaps enormous performance benefits.
    ZLIB Compression Module OK
    Note: Your php configuration file (php.ini) is located at:
    C:\WINNT\php.ini

    At a loss. I recently discovered SugarCRM and have clients who could benefit from it, some on Linux/Apache and some on Windows boxes - so I really need to make it work on Windows/IIS. Ready to start debugging this myself but I've got to believe somebody has had this same issue.

    Thanks in advance,

    Jon

  2. #2
    jcoon is offline Member
    Join Date
    Oct 2006
    Posts
    7

    Question Re: Writable Session Save Path Not A Valid Directory

    I really want to try Sugar, but I can't try it if I can't install it, and the only thing I have left to try is mucking about in the source code. I really don't want to do that if there is someone who knows the answer.

    Even if no one knows, it would be nice to know that someone with some expertise has glanced at this post. I would be indebted for any response at all

  3. #3
    jcoon is offline Member
    Join Date
    Oct 2006
    Posts
    7

    Unhappy Re: Writable Session Save Path Not A Valid Directory

    Anybody at all?

  4. #4
    baserunner is offline Junior Member
    Join Date
    Nov 2006
    Posts
    4

    Default Re: Writable Session Save Path Not A Valid Directory

    hi,

    i have the same issue during installation

    Writable Session Save Path () Not A Valid Directory

    unfortunatly i use a hosted server.

    I am new to this and i have not figured out how i can access the php.ini, neither have i found it (the php.ini file)

    looking for help 2

    Thanks in advance


    i found another related forum thread in general discussion
    Last edited by baserunner; 2006-11-01 at 02:40 PM.

  5. #5
    jcoon is offline Member
    Join Date
    Oct 2006
    Posts
    7

    Default Re: Writable Session Save Path Not A Valid Directory

    Hi baserunner,

    I'm working on this myself - hopefully someone with more expertise will chime in...

    Let's make sure we have the same problem - can you do 2 things?

    1. copy the output from Step 2: System Check Acceptance, and post it.

    2. make a file with just this text in it:

    <?php
    phpinfo();
    ?>

    name it phptest.php (or whatever you want), put it in the sugar directory and call it from the browser. This will tell us what your php.ini file contains and a bunch of other information.

    PS: Don't leave the phptest file on the server after you run it - it will output too much sensitive information. Don't post any part of it here that contains sensitive path information, etc.

    Forgive me if you already know this stuff, but I don't know your skill level and my own is not that great wit PHP.

    Jon

  6. #6
    baserunner is offline Junior Member
    Join Date
    Nov 2006
    Posts
    4

    Default Re: Writable Session Save Path Not A Valid Directory

    have you read
    this thread?

    i am now re-installing sugar as i was trying too much and it did not work anymore at all.
    I will post the step 2 messages later on today

    my php skill is not very advanced...more likely rudemantal

  7. #7
    jcoon is offline Member
    Join Date
    Oct 2006
    Posts
    7

    Default Re: Writable Session Save Path Not A Valid Directory

    Thanks baserunner,

    Yes, I've read that thread and several others. None of the solutions worked for me.

    For those who are following this, the problem (at least for my situation) is that the Sugar installer can write it's session data to the given save_path directory but then behaves as if the directory does not exist.

    After checking this out further, I find the problem code in checkSystem.php, on line 221 - the is_dir function (a built in php function) is returning false with the given path, indicating that the dirctory does not exist even though it must because we already wrote to it.

    I'm working on a fix for myself and will post it here when I get it.

    Jon

  8. #8
    jcoon is offline Member
    Join Date
    Oct 2006
    Posts
    7

    Smile Re: Writable Session Save Path Not A Valid Directory

    OK, for those interested, here is my 'fix'.

    First, it looks like checkSystem.php already runs a set of session checks at lines 42 through 50. The is_dir function call at line 221 seems to me to be superfluous and problematic - inviting trouble with different OS's and file systems when sessions are already proven to be functioning by previous code.

    My inclination is to eliminate the is_dir check altogether, but in the interest of modifying the code as little as possible, and assuming there may be a good reason for the is_dir check, I simply rely on the same session test and replace line 221 like this:

    //if(is_dir($session_save_path)) {
    if(isset($_SESSION['test_session'])){

    This fixed my problem. The next issue is that my version of MySql is not supported, but that's another issue.

    I do not know the reason for the is_dir function returning false on a directory which obviously exists, however a visit to php.net finds reference to several known issues with the function, and I imagine the issues are compounded when used across multiple operating systems. Hopefully this will help some poor sole having the same problem.

  9. #9
    baserunner is offline Junior Member
    Join Date
    Nov 2006
    Posts
    4

    Default Re: Writable Session Save Path Not A Valid Directory

    congtrats

    well done if it works for you....i will try the other solutions first (from that other thread), although i do not know which .htaccess file i should edit/change...there are several in my public_html directory

  10. #10
    simple is offline Sugar Community Member
    Join Date
    Jul 2005
    Posts
    259

    Default Re: Writable Session Save Path Not A Valid Directory

    Hi Jon

    could be a php bug. See here

    Maybe you should vote for this bug or add a comment...?
    Cheers Pascal
    Simplicity GmbH

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •