0

I am integrating PHPBB with my Laravel installation and I am having errors because variables are conflicting.

Eg: This page: http://clashdata.tk/search/livesearch?clanname=clans&location=&trophies=0&minmembers=1&maxmembers=50&clanlevel=0

PHPBB is using the Laravel $request var instead of the phpBB one.

The line of code is:

$script_name = $request->escape($symfony_request->getScriptName(), true);

What can I do to fix this? Is there a way I can make Laravel have nothing to do with the /forum directory and totally ignore it with everything?

  • Where have you put the `forum/` directory? Is it within `public/` (i.e. `public/forum/`)? – samlev Nov 24 '15 at 22:29
  • @samlev no. Just /forum. My laravel installation is also in root. I removed the public directory. –  Nov 24 '15 at 22:35

1 Answers1

0

phpBB uses composer, same as laravel.

If you use the same root folder for both installations, composer will try to autoload classes from both installations, hence the errors.

Please install phpBB and laravel in their own separate root folders.

Example:

/html/phpBB/

/html/laravel/

Mysteryos
  • 5,581
  • 2
  • 32
  • 52
  • Please give the full path of both phpBB & laravel installations. – Mysteryos Nov 25 '15 at 06:29
  • Laravel is /home/clashdata/public_html. Phpbb is /home/clashdata/public_html/forum –  Nov 25 '15 at 06:32
  • Laravel should be: /home/clashdata/public_html/laravel. and phpBB remains the same. If you are on a shared hosting plan, may i suggest you consider renting a server on [Amazon Web Services](https://aws.amazon.com/ec2/) or [Google Cloud](https://cloud.google.com/compute/). It will give you more flexibility. – Mysteryos Nov 25 '15 at 06:51
  • I am on a VPS already. Can you update your post with the commands and steps I need to do to move laravel to /laravel? Thanks. –  Nov 25 '15 at 07:07
  • I have laravel now in `/home/clashdata/public_html/public` and forum in `/home/clashdata/public_html/forum` but it still isn't working. I used this `.htaccess` trick: http://tutsnare.com/remove-public-from-url-laravel/ so that is is still accessible without having to put /public/ in the URL. Still same error though: http://clashdata.tk/search/livesearch?clanname=lol&location=&trophies=0&minmembers=1&maxmembers=50&clanlevel=0 –  Nov 25 '15 at 18:45
  • Go to each of the folder above, and then in command line, type `composer dump-autoload`. If you followed the tutorial above, it means you didn't modify your apache's vhost config to have it point directly to /home/clashdata/public_html/public/public. – Mysteryos Nov 26 '15 at 04:27
  • Do I need to use the apache stuff? Will /forum still be accessible then? `composer dump-autoload` didn't work. –  Nov 26 '15 at 06:47
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/96212/discussion-between-mysteryos-and-shivam-paw). – Mysteryos Nov 26 '15 at 07:24