Jump to content
Larry Ullman's Book Forums

kam

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by kam

  1. Good Morning Larry.

     

    After user registers successfully, The email for registration confirmation I want include a link to an activation page site. at Page 90

    Now I have activate page and code column set to NULL value so to complete the activation process it looks I am missing some php script which I want some help from you.

     

    I hope you understand, English is my second language

     

    Thanks

  2. Good Morning.

     

    I am using Zend framework accessing the login page:

    $adapter = new Zend_Auth_Adapter_DbTable($dbRead, 'users', 'username', 'password', 'sha1(?)');

    also I tested in dreamweaver log in user server behavior:

    if (isset($_POST['password'])) {$_POST['password'] = sha1($_POST['password']); }

     

    The thing is both logins fails. I think since the password stored as binary it cannot be dycrypted.

    is there anyway we can store the password SHA1 or MD5 directly in the database instead hash_hmac()

     

    Thanks

  3.  

    Thanks again.

     

    I added the redirect page after

     

    $r = mysqli_query ($dbc, $q);

     

    if (mysqli_affected_rows($dbc) == 1) { // If it ran OK.

     

     

     

    header('Location: http://www.citidesigners.com');

     

     

    and I am getting this error.

     

     

    An error occurred in script '/home3/citide/public_html/reg.php' on line 115:

    Cannot modify header information - headers already sent by (output started at /home3/citide/public_html/reg.php:7)

     

    Array

    (

    [0] => Array

    (

    [function] => my_error_handler

    [args] => Array

    (

    [0] => 2

    [1] => Cannot modify header information - headers already sent by (output started at /home3/citide/public_html/reg.php:7)

     

     

    please help.

     

    Thanks

  4. <pre class="prettyprint">

    I added

    </pre>

    <pre class="prettyprint">

    <span class="pln"><font color="#000000">echo mysqli_error</font></span><span class="pun"><font color="#666600">(</font></span><span class="pln"><font color="#000000">$dbc</font></span><span class="pun"><font color="#666600">);</font></span></pre>

    <p><span class="pun"><font color="#666600">after </font></span></p>

    <pre class="prettyprint">

    <span class="pun"><font color="#666600"><span class="pln"><font color="#000000">trigger_error</font></span><span class="pun"><font color="#666600">(</font></span><span class="str"><font color="#008800">'You could not be registered due to a system error. We apologize for any inconvenience.'</font></span><span class="pun"><font color="#666600">);</font></span></font></span></pre>

    <p> </p>

    <p><span class="pun"><font color="#666600">It's working now and Thanks very much for the help.</font></span></p>

    <p> </p>

    <p> </p>

    <p> </p>

    <p> </p>

    <p><br />

     </p>

     

  5. Hello Larry.

    I need little help on registration page 80. I am getting this error when I uploaded to my site, but it looks fine and working on localhost. Also I am not getting an email that there is an errors on this page . Please help me. Thanks

     

    An error occurred in script '/home3/citi/public_html/test/includes/reg.php' on line 155:

    You could not be registered due to a system error. We apologize for any inconvenience.

    Array

    (

    [0] => Array

    (

    [function] => my_error_handler

    [args] => Array

    (

    [0] => 1024

    [1] => You could not be registered due to a system error. We apologize for any inconvenience.

    [2] => /home3/citi/public_html/test/includes/reg.php

    [3] => 155

    [4] => Array

    (

    [GLOBALS] => Array

    *RECURSION*

    [_POST] => Array

    (

    [first_name] => test

    [last_name] => hello

    [username] => testings

    => test@example.com

    [pass1] => Hihi123

    [pass2] => Hihi123

    [category] => 3

    [title] => test

    [description] => test

    [submit_button] => Next →

     

    )

    [_GET] => Array

    (

    )

    [_COOKIE] => Array

    (

    [__utma] => 8882487.567969204.1322294083.1322294083.1322294083.1

    [__utmz] => 8882487.1322294083.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)

    )

    [_FILES] => Array

    (

    )

    [_SERVER] => Array

    (

    [CONTENT_LENGTH] => 168

    [CONTENT_TYPE] => application/x-www-form-urlencoded

    [DOCUMENT_ROOT] => /home3/citi/public_html/

    [GATEWAY_INTERFACE] => CGI/1.1

    [HTTP_ACCEPT] => image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, */*

    [HTTP_ACCEPT_ENCODING] => gzip, deflate

    [HTTP_ACCEPT_LANGUAGE] => en-us

    [HTTP_CACHE_CONTROL] => no-cache

    [HTTP_CONNECTION] => keep-alive

    [HTTP_COOKIE] => __utma=8882487.567969204.1322294083.1322294083.1322294083.1; __utmz=8882487.1322294083.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=129758494.1909320003.1322984088.1322984088.1324242202.2; __utmz=129758494.1322984088.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)

     

    [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)

    [HTTP_X_VIA] => Harmony proxy

    [PATH] => /bin:/usr/bin

    [QUERY_STRING] =>

    [REDIRECT_STATUS] => 200

     

    The Localhost looks fine .

    Thanks!

     

    Thank you for registering! To complete the process, please now click the below link to login the site

    Click Next

    An error occurred in script 'C:\xampp\htdocs\server\content\includes\reg.php' on line 139:

    mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

     

    Array

     

    (

     

    [0] => Array

     

    (

     

    [function] => my_error_handler

     

    [args] => Array

     

    (

     

    [0] => 2

     

    [1] => mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

     

    [2] => C:\xampp\htdocs\server\content\includes\reg.php

     

     

     

     

    Thanks

  6. Right. It's the same problem--a stored procedure doesn't exist--but with a different stored procedure. As the error message clearly states, the stored procedure get_shopping_cart_contents() does not exist in the database. You have to create it. In other words, do whatever you did in the other thread to get that one working.

     

     

    Thank you very much. That what I'll do.

     

     

    Best wishes.

  7. Hello

     

    I have a problem with cart.php

     

    is there anybody can help me fixing this errors Please.

     

    An error occurred in script 'C:\xampp\htdocs\SERVER\commerce\html\cart.php' on line 81:

    mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given

     

    Array

    (

    [0] => Array

    (

    [function] => my_error_handler

    [args] => Array

    (

    [0] => 2

    [1] => mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given

    [2] => C:\xampp\htdocs\SERVER\commerce\html\cart.php

    [3] => 81

    [4] => Array

    (

    [GLOBALS] => Array

    *RECURSION*

    [_POST] => Array

    (

    )

     

    [_GET] => Array

    (

    [sku] => O2

    [action] => add

    )

     

    [_COOKIE] => Array

    (

    [sESSION] => ba0249306d8d4ca114d87bd61d5270a0

    )

     

    [_FILES] => Array

    (

    )

     

    [live] =>

    [contact_email] => you@example.com

    [uid] => ba0249306d8d4ca114d87bd61d5270a0

    [page_title] => Coffee - Your Shopping Cart

    [dbc] => mysqli Object

    (

    [affected_rows] => -1

    [client_info] => mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $

    [client_version] => 50007

    [connect_errno] => 0

    [connect_error] =>

    [errno] => 1305

    [error] => PROCEDURE ecommerce2.get_shopping_cart_contents does not exist

    [field_count] => 0

    [host_info] => localhost via TCP/IP

    [info] =>

    [insert_id] => 0

    [server_info] => 5.5.8

    [server_version] => 50508

    [sqlstate] => 42000

    [protocol_version] => 10

    [thread_id] => 20

    [warning_count] => 0

    )

     

    [pid] => 2

    [sp_type] => other

    [r] =>

    )

     

    )

    )

     

    [1] => Array

    (

    [file] => C:\xampp\htdocs\SERVER\commerce\html\cart.php

    [line] => 81

    [function] => mysqli_num_rows

    [args] => Array

    (

    [0] =>

    )

     

    )

     

    )

     

     

    Your Shopping Cart

    Your shopping cart is currently empty.

     

    Thanks

  8. Hello Larry.

    I followed your book and almost second day I have problem config files. Please help.

    define ('BASE_URI', 'C:/xampp/htdocs/server/commerce/');

    define ('BASE_URL', 'localhost/');

    define ('MYSQL', BASE_URI . 'mysql.inc.php');

     

    database coonection

     

    DEFINE ('DB_USER', 'commerce');

    DEFINE ('DB_PASSWORD', 'password');

    DEFINE ('DB_HOST', 'localhost');

    DEFINE ('DB_NAME', 'ecommerce2');

     

    // Make the connection:

    $dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);

     

     

     

    AND here is the error.

     

    An error occurred in script 'C:\xampp\htdocs\SERVER\commerce\html\views\home.html' on line 14:

    mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given

     

    Array

    (

    [0] => Array

    (

    [function] => my_error_handler

    [args] => Array

    (

    [0] => 2

    [1] => mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given

    [2] => C:\xampp\htdocs\SERVER\commerce\html\views\home.html

    [3] => 14

    [4] => Array

    (

    [GLOBALS] => Array

    *RECURSION*

    [_POST] => Array

    (

    )

     

    [_GET] => Array

    (

    )

     

    [_COOKIE] => Array

    (

    [sESSION] => ba0249306d8d4ca114d87bd61d5270a0

    )

     

    [_FILES] => Array

    (

    )

     

    [live] =>

    [contact_email] => you@example.com

    [page_title] => Coffee - Wouldn't You Love a Cup Right Now?

    [dbc] => mysqli Object

    (

    [affected_rows] => -1

    [client_info] => mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $

    [client_version] => 50007

    [connect_errno] => 0

    [connect_error] =>

    [errno] => 1305

    [error] => PROCEDURE ecommerce2.select_sale_items does not exist

    [field_count] => 0

    [host_info] => localhost via TCP/IP

    [info] =>

    [insert_id] => 0

    [server_info] => 5.5.8

    [server_version] => 50508

    [sqlstate] => 42000

    [protocol_version] => 10

    [thread_id] => 12

    [warning_count] => 0

    )

     

    [r] =>

    )

     

    )

     

    )

     

    [1] => Array

    (

    [file] => C:\xampp\htdocs\SERVER\commerce\html\views\home.html

    [line] => 14

    [function] => mysqli_num_rows

    [args] => Array

    (

    [0] =>

    )

     

    )

     

    [2] => Array

    (

    [file] => C:\xampp\htdocs\SERVER\commerce\html\index.php

    [line] => 20

    [args] => Array

    (

    [0] => C:\xampp\htdocs\SERVER\commerce\html\views\home.html

    )

     

    [function] => include

    )

     

    )

     

     

    Welcome to Our Online Coffee House!

×
×
  • Create New...