Current time: 11-23-2024, 08:02 AM Hello There, Guest! (LoginRegister)


Post Reply 
Does ispCP support PHP 5.3.0
Author Message
ceco91 Offline
Moderator
*****
Moderators

Posts: 95
Joined: Jan 2009
Reputation: 0
Post: #5
RE: Does ispCP support PHP 5.3.0
I have made some changes to sql_user_add.php and now ispCP adds a new SQL users but it gives me "Query was empty" (It gave the same error before the edit). Here is the part I've changed:
Code:
    $new_db_name = ereg_replace("_", "\\_", $db_name);
    $query = 'grant all on ' . quoteIdentifier($new_db_name) . '.* to ?@\'localhost\' identified by ?';
    $rs = exec_query($sql, $query, array($db_user, $user_pass));
    $query = 'grant all on ' . quoteIdentifier($new_db_name) . '.* to ?@\'%\' identified by ?';
    $rs = exec_query($sql, $query, array($db_user, $user_pass));
to
Code:
    $new_db_name = str_replace("_", "\\_", $db_name);
    $query = 'grant all privileges on ' . quoteIdentifier($new_db_name) . ".* to ".$db_user."@localhost identified by '".$user_pass."'";
    $rs = exec_query($sql, $query);
    $query = 'grant all privileges on ' . quoteIdentifier($new_db_name) . ".* to ".$db_user."@% identified by '".$user_pass."'";
    $rs = exec_query($sql, $query );

Apparenty, PDO class doesn't work fine Sad.
(This post was last modified: 07-28-2009 05:10 AM by ceco91.)
07-28-2009 05:09 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
Does ispCP support PHP 5.3.0 - ceco91 - 07-27-2009, 05:58 AM
RE: Does ispCP support PHP 5.3.0 - joximu - 07-27-2009, 06:02 PM
RE: Does ispCP support PHP 5.3.0 - ceco91 - 07-28-2009, 01:37 AM
RE: Does ispCP support PHP 5.3.0 - joximu - 07-28-2009, 01:43 AM
RE: Does ispCP support PHP 5.3.0 - ceco91 - 07-28-2009 05:09 AM
RE: Does ispCP support PHP 5.3.0 - joximu - 07-28-2009, 05:36 PM
RE: Does ispCP support PHP 5.3.0 - ceco91 - 07-28-2009, 10:34 PM
RE: Does ispCP support PHP 5.3.0 - BeNe - 07-29-2009, 03:43 PM
RE: Does ispCP support PHP 5.3.0 - ceco91 - 07-29-2009, 09:12 PM
RE: Does ispCP support PHP 5.3.0 - joximu - 07-29-2009, 09:37 PM
RE: Does ispCP support PHP 5.3.0 - ceco91 - 07-31-2009, 06:28 AM

Forum Jump:


User(s) browsing this thread: 3 Guest(s)