IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1952.35 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-06-15
Pages: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Next >
[00:00]<ddsvd>+richardlynch, ||cw: thanks for your help
[00:01]<dzzazjsjpv>-<base href="http://www.mysite.com" /> <---- this is usually the way we need to keep image links and such in check when creating new dir... correct?
[00:02]<zdzxzzmfdgzx>+marcrosoft: Maybe I'm just used to ancient browsers, but my experience with BASE tag is it is unreliable...
[00:03]<dzzazjsjpv>-hmm, well then the other option is to have absolute paths, thats a waste of space...
[00:03]<amcr>+j0!
[00:04]<amcr>+Hello boys and girls - I'm having some PDO issues:
[00:04]<zdzxzzmfdgzx>+marcrosoft: My images are usually at <IMG SRC="/images" /> which only "wastes" one character for the leading "/"
[00:05]<amcr>+This is the site, you'll notice some.. errors [most of the blah blah is debugging stuff]: http://kg.brainsware.org/ --- This is the Navigation class I use to create a Navigation with items and sub items: http://kg.brainsware.org/classes/Navigation.class.phps ---- Here are some wrappers for PDO I wrote to catch the Exceptions it throws: http://kg.brainsware.org/classes/dbconn.dbc.phps
[00:05]<zdzxzzmfdgzx>+If you have to count the characters in the URL to be significant in your HTML bandwidth, then you're in trouble, or you're Google...
[00:05]<amcr>+[I'm running the latest PHP/pdo/blah stuff available via dotdeb on Debian Sarge]
[00:07]<wjlllrws>+ACTION blinks at WhiteWolf
[00:08]<zdzxzzmfdgzx>+jMCg: All I can say is that I have only heard a lot of wailing and gnashing of teeth from people who are going to the bleeding edge of using PDO. YMMV.
[00:09]<amcr>+Well... this is the very first time I got any issues of such an extent.
[00:09]<ajzdja>+Hihi, I was wondering if anyone in here uses memcached via the PECL memcache extention?
[00:09]<-- svgvsdyzgjvr xrs>/dev/null")
[00:09]<zdzxzzmfdgzx>+It is entirely possible that there are a billion users who sail through with no trouble, and I never met them.
[00:10]<amcr>+richardlynch, those who don't have any troubles don't com[plain.
[00:10]<zdzxzzmfdgzx>+Yes -- though some do sing the praises of the new tech -- and I ain't heard of none of that yet. :-)
[00:11]<amcr>+I sang the praises until this morning.
[00:11]<zdzxzzmfdgzx>+:-)
[00:11]<amcr>+[It's 23:09 now.. but I didn't work all day on it ;]
[00:12]<ajzdja>+So if I install a PECL extention to php, it should just work, sorta like a pear extention, right?
[00:12]<zdzxzzmfdgzx>+Try on PHP-General -- And if that fails, PHP-Internals. But it's off-topic for Internals, so go gently.
[00:12]<zdzxzzmfdgzx>+kormoc: Yes. PEAR and PECL share a lot of the installation code/paradigm.
[00:12]<ajzdja>+ACTION ponders
[00:12]<amcr>+richardlynch, suppose you're talking mailing lists
[00:12]<ajzdja>+this PECL memcache install installed a .so file, but it doesn't appear to be loading
[00:13]<zdzxzzmfdgzx>+jMCg: Afraid so. But you need not subscribe to post to General, as it's simply to high-volume -- Last i heard anyway.
[00:14]<zdzxzzmfdgzx>+kormoc: You may need to install memcache itself as its own package, same as you would MySQL the database.
[00:14]<ajzdja>+richardlynch, I mean, it's not providing the functions on the php side of things
[00:14]<amcr>+ACTION considers abusing google for this.
[00:14]<ajzdja>+richardlynch, unknown function memcache_connect and similar
[00:15]<zdzxzzmfdgzx>+kormoc: It may have failed to install BECAUSE you don't have the memcache installed, just as mysql_php functions would not install if you didn't have MySQL in the first place.
[00:15]<ajzdja>+shh
[00:15]<ajzdja>+erm
[00:15]<ajzdja>+ahh
[00:15]<ajzdja>+but I have memcached installed and running
[00:15]<ajzdja>+connects to it fine via perl and c
[00:15]<zdzxzzmfdgzx>+kormoc: What is the exact error message about the ".so" file?
[00:16]<ajzdja>+nothing at all
[00:16]<ajzdja>+it just never loads it
[00:16]<eyzau>-kormoc: does it say it is installed via phpinfo(); output?
[00:16]<ajzdja>+zircu, nope, which is why I'm confused
[00:16]<zdzxzzmfdgzx>+kormoc: What is the exact name of the ".so" file?
[00:17]<ajzdja>+it installs into /usr/lib/php/modules/memcache.so just fine
[00:17]<zdzxzzmfdgzx>+kormoc: Did you edit your php.ini and add a line to load that Module? And re-start Apache?
[00:17]<ajzdja>+richardlynch, I didn't add a line to php.ini, didn't know I had to. Let me give that a shot
[00:18]<zdzxzzmfdgzx>+kormoc: It may already be there and you just need to take out the ; in that line.
[00:18]<ajzdja>+the documentation for PECL seems rather... lacking
[00:18]<eyzau>-kormoc: for installation?
[00:18]<ajzdja>+yeah
[00:18]<zdzxzzmfdgzx>+You gonna have to talk to the PECL guys about that one...
[00:19]<eyzau>-kormoc: how did you install this, is it a package php_mmcache module or you are doing this from a pecl install?
[00:19]<ajzdja>+heh, no worries, just seems like something they should of memtioned in the install directions
[00:19]<ajzdja>+zircu, it's in pear, so I just did pear install memcache
[00:20]<eyzau>-kormoc: well technically it is pecl, and uses the pear installer but yea
[00:20]<zdzxzzmfdgzx>+kormoc: It's possible that their installer attempted, or even succeeded, in changing *A* php.ini file, but not the one you are actually using.. :-)
[00:20]<tml>+kormoc: When it's a .so file, you need to edit php.ini and restart the web server to get it loaded.
[00:20]<ajzdja>+zircu, and that didn't work, and it's version 1.5, and on the site, they have 2.0.4 stable, so I downloaded that, pear uninstall memcache, and then pear install memcache-2.0.4.tar.gz and that installed it as well, but still didn't work.
[00:20]<amcr>+ACTION hopes the errors are at least somehow related in php-cli and mod_php
[00:20]<tml>+I don't believe the pear utility does that magically.
[00:20]<ajzdja>+ACTION nods
[00:21]<ajzdja>+makes sense
[00:21]<nzzusnrzwz>+is there a function to get all the headers of the columns in a postgresql dataresult? trying to just get all the column headers so i can make a dynamic html table from result sets without recoding it all the time
[00:21]<tml>+Narusegawa: Use pg_fetch_assoc and array_keys
[00:21]<zdzxzzmfdgzx>+Narusegawa: Look for something like pg_field_name in http://php.net/
[00:22]<ajzdja>+zircu, richardlynch, TML, That did it. Thank you very much.
[00:22]<eyzau>-kormoc: yeah you are correct that it doesn't mention that you need to edit the php.ini file to enable it, i would suggest to add a documentation bug about that
[00:22]<eyzau>-installing pecl from source it tells you, edit your php.ini file
[00:23]<suzpmun>+hi :P
[00:23]<ajzdja>+zircu, doesn't appear to in my output, but perhaps it's just a bum version
[00:23]<ajzdja>+zircu, yeah, I'll add that document bug. Thanks very much
[00:23]<suzpmun>+zircu, long time no talk
[00:25]<cbtc>+ok so Im using php to process a form, the php also validates all the required fields. However I have a question which uses javascript to hide/show <tr> based on the answer. I want to have each <tr> not hidden become required fields and be validated. Could I use php to do this based on the <tr> that is NOT hidden, and not validate the <tr> that IS hidden??
[00:26]<mzzcz9q>-CBTC: I think it would be better if you validate the fields for consistency with respect to each other, rather than what's shown / hidden. So use the answers of the other questions to enable/disable the validation of dependent field
[00:27]<mzzcz9q>-I find it easiest not to do client-side validation at all, because I'm lazy and don't like doing things more than once
[00:27]<rsmw>-shall I use mysql_fetch_assoc instead of mysql_fetch_rows?
[00:27]<cbtc>+in this case certain fields do need to be validated for an answer
[00:27]<tml>+CBTC: Better still, rather than showing/hiding the <tr>s, you can make sure that the <tr> only exists when it is appropriate.
[00:27]<cbtc>+but in the case of *question 10*
[00:28]<ceredtuw>+I'm having a little bit of a problem figuring out php 5 oop and object handling accross sessions, any tips?
[00:28]<cbtc>+I only want to validate the <tr> if it becomes visible, and not validate the ones still hidden
[00:29]<cbtc>+it seems that the way I have the validation setup it would fail if it validates all the <tr> fields hidden or not. as there needs to be some sort of answer filled in
[00:29]<amcr>+Once again: http://kg.brainsware.org/ --- http://kg.brainsware.org/classes/Navigation.class.phps ---- PDO wrapers: http://kg.brainsware.org/classes/dbconn.dbc.phps ---- And this is the strace -f -a 2554 I get when I run it in the console http://kg.brainsware.org/pdo_debug.txt
[00:30]<zdzxzzmfdgzx>+CBTC: Whatever you use to toggle the show/hide of the TR needs to change SOMETHING that gets sent to PHP. PHP has no friggin' idea what is visible on the browser. So set up a checkbox or a HIDDEN input and PHP can tell from that input if the other inputs are supposed to be there, and validate them then.
[00:30]<cbtc>+MarkR42: could you guide me to a url that could show me what I could do to enable/disable the validation based on the answer
[00:31]<mzzcz9q>-CBTC: No, you just do.
[00:31]<eyzau>-hmm.. i would be neet to have .phps files output with line numbers
[00:31]<tml>+CBTC: Don't put the <tr> on the page as invisible. Create it as a DOM object and use the DOM to add the <tr> when it needs to be there and remove it when it's not.
[00:31]<zdzxzzmfdgzx>+jMCg: I would fix the Undefined index E_NOTICE messages first...
[00:32]<cbtc>+MarkR42: well I understand the concept of what your saying, but frankly I am still a n00b when it comes to php
[00:32]<mzzcz9q>-CBTC: It's nothing to do with PHP, just normal programming, use an "if" block.
[00:32]<zdzxzzmfdgzx>+zircu: http://php.net/highlight or somesuch gives you the lines. You add the numbers. Done.
[00:33]<eyzau>-jMCg: heh.. odd, you are changing objects to function calls? :)
[00:33]<amcr>+richardlynch, this has ABSOLOUTELY nothing to do with the PDO stuff.
[00:33]<cbtc>+MarkR42: Bare with me, I'm still new to all this
[00:33]<amcr>+zircu, care to explain your asumption which I do not understand.
[00:34]<amcr>+[I just did a ltrace.. which I'm not gonna paste as it's 241MiB]
[00:34]<eyzau>-jMCg: you made wrappers PDOQuery() to pass a pdo object and its options as if you called $pdo->query();
[00:35]<amcr>+zircu, because I would have to have handled each of the FUCKING exceptions which looks UGLY in a foreach - don't you think?







