fooDigi Posted December 7, 2006 Share Posted December 7, 2006 i am trying to run a php script from the command line (ex. >php /path/to/script.php) which needs to connect to a mssql database. i get the error "Fatal error: Call to undefined function: mssql_connect()...."i can run mysql_connect from command line successfully, and run mssql_connect from the browser without problems. just not mssql from the command line. what do i have to do to get this working? if it is possible.thx for any help. Link to comment https://forums.phpfreaks.com/topic/29850-command-line-php/ Share on other sites More sharing options...
papaface Posted December 7, 2006 Share Posted December 7, 2006 What code are you using to connect to the mssql db?regards Link to comment https://forums.phpfreaks.com/topic/29850-command-line-php/#findComment-137140 Share on other sites More sharing options...
trq Posted December 7, 2006 Share Posted December 7, 2006 I know for one that my cli version of php uses a different php.ini than my mod_php version, maybe you don't have the mssql extension enabled in your php.ini. Link to comment https://forums.phpfreaks.com/topic/29850-command-line-php/#findComment-137145 Share on other sites More sharing options...
fooDigi Posted December 7, 2006 Author Share Posted December 7, 2006 i'm using the standard code to connect...[code]mssql_connect($hostname,$username,$password);mssql_select_db($dbName)[/code]good point thorpe, i believe we do too. i'll look into that.thx Link to comment https://forums.phpfreaks.com/topic/29850-command-line-php/#findComment-137150 Share on other sites More sharing options...
fooDigi Posted December 8, 2006 Author Share Posted December 8, 2006 i have checked. i copied the exact php.ini for the cli version. so that they are identical. is there something specific about the mssql functions? Link to comment https://forums.phpfreaks.com/topic/29850-command-line-php/#findComment-137560 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.