Issue with CI Bonifre Module - codeigniter

Im using the latest version of bonfire. I created new module called 'contacts' which works fine on my localhost (public/index.php/admin/content/contacts).
I uploaded everything to the server and it works perfect... except my module. It gives me a 404.
Any ideas?

I had a similar issue. On my localhost the controllers of my new module created by the module builder work fine. But when I tried the same in the production environment I got the 404 error when viewing the module in the admin panel.
To fix the issue you need to capitalise all the controller file in your new module /application/modules/. Make sure that the class names in the controllers are capitalised as well. This fixed the issue for me.
Not sure why the localhost acts differently. Hope that helps.

Related

Laravel deployment issue on Linux sharded server

I have built my Laravel application on a Windows10 machine. For the deployment on my Linux server (shared server), i have followed this youtube tutorial https://www.youtube.com/watch?v=x4VIWOj_9dA
My Application works fine on my developpement computer. The method of the tutorial works fine on window machine. But when i made the deployment on Linux with the same package i have tested on my Windows machine, for a page that does not call a controller, it works but for any page where a controller is called, i receive this error message (an example for a page that requires the kitContrller):
Illuminate\Contracts\Container\BindingResolutionException
Target class [App\Http\Controllers\kitController] does not exist.
My problem is that the target controller existes in the indicated folder without any case problem but the message says that it does not existe.
Please, help.
After some other verifications, i saw that the problem was in my router: In the router, i have written the name of the Controller with lower case (Example: kitController in stead of KitController.
k(Lower case) in stead of K(upper case): That was the problem. I have changed things and it works fine.
Thank u for suggestions.

Unable to locate the model you have specified - All i did was change servers

I have a codeigniter website, using the latest version of the frame work. I was hosting my website on Azure, and it was working fine - never any issues.
I've just moved all the files to a different server, a linux one - standard normal web hosting type server with cpanel.
My site loads up, however a lot of pages I use that require models, are giving off errors, as if the files do not exist
Unable to locate the model you have specified: UsersModel
Just note : I have read so many articles today, that you need to have uppercase / lowercase and all that stuff, but that's how i already have it setup, it just does not work since changing servers. and it worked perfectly fine yesterday on the Azure server.
Also, when going to the actual file in my address bar, it takes me to the 404 error. not sure if this has anything to do with it?
Did you change your base url in config file ?
All model , controllers, helper ,library name must me capital letter.
If you change server remove index.php from config file where you will get config['index']= ""; and save this.
Still you get error then save base url like domain/project_name/index.php

PHPUnit testing in PhpStorm token mismatch exception

I am running unit testing on a Laravel project through PhpStorm inbuilt test environment. I am getting token mismatch exception.
All the configurations are correct and it was working fine. Suddenly this error showed up. I tried with the terminal and it works fine. I am developing this projects under Vagrant.
What can I do to solve this issue?
I googled and found out that changing Laravel's VerifyCsrfToken as below will solve this issue. But I need this to be default as well.
$except = ['/*']
I was experiencing the same problem, i fixed it by setting the "Default configuration file" option in the chosen "Test Frameworks" to the phpunit.xml in my project root. It seems PHPStorm by default uses a 'local' phpunit config. I came to this idea while checking the runningUnitTests() method in Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
and seeing dat APP_ENV was "local" and not "testing" as specified in my PHPunit.xml
Hope this helps.
I used WithoutMiddleware trait in my testing class. It worked fine. And I tried #Lijubadr 's reply also. It worked too. thank you.

intervention-image with laravel 5.2 on ubuntu-server breaks the other calls

I am using laravel 5.2 to write services for a mobile app. all the calls are working fine. My project is deployed in ubuntu server.
Now I want to resize the uploaded images inorder to maintain same performance. I thought of trying intervention-image.
In local machine it worked fine. I installed intervention-image and set the provider and alias name, I included the alias name to controller. Once I do that and update the server, all the other calls are getting effected. I am getting 505 error.
It's the intervension-image which is causing this problem, I checked with previous upload and I am getting all the calls. Any suggestions?
I suggest you create a dev environment like your production , use vagrant . About error 505 check you error log file to have more detail about the bug

Spring security login error

I just implemented a simple login functionality using spring it how ever worked with the eclipse in built browser but gives the following error in chrome and firefox.
HTTP Status 404 - /SpringLogin/welcome.jsp;jsessionid=8332D4F3D4709DCA37C87F30F1EA03D5
The requested resource (/SpringLogin/welcome.jsp;jsessionid=BEE789093FF79CB6B67F8DA368E8B3E4) is not available.
can you please tell me why it is happening?
PS: I have two projects SpringLogin and both of them had same project names and both had similar packages. Then neither of the projects worked properly and gave the above error. How ever after I created another project with a different name and using different package names, it worked like magic. I am guessing here that it may have been the problem. But what is the logical answer that'll explain what happened there?
you don't have being calling the correct URL
it seems that the context /SpringLogin/ does not exists anymore.
Try /welcome.jsp or if you changed the name of application - try /newappname/welcome.jsp

Resources