Forum Moderators: coopster
When php run as CGI
Place your php.ini file in the dir of your cgi’d php, in this case /cgi-bin/
htaccess might look something like this
AddHandler php-cgi .php .htm
Action php-cgi /cgi-bin/php5.cgi
If you're limited by environment, maybe we can explore **why** you need to do this. Maybe you can code around it?
Do you have a common include/config for every page? You should be able to set this with ini_set() at the top of your script?
Interesting to note that session.use_only_cookies defaults to "On" from PHP 5.3.0
The php settings are the same on the new server, except for this one (session.use_only_cookies), it was 'On" on the old site, and is "off" now on the new site. ... So, I had to assume that was what was causing the problem.
I have tried that, both with 'ini_set()' and also with @ini_set(), but it didn't let me use the admin part still. I have checked the obvious, like there are no php errors.
echo ini_get('session.use_only_cookies'); error_reporting(E_ALL | E_STRICT);
ini_set('display_errors',1);
I very much doubt that this is the cause of your problem.
You can try calling ini_get() immediately after calling ini_set() to see if the value has stuck or not...echo ini_get('session.use_only_cookies');
Do you not get any other errors/warnings/notices?
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors',1);
[Wed Mar 03 22:19:35 2010] [error] [client my.ip.add.res] PHP Strict Standards: Non-static method Logger::instance() should not be called statically in /class/logger.php on line 228 session.use_only_cookies - Local:On Master:Off
[Wed Mar 03 22:19:35 2010] [error] [client my.ip.add.res] PHP Strict Standards: Non-static method Logger::instance() should not be called statically in /class/logger.php on line 228
public static function instance()
This indicates that your Logger class was written for (or at least to be compatible with) PHP4. You are now running PHP5. To fix this particular instance it is probably just be a case of adding the static keyword to the method prototype. eg. In /class/logger.php: