CakePHP "Object not found!" XAMP - cakephp

I have downloaded and setup CakePHP on XAMP (Win 7) following by http://www.youtube.com/watch?v=hQos_O-nqtQ tutorial.
When I setup new project using NetBeans IDE 8.0.1, everything goes fine but when I tried to view page of my ItemsController's "index" function using http:// myproject/items/ it says: "Object not found!".
I tried "http:// myproject/index.php/items/" and my page loads without javascript and css files. I tried everything which are suggested here, but could not resolve the issue after spending many hours. Does anyone know the exact solution of this problem?
Thanks

The problem was solved from the link provided by Kai leonardaustin.com/blog/technical/enable-mod_rewrite-in-xampp. The problem solved after one change in httpd.conf file residing in xampp\apache\conf folder. Change: AllowOverride none to AllowOverride All.
#Kai: Thanks a lot.
I have to post my own answer as Kai did not post his reply as "Answer" even after a long time

Related

ReactJS problem routing with deployment using apache2

I have been searching the web for solutions for my setup and no luck.
Note: All of these links work properly (www.mywebsite.com and www.mywebsite.com/subPage) when I run the app locally. When I deploy the app, the www.mywebsite.com works, but www.mywebsite.com/subPage does not work (404 NOT FOUND)
I have a website www.mywebsite.com that routes to xxx.xxx.xxx.xxx:80/mywebsite (This is on goDaddy)
This directory on my server that has the static files from the reactJS build is: /var/www/html/mywebsite
So basically the www.mywebsite.com -> /var/www/html/mywebsite
I am fairly certain I have a problem with my .htaccess (which is blank). I have tried many things from online, many different .htaccess files, but nothing I looked at covers my exact configuration.
I have tried putting the .htaccess file in /var/www/html
I have tried putting the .htaccess file in /var/www/html/mywebsite
I have also tried putting it in both. Nothing worked. My AllowOverride All is set properly and I turned on the rewrite module using instructions online and verified this.

Pantheon Drupal 7 setup issue with clean url

On my site under admin section node view (node/xxx) is working fine but when I am trying to edit a node (node/xxx/edit) give me following error
ERR_TOO_MANY_REDIRECTS
This issue is only on Pantheon when I do it on my local server it is working fine.
I already checked .htaccess and web.config file. The same configuration is working for me with another setup
Finally i got solution. Actually i installed ThemeKey module and the ThemeKey Debug creating redirection issue on Pantheon only i disabled it and site is working.

CakePHP without mod_rewrite causes 404 errors

I'm pretty new to Cake, so I tryed to start with the blog tutorial.
I installed CakePHP 2.3.8 in webroot.
Configured SQL and deleted all 3 .htaccess-files, cause i have no mod_rewrite. In core.php I activated
Configure::write('App.baseUrl', env('SCRIPT_NAME'));
I created the Posts-Model, Controller and the index-View like the tutorial says.
The APP/View/Pages/home.ctp tells me, everything's allright.
But when i try to open /posts/index i get a 404. Why?
Without mod_rewrite the urls look like www.example.com/index.php/controllername/actionname/param, i.e. in your example you have to call /index.php/posts/index (or /index.php/posts/).

Cakephp 2.1 White Screen on Devserver

We created a subdomain on our server. First we tested that HTML worked, then I did phpinfo() and everything worked fine there. But when I moved the entire Cakephp app to the devserver at:
dev.lessonshark.com
I get a white screen. But I can go to:
dev.lessonshark.com/css/front.css
and that routes fine.
What I have done so far:
1. Made debug in core set to 3.
2. Removed all the cache files in tmp folder.
Still no luck, any ideas?
Firstly, check your server error logs. White screens are usually one of the following:
You didn't clear out the files in /app/tmp/cache (leave the
directories, remove any files).
You are running out of memory (check the server logs)
mod_rewrite is not enabled on the server or is not configured correctly (check you have allowOverride all set in your apache config so Cake's .htaccess files are read)
[edit]
you haven't made your app/tmp directory writable by the web user
I just cracked my head with this problem.
If none of the above mentioned solution work, (debug, emptying cache..etc), try this one.
Open up your controller, remove any unwanted empty line especially at the top of the file anywhere around you <?php tag, and make sure no useless empty line around the closing ?> tag as well.
I hope it help.

CakePHP 1.3.0 RC4 Installation

I have been using 1.2.6 and downloaded 1.3 to try it out. I am using wampserver with Apache 2.2.11. I have mod rewrite enabled. When I bake a new application using the cake 1.3 console, after I verify that the webroot/index.php of the application CAKE_CORE_INCLUDE_PATH is set to the Cake1.3 Installation folder. The result is a page thats missing CSS, missing a method. Typing in localhost/app/index.php will enable the program to find the app. Therefore I have to assume the rewrite module isnt functioning properly for v1.3. Is there something I have to add to the cake installation or app folder to make this function as it should?
No, Cake is set up properly from the start. The thing that always trips me up is that I forget to set my Apache virtual host's AllowOverride value to All. This allows the .htaccess file to be read.
Are there any error messages in your apache error logs?
Did you replace the previous application's directory with the new one? If not, you may need to add a tag with the appropriate AllowOverride permissions set inside your httpd.conf file, to allow mod rewrite to execute.
Can you load /css/style.css in your browser or does it give a 404?
This may sound like a silly question, but after you made your changes to AllowOverride in your Apache configuration, did you restart Apache?

Resources