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: 1982.48 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-07-26
Pages: < Prev
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
49
50
51
52
53
Next >
[14:09]<txudrgg>this is getting on my nerves
[14:09]<vxn-nzd>Thumann: why?
[14:09]<vxn-nzd>what's getting on your nerves?
[14:10]<vxn-nzd>I just joined.
[14:10]<txudrgg>this is a really simple script, and for unknown reasons.. i fail to see why it's failing. by the looks of it, doesn't connect to the database aparantly http://pastebin.ca/100692
[14:10]<txudrgg>var_dump($link); shows resource(87) of type (mysql link) and var_dump($dbArray); shows NULL .. and the bloody script works if don't use an alternate database connection
[14:11]<vxn-nzd>Thumann: Well for starters your example has 'localhost' so of course it's not going to execute on a different host.
[14:11]<vxn-nzd>You might need to set you port, the remote mysql server also needs to have that port running.
[14:11]<txudrgg>the-erm: aye.. i removed the connection
[14:11]<txudrgg>no no
[14:12]<txudrgg>the real script has proper stuff in those fields
[14:12]<vxn-nzd>Not to mention mysql has to be configured to allow incoming connections.
[14:12]<txudrgg>the-erm: it has..
[14:12]<vxn-nzd>and 3306 is open?
[14:12]<txudrgg>it's on the same host.. just different databases
[14:12]<vxn-nzd>oh ok.
[14:13]<[gabri]>hi all
[14:13]<vxn-nzd>then ... my guess is your grants are off there Thumann
[14:13]<txudrgg>my grants?
[14:13]<vxn-nzd>Ya mysql has permissions.
[14:13]<txudrgg>no, they're okay
[14:13]<txudrgg>i can make a dummy script that just prints the data without a hassle..
[14:14]<[gabri]>i need remove ' and ' on derecha Warning: file(C:\AppServ\www\menu\'derecha.php'): but with this line can't work $file = "C:\AppServ\www\menu\.'$archivo.'"; any fix?
[14:14]<gjvgedns|svjede>phade
[14:14]<gjvgedns|svjede>$total = mysql_num_rows($result);
[14:14]<gjvgedns|svjede> for ($i = 1; $i = $result; $i = $i + 1) { echo "blllllll"; }
[14:14]<ffrggnf>[GABRI]: you needto escape the slashes, for one thing
[14:14]<gjvgedns|svjede>should that work?
[14:14]<[gabri]>mm Flannel how?
[14:15]<zzaxyvysv> \\
[14:16]<zzaxyvysv>and get the . and ' balanced
[14:17]<gjvgedns|svjede>arch you got time to help me out mate?
[14:18]<vxn-nzd>Thumann: mind giving me the url your testing this on?
[14:18]<gjvgedns|svjede>what i'm trying to achieve with the code above is for php to count the total number of tables entries and then apply a different class for the last entry
[14:18]<dysynf>how do i connect to oracle using php?
[14:19]<ausfnz1>hello, I'm having a problem, I've downloaded the slackware packages for php5 and it comes with-mysql=shared/usr and I've installed mysql but it's not working (phpinfo it's not showing me the support) any clues on this?
[14:19]<txudrgg>the-erm: sure.. http://roster.thumann.dk
[14:19]<dysynf>under either windows or linux... i know there is pecl library, but under linux i can't make it work and under windows i have no way to compile it
[14:19]<txudrgg>the-erm: i pm'ed you login info
[14:38]<mzzw>hi all.. apologies for what I'm sure is a regular question.. php 5 mysql 5 = mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
[14:38]<mzzw>everything weas fine with php 5 mysql 4
[14:38]<mzzw>any pointers?
[14:40]<txzzzzdjdzvzzzzz>Here is something interesting I just found out ... the break even point for using strcasecmp versus strtolower and then == is two comparisons.
[14:41]<txzzzzdjdzvzzzzz>In some tests using strtolower and then == for a single comparison is faster than strcasecmp
[14:46]<txzzzzdjdzvzzzzz>Mar1: The problem is the aftermath of an error that happened with the SQL query, I suggest running it in phpMyAdmin and looking up mysql_error() in order to resolve the problem
[14:46]<zzaxyvysv>Marl check mysql_error() before using a result
[14:47]<txzzzzdjdzvzzzzz>!tell Marl about mysql_error
[14:47]<txzzzzdjdzvzzzzz>!tell Mar1 about mysql_error
[14:49]<mzzw>TheRandomAvenger thanks will check it out. starange that it worked with mysql4
[14:49]<dsv>seen cpunerd
[14:50]<dsv>uh
[14:50]<zzzdjdzvzzzzz>Mar1: If it worked with MySQL4 then the problem is because of keywords. MySQL reserves keywords such as "by", and new versions of MySQL usually add new keywords. To fix this problem, escape your column names by surrounding them with backticks (`)
[14:50]<maffd>RandomAvenger: Does the length of the string affect that in any way?
[14:51]<gavaasx>when auth'ing, what's the rules with re-gen'ing the session id?
[14:51]<zzzdjdzvzzzzz>McFly: My first test was with 4-10 character strings as that is what I'm using it for, but strcasecmp only becomes slower with longer strings
[14:53]<zxnzvnz>hi again
[14:53]<zxnzvnz>cythrawll is there anything you said after my internet connection died?
[14:53]<mzzw>tks therandomavenger
[15:02]<wjlllrws>'nygma!!!11one
[15:03]<rrdrdr>wolfie!!$#@
[15:05]<zzzdjdzvzzzzz>confused!!1!
[15:06]<mzzw>I think my error might be with $_SERVER["REMOTE_USER"] is there a tweak to the config to get this to work in php5?
[15:06]<mzzw>5.1
[15:07]<zzzdjdzvzzzzz>Mar1: In PHP < 5.1 I believe it is called $_SERVER['HTTP_AUTH_USER']
[15:08]<mycnmu2>'PHP_AUTH_USER'
[15:08]<mycnmu2>When running under Apache or IIS (ISAPI on PHP 5) as module doing HTTP authentication this variable is set to the username provided by the user.
[15:08]<mycnmu2>that?
[15:08]<mycnmu2>http://ca3.php.net/reserved.variables
[15:09]<22n>whats the best way to validate the mime type of file uploads via post
[15:11]<2j2gjzdrf>can anyone recommend a soap tool, the ones i've tried + the tutorials i've found all seem a bit lakcing
[15:11]<2j2gjzdrf>is php5 built-in SOAP the preferred way to go in terms of future upgrades?
[15:12]<2ggsjg>afternoon all, i was wondering how to split a variable of certain a certain html tag? any ideas?
[15:13]<mzzw>getting Q'uery was empty' even though in pma it works
[15:13]<zzzdjdzvzzzzz>bbe: The client supplies the mime type for the upload but I would not trust it. PHP has a built-in function that uses mime.magic to determine the type.
[15:13]<2ggsjg>strip_tags() looks like ti do the job
[15:15]<c-fjzm>hi. is this the best channel for zend framework queries?
[15:15]<22n>RandomAvenger, cheers I read in the manual that I shouldn't trust the browser, and now I've found mime_content_type( )
[15:15]<zzzdjdzvzzzzz>bbe: That's the one
[15:19]<c-fjzm>bye bye
[15:21]<mzzw>sorry gang can anyone tell me what's wrong??
[15:21]<mzzw>include("connect.inc");
[15:21]<mzzw>$username = $_SERVER['HTTP_AUTH_USER'];
[15:21]<mzzw>$query = mysql_query("SELECT * FROM admin WHERE userName=mday");
[15:21]<mzzw>$result = mysql_query($query); if (!$result) { echo $query.'<br>'.mysql_error(); exit(1); }
[15:21]<jumn>Username needs to be quoted.
[15:21]<jumn>SELECT * FROM admin WHERE userName='mday'"
[15:21]<jumn>Strings always need to be quoted in mysql, or it thinks that it's a column/table name, etc.
[15:22]<mzzw>sorry, type.. forget that line.. I'm calling username direct
[15:22]<jumn>Are there quotes around the variable?
[15:22]<jumn>like...
[15:22]<jumn>mysql_query(sprintf("SELECT * FROM admin WHERE userName='%s'", mysql_real_escape_string($username)));
[15:24]<mzzw>yes there are quotes now.. still no go.. (thanks for the correct coding example :)
[15:27]<jyylln>hello i'm still using php-4.3.3 and i get memory exhaustion fatal error when using gd 2.0 image functions with about 900kb images and memory limit is set to 15mb
[15:28]<jyylln>how'd i fix this
[15:32]<zzaxyvysv>Jiippe, are you not clearing the old image before creating another etc
[15:35]<sfrsxvjd>probably missing something obvious, by how do i get time in seconds since epoch in UTC?
[15:35]<jseju>hello there
[15:35]<ldwg2>is there something to convert timestamps into h:m:s plus days?
[15:36]<drvvknffdxjdn>date()







