This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Hacking sentora's unique domain
#1
Hacking sentora's unique domain
Hi,
I decided to create another topic with just this question. I need to hack sentora's file, so it won't check if domain name is unique (necessary in my case, you can read about it here: http://forums.sentora.org/showthread.php?tid=2649)

Can someone tell me, in which file I have to change true to false (or false to true)?

Big thanks and regards!


//can those threads help me?
http://forums.sentora.org/showthread.php?tid=2058
https://github.com/sentora/sentora-core/issues/246

isn't that about changing that If?
Reply
Thanks given by:
#2
RE: Hacking sentora's unique domain
(03-09-2016, 06:54 PM)kai91 Wrote: Hi,
I decided to create another topic with just this question. I need to hack sentora's file, so it won't check if domain name is unique (necessary in my case, you can read about it here: http://forums.sentora.org/showthread.php?tid=2649)

Can someone tell me, in which file I have to change true to false (or false to true)?

Big thanks and regards!


//can those threads help me?
http://forums.sentora.org/showthread.php?tid=2058
https://github.com/sentora/sentora-core/issues/246

isn't that about changing that If?

The check is within the controller file of the Domain Module:

PHP Code:
       // Check to see if the domain already exists in Sentora somewhere and redirect if it does....
 
       $sql "SELECT COUNT(*) FROM x_vhosts WHERE vh_name_vc=:domain AND vh_deleted_ts IS NULL";
 
       $numrows $zdbh->prepare($sql);
 
       $numrows->bindParam(':domain'$domain);

 
       if ($numrows->execute()) {
 
           if ($numrows->fetchColumn() > 0) {
 
               self::$alreadyexists TRUE;
 
               return FALSE;
 
           }
 
       
[Image: logo2.png]

My being on this forum is all personal and all is done here by me has nothing to with the company Web Improved I work for Smile
Reply
Thanks given by: kai91
#3
RE: Hacking sentora's unique domain
(03-09-2016, 10:22 PM)bbspike Wrote: The check is within the controller file of the Domain Module:

PHP Code:
       // Check to see if the domain already exists in Sentora somewhere and redirect if it does....
 
       $sql "SELECT COUNT(*) FROM x_vhosts WHERE vh_name_vc=:domain AND vh_deleted_ts IS NULL";
 
       $numrows $zdbh->prepare($sql);
 
       $numrows->bindParam(':domain'$domain);

 
       if ($numrows->execute()) {
 
           if ($numrows->fetchColumn() > 0) {
 
               self::$alreadyexists TRUE;
 
               return FALSE;
 
           }
 
       



Is that possible to change it via phpmyadmin? (true false) or I have to dig into files?

Ok, I found it. Shall I remove whole select? cause if I remove only if, that would be senseless to check every domain for nothing, right?

//I removed whole select (excatly that what you have quoted), and now I have 'you cannot add a subdomain here' :/
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Is Sentora dead? rajeevrrs 2 3 ,069 12-17-2022, 09:20 AM
Last Post: TGates
Sentora debug and error files johnnyp 0 1 ,187 10-27-2022, 06:16 PM
Last Post: johnnyp
Transfer Account to another Sentora BenI 1 2 ,632 07-21-2022, 07:19 PM
Last Post: Nigel

Forum Jump:


Users browsing this thread: 1 Guest(s)