Setup:
- Prestashop 1.6 Fresh Install
- Products CSV export from a live site (Prestashop 1.4)
Goal:
What I want to accomplish is to completely test the CSV Import on localhost first
before doing it on a new site. I have already tried it on the live site and I encounter
a bunch of errors, so I though it would be better to test is first.
Problem:
Now the problem is that the CSV Import doesnt seem to work on localost. Whenever I try to upload the CSV i get a "products_stream.csv (382.23 KB) : File is too large" error.
I have also tried copying the csv file directly to the admin/import folder to see if it would appear on the 'Choose from history /FTP' list but that also failed.
Would greatly appreciate any help! Cheers!
it depends on PHP configuration variables. Edit your php.ini file and increase these values, for localhost develop you can do it without fear.
Example PHP.ini modifications
; Maximum allowed size for uploaded files.
; Modified for prestashop develop
upload_max_filesize = 256M
I also suggest you to change these other values in order to better Prestashop develop:
memory_limit = 512M ; Maximum amount of memory a script may consume (8MB)
max_input_vars = 5000 ; Numero maximo de variables post
After changing values, don't forget to restart your LAMP or WAMP server (almost Apache) and to clear browser cookies before retrying import process.
Best regards
Related
I am editing a website using the Plone 4 CMS. The Plone instance I am currently using is hosted by a server to which I don't have access (i.e. I can't FTP this server and edit PHP files).
Although I don't own the server which is hosting this website, I would like to access the buildout.cfg file. Is there a way to edit this file by just logging in on my Plone website, or do I need to have the credentials to manipulate the whole instance of the site with FTP?
When I log in, I can go to a page called Site Setup (screenshot provided). Can I perhaps solve my problem from this page?
Theoretically it's possible, the code-example below shows a prototype using a browser-view, which when called:
Reads the content of a given page
Writes the content to the buildout-config
Updates the instance
Practically:
You'd need to have access to the file-system, to install an add-on with the browser-view beforehand.
One would never want to do this in production, because if errors occur you
cannot do much about it then.
import os
from Products.Five.browser import BrowserView
class View(BrowserView):
def __call__(self):
# Let's assume these paths exist:
instance_path = '/path/to/instance'
buildout_config_path = instance_path + 'buildout.cfg'
page_path_in_site = 'front-page'
# Read buildout-config of page in site:
page = self.context[page_path_in_site]
config_content = page.getText()
# Write buildout-config to filesystem:
with open(buildout_config_path, 'w') as fil:
fil.write(page.getText())
# Run buildout, so changes in config take effect:
os.system(instance_path + 'buildout')
# Restart server, so python- and zcml-files get
# (re-)compiled, respectively loaded:
os.system(instance_path + 'bin/instance restart')
You can't. The buildout.cfg file is used for installing / building your application. So, when you are in Site setup you already are using the running application you want to reconfigure.
You will edit your buildout.cfg then you will run ./bin/develop rb to rebuild it, then you will (re)start the instance of your application. This is when, for example, you will see new add-ons available for activating them from Site setup / Add-ons (the add-ons you added in eggs / zcml / versions sections of your buildout.cfg).
I have, in order to process some big data, to set up ckan on a local machine. I've set up the whole system following this guide : http://docs.ckan.org/en/latest/maintaining/installing/install-from-source.html
I wanted to display a preview of a locally loaded file, so the user can actually see it before downloading it. And it doesn't work, because it only works for online files. For instance, it DOES work with this online file but NOT with my own file I upload.
So, I've been interested about Datastore and Datapusher. I've followed every part of the guide, and it appears on my ckan. However, I have an error. Specifically this one :
Upload error: An Error occurred while sending the job: 403 Client Error: Forbidden for url: http://127.0.0.1:8800/job
Here's my most important parts about my production.ini file (copying the whole would be very long) :
ckan.site_url = http://localhost
ckan.plugins = datastore datapusher stats text_view image_view
recline_view recline_graph_view recline_map_view webpage_view
ckan.datapusher.formats = csv xls xlsx tsv application/csv
application/vnd.ms-excel
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
ckan.datapusher.url = http://127.0.0.1:8800/
I truly have no idea about what my problem could be, I tried to change the datapusher.url to 0.0.0.0 as the guide suggested, but it doesn't work either.
If the data to be added to CKAN is in a file on your computer, select “Upload a file” option. CKAN will give you a file browser to select it. You should use link to a file option just for publicly available resources.
Have you installed datapusher also? Its a separate process running on port 8800. CKAN uses datastore to be able to have a grid view of tabular data. Data needs to be pushed through datapusher to be used by datastore.
Yes, you need to set up the Datapusher.It's not activated by default.
Pull the datapusher code, install the dependencies and run it using:
python datapusher/main.py deployment/settings.py
The instructions to configure the settings are on the repository.
Here's the datapusher manual: http://docs.ckan.org/projects/datapusher/en/latest/
Here's the repository: https://github.com/ckan/datapusher
Had the exact same error message.
This post solved my issue though.
short: insert/check the following in your virtualhost in /etc/apache2/sites-enabled/datapusher.conf
<Directory /etc/ckan>
Options All
AllowOverride All
Require all granted
</Directory>
I get INTERNAL SERVER ERROR when trying to upload a file that is larger than ~15 MB.
It happens on many Typo3 installations.
I have set post_max_size and upload_max_filesize to 100 megabytes.
max_execution_time and max_input_time to 1000.
Typo3 6.2 and 7.6.
You have also to look at the max execution time and max input time of php.
max_execution_time = value_in_seconds
max_input_time = value_in_seconds
If this is not helping, look at your apache error log file which error is displayed.
Other possible problems:
Does the filename contain characters that are not compatible with your system?
Is the user (you) allowed to upload to the upload directory?
Are the permissions for the target folder correctly set (see Installtool -> Folder Structure)
I've tried all of the suggestions that I've found and haven't succeeded in eliminating the error message:
The page at [ip address] says:
[filename] is too large to upload
I'm running Ubuntu 12.04.1 server and Moodle 2.3.1+. As others have suggested, I modified
/etc/apache2/httpd.conf adding
LimitRequestBody 0 so that there is no limit on the maximum size of uploads.
I also modified /etc/php5/apache2/php.ini setting:
post_max_size = 1024M
upload_max_filesize = 1024M
max_execution_time = 300
Those changes actually had an effect on Moodle and caused it to list larger upload limits in the site security policies and the course settings. Prior to revising php.ini the maximums were 2MB. And so, I set each of those limits to 1GB.
http://[ip address]/moodle/admin/settings.php?section=sitepolicies
http://[ip address]/moodle/admin/settings.php?section=coursesettings
And still I get the error message that the file I'm trying to upload is too large. It is only 30MB.
Can you help?
Did you reload your web-server instance?
What about memory_limit directive?
Did you try to search any .htaccess file, that might override your settings?
However, your question is related to the PHP change the maximum upload file size issue
Moodle docs:
How do the limits on uploaded files work?
File upload size
To see your actual php settings, you can look at:
http://[path to moodle]/admin/phpinfo.php and http://[path to moodle]/admin/environment.php
When i upload a file of size 35MB or more it gives
Server Error
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
and if i upload a file of size 25MB or less then that it works fine. This issue occurred only when i deploy it on a server if i run it on my local system it works perfectly. One thing i want to tell that i have override httpruntime setting in my web.config and its have
<httpRuntime maxRequestLength="3145728" executionTimeout="1200" requestValidationMode="2.0"/>
what may be the issue?
Luckily, there is an alternate solution that can be enabled at the site level rather than server-wide.
source: http://www.webtrenches.com/post.cfm/iis7-file-upload-size-limits
After two days i found answer to my question and the issue is that IIS7 have maximum file upload limit which is 30000000 Bytes which is around 29MB