-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload Problem of file #21
Comments
Common problems on upload is incorrect file path and read permission on file. Can you check this? |
I have already check weather the file exists or not(this return's true).I can open that pdf through simple browser, that means read permissions are enabled. |
Php permissions are not the same as user permissions. Can you try to set it to "chmod 777"? (not safe for production, just for test) |
I switched to the API and it is Working Great. |
Code is after following your step's of previous upload issue raised is :-
<?php require_once('init.php'); use Ilovepdf\UnlockTask; //with your credentils $myTask = new UnlockTask('project_public_1c8**','secret_key_f**'); try{ $file = $myTask->addFile('Bt21to27july2019.pdf'); } catch (\Exception $e) { var_dump($e); } ?>
This Returns up as below mentioned :-
Call Stack #TimeMemoryFunc'... (length=1761)``C:\xampp\htdocs\pdftest\index.php:43:
object(Ilovepdf\Exceptions\UploadException)[4]
private 'params' (Ilovepdf\Exceptions\ExtendedException) => null
private 'type' (Ilovepdf\Exceptions\ExtendedException) => null
protected 'message' => string 'Upload error' (length=12)
private 'string' (Exception) => string '' (length=0)
protected 'code' => int 0
protected 'file' => string 'C:\xampp\htdocs\pdftest\src\Ilovepdf.php' (length=40)
protected 'line' => int 191
private 'trace' (Exception) =>
array (size=3)
0 =>
array (size=6)
'file' => string 'C:\xampp\htdocs\pdftest\src\Task.php' (length=36)
'line' => int 191
'function' => string 'sendRequest' (length=11)
'class' => string 'Ilovepdf\Ilovepdf' (length=17)
'type' => string '->' (length=2)
'args' =>
array (size=3)
...
1 =>
array (size=6)
'file' => string 'C:\xampp\htdocs\pdftest\src\Task.php' (length=36)
'line' => int 156
'function' => string 'uploadFile' (length=10)
'class' => string 'Ilovepdf\Task' (length=13)
'type' => string '->' (length=2)
'args' =>
array (size=2)
...
2 =>
array (size=6)
'file' => string 'C:\xampp\htdocs\pdftest\index.php' (length=33)
'line' => int 41
'function' => string 'addFile' (length=7)
'class' => string 'Ilovepdf\Task' (length=13)
'type' => string '->' (length=2)
'args' =>
array (size=1)
...
private 'previous' (Exception) => null
public 'xdebug_message' => string '( ! ) Ilovepdf\Exceptions\UploadException: Upload error in C:\xampp\htdocs\pdftest\src\Ilovepdf.php on line 191
The text was updated successfully, but these errors were encountered: