Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
Page 11 of 12
Can’t upload product images…. 
 
dimi_ned
Jr. Member
 
Total Posts:  22
Joined:  2008-08-01
 
JLHC - 12 October 2008 11:40 PM

@ dimi_ned: Have you tried contacting your hosting provider about this? They may be able to asist you in this since they are the only one who knows what configurations the servers are using.

Hi JLHC
I guess you are right. I’ve just sent them a request detailing the issue. Maybe they’ll be able to respond before I wipe out my linux install…

Many thanks for your time

 
Magento Community Magento Community
Magento Community
Magento Community
 
JLHC
Guru
 
Avatar
Total Posts:  573
Joined:  2008-05-09
MY - US
 
dimi_ned - 13 October 2008 11:09 AM

Hi JLHC
I guess you are right. I’ve just sent them a request detailing the issue. Maybe they’ll be able to respond before I wipe out my linux install…

Many thanks for your time

Be sure to update us on this when they responds. wink

 Signature 

Aspiration Hosting - Premium Hosting Solutions
Magento-One-Click-Installer Available NOW!
Unleash the real potential of your Magento store with Aspiration Hosting!

 
Magento Community Magento Community
Magento Community
Magento Community
 
dimi_ned
Jr. Member
 
Total Posts:  22
Joined:  2008-08-01
 
JLHC - 14 October 2008 12:04 AM

- 13 October 2008 11:09 AM
Hi JLHC
I guess you are right. I’ve just sent them a request detailing the issue. Maybe they’ll be able to respond before I wipe out my linux install…

Many thanks for your time

Be sure to update us on this when they responds. wink

I contacted the hosting provider (hostmonster) who said that although they didn’t have a linux OS to replicate this scenario (they have windows XP with IE6 & FF3) they run a script to fix the ownership of files. I asked to see the script so that I/we don’t have to go through the same trouble again.

On the other hand, before they did anything I wiped out my Ubuntu 64 bit system. And I did that for the reason that Adobe hasn’t produced a native 64 bit flash player. So when you choose to install the flash player (on a 64 bit system), it installs also a wrapper library which allows you to run the flash player in 64 bit environment.

So I installed instead the 32 bit Ubuntu, installed Flash (flashplugin-nonfree 9.0.124) and it worked…
It didn’t work with the latest flash 10.0.b128 which appears to be the latest (albeit beta) from Adobe. But I guess that is highly dependent on the OS.

In conclusion, when having this problem
1. Report the OS you are running it at and whether its 32 / 64 bit
2. Report your flash player version. Note if its a beta.

This particular problem on my setup was indeed caused by the 32-bit flash player running on 64-bit platform (although it was working while using the local Magento LAMP install).

I’ll post here the script if they mail it to me. It might be useful for people who don’t have a flash issue at all

warm regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jestore
Jr. Member
 
Total Posts:  3
Joined:  2008-08-24
 

I have exactly the same problem as the original poster (Whitewolf, Shaun). i.e. Images are not uploaded upon request in product manager and I am logged out after attempting the upload and changing screens.

Has anything been found to be the cause of the issue?

Can people with different problems start a seperate thread as it is diluting attention on what seems to be a common problem.

 
Magento Community Magento Community
Magento Community
Magento Community
 
JLHC
Guru
 
Avatar
Total Posts:  573
Joined:  2008-05-09
MY - US
 
Jestore - 16 October 2008 08:38 AM

I have exactly the same problem as the original poster (Whitewolf, Shaun). i.e. Images are not uploaded upon request in product manager and I am logged out after attempting the upload and changing screens.

Has anything been found to be the cause of the issue?

Can people with different problems start a seperate thread as it is diluting attention on what seems to be a common problem.

Have you tried inserting the following lines in your php.ini file (in your Magento root folder):-

“magic_quotes_gpc = off
short_open_tag = on
extension=pdo.so
extension=pdo_mysql.so”

 Signature 

Aspiration Hosting - Premium Hosting Solutions
Magento-One-Click-Installer Available NOW!
Unleash the real potential of your Magento store with Aspiration Hosting!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jestore
Jr. Member
 
Total Posts:  3
Joined:  2008-08-24
 

Thanks AH

I created a php.ini file in root directory solely containing the code you posted and the problem is now resolved.

For the record I have all folders set to 755 apart from the /media folder and its subfolders that are set to 777.

Thanks again for your help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
JLHC
Guru
 
Avatar
Total Posts:  573
Joined:  2008-05-09
MY - US
 
Jestore - 16 October 2008 10:31 AM

Thanks AH

I created a php.ini file in root directory solely containing the code you posted and the problem is now resolved.

For the record I have all folders set to 755 apart from the /media folder and its subfolders that are set to 777.

Thanks again for your help.

No problem. Glad that I can help. wink

 Signature 

Aspiration Hosting - Premium Hosting Solutions
Magento-One-Click-Installer Available NOW!
Unleash the real potential of your Magento store with Aspiration Hosting!

 
Magento Community Magento Community
Magento Community
Magento Community
 
doctorlogos
Sr. Member
 
Avatar
Total Posts:  136
Joined:  2008-05-06
 

I have this problem with a clean installation of Magento 1.1.6, under XAMPP / windows XP.

When I click right bottom/properties to Media folder, always ‘read only’ is checked. I think it´s a silly question but, how to change permissions locally?

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
I Am Me
Jr. Member
 
Total Posts:  7
Joined:  2008-10-20
 
JLHC - 16 October 2008 09:03 AM

Jestore - 16 October 2008 08:38 AM
I have exactly the same problem as the original poster (Whitewolf, Shaun). i.e. Images are not uploaded upon request in product manager and I am logged out after attempting the upload and changing screens.

Has anything been found to be the cause of the issue?

Can people with different problems start a seperate thread as it is diluting attention on what seems to be a common problem.

Have you tried inserting the following lines in your php.ini file (in your Magento root folder):-

“magic_quotes_gpc = off
short_open_tag = on
extension=pdo.so
extension=pdo_mysql.so”

Thanks - worked for me too :D

 
Magento Community Magento Community
Magento Community
Magento Community
 
JLHC
Guru
 
Avatar
Total Posts:  573
Joined:  2008-05-09
MY - US
 
I Am Me - 22 October 2008 08:08 AM

Thanks - worked for me too :D

Glad that it is working for you as well. Be sue to showcase your store here when it is ready. wink

 Signature 

Aspiration Hosting - Premium Hosting Solutions
Magento-One-Click-Installer Available NOW!
Unleash the real potential of your Magento store with Aspiration Hosting!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tonitobleroni
Jr. Member
 
Total Posts:  23
Joined:  2008-10-17
 

Unfortunately it didn’t work for me. Any other suggestions? Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
doctorlogos
Sr. Member
 
Avatar
Total Posts:  136
Joined:  2008-05-06
 

Same here blank stare

 
Magento Community Magento Community
Magento Community
Magento Community
 
jawshchevyvan
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2008-06-12
 

hey all, was having one heck of a time with this all of a sudden (probably the Flash 10 upgrade (don’t do it if you want the uploader to work).

so I rolled back to Flash 9 after my co-worker / roommate / drinking buddy / wunderkind decided that it was a pain to get the ajax callbacks to work and was having issues with the db stuff (and he was basically just trying to help for a little bit).  he wrote a simple php form that would post the image and upload it in the correct format (and it didn’t use flash either just simple html and php), but we didn’t want to have him be entirely distracted by my project (and it was nearing 2 am), so we scrapped that idea, and decided to roll back to Flash 9 on my machine.

So with Flash 9 installed we are able to get the browse button back in operation.  Nice.  Upload button works.  Nice.  No call back.  My roommate starts hacking away at this, and then after awhile is like… hrmmmm.... and says that it should be working but there is a javascript error that shouldn’t be there.  ok… so i keep trolling the forums looking at people’s php.ini files and what not.  Try billions of options, keep refreshing sessions, etc… To no avail… Meeting today to show the client… OH NOES!!!!!!!!!!!!!

So in the office this morning my boss and I decide to tail the logs (I don’t have shell access on my box so if you are using a hosting service or something check with the admin to have them see whats what, if they will). 

I don’t have the exact text but mod_security was having an issue and commenting this line out seemed to work for us.
this:

REQBODY_PROCESSOR_ERROR
to this:
#REQBODY_PROCESSOR_ERROR

then we got some images uploaded, and then i was having additional issues, but that was because someone gave me media files with the wrong extension and mismatching mime types. 

The uploader is finicky, but thank goodness its working for me.

Good luck and keep trying!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jawshchevyvan
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2008-06-12
 

FYI:

This is how my coworker set up the upload (make a back up of ‘/app/design/adminhtml/default/default/template/media/uploader.phtml’),
keep in mind this DOES NOT enter the info into the db, so this is essentially useless on its own, though it may help someone else who wants to figure away around the flash uploader (i think its too flashy, no pun intended, and not functional enough, though this is web 2.0 in general, no?)

I make no guarantees about this, yadda yadda yadda…

Use this:

<?php
if (isset($_FILES["uploaded_img"]) == TRUE) :
    
    
$lsBaseDirectory $_SERVER['DOCUMENT_ROOT''/shop/media/catalog/product';
    
$lsFirstLetter substr($_FILES["uploaded_img"]["name"]01);
    
    if (
is_dir('/' $lsBaseDirectory '/' $lsFirstLetter) === FALSE{
        mkdir
('/' $lsBaseDirectory '/' $lsFirstLetter);
        
chmod('/' $lsBaseDirectory '/' $lsFirstLetter0777);
    
}
    
    $lsSecondLetter 
substr($_FILES["uploaded_img"]["name"]11);
    
    if (
is_dir('/' $lsBaseDirectory '/' $lsFirstLetter '/' $lsSecondLetter) === FALSE{
        mkdir
('/' $lsBaseDirectory '/' $lsFirstLetter '/' $lsSecondLetter);
        
chmod('/' $lsBaseDirectory '/' $lsFirstLetter '/' $lsSecondLetter0777);
    
}
    $lsFilename 
$_FILES["uploaded_img"]["name"];
    
$lsDirectory $lsFirstLetter '/' $lsSecondLetter;
    
$lsDBDestination '/' $lsDirectory '/' $lsFilename;
    
$lsDestination '/' $lsBaseDirectory '/' $lsDBDestination;
    
    if (
file_exists($lsDestination) === TRUE{
        $oDir 
opendir('/' $lsBaseDirectory '/' $lsDirectory);
        
$lsBaseFilename preg_replace('/(.+)\.(jpg|gif|png|jpeg)$/i'"$1"$lsFilename);
        
$liBaseFilenameCount strlen($lsBaseFilename);
        
$liOffsetNumber 0;
        
$liLeadingZeroes '00';
        while (
false !== ($oFile readdir($oDir))) {
            
if ($oFile != '..' && $oFile != '.'{
                preg_match
('/^' preg_quote(preg_replace('/\.[a-z]{3}$/i'''$lsFilename)) . '\_([0-9]{3})?\.(jpg|gif|png|jpeg|JPG|GIF|JPEG|PNG)$/'$oFile$aMatches);
                echo 
preg_quote(preg_replace('/\.[a-z]{3}$/i'''$lsFilename));
                if (
count($aMatches) > 0{
                    
if ($aMatches[1] >= $liOffsetNumber{
                        $liOffsetNumber 
$aMatches[1] 1;
                        if (
$liOffsetNumber 9{
                            $liLeadingZeroes 
'0';
                        
}
                        
if ($liOffsetNumber 99{
                            $liLeadingZeroes 
'';
                        
}
                    }
                }
            }
        }
        $lsFilename 
preg_replace('/\.(jpg|gif|png|jpeg|JPG|GIF|PNG|JPEG)$/'"_" $liLeadingZeroes $liOffsetNumber ".$1"$lsFilename);        
        
$lsDBDestination '/' $lsDirectory '/' $lsFilename;
        
$lsDestination '/' $lsBaseDirectory '/' $lsDBDestination;    
    
}
    
    
    move_uploaded_file($_FILES[
"uploaded_img"]["tmp_name"]$lsDestination);
    

endif;    
?>

and this

<form method="POST" action="<?php echo $_SERVER["PHP_SELF"]; ?>" enctype="multipart/form-data">
    <
input type="hidden" name="MAX_FILE_SIZE" value="30000000" />
    <
input type="file" name="uploaded_img" id="uploaded_img" />
    <
input type="submit" name="uploaded_file_submit" id="uploaded_file_submit" value="Upload" />
</
form><br/><br/>

Now figure out that db stuff and much love.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tonitobleroni
Jr. Member
 
Total Posts:  23
Joined:  2008-10-17
 

Thanks for sharing these hassles… The solution that worked for me was quite simple after all. It might be obvious to some of you, but I didn’t know the server was running in Safe Mode. I asked the hosting company to disable Safe Mode (advise given by a kind forum member, thanks Gui!) and re-installed Magento from scratch. Now everything works great! It solved not only the image-uploading-issue, also is solved errors I previously encountered when trying to export products and to use Downloader. Hope this post helps some of you too!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 11 of 12
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
53192 users|746 users currently online|107224 forum posts