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.31 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-06-08
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
Next >
[00:00]<zdzxzzmfdgzx>Kurrasoe: The one defined in httpd.conf as the Apache User directive. PHP runs as that user, whatever it is. It's should be an under-powered user for security purposes.
[00:00]<vmmwno9>BigE: thats the error message I get would you like me to show you the code on pastebin?
[00:00]<d-00cyn>hrm.. can i not do: $str='abcd'; $str[2]='g'; echo $str; and get 'agcd'?
[00:00]<zdzxzzmfdgzx>tdd1984: On line 88, put this: echo mysql_error();
[00:01]<zdzxzzmfdgzx>m-00kie: No, you'd get abgc because a is 0 position.
[00:01]<kuzzrsjn>so apahe
[00:01]<d-00cyn>well yeah
[00:01]<zdzxzzmfdgzx>abgd, sorry.
[00:01]<kuzzrsjn>apache
[00:01]<d-00cyn>im getting strange behaviour though
[00:01]<d-00cyn>i have
[00:01]<zc_wjzc>hi, im new at XML, its complete diferent simplexml and xml parser ?!
[00:01]<d-00cyn>$_f='00000'; echo $_f[0]; it echos null
[00:02]<vmmwno9>http://pastebin.com/766120
[00:02]<vmmwno9>richardlynch: here look at that cause i had the lines messed up
[00:02]<vmmwno9>what line should i put that syntax on now?
[00:02]<buzyrg>I changed my max file size in my php.ini folder to 9 mb and it will still only allow me to upload 2....is there anything else to change?
[00:02]<d-00cyn>any idea why it doesnt seem to work?
[00:03]<adgya>m-00kie: It works fine for me... must be something else.
[00:03]<adgya>Time to run though, bye!
[00:04]<crfvrmjs>Hello, php-mysql can get a sql queries execution time ?
[00:04]<zdzxzzmfdgzx>m-00kie: http://pastebin.com/766127
[00:05]<zdzxzzmfdgzx>CalvadoS: You can either use SQL commands to get the time, if your DB has them, or you can use microtime() before/after, which includes the tiny overhead of PHP sending query.
[00:05]<crfvrmjs>hmm
[00:06]<vmmwno9>richardlync: did you get the new pastebin i posted?
[00:06]<crfvrmjs>well when I select something from mysql it returns 1 row in set (1.00 sec) after result
[00:07]<d-00cyn>richardlynch - http://pastebin.com/766135
[00:07]<d-00cyn>that's printing:
[00:07]<d-00cyn>F:
[00:07]<d-00cyn>OVER: /0,
[00:07]<d-00cyn>however if i move the F: line to above the if(()&&()) line, it prints fine
[00:08]<zc_wjzc>hi, i would like to know if simplexml is completely diferent from xml(expat), or simplexml is a easy way to use xml instead of xml parser (expat).
[00:08]<zdzxzzmfdgzx>m-00kie: First, you should not use $_f, I don't think.
[00:08]<cjzcf>m-00kie, why do you use if() : and not if() { } ? is that even legal?
[00:08]<d-00cyn>richardlynch - why not?
[00:09]<d-00cyn>korkl - huh?
[00:09]<ru2rg>hey all, I need to do two things in a variable.. how can I do that? I've looked all over the docs... IE: $currentdir=ltrim(dirname(__FILE__),substr(d:\testtest\test,0,3));. That removes d:\. I'd like to append a / before the output of $currentdir
[00:09]<zdzxzzmfdgzx>m-00kie: Reserved for PHP superglobals
[00:09]<cjzcf>m-00kie, sorry that was meant for richardlynch
[00:10]<d-00cyn>richardlynch - no, there's only 9 or so superglobals reserved in php
[00:10]<zdzxzzmfdgzx>I do not use the alternate syntax.
[00:10]<zdzxzzmfdgzx>m-00kie: I'm pretty sure PHP has reserved the right to create MORE superglobals someday, and $_ is for them.
[00:10]<zc_wjzc>cuban why don you use ereg_replace()
[00:11]<d-00cyn>well it works fine, until that if(()&&()) line
[00:11]<d-00cyn>i cant see WHY its breaking at that line..
[00:11]<n-xnrm>I have some pointer/reference questions.
[00:11]<n-xnrm>$a =& $b. Can reference assignments like this be used on arrays as well as objects ?
[00:11]<zc_wjzc>there is eregi_replace() for case insensitive
[00:11]<zdzxzzmfdgzx>m-00kie: The reason that you get NULL is that '00000' turns into the integer 0, and then you try to index an integer as an array. Make it be $_f = (string) '000000';
[00:12]<ru2rg>ak_work you mean like... $currentdir=ereg_replace(substr(dirname(__FILE__),"","321"));
[00:12]<d-00cyn>"\0" is null, not '00000' .. PHP doesnt even translate if you use single quotes, also..
[00:12]<sdfjw>hi, I have a search form with many options, any tips about why approach this through post or get requests? And.. avoiding a long file with lot's of if statements?
[00:13]<zdzxzzmfdgzx>m-00kie: You're right, it's not a conversion thing here. Tho PHP will convert when it sees fit...
[00:13]<bzuvusugyw>is it possible to use odbc connection to a remote database?
[00:13]<zc_wjzc>cuban ereg is regular expression, it search for a pattern and replaces that pattern, for everything that you want.
[00:13]<zc_wjzc>you can search for d:/ and replace for /
[00:14]<ru2rg>ak_work yes I'm aware but this should work should it not?
[00:14]<d-00cyn>well i converted "$_f" to "$gf", and still have the same problem
[00:14]<d-00cyn>$gf is echoing correctly ("00000") prior to the if(()&&())
[00:14]<ru2rg>ak_work: $currentdir=ereg_replace(substr("d:\test\test\test321",0,3),"","321");
[00:14]<zdzxzzmfdgzx>m-00kie: Yes. I have no idea why it is behaving so strangely. Change 00000 to 11111 and what do you get?
[00:14]<d-00cyn>same result
[00:15]<nrvxn>I know php supports $function($foo), but does does that support extend to methods?
[00:15]<zc_wjzc>cuban what do you want to do? replace d:
[00:15]<zc_wjzc>ops, d:\ for / ?
[00:15]<zdzxzzmfdgzx>Nathe: Try it and see.
[00:16]<zdzxzzmfdgzx>m-00kie: I dunno why they broke it, but use substr. :-)
[00:16]<sdfjw>Nathe: php.net/func_get_args
[00:16]<sdfjw>Nathe: ah.. you mean methods in classes , that works too
[00:18]<nrvxn>sylow: yeah I'm registering a callback function, and the majority, but not all of them are going to be methods
[00:18]<nrvxn>ehh. nm I just answered my question
[00:18]<nrvxn>blah
[00:19]<sdfjw>:)
[00:19]<nrvxn>sorry.. 4 hours of sleep and not enough cafffine
[00:19]<nrvxn>or caffine for that matter
[00:24]<n-xnrm>What does the & in the function definition "function &my_function()" imply ?
[00:25]<wjlllrws>!+&
[00:25]<svjzd2jv>[&] & is the PHP 'Reference' operator. See: http://php.net/references; & is Also the PHP bitwise AND operator. See: http://php.net/manual/en/language.operators.bitwise.php
[00:25]<n-xnrm>thanks
[00:27]<n-xnrm>Does php4 have any awareness of static member functions ?
[00:27]<nrvxn>richardlynch: yeah but that meens I have to actually work **whine** :P (I figured out a better way to do it anyway
[00:28]<wjlllrws>e-head: no.
[00:29]<n-xnrm>I can execute class method functions using MyClass::method() though. Is this just class/OOP sloppiness in php4 ?
[00:29]<jufyzg|wjzc>It's a static call.
[00:30]<wjlllrws>e-head: php.net/oop
[00:30]<n-xnrm>thanks
[00:30]<zdzxzzmfdgzx>e-head: You can use static methods, and the 'work' but you can't declare them, and there's no enforcement of not mixing static and non-static, and if you manage to pass $this around and then use it, on your head be the results.
[00:30]<n-xnrm>Thanks richardlynch. It's sort of self-regulated then.
[00:31]<nrvxn>richardlynch: that'd be some funny stuff :/
[00:31]<ru2rg>What does this mean... "Warning: ereg_replace() [function.ereg-replace]: REG_EESCAPE in /cusource2/index.php on line 6"
[00:32]<xmlxjym>i can just see someone designing a system where you store your instances in a registry so that when you do static calls on nonstatic methods it can look up an instance to use
[00:32]<dwyrrygs>is there any way to trap a fatal error from require_once() ? i just want to get a backtrace and then die
[00:32]<s|c>Can I have static classes where I use the static keyword for the entire class?
[00:34]<s|c>hrm
[00:34]<s|c>the manual says nothing about it
[00:34]<s|c>probably not possible
[00:35]<dwyrrygs>to define a class where all methods are static? itd be fine if you did it explicitly
[00:35]<s|c>can I do: static class myClass {
[00:36]<dwyrrygs>so that each member is static implicitly? no
[00:37]<s|c>I see







