i using laravel ftp and i can upload file successfully
$this->path = $this->file->storePublicly( 'chats/' . $this->year . "/" . $this->month , 'ftp');
i try this to delete file from ftp storage with this codes but none of this not working
Storage::disk('ftp')->exists('/files/chats/2021/4/VX9FzZ3votNThqEC1lVZKoo0bkY0VbcEyCEdYxFU.jpg')
$ftp = new Ftp([config array]);
$ftp->delete('files/chats/2021/4/VX9FzZ3votNThqEC1lVZKoo0bkY0VbcEyCEdYxFU.jpg');
in #1 method i see this error in cpanel Errors :
2021-04-22 14:12:08.278499 [INFO] [10381] [195.201.169.252:47646:HTTP2-1#APVH_dl.pinpaper.ir:443] Auto Index is disabled for [/home/root/public_html/], access denied.
I change file permission to 0777 and i see "access is denied" error
in #2 methos i got this error ftp_delete(): Could not delete files/chats/2021/4/VX9FzZ3votNThqEC1lVZKoo0bkY0VbcEyCEdYxFU.jpg: No such file or directory
bit i check cpanel and i see thw files with currect directory.
when i clear files from start of path it work properly. i dont know why this is happen, only its work. thank you dear john hanley
files/chats/2021/4/VX9FzZ3votNThqEC1lVZKoo0bkY0VbcEyCEdYxFU.jpg
Related
I am getting an error when I am opening the Atelier B tool. Below is the error message.
"Please check that the resource file exists and that you are using a
correct bbatch version."
Error message
Resource file: file or
directory C:\Users\ASUS i5\AtelierB_Data\AtelierB_free_4.5.1\press\bdb
does not exist or cannot be accessed
Looking for a solution.
This worked for me!!!
Click Show Details...
Then you will see an error message saying that you don't have the resource file in a particular directory.
Solution
In my case, the directory is C:\Users\ASUS i5 go inside and
Create a new folder and named it to 'AtelierB_Data'
Then inside that folder create another new folder and named it to
'AtelierB_free_4.5.1'
Go to your Atelier B installation folder and copy 'press' folder and paste it inside the 'AtelierB_free_4.5.1'
That's all (Y)
Note-
*Replace 1,2,3 according to your error message.
In laravel 5.8 app I use https://github.com/spatie/browsershot
and if I save file as
$save_to_file= 'file.pdf';
Browsershot::html(htmlspecialchars_decode($pdf_content))
->showBackground()
->save($save_to_file);
it is downloaded and saved in /public dir of my app at my local OS
If I try to set path to ‘Downloads’ directory of my Kubuntu 18 as
$save_to_file= '/home/currentuser/Downloads/file.pdf';
Browsershot::html(htmlspecialchars_decode($pdf_content))
->showBackground()
->save($save_to_file);
I got error:
Symfony \ Component \ Process \ Exception \ ProcessFailedException
The command "PATH=$PATH:/usr/local/bin NODE_PATH=`npm root -g` node '/mnt/_work_sdb8/wwwroot/lar/votes/vendor/spatie/browsershot/src/../bin/browser.js' '{"url":"file:\/\/\/tmp\/0906513001561868598\/index.html","action":"pdf","options":{"path":"\/home\/serge\/Downloads\/file.pdf","args":[],"viewport":{"width":800,"height":600},"displayHeaderFooter":false,"printBackground":true}}'" failed. Exit Code: 1(General error) Working directory: /mnt/_work_sdb8/wwwroot/lar/votes/public Output: ================ Error Output: ==============
1) If there is a way to download generated file into ‘Downloads’(OS independently) ?
2) I think that I can use php remove function but again how define ‘Downloads’(OS independently) directory ?
I received the exact same error. No idea why I got that. Followed all the steps mentioned in the docs. Tried various resources still could not figure it out.
Finally this worked
$save_to_file= '/var/www/laravel/storage/app/file.pdf';
Browsershot::url('https://www.google.com')
->noSandbox()->format('a4')->save($save_to_file);
The ->noSandbox() was the key. Let me know if this works for you.
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'C:\xampp\htdocs\Laravel\Blog\server.php' (include_path='C:\xampp\php\PEAR') in Unknown on line 0
Someone knows, why did this happen?
In your project folder, the server.php file is missing so you got this error
The solution will to create another project then copy the newly created server.php this will solve it.
Another Solution is:
Open the link: https://github.com/laravel/laravel/blob/master/server.php
Copy all code
Open Notepad and paste your copy code
save Notepad file and set name server.php
Copy the server.php file and paste it inside your Laravel project
Run your project again in browser Now you will not get an error and the Laravel project will work properly.
I'm using smarty version 3.1.13;
My project works perfectly on the local server;
When I put my site on the server (www.1and1.com) appears the following error:
Fatal error: require_once():
Failed opening required 'Smarty_Internal_TemplateCompilerBase.php'
(include_path='/homepages/39/d441258317/htdocs/mtx/application:/
homepages/39/d441258317/htdocs/mtx/application/controllers:
/homepages/39/d441258317/htdocs/mtx/application/models:
/homepages/39/d441258317/htdocs/mtx/application/../library:
/homepages/39/d441258317/htdocs/mtx/application/../library/Smarty
/sysplugins:/homepages/39/d441258317/htdocs/mtx/application/../library
/Smarty/plugins:.:/usr/lib/php6') in /homepages/39/d441258317/htdocs/
mtx/index.php on line 28
I changed the permissions of the folder compile_c but nothing, still get an error
Appreciate your help
looks like a big problem but was not. When i created my folder in local server did i put "public" folder with "P" upercase. Because i have a linux server and linux it's case sensitive it not works. Just rename the folder from "Public" to "public" and it done!
I am using joomla 1.0 for developing a website,I cant login at backend (login only at backend).it shows the error messages as follows
first it shows the following errors in administrator/index.php
first stage
Warning: session_start() [function.session-start]: open(/hsphere/local/home/mdlglobe/mdlglobe.com/sessions\sess_972fdf60f45c091916639d797a8c7458, O_RDWR) failed: No such file or directory (2) in E:\EasyPHP 3.0\www\mdlglobe\administrator\index.php on line 111
Warning: session_write_close() [function.session-write-close]: open(/hsphere/local/home/mdlglobe/mdlglobe.com/sessions\sess_972fdf60f45c091916639d797a8c7458, O_RDWR) failed: No such file or directory (2) in E:\EasyPHP 3.0\www\mdlglobe\administrator\index.php on line 150
Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/hsphere/local/home/mdlglobe/mdlglobe.com/sessions) in E:\EasyPHP 3.0\www\mdlglobe\administrator\index.php on line 150
then it redirect to index2.php,and shows
second stage
Warning: session_start() [function.session-start]: open(/hsphere/local/home/mdlglobe/mdlglobe.com/sessions\sess_a1d4a8fb0750e8d835ed4ff59cc4e707, O_RDWR) failed: No such file or directory (2) in E:\EasyPHP 3.0\www\mdlglobe\administrator\index2.php on line 37
after that it redirect to the index page itself and show
third stage
Invalid Session
login failed
I have searched lot and they says the error occurs due to session.save_path
Please anyone tell me how this session.save_path edited in easyphp and solve this problem .I am facing big issues due to this
As one answer says i have changed session.save_path="E:/easyphp/temp/" But it not effected at all..
Please help
Check session.save_path in php.ini, it should be like
session.save_path = "C:\php\temp"
and DIR path should be valid
Finaly I have Solved this issue,by done the following
I changed the session.save_path in php.ini
session.save_path = "absolute path to the temp folder"
Also I have changed the session path in .htaccess file in the sessions folder of joomla 1.0
Joomla 1.0 is using differnt method to save session variables than other joomla versions