logs archiveIRC Archive / Freenode / #php / 2006 / June / 7 / 36
xshad
vdepizzol www.php.net/header there's an example there
pragma:no-cache or something
cuban
richardlynch: quick question then
vdepizzol
xshad, but is to cache, no?
cuban
How can I find the character AFTER the one I'm trying to locate. Like I want to find /www/htdocs/departments/mis I use strrpos("/www/htdocs/departments/mis", "/") and wrap it in substr and it gives me '/mis'. I just want mis
richardlynch
cuban: strrpos(...) + 1
cuban: Or you could use http://php.net/basename
Bazzi
cuban: you may want to use functions like basename() or dirname()
cuban
oooh basename seems nice, thanks!
vdepizzol
xshad, some idea?
xshad
vdepizzol nao
         

vdepizzol
xshad (por isso que não tem nenhum brasileiro na comunidade php-br! :D)
xshad
hehe
vdepizzol
hehehe
xshad, eu não faço idéia do que tá acontecendo com o formulário. A página parece que é sempre recarregada, e não tem nenhuma função header()...
xshad
!tell vdepizzol about english
O.o
thirdLibr
so for my site search, when i have 3 checkboxes for filters (all, title, keyword respectively). i also have a checkbox called 'within these results'. if someone searches and only uses the title filter, and then they search within these results, how can i organize this best?
offset
richardlynch: posix_getpwuid() is what I was looking for. thanks for your help.
vdepizzol
ok... sorry for this message in portuguese :P.... It's right :)
thirdLibr
right now if they search for a title containing 'respect' it shows one result. but if they search within the results and check all it shows many more
xshad
vdepizzol I've tried it here, a simple form works pretty nice here
Administrateur_
Slaut tout le Monde
thirdLibr
can you make an array a session?
Fr-c0x
IS There some French here ??
vdepizzol
xshad, I've also tried with a simple form in html file... it worked fine... but in the system I'm doing.... it's not working (is maybe because the 2000 lines of the core?)
Fr-c0x
Ya des Francais Svp ??
xshad
vdepizzol no :)
vdepizzol
i thinked it because the script "sleeps" 0.8 secs to load...
xshad
vdepizzol does your index do something like switch($_GET['page']) {} ?
vdepizzol
xshad, yes
xshad
that's it
vdepizzol
hmm!
         

xshad
you're processing the same page all time
vdepizzol
how I can chage this? Use friendly URLs?
*change
xshad
vdepizzol I've no idea ;)
If the stupid client leaves that page, he need to fill all fields again... it's his problem
vdepizzol
yes...
xshad
you can use onunload and set some cookies with the current values
<body onunload="bla()">
richardlynch
vdepizzol: Maybe I'm missing something here, but... if (valid_submission()){ /* process form */} else { /* show form */}
vdepizzol
xshad... it would be very dificult... the form is generated by a class, and there are dozens of forms...
xshad
richardlynch he wants to save the values, even if the cliente don't submit the form
vdepizzol so, forget that :)
richardlynch
Get them all to switch to FireFox? :-) Or so something in JavaScript/AJAX? But, honestly, as far as I'm concerned, you're just BREAKING my browser if you do that.
s/so/do/
xshad
lol
micker
does anyone know of a good tutorial for libcurl? none of the ones I found on google really did it for me
Wolfpaws
what do you mean 'libcurl'? PHP implementation or....?
micker
sorry... yeah.. php implementations... possibly some sample code
richardlynch
micker: The examples and user contrib notes in http://php.net/libcurl provide decent tutorial-like examples, honestly...
You gotta dig and sift through the chaff to find the wheat, mind you, but ti's there.
vdepizzol
xshad, I did a test with the form without using /?end=... and it worked!
brohism
I'm getting the following error on this script: http://pastebin.com/765941
Shane-S
is MySQL's md5 hash result the same as php's?
brohism
Parse error: syntax error, unexpected '<' in /home/bazingnet/www/ba-zing.net/include/sys/auth_incl.php on line 2
I don't understand what I'm doing wrong
I've done this before
and it's worked
Wolfpaws
brohism: pastebin the code?
Shane-S
I ask because I forgot to do an MD5 hash and now my DB has a plain password, I was just gonna execute the SQL directly with MD5, but want to make sure php's is the same
brohism
Wolfpaws, URL above
http://pastebin.com/765941
Wolfpaws
sowie
Jymmm
Shane-S TIAS
brohism
no problem
tdd1984
can someone help me i get the site database is unavailabe? view my db connect at http://pastebin.com/765944
Wolfpaws
if ('00' <= $hour < '12') <-- you can't do that
vdepizzol
brohism, '00' <= $hour < '12' is wrong... try $hour <= '00' && $hour < '12'
brohism
oh, that's right, it has to be two different comparison statements
i always forget that
:-P
thanks
nphase
date(DATE_RFC822) isn't acting right
WedPMEDTE_RJuneC822
instead of
something like Mon, 15 Aug 2005 15:12:46 UTC
anyone know what the deal might be?
richardlynch
Shane-S: Dump the db just ni case, but MD5 is MD5.
ftsf
nphase, are you using 5.1.1+
?
nphase
ftsf: no
||cw
nphase: looks like that constant isn't defined
nphase
dang
hmm
ftsf
"Tip: Since PHP 5.1.1 there are a couple of useful constants of standard date/time formats that can be used to specify the format parameter."
richardlynch
tdd1984: die(mysql_error());
ftsf
you could define it yourself though
christo
when I load text into a textarea, how can I replace \n with a newline? I want the text to appear in the textarea in the same 'shape' as it's provided
nphase
ftsf: how?
||cw
nphase: what's wrong with date("r")
ftsf
define('DATE_RFC822', "r");
nphase
doh
richardlynch
nphase: You can find somebody who has 5.1.1 and ask them what value is in DATE_RFC822 -- then just paste that in, or do an if(!defined(...) define());
nphase
||cw: feedvalidator says its wrong
||cw
nphase: for the constand, read the first "tip" on the date manual page
nphase: the "r" or the output?
nphase
||cw: the output
richardlynch
christo: \n in textarea SHOULD show up with line-breaks... You'll want to play wiht http://php.net/htmlentities and http://php.net/nl2br however.
nphase
R is 2822 not 822
||cw: but i dunno why its saying that
MarkR42
RFC2822 sounds like it should be IP over nocturnal avian carrier :)
christo
richardlynch - I think the problem is that the text has been html_real_escape_string'd, so I get an extra slash.. or something, but I can't stripslashes, because then \n\n just looks like nn - This is very confusing :/
Jymmm
MarkR42 you're not even in the same ballpark...
ftsf
ahh, well it shouldn't be too hard to figure out how to make it, "D, j M H:i:s e" or something like that
richardlynch
christo: If you have done a double addslashes to your data, with both Magic Quotes and with mysql_real_escape_string, you'll need to un-corrupt your data before you do anything else...
||cw
nphase: ah, well unless you have 5.1.1, you'll have to write up the format youself
nphase
k
richardlynch
christo: It's also possible you have magic_quotes_runtime set to "on" which is just plain silly, period.
||cw
nphase: or find a 5.1.1 and see what the value of DATE_RFC822 is
nphase
oh god im stupid
damnit.
sorry
||cw
and use that value
nphase
that wasnt the problem at all.
christo
richardlynch, I see what you mean, but I don't
pi
Hi having a small issue where I cannot select my drop down boxes,.. anyone see anything wrong here? http://pi.pastebin.com/765980
caffinated
pi: your options (according to the snippet) are not wrapped in <select></select> - this is not an issue for ##php though. try #web for html related issues.
pi
That is in another file.. this routing just lists all the options
caffinated
pi: you're also missing a closing angle bracket on your opening <option> tag
pi
routine*-
thanks, let me have a look
caffinated
no matter though. does not belong here
Kurrasoe
okay i'm confused
kingmike
Hi. How do I tell php to run my scripts quietly without printing warnings ? I don't have access to the configuration file.
caffinated
kingmike: http://php.net/error_reporting
TestiCalls
error_reporting(OPTS)
caffinated
instead of hiding warnings, you should fix them
kingmike
cool ! Thanks, guys.
DogWater
is there a "right way" to send an email so that you can be sure that most MUAs will honor your breaks (\r\n) ?
mikefoo
so I have 152 instances of httpd according to ps - load seems to be about 11-12.. Ahh any advice on debugging what is the cause, I know the programmer has alot of php scripts doing everything possible. - anyway to narrow down to what exactly issue is?
MarkR42
kingmike: If you write a custom error handler, PHP will no longer log or display errors itself.
richardlynch
DogWater: Read the Email spec...
MarkR42
kingmike: Your custom error handler can do whatever you feel is necessary, perhaps telling the user "It's broke" or something
and maybe logging the error and the circumstances, along with any other debug info, maybe even emailing (but be careful about spamming yourself)
caffinated
which shouldn't matter, because your scripts shouldn't be spewing warnings in the first place.
DottHellboy
hi. does php5 support the mysql stored procedure ?
MarkR42
DottHellboy: It does if you're using a version of mysql which does
but then so does PHP4 and in all likelihood, PHP3
DottHellboy
'cos i try mysql_query("CALL procedure()")
caffinated
DottHellboy: stored procedures in mysql have to be in C iirc.
DottHellboy
but it doesn't work
MarkR42
DottHellboy: Have you created the SP successfully in MySQL and tested it from the CLI MySQL client?
richardlynch
DottHellboy: You wanna define "doesn't work" for us? mysql_error()?
DottHellboy
yes
wait
i copy the error
||cw
DottHellboy: php's database api's support all commands of any database
Kurrasoe
anywhere i can get a concise look at fopen, fwrite, fread? having an issue unable to debug, just looking for info beyong the php.net/manual pages
||cw
it's not EXEC instead of CALL?
« 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 next »