I'm a trying to install Laravel
My problem is:
/localhost/laravel displays its content like the folders under it.
but I am expecting something like the logo of laravel and the text "You have arrived."
I believe that the error is something in my paths.php:
return array(
/*
|--------------------------------------------------------------------------
| Application Path
|--------------------------------------------------------------------------
|
| Here we just defined the path to the application directory. Most likely
| you will never need to change this value as the default setup should
| work perfectly fine for the vast majority of all our applications.
|
*/
'app' => __DIR__.'/../app',
/*
|--------------------------------------------------------------------------
| Public Path
|--------------------------------------------------------------------------
|
| The public path contains the assets for your web application, such as
| your JavaScript and CSS files, and also contains the primary entry
| point for web requests into these applications from the outside.
|
*/
'public' => __DIR__.'/../public',
/*
|--------------------------------------------------------------------------
| Base Path
|--------------------------------------------------------------------------
|
| The base path is the root of the Laravel installation. Most likely you
| will not need to change this value. But, if for some wild reason it
| is necessary you will do so here, just proceed with some caution.
|
*/
'base' => __DIR__.'/..',
/*
|--------------------------------------------------------------------------
| Storage Path
|--------------------------------------------------------------------------
|
| The storage path is used by Laravel to store cached Blade views, logs
| and other pieces of information. You may modify the path here when
| you want to change the location of this directory for your apps.
|
*/
'storage' => __DIR__.'/../app/storage',
);
and index.php
require __DIR__.'/../bootstrap/autoload.php';
$app = require_once __DIR__.'/../bootstrap/start.php';
$app->run();
It's not your path. You should create a virtual host and point the virtual host's root to laravel/public.
Related
i want to create download excel function using laravel-excel.maatwebsitelibrary. my code like below :
return Excel::download(new PembukuanExport, 'pembukuan.xlsx');
but when i ran it, it gave me error like this
Could not open /var/folders/n_/xh_10hm50dvbwg23cfq_kw3h0000gn/T/laravel-excel-DMBN3reNUrSiamYT for writing.
my laptop is macbook, been googling but cant find the right answer
It might be too late to answer this, but I guess you need to configure your excel.php config files.
Publish excel config files:
php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider"
Now in config/excel.php files you need to do configuration:
'temporary_files' => [
/*
|--------------------------------------------------------------------------
| Local Temporary Path
|--------------------------------------------------------------------------
|
| When exporting and importing files, we use a temporary file, before
| storing reading or downloading. Here you can customize that path.
|
*/
'local_path' => storage_path(),
/*
|--------------------------------------------------------------------------
| Remote Temporary Disk
|--------------------------------------------------------------------------
|
| When dealing with a multi server setup with queues in which you
| cannot rely on having a shared local temporary path, you might
| want to store the temporary file on a shared disk. During the
| queue executing, we'll retrieve the temporary file from that
| location instead. When left to null, it will always use
| the local path. This setting only has effect when using
| in conjunction with queued imports and exports.
|
*/
'remote_disk' => null,
],
This will set the temporary folder to your storage path which has permission to execute things. Hope this find helpful to others.
i solved this by changing User & Group in `httpd.conf.
Open httpd.config.
Search keyword "User or Group" and change it.
User your_mac_user and fill in Group staff
I believe it is much the same as a Laravel 4 upload.
I have my setup as follows, is this correct?
Is the only file I need to amend the index.php file which in my case is in the techjobs folder? I have amended this file to suit the directory structure. Are there any other files that need to change?
index.php
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* #package Laravel
* #author Taylor Otwell <taylorotwell#gmail.com>
*/
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels nice to relax.
|
*/
require __DIR__.'/../../techjobs-laravel-base/bootstrap/autoload.php';
/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/
$app = require_once __DIR__.'/../../techjobs-laravel-base/bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can simply call the run method,
| which will execute the request and send the response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/
$kernel = $app->make('Illuminate\Contracts\Http\Kernel');
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
Right now you have too many steps back in your folders with ../ . Please try using below instead
require __DIR__.'/../techjobs-laravel-base/bootstrap/autoload.php';
and
$app = require_once __DIR__.'/../techjobs-laravel-base/bootstrap/app.php';
Capistrano is in charge of deploying my magento in all environments. The structure we work with is as follows:
Website
| current
| | media ---ln---> /var/www/website/aplication/shared/media
| | | import
| | | | p
| | | | | a
| | | | | | patata.jpg
When I try to import a CSV with a list of products with the image gallery, the images aren't imported. I have noticed that it's not possible to upload images from the backend either when "media" is a symbolic link.
What can I do to make it work with symbolic links? Has anyone had this problem before?
You should try the MAgmi Image attributes processor.
It allows images to be uploaded even from a third party URL.
i have a magento site main domain.
i did the following steps :
1.Downloaded the full magento site from main domain(mydomain.com)
2.Created a sub domain as new.mydomain.com(in plesk)
3.Uploaded the full magento site in to sub domain.
4.Created new database and imported the database.
5.Changed the secure url and unsecure url as 'http://www.new.mydomain.com/' in core_config_table.
6.Changed the local.xml file with new database details.
The above steps i did.
Then i take the sub domain as new.mydomain.com in browser, but it goes to main domain(mydomain.com).
What is the reason for that?
I contacted the client, the client give me the information that, there is no server problem. It is in your code.
So what is the problem here?
Is there is any redirection to main domain from sub domain?
Or is there is any file taken from main domain instead of sub domain?
How can i solve this?
Are there any additional steps here i need to do?
I already checked the index.php page:
Here, i give an echo statement before Mage::run($mageRunCode, $mageRunType);
that is :
echo "test";
die();
Mage::run($mageRunCode, $mageRunType
Then the test will be displayed.
So when running mage it redirects to main domain.
fwiw: magento stores the "domain" information in at least two records in the core_config_data table:
mysql> select * from core_config_data where value like '%mydomain.com/';
+-----------+---------+----------+-----------------------+----------------------+
| config_id | scope | scope_id | path | value |
+-----------+---------+----------+-----------------------+----------------------+
| 4 | default | 0 | web/unsecure/base_url | http://mydomain.com/ |
| 5 | default | 0 | web/secure/base_url | http://mydomain.com/ |
| 1488 | stores | 2 | web/unsecure/base_url | http://mydomain.com/ |
| 1489 | stores | 2 | web/secure/base_url | http://mydomain.com/ |
+-----------+---------+----------+-----------------------+----------------------+
Before making the backup of the database, or even after backing it up, but before attempting to make the new site live, run an update statement:
update core_config_data set value = 'http://mynewdomain.com' where value = 'http://mydomain.com'
And then the site should come up fine.
Another method is to change the secure and the unsecure urls in the System->Configuration->web section and then saving the database.
SS
Have you clean cache ? ( removing /var/cache dir ) ?
You can try by phpmyadmin searching for mydomain.com in all the database and change it.
I have a strange problem:
I am using MAMP and Codeigniter and I see that view is not showing anything on the browser. Model works and the DB is wired up.
Here is the code that does not work on the local host:
$this->load->view('test/db_tester_view',$data);
Sadly there is no error messages!!? but here is the config:
$config['base_url'] = 'http://localhost:8888';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
I spend 20 hours on this so your help is appreciated
Some tips:
Make sure error reporting is on, as usual (this should be in your bootstrap file, index.php):
error_reporting(E_ALL);
ini_set('display_errors', 1);
Make sure you did not disable these directives somewhere else in your script.
Windows and *NIX deal with uppercase/lowercase file names differently. Make sure your files are all normalized to lowercase to avoid problems with different operating systems.
The base url needs a trailing slash:
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
| http://example.com/
|
| If this is not set then CodeIgniter will guess the protocol, domain and
| path to your installation.
|
*/
$config['base_url'] = 'http://localhost:8888/';
// OR...
$config['base_url'] = ''; // automagic
If you don't require the port to be set explicitly, you can remove it.