so i've beein struggling with an old laravel project from 2018 that i can't seen to run. The probem is that the project i splittedinto two folders not a classic laravel one, there's an other one named "httpdocs" and the index.php is there, so i managed to install everything and running the migrations, but noti can't run the website ? idk why it said:
Warning: require(C:\xampp\htdocs\httpdocs/../daddyshop_app/vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\httpdocs\index.php on line 24
the autoload.php file exists
I think this part is wired, see / and \ on the require:
require(C:\xampp\htdocs\httpdocs/../daddyshop_app/vendor/autoload.php)
Maybe you are setting wrongly the folder structure, or in the index.php file, you are searching in the wrong path.
For example, try checking paths are correct:
Maybe /../../laravel-app or ../.. or /../laravel-app.
You get the point, make sure paths are correct.
Related
I am update composer and use barryvdh/laravel-dompdf package.
the problem is when i click the button it show me error like image below:-
Is that anyway to change the folder path? or am I missing code to modify path to download the pdf file?
You need to run this command:
php artisan vendor:publish
Then, try to create a fonts directory in the storage directory.
i.e. storage/app/fonts. Also, remember to make it writable.
For maximum execution time of 30 seconds exceeded, this is not laravel related issue but it's about php configuration issue. Please see this and fix it: http://php.net/manual/en/info.configuration.php#ini.max-execution-time
You can also see this answer: https://stackoverflow.com/a/30290770/6000629
Hope this will helps you!
Try this:
$pdf = PDF::loadView('pdf/personalpdf', compact('user','result'))->setOptions(['defaultFont' => 'sans-serif']);
It worked for me, I didn't make any file/folder
Just remove the reference to css external file in your cart.placeOrder.blade
Note: This directory must exist and be writable by the webserver process.
under the config file thats what it say: therefore you should create the fonts directory inside the storage.
"font_cache" => storage_path('fonts/'),
I am trying to install magento 1.9 on my web hosting server .
I ftp-ed the files into my hosted website but experience the following error when i try to access my URL.
Fatal error: Class 'Mage_Core_Controller_Request_Http' not found in /home/bf/public_html/app/code/core/Mage/Core/Model/App.php on line 1238
I tried a google search but i am unable to find anything relevant .
Just download the Fresh copy from Magento community again. Also make sure that your server has all the prerequisite for Magento as mentioned in below link.
http://docs.magento.com/m1/ce/user_guide/magento/system-requirements.html
Please make sure that below files exist in this directory
app/code/core/Mage/Core/Controller/Request/Http.php
1.Make sure you have enabled curl on your server and with have right file permission.
2.Make sure file should exist on following path:
/home/bf/public_html/app/code/core/Mage/Core/Controller/Request/Http.php
3.Make sure compilation mode is disabled.
/home/bf/public_html/includes/config.php
Every thing inside should be commented.
4.If it does not work, you have to debug this.
Open index.php in root and add these line of code,
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
It will show you why error is coming.Once you will find the root cause, you can get the solution on google or any forum.
I was trying to install an extension in my magento site which was failed in the middle later i could not get access to my admin neither to my site as it shows this error.
http://prntscr.com/68qc3c
this error should be removed maintenance.flag file but this file is not available in my root folder. Please assist me if there is any other way possible?
Thanks
two possible ways are
1 . you can delete manually both session and cache directory from var directory.
path
magento_root/var/
2. or you can delete all files of that extension and reinstall again.
The maintenance.flag file must still be in your root directory, otherwise Magento would not be displaying the 503 error. The way that this is displayed is a result of the index.php file, around line 66:
$maintenanceFile = 'maintenance.flag';
if (file_exists($maintenanceFile)) {
include_once dirname(__FILE__) . '/errors/503.php';
exit;
}
This page cannot even be cached. Re-connect to your FTP server and check for the file in your html directory on the webserver. Alternately, speak with your web hosts & have them remove the file.
As a precaution, you can try deleting your var/cache directory and see if that makes a difference.
I'm having some trouble with artisan/packages.. I've added a package to my composer file and ran composer update and an error was returned:
PHP Warning: require(/home/xxx/public_html/bootstrap/autoload.php): failed to open stream: No such file or directory in /home/xxx/public_html/artisan on line 16
I can see that require path is incorrect, my structure is like so:
/home/xxx/bootstrap
/home/xxx/app
/home/xxx/vendor
/home/xxx/public_html
I hadn't changed any of the paths and everything seemed to work out of the box with this structure, basically removing the public folder and pushing everything up a directory.
I've opened up Artisan tried a couple of paths that kept failing so i've changed them to absolute:
require '/home/xxx/bootstrap/autoload.php';
It seemed to work from here on, but at the end of the process got another error:
Writing lock file
Generating autoload files
[RuntimeException]
Could not scan for classes inside "app/commands" which does not appear to be a file n or a folder
Rather than continue to mess it up i thought now would be a good time to clear it up, any ideas how to fix this?
Make sure you are using php 5.3 or higher.
Run php -v
Try creating an empty "app/commands" folder, fixed the issue for me!
can any one pls tell me how to delete an image file and directory in yii
I have tried unlink but its not working.(the path is correct but its not deleting) but getting the error No such file or directory
unlink(Yii::app()->request->baseUrl.'/uploads/'.$model->file_id.'/'.$fileModel->file_name.$fileModel->extension);
and I also need to delete a directory in yii framework.the path is
correct but its not deleting
rmdir(Yii::app()->request->baseUrl.'/uploads/'.$model->file_id);
This is not working either, but getting the error No such file or directory.
Try:
unlink(getcwd().'/uploads/'.$model->file_id.'/'.$fileModel->file_name.$fileModel->extension);
getcwd() gets the current working directory. The docs for it are here
Instead of
Yii::app()->request->baseUrl
Try
Yii::app()->basePath
I have never used Yii's earlier versions.
For Yii2: unlink(Yii::$app->basePath.'/directory_path/'.$filename);
we can use this as well
unlink($file->getFullPath());