MRatWork Forum by Mustafa Ramadhan
Language Specific Discussions => Indonesia Users => Topic started by: ar1246 on 2017-05-18, 08:34:31
-
solusi di post 3
Salam
Pak MR ato suhu suhu d sini, apakah ada yang bisa konfig Laravel?
Saya udah simpan file file public laravel di root domain
file&folder laravel selain public saya simpan dengan pada folder project di doc root client, se level dengan kloxoscript, .pki dll
index.php udah saya edit dengan perubahan:
require __DIR__.’/../bootstrap/autoload.php’; (baris 22)
jadi
require __DIR__.’/../project/bootstrap/autoload.php’;
$app = require_once __DIR__.’/../bootstrap/app.php’; (baris 36)
jadi
$app = require_once __DIR__.’/../project/bootstrap/app.php’;
saya juga telah menambahkan:
// set the public path to this directory
$app->bind('path.public', function() {
return __DIR__;
});
HOME
----namaclient
-------------.pki
-------------__processed_stats
-------------kloxoscript
-------------zzzxxx.sch.id
-------------project
-------------.bash_logout
-------------.bash_profile
-------------.bashrc
-------------.qmail
-------------public_html -> /home/namaclient/zzzxxx.sch.id
DB udah sesuai,
tapi pas akses webnya ada eror:
Parse error: syntax error, unexpected '.' in /home/yepeka/zzzxxx.sch.id/index.php on line 22
berarti kan karena titik yg gk di harapkan yang ada di baris autoload,
tapi titik mana n gmana benerinnya yah?
terima kasih
-
Tampilkan saja isi /home/yepeka/zzzxxx.sch.id/index.php
-
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.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 great to relax.
|
*/
require __DIR__.’/../project/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__.’/../project/bootstrap/app.php’;
// set the public path to this directory
$app->bind('path.public', function() {
return __DIR__;
});
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated 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::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
-
Solved pak
ternyata ada kesalahan tanda kutip di index.php dan juga versi php nya.
versi phpnya minimal 5.6
index.php
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.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 great to relax.
|
*/
require __DIR__.'/../project/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__.'/../project/bootstrap/app.php';
// set the public path to this directory
$app->bind('path.public', function() {
return __DIR__;
});
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated 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::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
-
sebenarnya kloxo-mr paling mudah untuk konfigurasi laravel.
saat menginput domain, masukkan saja folder repositori/public
contohnya folder repo adalah: "aplikasisaya", maka buatlah "domain.com" dan input "aplikasisaya/public" sebagai document root.
done, tidak perlu diseting apa2 lagi, karena "domain.com" langsung diarahkan ke "aplikasisaya/public"
mudah di-pull jika ada update nantinya
-
wah bener, Kloxo MR emang greget
sekalian nanya
1. ssh nya pake root apa client bro?
2. saya coba install pake langkah ini:
cd /tmp
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
trus installnya pke:
/usr/local/bin/composer php -cli composer
instalasi sukses
tapi pas nyoba
composer -v
ada eror
Notice: Undefined variable: exitCode in phar:///usr/local/bin/composer/src/Composer/XdebugHandler.php on line 101
Call Stack:
0.0002 124016 1. {main}() /usr/local/bin/composer:0
0.0135 274388 2. require('phar:///usr/local/bin/composer/bin/composer') /usr/local/bin/composer:24
0.0202 615520 3. Composer\XdebugHandler->check() phar:///usr/local/bin/composer/bin/composer:19
0.0224 625060 4. Composer\XdebugHandler->restart() phar:///usr/local/bin/composer/src/Composer/XdebugHandler.php:68
Warning: passthru() has been disabled for security reasons in phar:///usr/local/bin/composer/src/Composer/XdebugHandler.php on line 101
Call Stack:
0.0002 124016 1. {main}() /usr/local/bin/composer:0
0.0135 274388 2. require('phar:///usr/local/bin/composer/bin/composer') /usr/local/bin/composer:24
0.0202 615520 3. Composer\XdebugHandler->check() phar:///usr/local/bin/composer/bin/composer:19
0.0224 625060 4. Composer\XdebugHandler->restart() phar:///usr/local/bin/composer/src/Composer/XdebugHandler.php:68
0.0254 625300 5. passthru() phar:///usr/local/bin/composer/src/Composer/XdebugHandler.php:101
Notice: Undefined variable: exitCode in phar:///usr/local/bin/composer/src/Composer/XdebugHandler.php on line 107
Call Stack:
0.0002 124016 1. {main}() /usr/local/bin/composer:0
0.0135 274388 2. require('phar:///usr/local/bin/composer/bin/composer') /usr/local/bin/composer:24
0.0202 615520 3. Composer\XdebugHandler->check() phar:///usr/local/bin/composer/bin/composer:19
0.0224 625060 4. Composer\XdebugHandler->restart() phar:///usr/local/bin/composer/src/Composer/XdebugHandler.php:68
terima kasih sebelunya