We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Parse error, unable to upload images [Solved] | Forum

Kumi Festus
Kumi Festus Jan 13 '14
Parse error: syntax error, unexpected $end, expecting '(' in /home/bookerzm/public_html/ow_libraries/wideimage/PaletteImage.php on line 45
The Forum post is edited by Alia Jan 14 '14
ross Team
ross Jan 13 '14
Alia Team
Alia Jan 13 '14
Kumi, open wideimage/PaletteImage.php what do you see on lines 40-50?
Kumi Festus
Kumi Festus Jan 13 '14
Aliia, This is what I see over there.

<?php
    /**
 * @author Gasper Kozak
 * @copyright 2007-2011

    This file is part of WideImage.
       
    WideImage is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation; either version 2.1 of the License, or
    (at your option) any later version.
       
    WideImage is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.
       
    You should have received a copy of the GNU Lesser General Public License
    along with WideImage; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   
    * @package WideImage
  **/
   
    /**
     * @package WideImage
     */
    class WideImage_PaletteImage extends WideImage_Image
    {
        /**
         * Create a palette image
         *
         * @param int $width
         * @param int $height
         * @return WideImage_PaletteImage
         */
        static function create($width, $height)
        {
            if ($width * $height <= 0 || $width < 0)
                throw new WideImage_InvalidImageDimensionException("Can't create an image with dimensions [$width, $height].");
           
            return new WideImage_PaletteImage(imagecreate($width, $height));
        }
       
        function doCreat
Alia Team
Alia Jan 13 '14
I think part of the text was cut out.
Do you have following lines:
function doCreate($width, $height)
        {
            return self::create($width, $height);
        }

?

Where function doCreate($width, $height)  is what you supposed to have on line 45.
Kumi Festus
Kumi Festus Jan 13 '14
So I should put  Where function doCreate($width, $height); in place of
return self::create($width, $height);

Is that what you are saying?
Kumi Festus
Kumi Festus Jan 13 '14
Or you mean I should have all this on line 45?

function doCreate($width, $height)
        {
            return self::create($width, $height);
        }

?

Where function doCreate($width, $height)

Kumi Festus
Kumi Festus Jan 13 '14
Yea, something is missing
I have seen that. 
Kumi Festus
Kumi Festus Jan 13 '14
The problem is solved now. Thanks a lot
Alia Team
Alia Jan 13 '14
Welcome. What was missing?
Kumi Festus
Kumi Festus Jan 13 '14
What you said was missing.
function doCreate($width, $height)
        {
            return self::create($width, $height);
        }

Kumi Festus
Kumi Festus Jan 13 '14
I don't how that could happen. I did the auto update.
Alia Team
Alia Jan 14 '14
Strange indeed.
Just in case I am attaching the whole file. Make sure that yours is the same.