2012-02-14, 04:44:33
First, I've installed pure GS 3.1 r646, w/o any plugins. The only change I made - enabled GSDEBUG in gsconfig.php.
Second, I've created simple plugin, with 1 line of code:
With PHP 5.3.8 and PHP 5.3.9 (IMHO, PHP 5.3+) runs like clockwork.
The problem is, that I use header() function within my plugins on hosting with PHP 5.2.17 (IMHO, with any PHP >5.2 and <5.3)
I've got this:
As a temporary solution I use redirect($url) function from basic.php file, but it causes double page refresh and it is not very comfortable to work like that.
I sniffed around, but didn't find any functions in load.php, common.php or template_functions.php that may work differently in PHP 5.3 and PHP 5.2
Second, I've created simple plugin, with 1 line of code:
Code:
<?php
# get correct id for plugin
$thisfile = basename(__FILE__, ".php");
# register plugin
register_plugin(
$thisfile, //Plugin id
'Someplugin', //Plugin name
'0.1', //Plugin version
'Author Name', //Plugin author (nickname: Zorato)
'http://www.example.com/', //author website
'Nothing special here', //Plugin description
'Settings', //page type - on which admin tab to display
'somefunction' //main function (administration)
);
add_action('settings-sidebar','createSideMenu',array($thisfile,'Some Plugin'));
function somefunction(){
error_reporting(E_ALL); //for debugging purposes
header('Location: settings.php');
}
?>
The problem is, that I use header() function within my plugins on hosting with PHP 5.2.17 (IMHO, with any PHP >5.2 and <5.3)
I've got this:
Quote:Warning: Cannot modify header information - headers already sent by (output started at /var/www/user21243/data/www/~/pure/admin/inc/template_functions.php:27) in /var/www/user21243/data/www/~/pure/plugins/someplugin.php on line 25Any ideas?
As a temporary solution I use redirect($url) function from basic.php file, but it causes double page refresh and it is not very comfortable to work like that.
I sniffed around, but didn't find any functions in load.php, common.php or template_functions.php that may work differently in PHP 5.3 and PHP 5.2