Quantcast

[Tiki-devel] Check Database Setup

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Tiki-devel] Check Database Setup

Brendan Ferguson
Hi Guys

Ive hit a bit of a brick wall. Wondering if anyone has some ideas, or even an area to point me in.

Im trying to check if there is valid database credentials, which means functions that reply on the tiki database being set up won’t work.

Any thoughts?

Brendan




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] Check Database Setup

Cloutier, Philippe (DGARI-Consultant)

Hi Brendan,

Not sure I can help, but I thought I’d mention I don’t understand much of your question.

Is this question about a particular install, and if so, is it a new install?

 

De : Brendan Ferguson [mailto:[hidden email]]
Envoyé : 11 mai 2017 14:42
À : Tiki developers <[hidden email]>
Objet : [Tiki-devel] Check Database Setup

 

Hi Guys

 

Ive hit a bit of a brick wall. Wondering if anyone has some ideas, or even an area to point me in.

 

Im trying to check if there is valid database credentials, which means functions that reply on the tiki database being set up won’t work.

 

Any thoughts?


Brendan

 

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] Check Database Setup

Brendan Ferguson
A tiki instance where there is no install, the database has been misconfigured, the database is down or the database is otherwise unavailable or unreachable is what I am trying to test for. Thats what I meant by valid database credentials.

Brendan



On May 11, 2017, at 3:22 PM, Cloutier, Philippe (DGARI-Consultant) <[hidden email]> wrote:

Hi Brendan,
Not sure I can help, but I thought I’d mention I don’t understand much of your question.
Is this question about a particular install, and if so, is it a new install?
 
De : Brendan Ferguson [[hidden email]] 
Envoyé : 11 mai 2017 14:42
À : Tiki developers <[hidden email]>
Objet : [Tiki-devel] Check Database Setup
 
Hi Guys
 
Ive hit a bit of a brick wall. Wondering if anyone has some ideas, or even an area to point me in.
 
Im trying to check if there is valid database credentials, which means functions that reply on the tiki database being set up won’t work.
 
Any thoughts?

Brendan

 

 
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] Check Database Setup

Jonny Bradley-4
Hi Brendan

Did you work this out? I think i'd look for how it's done in \Tiki\Command\ConsoleApplicationBuilder::listOfRegisteredConsoleCommands which seems to work well for the various states of installed or needing updates. For instance checkIsInstalled uses \Installer::isInstalled

Anyway, by the look of the commits you might have worked this (or something similar) out?

jonny





> On 11 May 2017, at 20:27, Brendan Ferguson <[hidden email]> wrote:
>
> A tiki instance where there is no install, the database has been misconfigured, the database is down or the database is otherwise unavailable or unreachable is what I am trying to test for. Thats what I meant by valid database credentials.
>
> Brendan
>
>
>
>> On May 11, 2017, at 3:22 PM, Cloutier, Philippe (DGARI-Consultant) <[hidden email]> wrote:
>>
>> Hi Brendan,
>> Not sure I can help, but I thought I’d mention I don’t understand much of your question.
>> Is this question about a particular install, and if so, is it a new install?
>>  
>> De : Brendan Ferguson [mailto:[hidden email]]
>> Envoyé : 11 mai 2017 14:42
>> À : Tiki developers <[hidden email]>
>> Objet : [Tiki-devel] Check Database Setup
>>  
>> Hi Guys
>>  
>> Ive hit a bit of a brick wall. Wondering if anyone has some ideas, or even an area to point me in.
>>  
>> Im trying to check if there is valid database credentials, which means functions that reply on the tiki database being set up won’t work.
>>  
>> Any thoughts?
>>
>> Brendan
>>  
>>
>>  
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
>> TikiWiki-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
> TikiWiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] Check Database Setup

Brendan Ferguson
Thanks jonny. I did work it out, but in kinda a half-hacked way. It should work well, but it's kinda an ugly swan. I ended up creating a dummy option that calls db/tiki-db.php and then dies. I then recall the same script with the dummy option from shell and the output is the any errors thrown while tiki tries to set the database up.

The issue I encountered is that so many functions in tiki rely on the database already being setup. I couldn't find a way to try and set the database without it calling die() upon failure.

I guess the proper way to do this would be to [REF] db/tiki-db.php into a class. And instead of calling die(), send errors back. Then the installer (or who ever was calling it) could decide what to do with those errors.

It could also likely clean the tiki code up a bit. While searching I found a few instances where there was some code duplication around checking database functionality.

I wouldn't mind doing it, but it's likely not a good job during semi auto merge time, and a change like this should also probably be discussed before appearing on the code base.

Thanks though for getting back to me. I will look at the file you've mentioned. I didn't find it before.

Brendan



> On May 14, 2017, at 7:22 AM, Jonny Bradley <[hidden email]> wrote:
>
> Hi Brendan
>
> Did you work this out? I think i'd look for how it's done in \Tiki\Command\ConsoleApplicationBuilder::listOfRegisteredConsoleCommands which seems to work well for the various states of installed or needing updates. For instance checkIsInstalled uses \Installer::isInstalled
>
> Anyway, by the look of the commits you might have worked this (or something similar) out?
>
> jonny
>
>
>
>
>
>> On 11 May 2017, at 20:27, Brendan Ferguson <[hidden email]> wrote:
>>
>> A tiki instance where there is no install, the database has been misconfigured, the database is down or the database is otherwise unavailable or unreachable is what I am trying to test for. Thats what I meant by valid database credentials.
>>
>> Brendan
>>
>>
>>
>>> On May 11, 2017, at 3:22 PM, Cloutier, Philippe (DGARI-Consultant) <[hidden email]> wrote:
>>>
>>> Hi Brendan,
>>> Not sure I can help, but I thought I’d mention I don’t understand much of your question.
>>> Is this question about a particular install, and if so, is it a new install?
>>>
>>> De : Brendan Ferguson [mailto:[hidden email]]
>>> Envoyé : 11 mai 2017 14:42
>>> À : Tiki developers <[hidden email]>
>>> Objet : [Tiki-devel] Check Database Setup
>>>
>>> Hi Guys
>>>
>>> Ive hit a bit of a brick wall. Wondering if anyone has some ideas, or even an area to point me in.
>>>
>>> Im trying to check if there is valid database credentials, which means functions that reply on the tiki database being set up won’t work.
>>>
>>> Any thoughts?
>>>
>>> Brendan
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
>>> TikiWiki-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
>> TikiWiki-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> TikiWiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Loading...