Question

I'm using Laravel 4.1. I put phpgrid into the vendors directory. Here are my paths using example domains:

Actual file path to website root: /home/.../htdocs/dashboard/public

Actual file path to phpgrid: /home/.../htdocs/dashboard/vendor/phpgrid

The (example) url to the site is: http://www.site1.com/dashboard/

The SERVER_ROOT is set to: http://www.site1.com/dashboard/vendor/phpgrid

phpgrid works when I use that domain. The problem is that I want to use a shorter domain with masking. So the url I want to use is something like: http://dashboard.myotherdomain.com/, and the virtual host has it pointing to the actual file path to the website root directory above. phpgrid builds the table, but then the AJAX fires and can't get to the vendor directory because it is now below the site root of the masked domain. I thought it would use the absolute path, but it doesn't seem to. Any ideas?

Was it helpful?

Solution

It turns out that the issue was with the AJAX calls. AJAX will not let you call a different domain for security reasons, so setting the SERVER_ROOT to a different domain than my masked domain was failing (silently btw, blank error message in phpgrid). So I was forced to move the phpgrid files and folders into the webroot and change the SERVER_ROOT to a relative path.

A simple fix although I would have preferred to keep the files in the vendor directory.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top