Hi, I recently was moving a site from a apache/mod_php server to a newer nginx/php-fpm server and after the move the site would not load due to getting an error in the admin/gb_design.php. I didn’t save the specific message, but it was an unexpected $end on the last line of the file.
After a little digging, I’m led to believe it’s because you had a php class defined throughout multiple <?php … ?> tags, which is not allowed. Not sure why the old PHP wasn’t throwing errors and why the new one was. (The old was either 5.1 or 5.2, the new server runs 5.3.)
To fix it, I just rewrote that file to use all echo statements instead of putting html content outside the php tags while still inside the class declaration.
My fix will be overwritten next time your plugin updates though, so I’d be much obliged if you would implement the GBDesignContent class in admin/gb_design.php within one set of php tags.
Note that I had the same issue: WP worked fine on one server, but broke with a similar error message about an unexpected $end on line 203 of gb_design.php. At first I thought the issue was due to a difference between PHP versions (old server had 4.9 installed vs. 5.3 on the new one), but after sorting through the code, I noticed one case in which a short open tag was used on line 169, which means the closing bracket on this line will be skipped if php.ini isn’t set to recognize short open tags.
I changed <? to <?php on line 169, and the problem seems to be resolved.
Viewing 1 replies (of 1 total)
The topic ‘[Plugin: Like-Button-Plugin-For-WordPress] Error in admin/gb_design.php’ is closed to new replies.