Do you have db.ini.php in the right place with proper write permissions, but still keep getting that pesky message telling you that the database cannot be found? I may have a solution for you.
The php.ini file may be the culprit. And yes it has everything to do with session passing, as many other posts have mentioned. What I could not find in the other posts was what to do to fix it. So I started looking around the net for issues with php sessions. What I found sounded almost too simple to be true, but it worked.
Please note that I am running SnippetMaster on my local PC to evaluate the software. I am running Apache 2.2 with PHP 5 on a Windows XP machine.
It seems that, under windows xp, the PHP 5 install sets the default session.save_path to be under the temp directory for the current user. For example...session.save_path="C:\DOCUME~1\Ralph\LOCALS~1\temp\php\session"
However, the \php\session
directory probably never got created by the installer, and in my case, my shutdown script deletes the contents of the temp directory, so it is not a safe place anyway.
The solution is simple if you have direct access to the server machine as I do. Create a directory called session somewhere "safe" so that it will not get whacked by accident. Then change the session.save_path entry in the php.ini file (Usually at C:\Program Files\PHP\php.ini on a windows machine) to point to it.
In my case, I created the directory at C:\Program Files\PHP\SESSION. Therefore the entry in my PHP.ini file looks like this...session.save_path="C:\Program Files\PHP\SESSION"
I refreshed the server and browsed to http://localhost/snippetmaster
, and VIOLA the database location field was already populated (it never was before) and the rest of the install went off without a hitch.
Note to Henri: I hope this helps others so they will not bother you as I have. I fully understand that you cannot respond to everyone's questions, and that paying customers get the highest priority.
I hope that this is helpful to someone out there with the same problems. Henri has a very nice product here, and it would be a shame if someone gave up on it when it might be as easy as this to fix.