-2

I am using Ubuntu 17.04 and I have recently installed latest version of CakePHP. It works well on my localhost but not working on server. It just shows 500 Internal Error.

I already have CakePHP projects running on my server but only cakephp setups installed and uploaded from Ubuntu are not working on server.

Thanks in advance.

4
  • 3
    what say the logfile ? /var/log/apache2/error.log
    – spinsch
    Sep 14, 2017 at 11:27
  • It seems the problem with .htaccess Sep 14, 2017 at 11:28
  • 2
    what does the PHP error_log say? We need the actual error message Sep 14, 2017 at 11:29
  • no errors in error_log and even .htaccess is same as it is on other projects.
    – Iqbal Kaur
    Sep 14, 2017 at 12:08

2 Answers 2

0

Before installing CakePHP3 we are needed to check some configuration in our server.

Make sure that you have the mbstring and intl extensions are enabled in PHP. Make sure that you have pdo_mysql enabled in PHP. And php version should be 5.6 or greater.

For this go to cpanel and click Select php version and enable all the required options from the list.

And Xampp modification :

Open /xampp/php/php.ini Change ;extension=php_intl.dll to extension=php_intl.dll (remove the semicolon)

5
  • Thanks Ajay for your suggestions but I already have all these enabled that's why all other projects are working on the same server.
    – Iqbal Kaur
    Sep 14, 2017 at 12:37
  • then check your database configuration Sep 14, 2017 at 12:40
  • few days back,I have also faced the same type of problem because of the wrong database configuration Sep 14, 2017 at 12:43
  • Using a fresh cakephp setup which works without database configurations. However, it should show database error instead of internal error. Actually, I have already checked all these possible issues but found no luck.
    – Iqbal Kaur
    Sep 14, 2017 at 13:02
  • Finally, resolved!! There was no problem with the CakePHP and php settings. the issue was with the zip file created from ubuntu system. I tried to create .tar and uploaded on server it works absolutly fine without any issue.
    – Iqbal Kaur
    Jan 31, 2018 at 9:47
0

You have to enable php-intl extension first

For Window Users (Xampp Server)

Path :- c:\xampp\php\php.ini 
Uncomment :- 
1. ;extension=php_intl.dll (Remove ;)
2. ;extension=php_mbstring.dll (Remove ;)

For Linux (Open terminal ctr+alt+t)

Run Command :- sudo apt-get install php-mbstring
               sudo apt-get install php-intl

Now Run server bin/cake server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.