image upload error

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am

image upload error

Post by thomahawk »

Hello all

This topic came up some times, but no solution to it. So here I come too with that: Fresh installed 1.4 of cmsms (my first), permissions set to 777 for the upload folder. And still when I try upload a small jpg image in Image Manager, there comes only the error message: "File could not be uploaded. This could be a permissions or Safe mode problem?"

I am using the installation locally with XAMPP on a Mac OSX. XAMPP has GD installed, version 2 or higher.

Interesting to mention is also that in Image Manager: The logo1.jpg that is part of the cmsms install doesnt show up. There is only a placeholder with pixel size, neither the tumbnails nor the image itself (in edit) is showing up. The same when I put my jpgs directly into uploads/images, it does generate a thumbnail and shows a placeholder in Image manager, but doesnt show the images.

Please HELP,

Thomas
alby

Re: image upload error

Post by alby »

thomahawk wrote: This topic came up some times, but no solution to it. So here I come too with that: Fresh installed 1.4 of cmsms (my first), permissions set to 777 for the upload folder. And still when I try upload a small jpg image in Image Manager, there comes only the error message: "File could not be uploaded. This could be a permissions or Safe mode problem?"
And System Information what report for uploads/images/?

Alby
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am

Re: image upload error

Post by thomahawk »

Alby: Hello to Italy from Switzerland  :D

System Info for the upload path shows green "OK symbol"

uploads_url: /Applications/xampp/xamppfiles/htdocs/cms/uploads (0777)
image_uploads_path: /Applications/xampp/xamppfiles/htdocs/cms/uploads/images (0777)
alby

Re: image upload error

Post by alby »

thomahawk wrote: Alby: Hello to Italy from Switzerland  :D
;D

thomahawk wrote: uploads_url: /Applications/xampp/xamppfiles/htdocs/cms/uploads (0777)
image_uploads_path: /Applications/xampp/xamppfiles/htdocs/cms/uploads/images (0777)
You have a strange conf or it's a paste error
url and path are same?
uploads_url must be /cms/uploads and not /Applications/xampp/xamppfiles/htdocs/cms/uploads

Alby
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am

Re: image upload error

Post by thomahawk »

Well, thats a point.
I think it is because I have a local installation, the Xampp server is on my own machine and the root url is http://localhost/cms

Everything that needs a path in config Information is under the same rooth path
root_path:/Applications/xampp/xamppfiles/htdocs/cms

I mean if thats bad, then I suppose nothing would work then, wouldn't it?

Thomas
alby

Re: image upload error

Post by alby »

thomahawk wrote: I think it is because I have a local installation, the Xampp server is on my own machine and the root url is http://localhost/cms
I work with xampp (for win) but I have not this.
Re-install (install/index.php) and uncheck create tables and simple contents in step 5.
This rewrite config.php

Alby
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am

Re: image upload error

Post by thomahawk »

I saw already in install step 6 that the installer took the same path as before, so I changed it there to "cms" which is the folder inside htdocs, where I have cmsms installed. But Now I have several error messages, right inside IMage Manager it says in red letters Invalid base directory: cms/uploads/images and system info doesnt even come up, it says "string(55) "Smarty error: unable to read resource: "systeminfo.tpl""

So I suppose the path as set before (defined by cmsms itself) was right...
alby

Re: image upload error

Post by alby »

thomahawk wrote: So I suppose the path as set before (defined by cmsms itself) was right...
Try to change all in final config.php

Alby
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am

Re: image upload error

Post by thomahawk »

Yes I see, its stored there in config.php – and I know I have to restart xampp after that. But the question is, what path should I use?

Thomas
alby

Re: image upload error

Post by alby »

thomahawk wrote: Yes I see, its stored there in config.php – and I know I have to restart xampp after that. But the question is, what path should I use?
Upload a file php with:

Code: Select all

<?php phpinfo(); ?>
And look paths

Alby
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am

Re: image upload error

Post by thomahawk »

a path example from phpinfo.php looks like this:

Configuration File (php.ini) Path /Applications/xampp/etc

But what does that tell me about how to setup cmsms?
alby

Re: image upload error

Post by alby »

thomahawk wrote: Configuration File (php.ini) Path /Applications/xampp/etc
No, for example:

path look _SERVER["SCRIPT_FILENAME"]
url look _SERVER["PHP_SELF"]

Alby
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am

Re: image upload error

Post by thomahawk »

???

On the phpinfo.php page that comes up, there is nothing with "path look", "url look" nor any word "look"

Shure I did not understand how to do this...

Thomas
alby

Re: image upload error

Post by alby »

thomahawk wrote: On the phpinfo.php page that comes up, there is nothing with "path look", "url look" nor any word "look"
::) It was very synthetic ...

For paths look to value relative to _SERVER["SCRIPT_FILENAME"]

For urls look to value relative to _SERVER["PHP_SELF"]

Alby
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am

Re: image upload error

Post by thomahawk »

Well, its late, sorry  ;D

I see relatively the same there:

_SERVER["SCRIPT_FILENAME"] /Applications/xampp/xamppfiles/htdocs/phpinfo.php

_SERVER["PHP_SELF"] /phpinfo.php



I have already tried "/cms" or "cms" or should it be "/htdocs/cms"?
Only with "/Applications/xampp/xamppfiles/htdocs/cms" do most things work, except image upload....
Locked

Return to “[locked] Installation, Setup and Upgrade”