In Dropbox api, this error occurs:
Warning: file_put_contents(dropbox/tokens/766tYP3FZu8IEv4d.token) [function.file-put-contents]: failed to open stream: No such file or directory in C:\xampp\htdocs\dropbox\dropboxupload.php on line 28
Authentication requiredhttps://www.dropbox.com/1/oauth/authorize?oauth_token=766tYP3FZu8IEv4d&oauth_callback=http%3A%2F%2Flocalhost%2Fdropbox%2Fdropboxupload.php%3Fauth_callback%3D1
How can this error be solved?
Errors are returned using standard HTTP error code syntax. Any additional info is included in the body of the return call, JSON-formatted. Error codes not listed here are in the REST API
Create folder at root name "tokens" and try again
warning is due to not having "tokens" folder in your dropbox directory at root level.
create one.
second Oauth doesnot work on a Local Machine .
try to Upload it on a server and try again .
Related
I want to use Google Sign-In for Android and verify the Token in my PHP Server. I see https://developers.google.com/identity/sign-in/android/backend-auth?authuser=0 to do this.
My first step was to get google-api-php-client. I put the folder google-api-php-client in my Server root folder.
I create VerifyToken.PHP in the root folder with this code:
$id_token = $_POST['idToken'];
$payload = $client->verifyIdToken($id_token);
Then when i call the PHP i get an ERROR in /google-api-php-client/src/Google/Client.PHP:
Fatal error: Uncaught Error: Class 'Google_AccessToken_Verify' not found in /root/google-api-php-client/src/Google/Client.php:705
I think maybe Client.php cant read "root /google-api-php-client /src /Google /AccesToken/Verify.php" then i modify Client.php with:
$dir=dirname(file);
require_once($dir.'/AccessToken/Verify.php');
But then i get the ERROR:
require_once(/root/google-api-php-client/src/Google/AccessToken/Verify.php): failed to open stream.
Why the Google file Client.php can't find Class 'Google_AccessToken_Verify'?
Why if i write the require_once, i can't open AccessToken/Verify.php?
Thanks.
I have a PHP project with the following structure:
Project structure
I'm getting this an error that says:
Warning: require(../app/view/home.php): failed to open stream: No such file or directory in /opt/app-root/src/index.php on line 22
Fatal error: require(): Failed opening required '../app/view/home.php' (include_path='.:/opt/app-root/src:/opt/rh/rh-php70/root/usr/share/pear') in /opt/app-root/src/index.php on line 22
Can anyone help me to resolve this issue?
Update:
Project structure on Openshift
Thanks in advance.
I see in you image of your folder structure you have folders for public and app containing the code, but the errors from your deployment look like the code is no longer in public public but in src.. are you sure the relative links are still correctly configured?
Has index.php maybe moved to the root and the link to ../abc/xyz.php should be updated to abc/xyz.php?
This is my first post here. I followed instructions and explored all the internet on this topic, still didn't figure out the solution. Added interpreter as you can see on this screenshot:
I created PHP Web Application as visible here:
And after that I when I try to run it in any browser I get this message (Don't have reputation 10 so couldn't post it as 3rd picture):
"Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.20"
Please help me, I don't know what to do anymore. Thanks in advance!
EDIT 1:
So I figured out that my php file and all the other files (css, js, html, img) have to be in xamp/htdocs folder so I can run it manually by writing "localhost/filename.php" in address bar. It works only if my php file is exactly in htdocs folder. Otherwise when I try to run my file from folder where the rest of my project is and in address I add "localhost/projectfolder/homepage.php" I got message saying: "
Warning: Unknown: failed to open stream: No such file or directory in
Unknown on line 0
Fatal error: Unknown: Failed opening required 'D:/xampp/htdocs/Damir
Jelusić/homepage.php' (include_path='D:\xampp\php\PEAR') in Unknown on
line 0"
I couldn't find a solution to this. Also I would like to be able to run my php page just by clickin little chrome icon in phpstorm. Tell me if it is possible. Cheers!
In controller i used.
$this->load->library("PHPExcel");
Its working on local machine but in main server have error...
Error : NetworkError: 500 Internal Server Error
Fatal error: Class 'PHPExcel_Shared_String' not found in Autoloader.php on line 36
What will be the issue?
Thank You in Adv.
check the permission of the PHPExcel.php file in library. this file have permission to access or not. because this file not have access permission then the occur this type of error.
you have PHP module xmlwriter enabled on server to run PHPExcel,,, check the requirements for PHPExcel.
In cloudinary php i have the required files and set my config too but when i try to upload a picture from php file
\Cloudinary\Uploader::upload("1.png");
i get error
( ! ) Fatal error: Uncaught exception 'Exception' with message 'Error in sending request to server - couldn't open file in C:\wamp\www\demo\src\Uploader.php on line 200
Exception: Error in sending request to server - couldn't open file "1.png" in C:\wamp\www\demo\src\Uploader.php on line 200
Call Stack
The uploader cannot find the file you are trying to upload. Try to put the 1.png file in the same directory as the php file and run:
\Cloudinary\Uploader::upload(realpath(dirname(__FILE__).'/1.png'));
Sounds like 1.png is hardcoded somewhere and your parameter is not taken into account. Try to do a project wide search for 1.png and see if you can replace that with a parameter.
I might as well provide an answer here because I had the same exact problem, contacted Cloudinary's support team, and their solution worked.
First, I have an images folder and keep all of them there.
\Cloudinary\Uploader::upload('images/image1.jpg');
That caused the same error you got. I then changed it to:
\Cloudinary\Uploader::upload("C:\\xampp\\htdocs\\test\\images\\image1.jpg");
That worked perfectly. However, I didn't want to use absolute paths, so that's why I contacted their support team. This is the code that works:
\Cloudinary\Uploader::upload( $_SERVER['DOCUMENT_ROOT'] . "/test/images/image1.jpg");
The test value in that string is the directory of my site, inside the htdocs folder.