[PHP] Re: php w/ mysql support compiled in -- can't connect to mysql
hi, I would suggest u do not put path to mysql with php configure...simply, --with-mysql will do.. hope iit works, thank you regards, James Kurt Lieber wrote: > OK, there's been another thread floating around about getting: > > Fatal error: Call to undefined function: mysql_pconnect() > > Turns out, I'm getting this same error message for both mysql_pconnect > as well as plain mysql_connect. I'm using the PHP debian package found > in potato. (4.0.3pl1) phpInfo() shows me the configure command which > includes: > > '--with-mysql=shared,/usr' > > So, I'm assuming that I really have mysql support compiled in. mysql > lives in /usr/bin/mysql (and is also the debian potato package) > > I'm used to windows -- this is the first time I've tried to set up > php/mysql on linux, so I'm hoping I'm just overlooking something > obvious. Anyone have any ideas? > > Thanks. > > --kurt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: OOP Problems
hie.. it's simply u did not declare ur class variable... class ctest { var $owner; function ctest(&$owner) { $this->owner = $owner; } function foo() { echo "test!"; } } hope it works :) regards, James Andrew Kirilenko wrote: > Hello! > > I have following problem: > > $container = new ccontainer(); > $container->init(); > $container->test1->foo(); > $container->test2->foo(); > $container->test2->owner->test1->foo(); > $container->test1->owner->test2->foo(); > > class ccontainer > { > function ccontainer() > { > } > > function init() > { > $this->test1 = new ctest(&$this); > $this->test2 = new ctest(&$this); > } > } > > class ctest > { > function ctest(&$owner) > { > $this->owner = $owner; > } > > function foo() > { > echo "test!"; > } > } > ?> > > Output of this script is: > ---> > test! > test! > test! > Fatal error: Call to a member function on a non-object in c:\www\a.php on > line 8 > <--- > > How to solve this problem??? > > Best regards, > Andrew Kirilenko, > Senior Programmer / System Administrator, > Internet Service. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]