Jump to content

no1uno

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

no1uno's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello all I have PHP 4.4.2 installed on my Windows 2003 server with IIS6.0 and have no problems with it running. However I recently tried running a PHP app in a Virtual Directory and getting errors. Below is the error I'm getting and the a link to a phpinfo file. Could someone please have a look and possible suggest a fix. Thanks Error: PHP Warning: Unknown(): (null): Unable to initialize module Module compiled with module API=20050922, debug=0, thread-safety=1 PHP compiled with module API=20020429, debug=0, thread-safety=1 These options need to match in Unknown on line 0 PHP Warning: Unknown(): (null): Unable to initialize module Module compiled with module API=20050922, debug=0, thread-safety=1 PHP compiled with module API=20020429, debug=0, thread-safety=1 These options need to match in Unknown on line 0 PHP Warning: Unknown(): (null): Unable to initialize module Module compiled with module API=20050922, debug=0, thread-safety=1 PHP compiled with module API=20020429, debug=0, thread-safety=1 These options need to match in Unknown on line 0 PHP Warning: Unknown(): (null): Unable to initialize module Module compiled with module API=20050922, debug=0, thread-safety=1 PHP compiled with module API=20020429, debug=0, thread-safety=1 These options need to match in Unknown on line 0 PHP Warning: Unknown(): (null): Unable to initialize module Module compiled with module API=20050922, debug=0, thread-safety=1 PHP compiled with module API=20020429, debug=0, thread-safety=1 These options need to match in Unknown on line 0 PHP Warning: Unknown(): (null): Unable to initialize module Module compiled with module API=20050922, debug=0, thread-safety=1 PHP compiled with module API=20020429, debug=0, thread-safety=1 These options need to match in Unknown on line 0 Link to directory: https://secured.hobbywebhosting.com/oceanfresh/info.php
  2. Thank you to all for your advise. Crayon Violent, that makes sense. I sort of figured it would be in that area, but as I am new to PHP I wasn't 100% sure. I will see how it goes. Cheers
  3. read the what..the where??  ??? Sorry I'm not sure of your response. I would have expected changes could be made in this part of the script: [code]// Load the domain names and their ids into a variable $db = mysql_connect($dbhost, $dbuser, $dbpassword); mysql_select_db($dbname); $result = mysql_query("SELECT * FROM hm_domains WHERE domainactive = '1' ", $db); $domains = "<select name=\"domain\">"; while ($row = mysql_fetch_array($result)) { $domainid = $row['domainid']; $domainname = $row['domainname']; $domains .= "\n<option value=\"$domainid\">$domainname</option>"; } $domains .= "\n</select>"; mysql_close();[/code]
  4. Hello all I am new here (and new to PHP, but trying to learn) and would like to ask if anyone can please help me with a script. I will need to go off the track for a second to explain what I need. I have an email server running on my server to give my members email addresses (hmailserver) and currently I need to set them up manually. I wanted a script so that users can create thier own account, and I found one on the hmailserver forum. Now back to the help I need. The script (below) works fine except that I have 3 domains setup in the MySQL database and the script pulls up all 3 for ther to to choose from when I only want 1 domain available. Can someone see if the script be amended to show only one domain? Thanks in advance. [code]<?php // HMailServer New user signup Script Configuration die("You have to configure the script first"); // <- remove this line $dbhost = "localhost";  // host of the MySQL database $dbuser = "root";      // Database username $dbpassword = "";  // Your database password $dbname = "hmail";      // the name of the database that has the hmailserver tables $webmailurl = "http://www.yurdomainname.com/webmail/login.php"; // The url to login in the webbased mail system $quota = "50"; // The mailbox free space // Get the action if (strlen($_POST["pas1"]) <= 4 && IsSet($_POST["pas1"])) { $error .= "<centeR>Error: Your password must be longer than 4 characters</center>"; } else if ($_POST["pas1"] == "12345" && IsSet($_POST["pas1"])) { $error .= "<centeR>Error: Too simple password</center>"; } if (IsSet($_POST["action"])) { $action = $_POST["action"]; } else { $action = $_GET["action"]; } // If there is no action, open the page for a new registration if (!IsSet($action)) { // Load the domain names and their ids into a variable $db = mysql_connect($dbhost, $dbuser, $dbpassword); mysql_select_db($dbname); $result = mysql_query("SELECT * FROM hm_domains WHERE domainactive = '1' ", $db); $domains = "<select name=\"domain\">"; while ($row = mysql_fetch_array($result)) { $domainid = $row['domainid']; $domainname = $row['domainname']; $domains .= "\n<option value=\"$domainid\">$domainname</option>"; } $domains .= "\n</select>"; mysql_close(); echo " <center><b>Open a new E-Mail Account</b> <p> (*) fields are reguired.<br> <form action=\"\" name=\"registration\" method=\"post\"> <table border=\"0\"> <tr> <td>* Username: <td><input type=\"text\" name=\"username\">@<td>$domains<tr> <td>* Password: <td><input type=\"password\" name=\"pas1\"><Td><tr> <td>* Password again: <td><input type=\"password\" name=\"pas2\"><Td><tr> <td><td> <input type=\"hidden\" name=\"action\" value=\"register\"> <input type=\"Submit\" value=\"Signup\"><td><tr></td></tr> </table>"; } else if ($action == "register") { $domainid = $_POST["domain"]; $username = $_POST["username"]; $pas1 = $_POST["pas1"]; $pas2 = $_POST["pas2"]; //$firstname = $_POST["firstname"]; //$lastname = $_POST["lastname"]; if ($username == NULL) { $error = "Error: You have to enter your desired username\n"; } if ($domainid == NULL) { $error .= "Error: You have to choose a domain\n<Br>"; } if ($pas1 == NULL) { $error .= "Error: You have to enter your password\n<Br>"; } if ($pas1 != $pas2) { $error .= "Error: Your passwords does not match\n<Br>"; } //if ($firstname == NULL)  { //$error .= "Error: You have to enter your first name\n<Br>"; //} //if ($lastname == NULL)  { //$error .= "Error: You have to enter your last name\n<Br>"; //} //Check if the user exists for that domain $db = mysql_connect($dbhost, $dbuser, $dbpassword); mysql_select_db($dbname); $result = mysql_query("SELECT * FROM hm_domains WHERE domainid = '$domainid' ", $db); $result = @mysql_fetch_array($result); $address = $username . "@" . $result['domainname']; $result = mysql_query("SELECT * FROM hm_accounts WHERE accountaddress = '$address' ", $db); $result = @mysql_fetch_array($result); if ($result['accountid'] != "") { $error .= "Error: The E-Mail address $address is already registered, please coose another username or domain\n<Br>"; mysql_close(); } if (IsSet($error)) { echo "<Center>Oops, There was some errors, please submit the form again<br>"; echo $error; } else { // Insert the new user infos $passwd = md5($pas1); $db = mysql_connect($dbhost, $dbuser, $dbpassword); mysql_select_db($dbname); $query = "INSERT INTO hm_accounts (accountaddress, accountdomainid, accountadminlevel, accountpassword, accountactive, accountisad, accountmaxsize, accountpwencryption, accountvacationmessageon) VALUES ('$address','$domainid','0','$passwd','1','0','$quota','2','0')"; mysql_query($query) or die("Error: Can not query to the database"); mysql_close(); echo "<center><B>Completed!</b> <br><br> You have created an email account with us! you can use the E-Mail services eather by pop3/imap or by using the webmail system. <p>Please <A href=\"$webmailurl\">Login</a> to read or to send emails <p>Thank you $username for joining us"; } } echo "<center><p><em><font size=\"2\">Powered by <a target=\"hmail\" href=\"http://www.hmailserver.com\">HMailServer</a> @ All rights reserved</em></font></centeR>"; ?>[/code]
×
×
  • 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.