• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ctype_digit() won't work on a VPS server

#1
I recently finished building my site using code igniter on WAMP local server and tested it on a shared hosting server (from Namecheap). Then I got VPS hosting plan (from iPage) and uploaded the files and did the necessary configs. However, I got this error when I tried accessing the site:

An uncaught Exception was encountered
Type: Error
Message: Call to undefined function ctype_digit()
Filename: /home/eastngco/public_html/system/core/Security.php
Line Number: 600

Problem is, the suspect file, Security.php, is a code igniter system file which I never messed with (everything I wrote was within the application folder).

I posted this problem on stackoverflow and was asked to contact my web host to have ctype enabled for me. I did and they enabled the function but the problem still persists. iPage tech team emailed me proof that ctype has been enabled, and asked me to contact Code Igniter. What baffles is that the same script works perfectly on local server and on a shared hosting server.

I tried changing the error line from ctype_digit to is_numeric (based on suggestions i saw on the web), the error changed to 'undefined function mysqli'. Again i changed the databasedriver in config/database.php to mysql, and the error shifted to something else, which made me realize something was really amiss.

Please i need help fixing this issue as it is apparent my web host can't help
Reply

#2
Forgive me if it seems rude, but your hosting environment is garbage. Seriously, when you are dealing with issues that you have described, the best course of action is to change hosts. There is nothing wrong with CodeIgniter.
Reply

#3
(11-16-2017, 04:14 PM)skunkbad Wrote: Forgive me if it seems rude, but your hosting environment is garbage. Seriously, when you are dealing with issues that you have described, the best course of action is to change hosts. There is nothing wrong with CodeIgniter.

Well I may not be a big fan of iPage, but I later figured out the source of the bug and it had nothing to do with my host. It was my .htaccess file. Corrected it, and everything works now
Reply

#4
How did you manage to disable a PHP extension via .htaccess, I assume by accident?
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.