[![enter image description here][3]][3][![enter image description here][4]][4]I'm trying to deploy a PHP app with Azure. I get the the index page to show up: http://phpdiscussionboard.azurewebsites.net/
But when you click login or register, the error I see is: "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."...which leads me to believe in my database.php file I am configuring it incorrectly..not sure. I have hooked up the connection with MYSQLWorkbench and when I test the connection it works. Similarly, when I change the index of my application to another view, that loads the specified template.
Here is my database.php file my applications/config
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$active_group = 'default';
$active_record = TRUE;
if(ENVIRONMENT == 'production')
{
$db['default']['hostname'] = 'ahmxn6q9c3.database.windows.net,1433';
$db['default']['username'] = 'username';
$db['default']['password'] = 'password';
$db['default']['database'] = '';
}
else
{
$db['default']['hostname'] = 'ahmxn6q9c3.database.windows.net,1433';
$db['default']['username'] = 'username';
$db['default']['password'] = 'password';
$db['default']['database'] = '';
}
$db['default']['dbdriver'] = 'sqlsrv';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
//end of database.php
The db driver only works with 'sqlsrv'. In my connection string I get from azure, it says my database is called "discussionboard"...which I named it as on purpose. However when I enter discussionboard as the default db i continue to get the error. For my Azure db page, when I click on the sql database, it tells me: Connect to your database with : Server: ahmxn6q9c3.database.windows.net,1433 For which I have that string and port as my default host. However, in the connection string it says the data source is : us-cdbr-azure-west-c.cloudapp.net
Am i configuring the whole database.php incorrectly?
I would really appreciate anyone's help that has successfully deployed a php app with mysql through azure before.
Thank you for your time
this is what i have right now....looks the same as the image you posted...am i missing something? Sorry I've never deployed a php app before.
I've tried configuring it how you said...the image below is the only way I can get the page to load with a database error..but i still get the Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'users'. even when I add a users table.