skip to Main Content

I am wondering if it is possible to get CakePHP working on a shared Windows Plesk server?

I have extracted the CakePHP files to the /httpdocs/ folder, and have created a web.config file as per the instructions in the CakePHP docs, however all I seem to get is an ‘Internal Server Error’. Do I also need to have the MySQL DB setup prior to viewing the basic Cake config pages or should it be able to show me something without any DB configured?

I have configured my site to run PHP 5.4.32 (FastCGI).

The error being reported is:

PHP Fatal error: You must enable the intl extension to use CakePHP. in
C:Inetpubvhostsexample.comhttpdocsconfigbootstrap.php on line 38

However my host said they tried including the path of the directory where php_intl.dll is present but this has not resolved the issue.

Cheers,

Pete

4

Answers


  1. Chosen as BEST ANSWER

    Thanks to all who responded to my question.

    I went back to CakePHP version 2.6.7 instead of 3.x and after following the instructions in the post by Fury I was able to successfully make some progress and get the basic CakePHP page to load.

    Hopefully, someone with a bit more knowledge will be able to come up with a guide for those looking to get it running with v3.x on Windows Plesk as I did notice there is a different directory structure etc.

    Cheers,

    Peter


  2. Here is how you do it in Cakephp 2.x

    Once you have setup your webspace you don’t need to change or spoil the php configuration (as long as php is set as default for this webspace) and when you create a web_space in Plesk, Plesk server normally does every thing for you.

    But hen you need to configure CakePhp application in Plesk server you need to follow these:

    • Root directory

    When you Create a new DNS or web_space Plesk create a directory structure for you the you need to place your application in created directory and configure the htaccess in these folders as follows (just add some “/” in paths):

    CakePHP root directory (must be copied to your document; redirects everything to your CakePHP app and updated to):
    
    <IfModule mod_rewrite.c>
       RewriteEngine on
       RewriteRule    ^$ app/webroot/    [L]  #to=> /app/webroot/
       RewriteRule    (.*) app/webroot/$1 [L] #to=> /app/webroot/$1
    </IfModule>
    CakePHP app directory (will be copied to the top directory of your application by bake):
    
    <IfModule mod_rewrite.c>
       RewriteEngine on
       RewriteRule    ^$    webroot/    [L]  #to=> /webroot/
       RewriteRule    (.*) webroot/$1    [L]  #to=> /webroot/$1
    </IfModule>
    CakePHP webroot directory (will be copied to your application’s web root by bake):
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ index.php [QSA,L]  #to=> /index.php
    </IfModule>
    
    • Database

    Of-course you would need to configure your database.

    To do so you need to setup a new Database for your application in you plesk server and then get the:

    • database ip address
    • database name
    • database user name
    • database password

    and update your app/Config/database.php with the new database details. as you would know:

    public $default = array(
            'datasource' => 'Database/Mysql',
            'persistent' => false,
            'host' => 'ip address here',
            'login' => 'database username',
            'password' => 'database password',
            'database' => 'database name'
        );
    

    Here is how to configure Cakephp 3.x

    Hope this helps

    Login or Signup to reply.
  3. Do I also need to have the MySQL DB setup prior to viewing the basic Cake config pages or should it be able to show me something without any DB configured?

    No, you don’t. Even without prior db config the default homepage would be loaded. It will just give you are message box stating db is not configured.

    The missing “intl” extension is your primary issue. You need to get that fixed. I don’t have any experience with plesk on windows so can’t help you with that. Though I would advice using a linux based server to make your life easier.

    Login or Signup to reply.
  4. php_intl extension is disabled by default for each Plesk PHP handlers:

    You can enable it in

    C:Program Files (x86)ParallelsPleskAdditionalPleskPHP54php.ini
    

    Just find and uncomment this string:

    ;extension=php_intl.dll
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search