BongoBoy Posted November 22, 2013 Share Posted November 22, 2013 This is more configuration I think, but I did not see a better place to ask. I'm totally new to PHP, have not written a line of code. Have set up Netbeans, and have successfully run the TodoList example application previously, connecting to MySQL and reading/writing to the database. After several reinstallations of most everything, I finally got TodoList to start up again, but on selecting any of the app functions, the app does a fatal error when it tries to use mb_strtoupper which it calls in a utils.php script, I'm thinking these type of functions are defined in a header file somewhere, and if so then I need to figure out why the script can't find them. I don't believe my current PHP install was done using a Windows installer--I was able to get Apache to recognize PHP through the web server .ini file I reckon, but maybe that wasn't good enough and I really needed a registry entry. I suspect my first PHP installation was in fact done using an installer. Anyway, I don't know how to troubleshoot this, let alone fix it. Suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/284182-todolist-script-fails-to-find-mb_strtolower/ Share on other sites More sharing options...
dalecosp Posted November 22, 2013 Share Posted November 22, 2013 My guess would be that the mbstring extension isn't installed. Quote Link to comment https://forums.phpfreaks.com/topic/284182-todolist-script-fails-to-find-mb_strtolower/#findComment-1459608 Share on other sites More sharing options...
boompa Posted November 22, 2013 Share Posted November 22, 2013 http://technaugh.com/technaugh/dotproject/call-to-undefined-function-mb_strpos-or-mb_stripos-or-mb_strlen-or-mb_strtoupper-or-mb_stristrll/ Quote Link to comment https://forums.phpfreaks.com/topic/284182-todolist-script-fails-to-find-mb_strtolower/#findComment-1459609 Share on other sites More sharing options...
JIXO Posted November 22, 2013 Share Posted November 22, 2013 Open your php.ini file, search for this line ;extension=php_mbstring.dll remove the semi-colon, save and then restart apache. Quote Link to comment https://forums.phpfreaks.com/topic/284182-todolist-script-fails-to-find-mb_strtolower/#findComment-1459611 Share on other sites More sharing options...
BongoBoy Posted November 23, 2013 Author Share Posted November 23, 2013 Well, I did both the enabling of the extension and set mbstring.func_overload = 1,2 per the link above, and restarted Apache. It made no difference (same error), so that tells me the php.ini file I edited is not associated with the PHP Apache is actually communicating with. But, that actually doesn't seem to be the case. I edited c:\php\php.ini, verified Apache 2.2 is the service that's actually running, and then inspected httpd.conf located in the Apache 2.2 folder under Program Files. The configuration file contains: LoadModule php5_module "c:/php/php5apache2_2.dll" AddHandler application/x-httpd-php .php PHPIniDir "C:/php" Is there any way to have the Apache server tell me what PHP it hands off php to? Please forgive my sloppy or incorrect terminology--I'm just learning not only PHP but web in general. I mean, I know how to shop, but... Quote Link to comment https://forums.phpfreaks.com/topic/284182-todolist-script-fails-to-find-mb_strtolower/#findComment-1459635 Share on other sites More sharing options...
dalecosp Posted November 23, 2013 Share Posted November 23, 2013 Write this script and run it, (CLI, or Browser): phpinfo(); That should tell you quite a bit. The INI file, in particular, will be noted. Quote Link to comment https://forums.phpfreaks.com/topic/284182-todolist-script-fails-to-find-mb_strtolower/#findComment-1459636 Share on other sites More sharing options...
BongoBoy Posted November 23, 2013 Author Share Posted November 23, 2013 I ran get_loaded_extensions() and mbstring is not one listed. It must be that it was a pre-installed extension in the PHP I had originally installed, and that's why the Todolist tutorial application just happened to run. So, I guess the first step is to find out about loading and installing modules. Looks a bit more challenging that for Perl. I wonder if I can get this thing to run by simply editing all the multi-byte calls to the 'standard' functions. Let's see. Quote Link to comment https://forums.phpfreaks.com/topic/284182-todolist-script-fails-to-find-mb_strtolower/#findComment-1459637 Share on other sites More sharing options...
BongoBoy Posted November 23, 2013 Author Share Posted November 23, 2013 php_info() returns 'Call to undefined function in [location of file with call]. So, I'm thinking I have a seriously goof-up installation. Quote Link to comment https://forums.phpfreaks.com/topic/284182-todolist-script-fails-to-find-mb_strtolower/#findComment-1459639 Share on other sites More sharing options...
BongoBoy Posted November 23, 2013 Author Share Posted November 23, 2013 ...underscore. Been doing that all day. My apology. Quote Link to comment https://forums.phpfreaks.com/topic/284182-todolist-script-fails-to-find-mb_strtolower/#findComment-1459640 Share on other sites More sharing options...
dalecosp Posted November 23, 2013 Share Posted November 23, 2013 Well, it's pretty darn late here. If it is where you are, I'd give it a rest. Fresh eyes, fresh brain tomorrow might help a bit. :-) Quote Link to comment https://forums.phpfreaks.com/topic/284182-todolist-script-fails-to-find-mb_strtolower/#findComment-1459642 Share on other sites More sharing options...
BongoBoy Posted November 23, 2013 Author Share Posted November 23, 2013 I completed deleted the project and started another tutorial project from scratch. This is also a tutorial found at netbeans.org, the wishlist project. Everything worked just fine until the first function was called--in this case the connection request for MySQL. "Fatal error: Call to undefined function mysqli_connect() in [path]" Just based on various comments I've seen at php.org, I'm now thinking my PHP is not compiled in a way that is compatible with my Apache 2.2. So, while I spent an hour trying to ensure I had the correct PHP, maybe not. Thanks to everyone for trying to help--I think I've got to get a solid install before I do anything else. Quote Link to comment https://forums.phpfreaks.com/topic/284182-todolist-script-fails-to-find-mb_strtolower/#findComment-1459644 Share on other sites More sharing options...
BongoBoy Posted November 23, 2013 Author Share Posted November 23, 2013 ;extension_dir="ext" was not uncommented. Beginners...jeeez. Quote Link to comment https://forums.phpfreaks.com/topic/284182-todolist-script-fails-to-find-mb_strtolower/#findComment-1459647 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.