Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

"Internal Server Error" using RewriteRule on CakePHP

Featured Replies

I'm currently trying to set up the Uniform Server as lightweight server for baking cakes (aka programming with CakePHP).

 

Since it uses beautified URLs, and mod_rewrite, I got a problem.

 

At first I got a 403 Error for the folder where I have placed Cake, but that was corrected using some Google-Fu and this forum and

Options +FollowSymLinks

 

Now I'm getting a 500 Error.

 

I tried following .htaccess:

 

Options +FollowSymLinks
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteRule	^$ app/webroot/	[L]
  RewriteRule	(.*) app/webroot/$1 [L]
</IfModule>

 

and

 

<IfModule mod_rewrite.c>
  RewriteEngine on
  Options +FollowSymLinks
  RewriteRule	^$ app/webroot/	[L]
  RewriteRule	(.*) app/webroot/$1 [L]
</IfModule>

 

Neither works.

 

For reference, I'm using vanilla Uniform Server 3.5 and Cake PHP 1.2.0.7296 RC2, currently on Vista.

  • 1 month later...

try add shlashes before "app/webroot/" -> "/app/webroot/"

 

hope helps

Installing cake CakePHP 1.2.0.7296 RC2 on Uniform Server 3.5-Apollo

 

1) Start with a fresh copy of US 3.5

2) Start US wait for apanel.

3) From apanel click phpMyAdmin

4) In create new database type maincake (or whatever name you wish to use) click create.

5) Unzip cake_1.2.0.7296-rc2.zip to any folder.

6) Navigate to the last folder named cake_1.2.0.7296-rc2 copy this folder and all it’s contens to US folder www.

7) Once copied rename cake_1.2.0.7296-rc2 to cake

8) Inside folder \Uniform Server\udrive\www\cake edit file .htaccess to look like this:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteRule	^$	webroot/	[L]
RewriteRule	(.*) webroot/$1	[L]
</IfModule>

9) Inside folder \Uniform Server\udrive\www\cake\app edit file .htaccess to look like this:

<IfModule mod_rewrite.c>
Options +FollowSymLinks  
RewriteEngine on
RewriteRule	^$	webroot/	[L]
RewriteRule	(.*) webroot/$1	[L]
</IfModule>

10) Inside folder \Uniform Server\udrive\www\cake\app\config edit file core.php

Locate the following line (line 153):

 

Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');

 

Change the character string to something different it must have the same number of characters e.g:

 

Configure::write('Security.salt', 'MYhG97b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');

 

11) Inside folder Uniform Server\udrive\www\cake\app\config rename the file database.php.default to database.php edit this file as follows.

 

At the bottom of this page locate the following code:

var $default = array(
 'driver' => 'mysql',
 'persistent' => false,
 'host' => 'localhost',
 'login' => 'user',
 'password' => 'password',
 'database' => 'database_name',
  'prefix' => '',
);

Change it to look like this:

var $default = array(
 'driver' => 'mysql',
 'persistent' => false,
 'host' => 'localhost',
 'login' => 'root',
 'password' => 'root',
 'database' => 'maincake',
  'prefix' => '',
);

Note 1: ‘login’ and ‘password’ are set to “root” Uniform Server’s default MySQL name and password.

 

Note 2: ‘database’ set this to the name you created in step 4

 

12) Check the set-up by typing http://localhost/cake/ into your browser address bar.

 

The following four lines are highlighted in green meaning you are ready to go.

a) Your tmp directory is writable.

:blink: The FileEngine is being used for caching. To change the config edit APP/config/core.php

c) Your database configuration file is present.

d) Cake is able to connect to the database.

 

All the best

Ric ;)

  • 2 months later...

I get an internal server error after following this guide.

 

[Thu Dec 04 00:00:37 2008] [error] [client 127.0.0.1] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary., referer: http://localhost/

 

I've checked the instructions 10 times, everything seems correct.

 

Any suggestions?

 

Thanks!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.