Giter Site home page Giter Site logo

Installation problem about imageworkshop HOT 9 CLOSED

sybio avatar sybio commented on July 27, 2024
Installation problem

from imageworkshop.

Comments (9)

Goodoh avatar Goodoh commented on July 27, 2024

In the example above I have made syntax errors but not the case in the file where I'm trying.
I don't understand why it is not working.I get namespace must come first or undefined function . I have un commented all the require_once in the files in PHPImageWorkshop.

from imageworkshop.

Sybio avatar Sybio commented on July 27, 2024

If you paste code with syntax error, I can't help and see the right error ! Can you zip me your projet and upload it somewhere I can download it and take a look ?

from imageworkshop.

Goodoh avatar Goodoh commented on July 27, 2024

You have to forgive me as I am a learner and don't like wasting your time asking questions.
To be honest I'm not sure where to upload or what, exactly, to upload , however I'll explain.
I have xampp installed in a folder I have named apache.
In htdocs I have the root directory which I have named website.In the website folder I have
Folders:images1, images2,lib,resources,scripts,storeadmin,styles.
Files:index.php,product.php,test.php.
I have other files that are ready for use but first I want to get ImageWorkshop working and adjust those files.
Index.php will be the home page.
What I am doing is using test.php for ImageWorkshop as in testing.
lib folder has PHPImageWorkshop in it.
image1 has images in there that are ready for adjusting so to speak.
image2 will be used for the final image that has been worked on with ImageWorkshop.
resources has one image in ready to test out Imageworkshop.
storeadmin is empty.
styles has style files in there and no problem accessing them.
scripts I have myscript.js in there and jquery-1.10.1.js
myscript.js is not working in scripts folder and not if it is in website as I just tested and only works if in the php file itelf. Have to have the script in the file.
So really I am only using at this time lib folder and test.php and resources folder is ready with an image as is images2 for the final image to go in.
In test.php.

or if I put in line 4 (class_exists('PHPImageWorkshop\ImageWorkshop'));
I get this
fatal error Namespace declaration statement has to be the very first statement in the script
C:\apache\htdocs\website\lib\PHPImageWorkshop\ImageWorkshop.php on line 3
I have tested the the file ImageWorkshop.php exists and the image in resources and have got an output of test when

I'm not getting past line 3
I hope I have explained it well for you and appreciate your response.Thanks for that.
Goodoh

from imageworkshop.

Sybio avatar Sybio commented on July 27, 2024
fatal error Namespace declaration statement has to be the very first statement in the script
C:\apache\htdocs\website\lib\PHPImageWorkshop\ImageWorkshop.php on line 3

In ImageWorkshop.php file, it seems you place code before namespace statement.

Please verify this file ("lib/PHPImageWorkshop/ImageWorkshop.php"), it has to begin like that :

<?php

namespace PHPImageWorkshop;

use PHPImageWorkshop\Core\ImageWorkshopLayer as ImageWorkshopLayer;
use PHPImageWorkshop\Core\ImageWorkshopLib as ImageWorkshopLib;
use PHPImageWorkshop\Exception\ImageWorkshopException as ImageWorkshopException;

// If no autoloader, uncomment these lines:
require_once(__DIR__.'/Core/ImageWorkshopLayer.php');
require_once(__DIR__.'/Exception/ImageWorkshopException.php');

Check that there is nothing before "namespace PHPImageWorkshop;" and then "use PHPImageWorkshop...".

from imageworkshop.

Goodoh avatar Goodoh commented on July 27, 2024

I have checked ImageWorkshop.php and is as it should be. Nothing before namespace and the required_once uncommented.
Then I have checked ImageWorkshop.php, the file exists and got true.
Then I did this.

got
Phase error syntax error unexpected';' in C:\apache\htdocs\website\test.php on line 4
Then I did line 4 as this
var_dump(class_exists('ImageWorkshop');
and got the same Phase error as above.
Isn't that strange as a different error as from before and yet nothing different.
I only looked at ImageWorkshop.php as it was as you have pointed out.

from imageworkshop.

Goodoh avatar Goodoh commented on July 27, 2024

Sorry I only just realized just as I sent the last comment the syntax error as in line 4
The ) var_dump(class_exists('ImageWorkshop'));
and in correcting that I got the error as before namespace declaration statement has to be the very first statement in the script.

from imageworkshop.

Sybio avatar Sybio commented on July 27, 2024

Ok but PHP think there is something before the namespace declaration of ImageWorkshop.php. This perhaps a problem of file encoding. Check the encoding of test.php, it must be UTF-8 without BOM, the same for the lib files.

Is there a way you can paste your project code here for example : http://pastebin.com/, I'll test it in my PHP environment.

from imageworkshop.

Goodoh avatar Goodoh commented on July 27, 2024

Hello,
I was thinking as in what part of the project do you need as I have file
that I'm still working on. Images are already compressed and do you need
them. I'm a learner as you know and it does get a little confusing for me.
On to a point of similar concern.
My connect to sql file.

// got an error to start that said mysql depreciated and to use mysqli and
that is how I have it.
Anyway I'm now getting an error select _db must have two parameters, so i
tried and added $db_host and error
must have one parameter. So back and forth from 1 to 2 in trial and error.
With that I could have a problem with privileges yet is that separate to
this issue, if that is another issue(privileges).
Earlier I had trouble with an external .js file.in a folder called scripts.
But now there is not a problem as I have this external javascript file in
the folder and am accessing it.
By <script src="scripts/myscript.js"></script>
It could have been syntax errors but I fairly sure after looking into such
a thing, it was not the case.
Anyway it is working.
Can you please give me an idea as to what files you'd need and not needed.
Example images as that is basic I would think
and not needed.
Files like test.php and other files for sotreadmin and scripts such as
connect to sql in storescripts.
What about pages for the site which are still being worked on such as some
with the images I intend to adjust etc.
Thanks and I hope I have not confused you yet I think you have an
understanding of such things and would follow what I;m saying
Thanks Goodoh

On Mon, Oct 21, 2013 at 12:18 AM, Clément Guillemain <
[email protected]> wrote:

Ok but PHP think there is something before the namespace declaration of
ImageWorkshop.php. This perhaps a problem of file encoding. Check the
encoding of test.php, it must be UTF-8 without BOM, the same for the lib
files.

Is there a way you can paste your project code here for example :
http://pastebin.com/, I'll test it in my PHP environment.


Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-26673833
.

from imageworkshop.

Sybio avatar Sybio commented on July 27, 2024

Solved #28

from imageworkshop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.