Jump to content

colap

Members
  • Posts

    302
  • Joined

  • Last visited

Everything posted by colap

  1. If i click the login link i get error => Notice: Array to string conversion in /var/www/site/library/Zend/View/Helper/HtmlElement.php on line 104 Call Stack: 0.0003 335540 1. {main}() /var/www/site/public/index.php:0 0.0682 4242800 2. Zend_Application->run() /var/www/site/public/index.php:26 0.0683 4242800 3. Zend_Application_Bootstrap_Bootstrap->run() /var/www/site/library/Zend/Application.php:366 0.0684 4242872 4. Zend_Controller_Front->dispatch() /var/www/site/library/Zend/Application/Bootstrap/Bootstrap.php:97 0.0789 4866464 5. Zend_Controller_Dispatcher_Standard->dispatch() /var/www/site/library/Zend/Controller/Front.php:954 0.0867 5201824 6. Zend_Controller_Action->dispatch() /var/www/site/library/Zend/Controller/Dispatcher/Standard.php:295 0.1095 6672344 7. Zend_Controller_Action_HelperBroker->notifyPostDispatch() /var/www/site/library/Zend/Controller/Action.php:523 0.1095 6673344 8. Zend_Controller_Action_Helper_ViewRenderer->postDispatch() /var/www/site/library/Zend/Controller/Action/HelperBroker.php:277 0.1096 6673344 9. Zend_Controller_Action_Helper_ViewRenderer->render() /var/www/site/library/Zend/Controller/Action/Helper/ViewRenderer.php:957 0.1107 6673592 10. Zend_Controller_Action_Helper_ViewRenderer->renderScript() /var/www/site/library/Zend/Controller/Action/Helper/ViewRenderer.php:918 0.1107 6673592 11. Zend_View_Abstract->render() /var/www/site/library/Zend/Controller/Action/Helper/ViewRenderer.php:897 0.1108 6714828 12. Zend_View->_run() /var/www/site/library/Zend/View/Abstract.php:880 0.1109 6716384 13. include('/var/www/site/application/views/scripts/index/login.phtml') /var/www/site/library/Zend/View.php:108 0.1133 6810172 14. Zend_Form->__toString() /var/www/site/library/Zend/Form.php:0 0.1133 6810172 15. Zend_Form->render() /var/www/site/library/Zend/Form.php:2903 0.1168 6970720 16. Zend_Form_Decorator_FormElements->render() /var/www/site/library/Zend/Form.php:2887 0.1336 7588600 17. Zend_Form_Element->render() /var/www/site/library/Zend/Form/Decorator/FormElements.php:101 0.1345 7590872 18. Zend_Form_Decorator_ViewHelper->render() /var/www/site/library/Zend/Form/Element.php:2020 0.1362 7609432 19. Zend_View->formPassword() /var/www/site/library/Zend/Form/Decorator/ViewHelper.php:246 0.1362 7609880 20. Zend_View_Abstract->__call() /var/www/site/library/Zend/View/Abstract.php:0 0.1362 7610208 21. call_user_func_array() /var/www/site/library/Zend/View/Abstract.php:342 0.1362 7610656 22. Zend_View_Helper_FormPassword->formPassword() /var/www/site/library/Zend/View/Abstract.php:0 0.1365 7613744 23. Zend_View_Helper_HtmlElement->_htmlAttribs() /var/www/site/library/Zend/View/Helper/FormPassword.php:89 0.1365 7614364 24. implode() /var/www/site/library/Zend/View/Helper/HtmlElement.php:104 Can anyone tell why am i getting this error? And how can i solve it ? public function loginAction() { $obj = new Application_Form_Login(); $request = $this->getRequest(); if ($request->isPost()) { if ($obj->isValid($request->getPost())) { if ($this->_process($obj->getValues())) { $this->_helper->redirector('arcade', 'index'); } } } $this->view->form=$obj; } Login form => <?php class Application_Form_Login extends Zend_Form { public function init() { $this->setName("login"); $this->setMethod("post"); $temp=array(array('StringLength',false,array(0,50))); $this->addElement('text','usr',array( 'filters'=>array('StringTrim','StringToLower'), 'validators'=>$temp, 'required'=>true, 'label'=>'Username', )); $this->addElement('password','psw',array( 'filters'=>array('StringTrim'), 'validator'=>$temp, 'required'=>true, 'label'=>'Password', )); $this->addElement('submit','log',array( 'required'=>false, 'ignore'=>true, 'label'=>'Login', )); } }
  2. I tried this: $listyear = array(); for($i=2010;$i<=2020;$i++){ array_push($listyear,array($i => $i)); } Array ( [0] => Array ( [2010] => 2010 ) [1] => Array ( [2011] => 2011 ) [2] => Array ( [2012] => 2012 ) [3] => Array ( [2013] => 2013 ) [4] => Array ( [2014] => 2014 ) [5] => Array ( [2015] => 2015 ) [6] => Array ( [2016] => 2016 ) [7] => Array ( [2017] => 2017 ) [8] => Array ( [2018] => 2018 ) [9] => Array ( [2019] => 2019 ) [10] => Array ( [2020] => 2020 ) ) But i want in this format : Array( [2010] = 2010 [2011] = 2011 ........ )
  3. When i start a topic/thread or reply for a post i get and option "Notify me of replies" at bottom of the form as a checkbox. Is this for email notification of forum notification ? That's confusing. Forum notification is >Profile>Modify Profile>Notification.
  4. Which is better to use echo 'Hello world' or echo "Hello world" ?
  5. I'm notified when someone replies to my thread. How can i stop this. But i want to keep getting notification here in phpfreaks forum when i log in phpfreaks forum,but not in my personal mail.
  6. Which is valid/better data type for date in postgresql table? Is it date or datetime ? create table dd ( id serial primary key, title varchar(50) not null, created_at date);
  7. mysql> describe acos; +-------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------+----------------+ | id | int(10) | NO | PRI | NULL | auto_increment | | parent_id | int(10) | YES | | NULL | | | model | varchar(255) | YES | | NULL | | | foreign_key | int(10) | YES | | NULL | | | alias | varchar(255) | YES | | NULL | | | lft | int(10) | YES | | NULL | | | rght | int(10) | YES | | NULL | | +-------------+--------------+------+-----+---------+----------------+ 7 rows in set (0.00 sec) mysql> describe aros; +-------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------+----------------+ | id | int(10) | NO | PRI | NULL | auto_increment | | parent_id | int(10) | YES | | NULL | | | model | varchar(255) | YES | | NULL | | | foreign_key | int(10) | YES | | NULL | | | alias | varchar(255) | YES | | NULL | | | lft | int(10) | YES | | NULL | | | rght | int(10) | YES | | NULL | | +-------------+--------------+------+-----+---------+----------------+ 7 rows in set (0.00 sec) mysql> describe aros_acos; +---------+------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------+------------+------+-----+---------+----------------+ | id | int(10) | NO | PRI | NULL | auto_increment | | aro_id | int(10) | NO | MUL | NULL | | | aco_id | int(10) | NO | | NULL | | | _create | varchar(2) | NO | | 0 | | | _read | varchar(2) | NO | | 0 | | | _update | varchar(2) | NO | | 0 | | | _delete | varchar(2) | NO | | 0 | | +---------+------------+------+-----+---------+----------------+ 7 rows in set (0.00 sec) How are acos,aros table created? Why are the table structures like that? mysql> select * from aros; +----+-----------+-------+-------------+-------+------+------+ | id | parent_id | model | foreign_key | alias | lft | rght | +----+-----------+-------+-------------+-------+------+------+ | 1 | NULL | Group | 1 | NULL | 1 | 2 | | 2 | NULL | Group | 2 | NULL | 3 | 4 | | 3 | NULL | Group | 3 | NULL | 5 | 6 | | 4 | NULL | Group | 4 | NULL | 7 | 8 | | 5 | NULL | Group | 5 | NULL | 9 | 10 | | 6 | NULL | Group | 6 | NULL | 11 | 12 | | 7 | NULL | Group | 7 | NULL | 13 | 14 | | 8 | NULL | Group | 8 | NULL | 15 | 16 | | 9 | NULL | Group | 9 | NULL | 17 | 18 | | 10 | NULL | Group | 10 | NULL | 19 | 22 | | 11 | NULL | Group | 11 | NULL | 23 | 24 | | 12 | NULL | Group | 12 | NULL | 25 | 28 | | 13 | NULL | Group | 13 | NULL | 29 | 30 | | 14 | NULL | User | 1 | NULL | 31 | 32 | | 15 | NULL | User | 2 | NULL | 33 | 34 | | 16 | NULL | User | 3 | NULL | 35 | 36 | | 17 | 12 | User | 4 | NULL | 26 | 27 | | 18 | 10 | User | 5 | NULL | 20 | 21 | +----+-----------+-------+-------------+-------+------+------+ 18 rows in set (0.02 sec) mysql> select * from acos; +----+-----------+-------+-------------+-------------+------+------+ | id | parent_id | model | foreign_key | alias | lft | rght | +----+-----------+-------+-------------+-------------+------+------+ | 1 | NULL | NULL | NULL | controllers | 1 | 2 | +----+-----------+-------+-------------+-------------+------+------+ 1 row in set (0.00 sec) mysql> select * from aros_acos; Empty set (0.00 sec) Can someone please explain how it works? I can setup user authentication and after successfull authentication it will allow/deny some actions for controllers. So why do we need acl? And when is acl needed/must? Can't understand the concept of acl. I have read the article from cakephp book.
  8. $this->val = $xmldoc->dump_mem(true, "ISO-8859-1"); What's the equivalent function of dump_mem in php5?
  9. var_dump($obj); object(php4DOMDocument)#289 (2) { ["myDOMNode"]=> object(DOMDocument)#295 (0) { } ["myOwnerDocument"]=> *RECURSION* } Search Again How can i get the value inside of this Dom object ?
  10. Is it possible to access php 4 class member function or variable with a dot(.) ? Is arrow(->) for php5 syntax ?
  11. Doing print_r($val); I get php4DOMDocument Object ( [myDOMNode] => DOMDocument Object ( ) [myOwnerDocument] => php4DOMDocument Object *RECURSION* ) Is it possible to get the value of this object? I used this script. http://alexandre.alapetite.fr/doc-alex/domxml-php4-php5/index.en.html
  12. Put all random number in array. Check if a number is there twice before storing into database.
  13. The second &, obj=& new classname();. Is that php-4 syntax?
  14. function &getInstance($boot = true) { static $instance = array(); if (!$instance) { if (!class_exists('Set')) { require LIBS . 'set.php'; } $instance[0] =& new Configure(); $instance[0]->__loadBootstrap($boot); } return $instance[0]; } Why is & there? function &getInstance And is it php4 syntax using the & ?$instance[0] =& new Configure();
  15. Is there any debug function ?
  16. Hi, Is there any debug($val); command available for php code? How can i add a breakpoint in php code and do Next> to go for the next line like some C++ IDE? Is it possible with php code? Thanks.
  17. http://en.wikipedia.org/wiki/List_of_Open_Source_eCommerce_Software or other..
  18. Why is it necessary to define $bmi="" ; at top?
  19. More: http://php.net/manual/en/function.session-regenerate-id.php
  20. You can't include an image. You have to echo image inside a html image tag. That was simple.
  21. @galvan, Post your code in " .. " tag.
×
×
  • 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.