Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
RSS entity function allow_url_fopen=0 wrapper is disabled because... ..
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 26, 2014 - 9:22 pm

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?

Avatar
Edward J Gelb
Member
Free Members
sp_UserOfflineSmall Offline
Feb 27, 2014 - 11:35 am

Edward J Gelb said

Yellow Swordfish said

No worries! smile

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

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 27, 2014 - 12:52 pm

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Edward J Gelb
Member
Free Members
sp_UserOfflineSmall Offline
Feb 27, 2014 - 1:42 pm

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

 

Avatar
Edward J Gelb
Member
Free Members
sp_UserOfflineSmall Offline
Feb 27, 2014 - 1:44 pm

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

 

Avatar
Edward J Gelb
Member
Free Members
sp_UserOfflineSmall Offline
Feb 27, 2014 - 4:43 pm

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.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

 

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

 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 27, 2014 - 9:29 pm

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...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620