Results 1 to 4 of 4

Thread: Posting a Trouble Report

  1. #1
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,327 Times in 1,258 Posts

    Posting a Trouble Report

    In order to best resolve issues with the translation script, it helps if you post as much relevant information as possible in your trouble report.

    This data usually includes:

    • The URL of the site you are translating
    • The URL to a copy of version.php running on your site (See the Troubleshooting Tips for a copy of this on-line program.)
    • Does the issue affect Google Translate, Yahoo Babelfish, or both?
    • What hosting company is your web site hosted at?
    • Which version of the Translation Script are you running? (Look at the top of translate/translate.php)
    • What version of Apache are you running? (1.3 or 2.x)
    • Does your Apache configuration have mod_rewrite enabled?
    • If you are calling the script from html files, is your Apache configured to support PHP code embedded in html files?
    • Does your host support cURL?
    • Is PHP safe_mode disabled on your host?
    • What HTML/JavaScript/PHP/etc... code are you using to call the script?
    • What error messages are you seeing in your Apache server logs?
    • What error messages are you seeing when you try to translate a page?

    The more information you give us, the more quickly we can help you to resolve your issue.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  2. #2
    sevy is offline Unknown Net Builder
    Join Date
    Oct 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hope that someone can help me out:

    I'm testing out the script to see if it works, besides the fact that I had to make a workaround with mod_rewrite since I use nginx as webserver, I'm still esperiencing a strange problem even calling the translation script directly from /translate/index.php?engine=g&language=it&page=...

    Before you go on please note: my website is adult-oreinted, so audience has been warned.

    Let's answer to main questions, than desctive the problem by errorlog.log

    The URL of the site you are translating
    Latest Porn Videos Added Today - GoshTube.com is Bigger than YouPorn!

    The URL to a copy of version.php running on your site (See the Troubleshooting Tips for a copy of this on-line program.)
    No need for it isnce I own the whole box and I have root access, so I know that all needed stuff is in place (safe_mode=off, cURL, etc...)

    Does the issue affect Google Translate, Yahoo Babelfish, or both?
    Actually I'm interested in translating with google only, however I didn't check it with babelfish yet.

    What hosting company is your web site hosted at?
    HiVelocity Ventures, part of SagoNet, one of the best datacenters of USA

    Which version of the Translation Script are you running? (Look at the top of translate/translate.php)
    Didn't find any info about the version at the top of translate.php but I guess it's the latest since I downloaded the file lang-2009-09-23.zip

    What version of Apache are you running? (1.3 or 2.x)
    NginX here with FPM-CGI but this has nothing to do with the script since I can easily instruct it to rewrite whatever I want. I think the problem is in the script's PHP itself.

    Does your Apache configuration have mod_rewrite enabled?
    Again NginX has a different rewrite module, but no point for this question since I'm calling the file directly from the /translate path.

    If you are calling the script from html files, is your Apache configured to support PHP code embedded in html files?
    No .html on my website, just pure PHP.

    Does your host support cURL?
    Latest stable version

    Is PHP safe_mode disabled on your host?
    Again yes.

    What HTML/JavaScript/PHP/etc... code are you using to call the script?
    Direct link at the moment, that I'll configure it with mod_rewrite for nginx

    What error messages are you seeing in your Apache server logs?
    No error logs in NginX logs.

    What error messages are you seeing when you try to translate a page?
    Here follows the complete error log for a single page call:

    Mon, 15 Feb 2010 11:23:49 -0500: Enter index.php: log_level=6
    Mon, 15 Feb 2010 11:23:49 -0500: site_url=http://www.goshtube.com
    Mon, 15 Feb 2010 11:23:49 -0500: hostname: www.goshtube.com host:www
    Mon, 15 Feb 2010 11:23:49 -0500: RemoveUrlParams()
    Mon, 15 Feb 2010 11:23:49 -0500: base=
    Mon, 15 Feb 2010 11:23:49 -0500: params=
    Mon, 15 Feb 2010 11:23:49 -0500: new_params=
    Mon, 15 Feb 2010 11:23:49 -0500: new_url=
    Mon, 15 Feb 2010 11:23:49 -0500: page_id:it__ engine:g lang:it
    Mon, 15 Feb 2010 11:23:49 -0500: url_mtime: 0 cache_mtime: 0
    Mon, 15 Feb 2010 11:23:49 -0500: Updating cache for: g/it__
    Mon, 15 Feb 2010 11:23:49 -0500: Translator url: Google Translate
    Mon, 15 Feb 2010 11:23:49 -0500: after curl_init
    Mon, 15 Feb 2010 11:23:50 -0500: after curl_exec
    Mon, 15 Feb 2010 11:23:50 -0500: REDIRECT message: translate_p_Frame, resource: Google Translate
    Mon, 15 Feb 2010 11:23:50 -0500: Translator url: Google Translate
    Mon, 15 Feb 2010 11:23:50 -0500: after curl_init
    Mon, 15 Feb 2010 11:23:50 -0500: after curl_exec
    Mon, 15 Feb 2010 11:23:50 -0500: REDIRECT message: MetaRefresh, resource: Google Translate
    Mon, 15 Feb 2010 11:23:50 -0500: Translator url: Google Translate
    Mon, 15 Feb 2010 11:23:50 -0500: after curl_init
    Mon, 15 Feb 2010 11:23:52 -0500: after curl_exec
    Mon, 15 Feb 2010 11:23:52 -0500: Content Check OK
    Mon, 15 Feb 2010 11:23:52 -0500: No content after GoogleRemoveScripts
    Mon, 15 Feb 2010 11:23:52 -0500: preg_last_error: 0(PREG_NO_ERROR)
    Mon, 15 Feb 2010 11:23:52 -0500: No content after GoogleRemoveSpanWrappers
    Mon, 15 Feb 2010 11:23:52 -0500: preg_last_error: 0(PREG_NO_ERROR)
    Mon, 15 Feb 2010 11:23:52 -0500: No content at beginning of DefaultFixup
    Mon, 15 Feb 2010 11:23:52 -0500: No content returned after fixup from 'http://translate.googleusercontent.com/translate_c?hl=en&sl=en&tl=it&u=http://www.goshtube.com/&prev=hp&rurl=translate.google.com&usg=ALkJrhjAfGG nvs4nE28iz7VbR9kFGazlpQ' for 'it__'

    The real problem seems to be the preg_match function which finds an empty string while trying to modify the page to be outputted.

    Just a couple quick notes:
    - The page is obviously not outputted to /g since the string which generates it is empty.
    - No chmod problems since the whole website is owned by the webserver user so the script can freely write wherever it wants (infact the script logs are saved).
    - I'ts the 1st time I try to use this script and the 1st time my IP fetches content from google, so no chance to be banned. I tried to wget and curl some translated pages with my own custom script and and they both fetched the page with no problems.

    So any clue on how to fix this?

  3. #3
    molekyla is offline Unknown Net Builder
    Join Date
    Jul 2010
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code: -3 (No content returned after fixup from 'http://translate.google.com/translate?hl=ru&sl=ru&tl=en&u=http://www.shram.kiev.ua/&prev=hp' for 'en_')
    Site Создан чтобы находить - Огромная база знаний о всевозможных способах улучшить жизнь - www.shram.kiev.ua
    Hosting: freehost.com.ua
    Version: Version: 9.9.X (to my mind)
    mod_rewrite enabled
    support PHP code embedded in html files
    host support cURL
    PHP safe_mode disabled




    This is continue from questions from 2012 topic Getting error Code -3

  4. #4
    molekyla is offline Unknown Net Builder
    Join Date
    Jul 2010
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I found the problem and know the fix for rhis problem!!!
    Google change code in translated frame.

    Was: <frame
    Now: <iframe

    I can be fix in file: tr_google.php

    Was:
    //Check for redirects if (preg_match('|<frame src="(/translate_p\?[^"]+)|', $content, $matches)) {
    $rval['result']='REDIRECT';
    $match = $matches[1];
    $match = preg_replace('|&amp;|','&',$match);
    $match = 'http://translate.google.com' . $match;
    $rval['redirect']=$match;
    $rval['message']='translate_p_Frame';
    return $rval;
    }
    Must be:
    //Check for redirects if (preg_match('|<iframe src="(/translate_p\?[^"]+)|', $content, $matches)) {
    $rval['result']='REDIRECT';
    $match = $matches[1];
    $match = preg_replace('|&amp;|','&',$match);
    $match = 'http://translate.google.com' . $match;
    $rval['redirect']=$match;
    $rval['message']='translate_p_Frame';
    return $rval;
    }
    Whom this tweak helps, give me the bottle of beer to Ukraine, Kiev (after EURO 2012 no beer in Ukraine its just a joke))

Similar Threads

  1. Trouble @Twitter
    By Franc Tireur in forum Social Networks
    Replies: 0
    Last Post: 14 April, 2011, 17:01 PM
  2. Someone's in trouble!!!!!!!!
    By farooqaaa in forum Forum Life
    Replies: 18
    Last Post: 8 October, 2009, 19:30 PM
  3. The Trouble with Twitter
    By Will.Spencer in forum Social Networks
    Replies: 12
    Last Post: 4 October, 2009, 23:53 PM
  4. Free Report: IR Firm Report
    By DotComBum in forum eBooks
    Replies: 0
    Last Post: 22 June, 2009, 15:11 PM
  5. Report: The 40K Flipping Report
    By DotComBum in forum eBooks
    Replies: 1
    Last Post: 19 June, 2009, 11:39 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •