NetBuilders

You are welcome to look around. You will have to register before you can post a message, create a blog, chat live with our members, or add a site to our directory.




Reply Unblock Facebook
Old 14 December, 2008, 09:17 AM   #1 (permalink)
Gozer
 
Will.Spencer's Avatar
 
Location: Singapore
iTrader: (45)
Blog Entries: 1
Thanked 1,622 Times in 890 Posts
Posts: 4,958
$NetBucks: 8,563
Join Date: Dec 2008
Last Online: Today 00:10 AM
Default 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.
  Reply With Quote
Old 15 February, 2010, 15:44 PM   #2 (permalink)
Unknown Net Builder
 
iTrader: (0)
Thanked 0 Times in 0 Posts
Posts: 2
$NetBucks: 54
Join Date: Oct 2009
Last Online: 16 February, 2010 21:52 PM
Default

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?
  Reply With Quote
Reply

Bookmarks

Tags
posting, report, trouble


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
The Trouble with Twitter Will.Spencer Social Networks 13 10 October, 2009 15:48 PM
Trouble setting up phpLD hendricius Directories 7 21 August, 2009 14:32 PM
[Free] Free Report: IR Firm Report DotComBum Marketplace 0 22 June, 2009 15:11 PM
[Free] Report: The 40K Flipping Report DotComBum Marketplace 1 19 June, 2009 11:39 AM
Trouble with my blog Lalucochin Promoting 2 11 May, 2009 19:23 PM


All times are GMT. The time now is 03:49 AM.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.1
vBAdvertise v1.0.0 Copyright ©2009, PixelFX Studios
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios