You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running into a problem with my site (no worries - it's still in development) but, the problem I ran into started happening when I created an add-on domain. I needed to do this with my provider so I could specify the root directory of the site to be the public directory of laravel.
Anyway, after this configuration took place I started getting this error:
I thought it might be a problem with the class not resolving correctly so I tries to update the class files with composer using composer update and during the update I received this error:
Generating autoload files
{"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","message":"syntax error, unexpected '['","file":"/home/damascu1/drccweb/vendor/codesleeve/stapler/src/Codesleeve/Stapler/StaplerServiceProvider.php","line":118}}{"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","message":"syntax error, unexpected '['","file":"/home/damascu1/drccweb/vendor/codesleeve/stapler/src/Codesleeve/Stapler/StaplerServiceProvider.php","line":118}}Script php artisan clear-compiled handling the post-update-cmd event returned with an error
OK - disregard this issue Travis. This problem is resolved when I remove the add-on domain.
I'm still lost as to how to configure this site correctly though. Here's my problem:
My hosting provider - A2hosting - will only support shared domains with the document root pointing to the public_html directory. ------ home/username/public_html ----
however my laravel document root is located at: ---- home/username/laravel/public ----
here is the tree structure:
home
/username
/laravel
/public
/public_html
I can get the site to resolve correctly by copying the files in my laravel/public directory to the public_html directory and changing the routes in the index.php file to point to the autoload.php and start.php files in the bootstrap directory (shown below).
The site renders fine now but, when I store an image with stapler it puts the files into the laravel/public directory instead of the public_html directory. Is there a way to tell stapler that the document root is now public_html?
Sorry for the long explanation Travis. I know this is not your issue, your app works really great. It's just trying to get around the configuration of a shared hosting environment.
Activity
GDLaw commentedon Jan 21, 2014
Also Travis - you can see the error by going to http://drccweb.org
tabennett commentedon Jan 21, 2014
I don't see an error when I go to that site.
GDLaw commentedon Jan 21, 2014
OK - disregard this issue Travis. This problem is resolved when I remove the add-on domain.
I'm still lost as to how to configure this site correctly though. Here's my problem:
My hosting provider - A2hosting - will only support shared domains with the document root pointing to the public_html directory. ------ home/username/public_html ----
however my laravel document root is located at: ---- home/username/laravel/public ----
here is the tree structure:
home
/username
/laravel
/public
/public_html
I can get the site to resolve correctly by copying the files in my laravel/public directory to the public_html directory and changing the routes in the index.php file to point to the autoload.php and start.php files in the bootstrap directory (shown below).
index.php file:-----------------------------------------------------------------------
require DIR.'/../laravel/bootstrap/autoload.php';
$app = require_once DIR.'/../laravel/bootstrap/start.php';
Then in the paths.php file in the bootstrap directory I change the route to the public directory to point to the public_html directory.
ppaths.php file: --------------------------------------------------------------------
'public' => DIR.'/../../public_html',
The site renders fine now but, when I store an image with stapler it puts the files into the laravel/public directory instead of the public_html directory. Is there a way to tell stapler that the document root is now public_html?
Sorry for the long explanation Travis. I know this is not your issue, your app works really great. It's just trying to get around the configuration of a shared hosting environment.
Thanks again,
Glen
GDLaw commentedon Jan 21, 2014
Well - in the filesystem.php file I modified the path variable from this:
'path' => ':laravel_root/public:url',
to this:
'path' => ':laravel_root/../public_html:url',
It seems to be working fine now. I hope this was the answer!!