Geo-Location Issue [message #159229] |
Wed, 13 May 2009 23:59 |
nozafc
Messages: 75 Registered: April 2009
Karma: 0
|
Member |
|
|
I've got a forum that is on shared hosting and I appear to be limited to the size of file I can upload. I'm trying to upload the csv file but it keeps failing. As far as I'm aware there is no way I can change the file size limit
I did try splitting the csv into 3 sections each under 2mb but it appears that this overwrites the existing file?
Any suggestions on how to get the Geo-Ip working ?
|
|
|
|
Re: Geo-Location Issue [message #159243 is a reply to message #159230] |
Thu, 14 May 2009 17:30 |
nozafc
Messages: 75 Registered: April 2009
Karma: 0
|
Member |
|
|
naudefj wrote on Thu, 14 May 2009 06:55 | Ask your hosting provider to increase the upload_max_filesize setting in php.ini.
If they cannot, upload the file to the server, cut and paste the loading code from admgeoip.php and run it manually.
Best of luck.
Frank
|
Thanks for the tip
My webhost wouldn't adjust the setting but I found an easy way to do it. I commented out the line
q("DELETE FROM ".$DBHOST_TBL_PREFIX."geoip");
in the admgeoip.php file which then allowed me to upload the split csv files
Thanks for the info anyway :toppa: , without it I'd never have thought about doing it that way
[Updated on: Thu, 14 May 2009 17:31] Report message to a moderator
|
|
|
|
Re: Geo-Location Issue [message #159619 is a reply to message #159244] |
Sat, 13 June 2009 03:54 |
The Witcher
Messages: 675 Registered: May 2009 Location: USA
Karma: 3
|
Senior Member |
|
|
Excellent answer Frank
Solved an issue I had on 2 separate hosts, I have added this to the Wiki so it is available from the help link on the Geo-IP manager.
Possible Error Messages and solutions:
Error: Quote: | File upload failed! Please check that file_uploads is enabled in your php.ini file and ensure that the upload_max_filesize setting is bigger than the file's size
|
solution: Ask your hosting provider to increase the upload_max_filesize setting in php.ini.
Note: I encountered this problem twice, and in both instances my hosts support team resolved the problem in minutes, but they did need to know the size of the file I was attempting to upload which in the case of Geo-IP is 3.72MB
"I'm a Witcher, I solve human problems; not always using a sword!"
|
|
|
|
|
Re: Geo-Location Issue [message #164164 is a reply to message #159230] |
Fri, 07 January 2011 11:00 |
The Witcher
Messages: 675 Registered: May 2009 Location: USA
Karma: 3
|
Senior Member |
|
|
naudefj wrote on Thu, 14 May 2009 00:55Ask your hosting provider to increase the upload_max_filesize setting in php.ini.
If they cannot, upload the file to the server, cut and paste the loading code from admgeoip.php and run it manually.
Best of luck.
Frank
As a work around could the forums data dump be loaded into "Fudforum_to_go", geo location uploaded then forum dumped and loaded back to the original server?
"I'm a Witcher, I solve human problems; not always using a sword!"
|
|
|
|
Re: Geo-Location Issue [message #164178 is a reply to message #164175] |
Fri, 07 January 2011 17:37 |
The Witcher
Messages: 675 Registered: May 2009 Location: USA
Karma: 3
|
Senior Member |
|
|
You mentioned a patch for FUD2Go MySQL, and SQLite to support cross database export/imports here:
http://fudforum.org/forum/index.php?t=msg&th=119222&goto=162127& ;#msg_162127
But it was apparently never completed, would this still be current?
Index: install/www_root/adm/admimport.php
===================================================================
--- install/www_root/adm/admimport.php (revision 4928)
+++ install/www_root/adm/admimport.php (working copy)
@@ -196,6 +189,14 @@
// Reverse formatting applied in admdump.php.
$line = str_replace('\n', "\n", $line);
+ // Handle different quote styles between databases for cross-database export/imports.
+ // For example, change \' --> '' (MySQL's --> SQLite or pgSQL)
+ if (__dbtype__ == 'mysql') {
+ $line = str_replace("''", "\'", $line);
+ } else {
+ $line = str_replace("\\'", "''", $line);
+ }
+
if (($line = trim($line))) {
if ($line{0} != '(') {
if ($tmp && !$skip) {
If so I'd be willing to give it a test and see, having that functionality for FUDforum2go
Would seem like a necessity if you are going to use it.
"I'm a Witcher, I solve human problems; not always using a sword!"
|
|
|
|
Re: Geo-Location Issue [message #164182 is a reply to message #164179] |
Sat, 08 January 2011 00:44 |
The Witcher
Messages: 675 Registered: May 2009 Location: USA
Karma: 3
|
Senior Member |
|
|
Ok I tried it but the initial results weren't quite what I hoped for:
So far without using the patch:
On the 1st attempt to upload geo-Ip got this error:
"File upload failed! Please check that file_uploads is enabled in your php.ini file and ensure that the upload_max_filesize setting is bigger than the file's size"
Checked system info: "Maximum allowed size for uploaded files.
upload_max_filesize = 2M"
So I Modified line 402 in G:\Users\name\AppData\Local\Temp\Server2Go_4452\php.ini to 6MB . (the current ip-to-country excel file is 5,506 KB)
That allowed the file to upload apparently but there was some small errors listed at the bottom of the page, which I did not catch,(FUDforum2Go uses IE so its hard for me to tell off hand.
In attempting to install the FUDforum2Go data dump on a full installation forum I got the "1061: Duplicate key name 'fud30_tv_1_i_t'" error previously addressed followed by "FATAL ERROR: No session, cannot update status!" so I was unable to ensure that the Geo_Ip had been successful installing to FUDforum2Go and uploading via the data dump or not.
I will try it again and get back.
"I'm a Witcher, I solve human problems; not always using a sword!"
|
|
|
Re: Geo-Location Issue [message #164207 is a reply to message #164179] |
Sun, 09 January 2011 15:47 |
The Witcher
Messages: 675 Registered: May 2009 Location: USA
Karma: 3
|
Senior Member |
|
|
naudefj wrote on Fri, 07 January 2011 11:53If I remember correctly a variation of that patch was eventually committed.
Best would be to just test it. If it doesn't work, we can always prepare another patch.
Ok I tried it again using a 4 GB thumb drive with no joy!
Errors mentioned last time were: "Errors on page" and "done but with errors on page"
Upload timed out after 30 seconds: Fatal error: Maximum execution time of 30 seconds exceeded in G:\FUDforum2Go testing\htdocs\include\theme\default\db.inc on line 100
Changed same to 3 minutes and retried:
Fatal error: Uncaught exception 'Exception' with message '(G:\FUDforum2Go testing\htdocs\include\theme\default\db.inc:101<br /> G:\FUDforum2Go testing\htdocs\include\theme\default\db.inc:108<br /> G:\FUDforum2Go testing\htdocs\adm\admgeoip.php:144<br /> ) 23000: columns ips, ipe are not unique<br /> Query: INSERT INTO fud30_geoip (ips, ipe, cc, country) VALUES('417800192','417808383','bs','BAHAMAS')<br /> _POST: array ( 'S' => '33d8c0899c1ea85a2eefd772f4db7b56', 'SQ' => 'ec3b60355bbcb09af8ce6f8ee9daac4b', 'format' => 'IP2C', 'btn_submit' => 'Upload IP Database', )<br /> Database version: 3.3.7undefined<br /> [Referring Page] http://127.0.0.1:4001/adm/admgeoip.php<br /> ' in G:\FUDforum2Go testing\htdocs\include\core.inc:215 Stack trace: #0 G:\FUDforum2Go testing\htdocs\include\theme\default\db.inc(101): fud_sql_error_handler('INSERT INTO fud...', 'columns ips, ip...', '23000', '3.3.7undefined') #1 G:\FUDforum2Go testing\htdocs\include\theme\default\db.inc(108): uq('INSERT INTO fud...', 1) #2 G:\FUDforum2Go testing\htdocs\adm\admgeoip.php(144): q('INSERT INTO fud...') #3 {main} thrown in G:\FUDforum2Go testing\htdocs\include\core.inc on line 215
"I'm a Witcher, I solve human problems; not always using a sword!"
|
|
|
|
Re: Geo-Location Issue [message #164209 is a reply to message #164208] |
Sun, 09 January 2011 16:44 |
The Witcher
Messages: 675 Registered: May 2009 Location: USA
Karma: 3
|
Senior Member |
|
|
Ernesto wrote on Sun, 09 January 2011 10:21Did you unpack the geo-ip file first?
Yes, downloaded and expanded a new version just this week.
"I'm a Witcher, I solve human problems; not always using a sword!"
|
|
|
|