Support Forum
it appears you have messed up the code, especially if all you did was add an @ and then remove it and still get errors...
can you paste the entire line of code so we can see it?
Visit Cruise Talk Central and Mr Papa's World
Edward J Gelb said
Yellow Swordfish said
No worries!
But please do let us know if those edits worked for you.
Problem .. lines 1731 $size = @getimagesize (str_replace ... produces error in
Parse error: syntax error, unexpected T_VARIABLE in /data/wp-content/plugins/simple-press/sp-api/sp-api-filters.php on line 1736
Removal of @ in line 1731 produces error
Parse error: syntax error, unexpected T_VARIABLE in /data/wp-content/plugins/simple-press/sp-api/sp-api-filters.php on line 1736
Ed
YS .. I also noticed that if you look at the error message there are additional errors at the bottom addressing a new issue.
Warning: Cannot modify header information - headers already sent by (output started at /data....wp-content/plugins/simple-press/sp-api/sp-api-filters.php:1436) in /data/0/,,, /wp-content/plugins/simple-press/forum/feeds/sp-feeds.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /data/0/0/23/9/23824/user/24314/problem-with-post-edit-buttontdocs/exploristX10/wp-content/plugins/simple-press/sp-api/sp-api-filters.php:1436) in /data/0/,,,/wp-content/plugins/simple-press/forum/feeds/sp-feeds.php on line 174
And .. raw messages are appearing.
Do appreciate if you can find a solution.
May of the Group RSS, Forum RSS and Topic RSS work.
I also found that Simple:Press does not like Groups to have Forums with the same name. They get mixed up their points are in error.
Ed
Let's go for the simple question first which is - what on earth did you use to make the file edits?
Clearly something was wrong with the edits you made and if you are still getting parse errors after you remove the changes then something is still wrong. And the headers already sent message might just be because of other errors or it might again be because of the way the file was edited. So - what tool was used is the first question.
YELLOW
SWORDFISH
|
Mr Papa said
it appears you have messed up the code, especially if all you did was add an @ and then remove it and still get errors...can you paste the entire line of code so we can see it?
YS and Mr. Papa,
As suggested I preformed that following modifications to the filter file.
May I suggest that it would be much easier if you would make the changes to the file and email me as gelb.com
if (empty($width[1])) {
$size = @getimagesize(str_replace(' ', '%20', $srcfile));
if ($size) {
if ($size[0]) {
$width[1] = $size[0];
}
} elseif (ini_get('allow_url_fopen') == true && $size == false) {
return '['.sp_text('Image Can Not Be Found').']';
}
============================
if (empty($width[1])) {
$size = @getimagesize(str_replace(' ', '%20', $srcfile));
if ($size) {
if ($size[0]) {
$width[1] = $size[0];
$height[1] = $size[1];
} else {
$width[1] = 0;
$height[1] = 0;
}
} elseif (ini_get('allow_url_fopen') == true && $size == false) {
return '['.sp_text('Image Can Not Be Found').']';
}
=====================================================
# insepct the image itself
global $gis_error;
$gis_error = '';
set_error_handler('sp_gis_error');
$display_width = '';
$display_height = '';
$size = @getimagesize(str_replace(' ', '%20', $src[1]));
restore_error_handler();
if ($gis_error == '') {
# Did image exist?
if ($size[0] && $size[1]) {
# check width
if (isset($width[1]) && ($width[1] <= $sfsigimagesize['sfsigwidth'] || $sfsigimagesize['sfsigwidth'] == 0)) {# width specified and less than max allowed
$display_width = ' width="'.$width[1].'"';
} elseif ($sfsigimagesize['sfsigwidth'] > 0 && $size[0] > $sfsigimagesize['sfsigwidth']) {
$display_width = ' width="'.$sfsigimagesize['sfsigwidth'].'"';
}
Regards,
Ed
Yellow Swordfish said
Let's go for the simple question first which is - what on earth did you use to make the file edits?Clearly something was wrong with the edits you made and if you are still getting parse errors after you remove the changes then something is still wrong. And the headers already sent message might just be because of other errors or it might again be because of the way the file was edited. So - what tool was used is the first question.
YS,
All changes to the PHP file were made with a standard TEXT EDITOR. I can assure you that after 30 years in programming, I did not make any mistakes.
Here is the message I just sent to Mr. Papa,
YS and Papa,
As suggested I preformed that following modifications to the filter file.
May I suggest that it would be much easier if you would make the changes to the file and email me as gelb.com
if (empty($width[1])) {
$size = @getimagesize(str_replace(' ', '%20', $srcfile));
if ($size) {
if ($size[0]) {
$width[1] = $size[0];
}
} elseif (ini_get('allow_url_fopen') == true && $size == false) {
return '['.sp_text('Image Can Not Be Found').']';
}
============================
if (empty($width[1])) {
$size = @getimagesize(str_replace(' ', '%20', $srcfile));
if ($size) {
if ($size[0]) {
$width[1] = $size[0];
$height[1] = $size[1];
} else {
$width[1] = 0;
$height[1] = 0;
}
} elseif (ini_get('allow_url_fopen') == true && $size == false) {
return '['.sp_text('Image Can Not Be Found').']';
}
=====================================================
# insepct the image itself
global $gis_error;
$gis_error = '';
set_error_handler('sp_gis_error');
$display_width = '';
$display_height = '';
$size = @getimagesize(str_replace(' ', '%20', $src[1]));
restore_error_handler();
if ($gis_error == '') {
# Did image exist?
if ($size[0] && $size[1]) {
# check width
if (isset($width[1]) && ($width[1] <= $sfsigimagesize['sfsigwidth'] || $sfsigimagesize['sfsigwidth'] == 0)) {# width specified and less than max allowed
$display_width = ' width="'.$width[1].'"';
} elseif ($sfsigimagesize['sfsigwidth'] > 0 && $size[0] > $sfsigimagesize['sfsigwidth']) {
$display_width = ' width="'.$sfsigimagesize['sfsigwidth'].'"';
}
Regards,
Ed
Edward J Gelb said
Yellow Swordfish said
Let's go for the simple question first which is - what on earth did you use to make the file edits?Clearly something was wrong with the edits you made and if you are still getting parse errors after you remove the changes then something is still wrong. And the headers already sent message might just be because of other errors or it might again be because of the way the file was edited. So - what tool was used is the first question.
YS,
All changes to the PHP file were made with a standard TEXT EDITOR. I can assure you that after 30 years in programming, I did not make any mistakes.
Here is the message I just sent to Mr. Papa,
YS and Papa,
As suggested I preformed that following modifications to the filter file.
May I suggest that it would be much easier if you would make the changes to the file and email me as gelb.comif (empty($width[1])) {
$size = @getimagesize(str_replace(' ', '%20', $srcfile));
if ($size) {
if ($size[0]) {
$width[1] = $size[0];
}
} elseif (ini_get('allow_url_fopen') == true && $size == false) {
return '['.sp_text('Image Can Not Be Found').']';
}
============================
if (empty($width[1])) {
$size = @getimagesize(str_replace(' ', '%20', $srcfile));
if ($size) {
if ($size[0]) {
$width[1] = $size[0];
$height[1] = $size[1];
} else {
$width[1] = 0;
$height[1] = 0;
}
} elseif (ini_get('allow_url_fopen') == true && $size == false) {
return '['.sp_text('Image Can Not Be Found').']';
}
=====================================================
# insepct the image itself
global $gis_error;
$gis_error = '';
set_error_handler('sp_gis_error');
$display_width = '';
$display_height = '';
$size = @getimagesize(str_replace(' ', '%20', $src[1]));
restore_error_handler();
if ($gis_error == '') {
# Did image exist?
if ($size[0] && $size[1]) {
# check width
if (isset($width[1]) && ($width[1] <= $sfsigimagesize['sfsigwidth'] || $sfsigimagesize['sfsigwidth'] == 0)) {# width specified and less than max allowed
$display_width = ' width="'.$width[1].'"';
} elseif ($sfsigimagesize['sfsigwidth'] > 0 && $size[0] > $sfsigimagesize['sfsigwidth']) {
$display_width = ' width="'.$sfsigimagesize['sfsigwidth'].'"';
}Regards,
Ed
YS,
Problem has been solved. We contacted the Host Company and modified the PHP to turn off the error_reporting, turn off the display_errors and allow_url_fopen ...
This solved all problems.
Thank you for your help.
However, you might wish to turn off the getimagesize function in future software releases.
Ed
well, we wouldnt turn off getimagesize - its quite standard... not sure why yours (only one thus far) doesnt like it... but as Andy said, we will suppress errors from it...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)