Connecting to MSSQL 2008 returns a Blank Page |
[eluser]winner[/eluser]
I downloaded the SQLSRV database driver and placed in the “system/database/driver”, i deleted the other ones from Microsoft. Now I am getting. Fatal error: Call to undefined function sqlsrv_connect() I think we are making progress! With your comment on using a framework over custom PHP. I posted a question on Reddit. See if you agree with the comments. http://www.reddit.com/r/PHP/comments/it7...framework/
[eluser]winner[/eluser]
here a screenshots of the - extraction of the sqlsrv - controller - model
[eluser]prabeen.giri[/eluser]
I am so sorry , I forgot to mention to install the php_sqlsrv php extension like php_mysql,php_odbc and enable it. It is also required. Error u mentioned above is due to missing php_sqlsrv extension . I am sure u will also require the sqlsrv database driver, to be installed on your server computer. And other thing , if you are very new to PHP , then I would recommend to get familiar with PHP core things, like 1. How PHP handles GET, POST method, Session , Cookies, 2. Basic OOP in PHP 3. Functions, Arrays , Loops , Referencing , 4. Security issues and measures in PHP 5. Database connections and query handling. If you are all set with above things then I think its better to switch to framework and you will realize the benefits of framework over custom PHP ,
[eluser]winner[/eluser]
Okay so the I got a senior developer to install the sqlsrv drivers on the dev machine. followed this http://msdn.microsoft.com/en-us/library/...l.90).aspx, froze php for a bit. I think because it's running on an IIS server or something. There go, I installed WAMP on my local machine and trying to connect via odbc to our dev database, I created the datasource and tested it in ODBC Data Source Administrator. Now getting A Database Error Occurred Unable to connect to your database server using the provided settings. Filename: C:\wamp\www\system\database\DB_driver.php Line Number: 124 Here is my /database/config/database.php Code: $active_group = 'default'; I know that php includes the odbc driver, so I know it's not the driver. It could be my 'hostname' , used the same name as my odbc datasource (see attachment). What do you think?
[eluser]prabeen.giri[/eluser]
I think you are getting me wrong, Its either u use odbc or sqlsrv , the are alternative. Please read my above message properly , definitely u will find the solution if you are using SQLsrv as your database driver. If you are using ODBC to connect to your MSSQL server then its enabled by default in php installation. You need to add the data source via "control panel/adminstrative tools/data sources" and u need to provide the data sources provided on the CI database config file accordingly. Your hostname on the database config file will the new database source u added in the ODCB Data sources. But as u mentioned you have problem with ODBC connection with unicode characters . So I was recommending SQLSRV driver instead. SQLSRV is alternative to the ODBC , if you are going to use sqlsrv then please follow all the message I had written above. If any problem persists, then let me know.
[eluser]Ashish Awasthi[/eluser]
Hi, I think a best and fast solution is in Database change the field type ntext to other type. Any table which is having next field type will give the same problem so better don't use ntext. |
Welcome Guest, Not a member yet? Register Sign In |