Git Product home page Git Product logo

Comments (8)

Stichoza avatar Stichoza commented on July 22, 2024

Try to change your /tmp folder permissions to 0755 or 0777.

Can you please provide information about server and software (apache, etc.) versons?

from google-translate-php.

Tropaion avatar Tropaion commented on July 22, 2024

Here you can see some Infos http://www.yakuzasubs.at/phpinfo.php
I dont know Apache Version, but I had PHP5.3 and now I changed to PHP5.5.
I dont have access with my ftp Account to the tmp Folder, but I think the permissions are already 0777, because I can upload files in this directory.
You can try this here: http://www.yakuzasubs.at/test.php
The code of this site is:

<form action="test.php" method="post" enctype="multipart/form-data"> 
<input type="file" name="datei"><br>
<input type="submit" value="Hochladen"> 
</form>
$type = $_FILES['datei']['type'];
echo $type;
$size = $_FILES['datei']['size'];
echo $size;
$dir = $_FILES['datei']['tmp_name'];
echo $dir;
//Dateiendung herrausfinden
$typ = explode (".", $_FILES['datei']['name']);
$count = count($typ);
$count--;
echo "<br>$typ[$count]";
include ('GoogleTranslate.php');
$tr = new GoogleTranslate("en", "de");
echo $tr->translate("Hello World!");

from google-translate-php.

Stichoza avatar Stichoza commented on July 22, 2024

Translation code works fine for me both on local and remote web servers. There is a problem with open_basedir settings in your PHP configuration. Take a look at this answer on stackoverflow.

from google-translate-php.

Tropaion avatar Tropaion commented on July 22, 2024

Ok thank you, I will write a mail to my hoster.
But the funny thing ist that the translation works....with error but it works.

from google-translate-php.

Stichoza avatar Stichoza commented on July 22, 2024

I've pushed two commits 1fee0dc and try with this version of code. Changed /tmp with sys_get_temp_dir() to get directory path used for temporary files.

P.S. There's a huge difference between Errors and Warnings

from google-translate-php.

Tropaion avatar Tropaion commented on July 22, 2024

Yeah, sure. Okay, thank you for that code. I tried it, but the same error occurs.
My hoster told me to control my program code. The path to webspace is /home/.sites/117/site3029/web.

By the way sys_get_temp_dir() output is /tmp - thats funny 😃

Now I made a folder with ftp with the permissions 777 and used the path /home/.sites/117/site3029/web/tmp. Now it works.

from google-translate-php.

Stichoza avatar Stichoza commented on July 22, 2024

That's weird 😄 Okay, happy your code works. Good luck!

from google-translate-php.

Tropaion avatar Tropaion commented on July 22, 2024

Yeah! Thanks for your help, and a great Code!

from google-translate-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.