Jump to content

Cant download files


Recommended Posts

Hi, 

i have added files to attachments for several products but when i try to download it, it says cant find file whats wrong with it i use 1.5.6.2, can somebody help me please for example http://www.androidsonline.eu/en/index.php?controller=attachment&id_attachment=3

 

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 32106368 bytes) in Unknown on line 0, referer: http://www.prestashop.com/forums/topic/310574-cant-download-files/

Edited by tashkas (see edit history)
Link to comment
Share on other sites

Cannot access to your link. Furthermore you have installed some JS running before your page is opening (snow and FB-connect). In the background I have a 404 site (This page is not available). Can you please disable all non-native modules you are running for front-office and check why your page is delivering a 404-site ? Seems that URL is not available (http://www.androidsonline.eu/en/index.php?, also not http://www.androidsonline.eu/index.php?)

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

http://www.androidsonline.eu it is available dont know why you entering to prestashop via index.php

 

when i try to enter now to modules, i have updated from git some files and now i get this one

 

Unknown column 'module_shop.enable_device' in 'field list'
SELECT m.name, m.version, mp.interest, module_shop.enable_device FROM `ps_module` m INNER JOIN ps_module_shop module_shop ON (module_shop.id_module = m.id_module AND module_shop.id_shop = 1) LEFT JOIN `ps_module_preference` mp ON (mp.`module` = m.`name` AND mp.`id_employee` = 1)

at line 623 in file classes/db/Db.php

 

617.             WebserviceRequest::getInstance()->setError(500, '
 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
618.         }
619.         else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
620.         {
621.             if ($sql)
622.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
623.             throw new PrestaShopDatabaseException($this->getMsgError());
624.         }
625.     }
626.
Edited by tashkas (see edit history)
Link to comment
Share on other sites

You are having some re-write problems on your server/site. For security reasons you never should reach any .php site (also not index). Four your shop it is possible to open with error for ex. index.php - http://www.androidsonline.eu/de/index.php

 

Did you make some changes to shop .htaccess ?

yes i made long time ago to htaccess how i can solve it? you can acess it becouse i have turned on debug its written.still cant download file. 

 

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 123731968 bytes) in /var/www/prestashop/controllers/front/AttachmentController.php on line 45,

 

still cant download 300mb file.

Edited by tashkas (see edit history)
Link to comment
Share on other sites

To have 1GB ram is not the same as to have them set on php. What is your infophp saying about memory_limit ? You can also check the value on your back-office under:

Advanced Parameters > Configuration Information > memory_limit

 

memory_limit should be not under 256, better is 512 for to run Prestashop 1.5.x

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

Memory limit: 128M

 

ok i have changed to 512M

 

but still i get this one PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 277716992 bytes) 

 

that's mean i need more then 1gb of ram to download 300mb file??

Edited by tashkas (see edit history)
Link to comment
Share on other sites

Guest Conprestador

There is no need for increasing the memory_limit to 512M or whatever. To change the maximum size of uploaded files you have to configure other parameters. Look for following lines in php.ini:
 

post_max_size = [anything]
upload_max_filesize = [anything]

If you want to set the maximum to 300 megabytes, change their values to
 

post_max_size = 300M
upload_max_filesize = 300M
Link to comment
Share on other sites

You can set on own php.ini file what you want, but if your server does not allow own or the php-settings you added, it is ignored or will deliver an error, like you are having.

 

From where are you reading the memory_limit ? phpinfo file or back-office ? The phpinfo file should give you the correct values for your server settings.

 

phpinfo file how to: http://www.php.net/manual/en/function.phpinfo.php

 

You are now able to access to modules ? Where exactly is the error you are having. Perhaps the updated files from github do not serve your PS version. I suggest you upgrade the whole software to latest if it is not PS 1.5.6.2.

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

i have added php.ini to .htaccess 

 

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv PHPRC /home/your_cpanel_username/php.ini
SetEnv HTTP_MOD_REWRITE On
</IfModule>
 

and default is /etc/php5/apache2/php.ini

Link to comment
Share on other sites

×
×
  • Create New...