Jump to content

systemtek

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Posts posted by systemtek

  1. Hi, in the modules on the left side, currently by default there is home, faq topics etc that point to pages on my site, say for example i want one to say Services and rarther than open a page on my site i want it to take me to a url say 123.com/forum and open it in a new window.

    Still trying to get used to phpnuke - getting there slowly....

    Thanks
  2. Hi thanks for the reply, tried as suggested and get the following error

    #1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key

    Any ideas ?

    Here is my code i just changed it and called it products :

    #
    # Table structure for table `nuke_products`
    #
     
    CREATE TABLE nuke_products (
      id tinyint(4) NOT NULL auto_increment,
      id_cat tinyint(4) NOT NULL default '0',
      question varchar(255) default ",
      answer text,
      PRIMARY KEY  (id),
      KEY id (id),
      KEY id_cat (id_cat)
    ) TYPE=MyISAM;
    #
    # Dumping data for table `nuke_products`
    #
    # --------------------------------------------------------
    #
    # Table structure for table `nuke_products`
    #
    CREATE TABLE nuke_products (
      id_cat tinyint(3) NOT NULL auto_increment,
      categories varchar(255) default NULL,
      flanguage varchar(30) NOT NULL default ",
      PRIMARY KEY  (id_cat),
      KEY id_cat (id_cat)
    ) TYPE=MyISAM;
    #
    # Dumping data for table `products`
    #
    # --------------------------------------------------------
  3. I am using phpnuke and i have read in the manual about Duplicating the PHP-Nuke FAQ module, this is section 22.1. 

    Here : http://www.karakas-online.de/EN-Book/duplicating-php-nuke-faq-module.html

    This is just what i need to do, but reading about it, it says about doing stuff from the command line to the MySQL.

    I dont have command line access i just have mysql and phpnuke via cPanel, do i need to do any of that, if so how do i go about doing it as dont have ssh access.

    Are the files anywhere i acn access them ?

    Thanks
  4. #!/usr/local/bin/php
    <?php
    // configure your database variables below:
    $dbhost = 'localhost'; // Server address of your MySQL Server
    $dbuser = 'XXXXX'; // Username to access MySQL database
    $dbpass = 'XXXXX'; // Password to access MySQL database
    $dbname = 'systemte_phpbb1'; // Database Name

    // Optional Options You May Optionally Configure


    $use_gzip = "yes";  // Set to No if you don't want the files sent in .gz format
    $remove_sql_file = "yes"; // Set this to yes if you want to remove the .sql file after gzipping. Yes is recommended.
    $remove_gzip_file = "no"; // Set this to yes if you want to delete the gzip file also. I recommend leaving it to "no"


    // Configure the path that this script resides on your server.


    $savepath =
    "/home/systemtek/public_html/dbsender"; // Full path to this directory. Do not use trailing slash!


    $send_email = "yes";  // Do you want this database backup sent to your email? Fill out the next 2 lines
    $to      = "admin@XXXXXX.co.uk";  // Who to send the emails to
    $from    = "admin@XXXXXX.co.uk"; // Who should the emails be sent from?


    $senddate = date("j F Y");


    $subject = "MySQL Database Backup - $senddate"; // Subject in the email to be sent.
    $message = "Your MySQL database has been backed up and is attached to this email"; // Brief Message.


    $use_ftp = "no"; // Do you want this database backup uploaded to an ftp server? Fill out the next 4 lines
    $ftp_server = "localhost"; // FTP hostname
    $ftp_user_name = "ftp_username"; // FTP username
    $ftp_user_pass = "ftp_password"; // FTP password
    $ftp_path = "/"; // This is the path to upload on your ftp server!


    // Do not Modify below this line! It will void your warranty!


           $date = date("mdy-hia");
           $filename = "$savepath/$dbname-$date.sql";    
           passthru("mysqldump --opt -h$dbhost -u$dbuser -p$dbpass
    $dbname >$filename");


           if($use_gzip=="yes"){
                   $zipline = "tar -czf ".$dbname."-".$date."_sql.tar.gz
    $dbname-$date.sql";
                   shell_exec($zipline);
           }
           if($remove_sql_file=="yes"){
                   exec("rm -r -f $filename");
           }


           if($use_gzip=="yes"){
                   $filename2 =
    "$savepath/".$dbname."-".$date."_sql.tar.gz";
           } else {
                   $filename2 = "$savepath/$dbname-$date.sql";
           }


           if($send_email == "yes" ){
                   $fileatt_type = filetype($filename2);
                   $fileatt_name = "".$dbname."-".$date."_sql.tar.gz";


                   $headers = "From: $from";


                   // Read the file to be attached ('rb' = read binary)
                   $file = fopen($filename2,'rb');
                   $data = fread($file,filesize($filename2));
                   fclose($file);


                   // Generate a boundary string
                   $semi_rand = md5(time());
                   $mime_boundary =
    "==Multipart_Boundary_x{$semi_rand}x";


                   // Add the headers for a file attachment
                   $headers .= "\nMIME-Version: 1.0\n" ."Content-Type:
    multipart/mixed;\n" ." boundary=\"{$mime_boundary}\"";


                   // Add a multipart boundary above the plain message
                   $message = "This is a multi-part message in MIME
    format.\n\n" ."--{$mime_boundary}\n" ."Content-Type: text/plain;
    charset=\"iso-8859-1\"\n" ."Content-Transfer-Encoding: 7bit\n\n" .
                   $message . "\n\n";


                   // Base64 encode the file data
                   $data = chunk_split(base64_encode($data));


                   // Add file attachment to the message
                   $message .= "--{$mime_boundary}\n" ."Content-Type:
    {$fileatt_type};\n" ." name=\"{$fileatt_name}\"\n"
    ."Content-Disposition: attachment;\n" ."
    filename=\"{$fileatt_name}\"\n" ."Content-Transfer-Encoding:
    base64\n\n" .
                   $data . "\n\n" ."--{$mime_boundary}--\n";


                   // Send the message
                   $ok = @mail($to, $subject, $message, $headers);
                   if ($ok) {
                           echo "<h4><center>Database backup created and sent! File name $filename2</center></h4>";
                   } else {
                           echo "<h4><center>Mail could not be sent. Sorry!</center></h4>";
                   }
           }


           if($use_ftp == "yes"){
                   $ftpconnect = "ncftpput -u $ftp_user_name -p
    $ftp_user_pass -d debsender_ftplog.log -e dbsender_ftplog2.log -a -E
    -V $ftp_server $ftp_path $filename2";
                   shell_exec($ftpconnect);
                   echo "<h4><center>$filename2 Was created and uploaded to your FTP server!</center></h4>";


           }


           if($remove_gzip_file=="yes"){
                   exec("rm -r -f $filename2");
           }


    ?>

  5. Hi All

    I am trying to setup a cron to run dbsender.php, i get the following error email back when it tried to run, it also puts this in the error log in the  /home/systemte/public_html/dbsender directory.  Any ideas ? I dont own the server. ??

    [03-Aug-2006 18:00:01] PHP Warning:  passthru() has been disabled for security reasons in /home/systemte/public_html/dbsender/dbsender.php on line 50
    [03-Aug-2006 18:00:02] PHP Warning:  filetype(): Lstat failed for (null) (errno=2 - No such file or directory) in /home/systemte/public_html/dbsender/dbsender.php on line 72
    [03-Aug-2006 18:00:02] PHP Warning:  fopen(/home/systemtek/public_html/dbsender/systemte_phpbb1-080306-0600pm_sql.tar.gz): failed to open stream: No such file or directory in /home/systemte/public_html/dbsender/dbsender.php on line 80
    [03-Aug-2006 18:00:02] PHP Warning:  filesize(): Stat failed for /home/systemtek/public_html/dbsender/systemte_phpbb1-080306-0600pm_sql.tar.gz (errno=2 - No such file or directory) in /home/systemte/public_html/dbsender/dbsender.php on line 81
    [03-Aug-2006 18:00:02] PHP Warning:  fread(): supplied argument is not a valid stream resource in /home/systemte/public_html/dbsender/dbsender.php on line 81
    [03-Aug-2006 18:00:02] PHP Warning:  fclose(): supplied argument is not a valid stream resource in /home/systemte/public_html/dbsender/dbsender.php on line 82
  6. Hi, sorry i am new to MySQL !, OK i read up and sucessfully created a username and password in mysql, so i try to install the XMB as per the instructions by running the install.html file, the first bit goes ok then i get this error :

     

    Notice: Undefined variable: list in c:inetpubwwwrootforumxmb.php on line 65

     

    Database connection error!!!

    A connection to the Database could not be established.

    Please check your username, password, database name and host.

    Also make sure config.php is rightly configured!

     

    When connecting, the database returned:

    Error 1045: Access denied for user: \'systemtek2@localhost\' (Using password: YES)

     

    The username and password in config.php match that i created as a mysql user.....what can be wrong here ?

     

    Thanks

    Duncan

  7. Hi and thanks for reply, i have been looking into this past few days, can anyone tell me, on a server win 2000 on IIS5 with PHP enabled and mysql if i install a forum such as XMB or whatever will i have to manually create tables etec in mysql how does it work ? thanks

  8. Hi All, i am never used MySql before and need a littel bit of help. I have a web server that i have enabled php on as i wish to do a forum and this uses the php and MySql to run. I think the php has installed ok. I am having problems with the MySql part, i am not familiar with SQL at all. I have installed MySql ver 4.0.16 for windows and i am unsure how to configure it, when i point my browser at my php code i get this :

     

    Database connection error!!!

    A connection to the Database could not be established.

    Please check your username, password, database name and host.

    Also make sure config.php is rightly configured!

     

    When connecting, the database returned:

    Error 1045: Access denied for user: \'systemtek2@localhost\' (Using password: YES)

     

    I have got a my.cnf in root of drive on the web box but really need help if possibe how to get this going, i dont know where in mysql i add my username and password etc etc or how to set it up, could not understand the guide i read.

     

    Any help would be apreciated

     

    Duncan

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.