logs archiveIRC Archive / Freenode / #php / 2006 / March / 9 / 1
merlincorey
b1n0ry: linux
b1n0ry
merlincorey: or, you could have compiled php 5 and didn't explicitly say --with-mysql
as it's not enabled by default
merlincorey
I didn't compile it, I'm using a binary with the php extension
b1n0ry
ok, then i'm out of suggestions :) good luck
merlincorey
heh
Dragnslcr
merlincorey- the CLI executable is different from the Apache module
merlincorey
thanks
b1n0ry
sorry, it's just after 5 and i don't like to stick around the office
Dragnslcr
You also need to restart Apache after reinstalling PHP
         

merlincorey
Dragnslcr: have restarted apache several times; the only possible problem I think might be that php4 and php5 are installed on this box but I told apache to use php5's module and loaded the extension in php5's ini
Jetpack
open question to the audience: is there a way with php and sql to get 20 records on one page, and then 20 records on the next page etc?
merlincorey
Jetpack: duh
Jetpack: come on, man. ask #sql about LIMIT and pass yourself starting points
Jetpack
its teh starting point bit that worried me
itrebal
!tell Jetpack about pagination
Rewt`
limit would be the key wor there.
;-)
merlincorey
hmm
Jetpack
ta itrebal
merlincorey
is there a CLI way I can tell which file is being used as php.ini?
itrebal
yup
Stormchaser
merlincorey: php -i |grep php.ini
merlincorey
Stormchaser: danke
AH!
I found my problem
itrebal
php-bot knows german: (03/08/2006 05:55:59 PM) itrebal: thanks
(03/08/2006 05:55:59 PM) php-bot: de nada, itrebal
merlincorey
this stupid distro's packaging system created an /etc/php5/php.ini but php5's binary is using /etc/php.ini
Stormchaser
de nada isn't german... It's spanish
itrebal
sorry, i get the two mixed of every so often....
(Action) feels dumb.
lig
Morning
merlincorey
alles klar, itrebal
itrebal
heh
foo
Any freelancers in here on AIM at the moment that are familiar with php, a payment processor, and maybe mysql? I have a referal ... just private message me. I'm too busy to take on this job ...
         

Stormchaser
(Action) rawrs at foo
foo
stedios: rawrs?
Stormchaser: ^^
kuja
Stormchaser: YOU LEFT MY COOL CHANNEL!? T_T
Stormchaser
kuja: Of course I did... I WENT TO SLEEP!
kuja
T_T
Stormchaser
!tell foo about jobs
kuja
Idle forever, bizzaaTch!
igel
hi
merlincorey
hmmm
foo
Stormchaser: ahhh, my bad. Didn't know that - thanks
Stormchaser
kuja: I suck at idling
merlincorey
how do I force php to reload its ini file? I already restarted apache after moving the ini file to where it wants it but it is using the same modules as before
kuja
Stormchaser: Yes, if you played IdleRPG, you'd get pwned.
Stormchaser
(Action) stabs kuja
kuja
Yeah? Now try stabbing me in IdleRPG :P
igel
is there a way to fill value into ootemplates with PHP, i.e. you have an online app. written in HTML/PHP and then it calls an OOtemplate and fills in the PHP vars and then you can print it or save it a pdf?
itrebal
kuja: http://itrebal.com/?irpg
igel
I think there has to be sth. like that.
Toerkeium
hello guys, I can't use the function header at the end of the php page. Is there any equivalent?
kuja
itrebal: lol, I'm like level 40.
merlincorey
Toerkeium: of course you can't
Toerkeium: you can't send any headers once output has been sent
Toerkeium: it's part of how HTTP works
itrebal
kuja: i did that page just so i could play with simpleXML
Toerkeium
and how can I redirect to another page?
merlincorey
Toerkeium: if you MUST you can use a meta redirect
itrebal
Toerkeium: in my template system i use output buffering, you can make header calls anywhere
igel
Toerkeium: you just don't
Toerkeium
ob_flush, itrebal?
merlincorey
Toerkeium: but there's no reason you can't make the header redirect work before any output
kuja
itrebal: Cool =)
Stormchaser
igel: What?
itrebal
Toerkeium: ob_start(); $content = ob_get_clean();
Toerkeium
merlincorey, I have to redirect the user after some checkings
itrebal
that way you can run function on the output, as well
Toerkeium
that's why it's complaining
itrebal
(i run tidy on it)
merlincorey
Toerkeium: yes, do the checking at the top of the page
igel
Stormchaser: ? :D
Toerkeium
that's what I do
merlincorey
Toerkeium: do the checking without any output ;)
Toerkeium
the header function is at the end of the redirect (doing it without outpus), If I can I can past the code so you can see it
can I?
merlincorey
Toerkeium: use a codepaster
and give us a link
Toerkeium
sure
igel
doesn't anyone have an idea for that PHP+OopenOfficeTemplates problem?
Stormchaser
no. Use pastebin
\
Toerkeium
http://pastebin.com/591591
that's the code, very simple
the only line which outputs something is commented
itrebal
does the bls.php file has any newlines in it (outside of <?php ?>
merlincorey
Toerkeium: I think you have spare newlines in bls.php like itrebal is telling you
itrebal
(or anything at all, not in <?php ?>)
Toerkeium
hmm let me check
hmm no, there is just one function there and some defined variables, all inside a <?php ?> block
no white spaces
merlincorey
on either side?
Toerkeium
no new lines
nope, the first character of the file is < and the last one is >
Wilik
check the last line outside the ?>
sometimes 1 will sneak in there
Toerkeium
there is no one Wilik, I did check it
merlincorey
you're outputting something somewhere, Toerkeium, or you'd be able to send headers all day
Wilik
whats the error you get?
Toerkeium
could be the function ssh2_connect ?
Wilik
possibly, if its sending an error
add "error_reporting(E_WARN);" to the top of your page
itrebal
Toerkeium: turn your error reporintg all the way up, E_ALL
Toerkeium
I have reports on
Wilik
or even E_ALL works
Smoked1
Is mysql5.x much faster then mysql4.x?
Toerkeium
hmm let me check
Wilik
Smoked1, you might want to check with #mysql
itrebal
Smoked1: thats more of a #mysql question
Smoked1
OK I usually install php4.x and am setting up a new web server right now. Is php 5.x faster or better then 4.x?
itrebal
Smoked1: you should upgrade to 5.x
Toerkeium
the exact error is: Warning: Cannot modify header information - headers already sent in /webspace/resadmin/baireslivestream/baireslivestream.com/www/preview.php on line 67
itrebal
http://pastebin.com/591591 is that preview.php ?
Toerkeium
and the line 67 correspond to header("....
yes, without the header line at the end
Smoked1
Will my existing code still run?
Toerkeium
I forgot to add it
merlincorey
Smoked1: I haven't had a problem yet with existing code running
outlaw84
what is the best way to have a php-script read a local file and show its contents in the html file generated?
itrebal
Smoked1: usually, you'd have to upgrade some things though
outlaw84: do you want to directly output it, or read it into a string
Toerkeium
itrebal, in line 67 I added header("Location: http://google.com");
merlincorey
outlaw84: see file()
outlaw84
itrebal: directly output it
itrebal
merlincorey: uhh, no
outlaw84: readfile
merlincorey
itrebal: uhhh, yes ;)
Smoked1
I'll try it. I am using apache 2 instead of 1.3 and now php5 instead of 4. This should be interesting
itrebal
merlincorey: that returns an array
merlincorey
Smoked1: careful about changing too much at once
itrebal
merlincorey: i upgraded to 2.x and php6, all in the same day - it was exciting :P
Wilik
you can use implode("", @file( "thefile" ));
merlincorey
itrebal: which can then be outputted quite easily with a foreach or for loop (also allows you to add things like <br /> or whatever tags you want and strip things if need be)
lamers_inn
can any body tell what is this error "cannot get the input object abc"
Smoked1
It's a new webserver so I don't have to migrate to it all at once.
lamers_inn
can any body tell what is this error "cannot get the input object abc"
itrebal
merlincorey: thats not what he wanted, he wanted it directly outputted, and unless he wants to modify the code (by reading it into a variable: outlaw84: do you want to directly output it, or read it into a string.... outlaw84: itrebal: directly output it) than he should use readfile
Wilik
lamers_inn, $abc isnt defined more then likely
lamers_inn
this error comes on third page and i initialized it on first page
and then write cookie for it
does i have to do with it on the second page again?
Wilik
you are adding an object to a cookie?
lamers_inn
its just a variable
merlincorey
itrebal: file() is way more useful than readfile()
itrebal
lamers_inn: serialize the object
merlincorey: unless you want to directly output it
merlincorey
itrebal: he may want to do nothing with it now but I'm talking about his future
« 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 next »