logs archiveIRC Archive / Freenode / #php / 2006 / January / 27 / 1
Macca`
hmm
try just Sum(DepositPaid) ?
or =Sum(.....);
what you doin tonight?>
gRim's a pu**y, he's got no cash so doesn't want to do anything :|
superfoo
hi, I'm trying to install phpbb, and I'm getting an error about no mysql module
aidan
I'm unsure... I think I'll have an early one
superfoo: is that a joke?
superfoo
aidan: yes, I read the topic and couldn't help myself :)
aidan
oh good
Macca`: It prompts me for that value when I do that
Shurique
is it possible to somehow load the PCNTL extension even if it wasn't compiled in?
tibyke
yoyo
Macca`
no idea sorry aidan. :( i gotta boot
daMaestro
how do i have more then one db connection?
$link = mysql_connect('localhost', 'user', 'asdf');
is how i am doing it now
i perl i would just $link2 = mysql_connect('localhost', 'user', 'asdf');
but that does not look like it would work
because of calls like mysql_select_db("bmname");
         

tibyke
that will do
$foo=mysql_connetct.... $bar=mysql_connect...
Shurique
daMaestro: if you take a look at php.net/mysql_select_db you'll see that there's an optional second parameter
tibyke
and then mysql_query("whatever",$connection)
or even mysql_db_query($db,$query,$connection);
http://php.net/mysql
daMaestro
thanks
i will try the ,$connectionObject
Awom
Is there a way to have file_exists check a URL.. or a function to do it?
aidan
does anyone have coral draw?
I need to convert some files to .png
or anyone know of a utility to do this?
tibyke
coral?
i have corel
bref
aidan: ImageMagick's convert tool
tibyke
yep
Awom
Is there a reason get_header() isn't defined o.0
php 5 ah nvm
sifi-xz
how can I echo the modified time from a file when the piece of code is in it's header, this only shows the modified time for the header: <meta name="DC.date.modified" content="<?php $file_stats = stat(__FILE__); echo date("Y-m-d H:i:s", $file_stats['mtime']) ?>" />
daMaestro
foreach( $_POST['checkboxDataName'] as $idNum ) {
is returning 'Array' as a $idNum
any way to fix this?
Shurique
is it possible to somehow load the PCNTL extension even if it wasn't compiled in?
lig
daMaestro, use print_r to see what is in it and then modify you code to get it
beebop
is it ok (as far as programming practice is concerned) to use printf() instead of print or echo?
my code would look alot cleaner with printf i think so i was just wondering
Meltir
beebop: nothing wrong with printf afaik
beebop
ok. just from code ive seen doesnt seem to be used alot
ill use it anyway
:) ty
lig
beebop, as long as you don't hve so many it messes with speed
beebop
lig: ok so use it for strings where there's alot of variables being thrown in?
lig
beebop, why not just use a double quoted string?
         

beebop
yea i do that now
i think its mainly my SQL statemenst look messy.
i dunno i guess if it works leave it alone its just a bit ugly to the eye
lig
can I see an example of one that looks messy?
sifi-xz
how can I print the modified time for a file from it's header.php, this fails: <meta name="DC.date.modified" content="<?php $file_stats = stat(__FILE__); echo date("Y-m-d H:i:s", $file_stats['mtime']) ?>" />
lig
sifi-xz, what do you mean fron it's header.php?
beebop
lig: now that I look i guess they arent that messy.. it just seems to look messy when you're using arrays and {} stuff
$sql = "SELECT COUNT(*) FROM code WHERE category = {$results['id']}";
i dunno that looks ugly to me
for some reason
but its fien right?
fine*
lig
beebop, it's fine - and you could always move it into a working var and then use that.. *shrug*
sifi-xz
lig, I have 2 files, 1 header.php and 1 index.php, in the header I use <meta name="DC.date.modified" content="<?php $file_stats = stat(__FILE__); echo date("Y-m-d H:i:s", $file_stats['mtime']) ?>" /> to declare, but this will only be for the header.php and not for index.php
lig
sifi-xz, that is because __FILE__ is the header file
sifi-xz
lig, I know, but how do I select the file that is using header.php instead?
lig
is header included?
sven_GP
how can I transfer something from iso8859-1 to utf-8
sifi-xz
lig, correct
lig
sven_GP, define transfer
Jayinwww
morning people
sven_GP
I have an input from a Form field which I want to save in utf-8 (as XML)
sifi-xz
lig, so how do I fix it?
lig
sifi-xz, why not make a var then that holds the calling page and use it?
sven_GP
the input seems to be in iso8859-1 and I want to change the format of it
sifi-xz
lig, yea =)
sven_GP
something like a function which changes the coding
sifi-xz
lig, but then I would need variables in each files
lig
sven_GP, have you looked at the mbstring functions? IIRC there is a convert_encoding
sven_GP
lig: ok found something now seems to be utf8_encode
thanks
lig
sifi-xz, maybe something like - calling page - $callPage = __FILE__; and in the included header page - content="<?php $file_stats = stat($page);
sifi-xz
lig, thank you =), it works fine
lig, but that requires $callPage = __FILE__; in each file, damn
[aJ]
I want to take an array that has 12 items and recreate it as an array with 3 items each containing 4 items. Is it possible??
lig
[aJ], sure
[aJ]
lig: what function would I use?
or would I use a foreach()?
lig
depends on how you want the final array to be
mazzanet
http://news.php.net/php.notes/102520 <--- most useful usernote of the day
lig
:D
[aJ]
lig: I want the finally array to be array(0=> array(0=>'', 1=>'', 2=>'', 3=''), 0=> array(1=>'', 1=>'', 2=>'', 3=''), 0=> array(2=>'', 1=>'', 2=>'', 3=''))
lig
[aJ], I don't think you can have duplicate array keys
p0windah
obviously, they wouldnt be very effective keys if they werent... "keys"
[aJ]
array(array(array(), array(), array()),array(array(), array(), array()),array(array(), array(), array()))
that better
sorry
is there a way to split an array?
lig
explode
mazzanet
http://news.php.net/php.notes/102524 <--- *falls off chair laughing*
p0windah
I guess the temp part was lost on the poster :)
mazzanet
someone obviously didn't notice that tempnam() returns a string with the filename :)
daMaestro
how do i print a newline?
perl it is \n
aidan
what a twat
mazzanet
"If you have a __destructor() in a class that is stored in a $_SESSION, that object will have all it's values NULL'd out when you do a session_start() and try to retrieve the object.
"
aidan
daMaestro: same
mazzanet
er
daMaestro
sweet.. thanks
mazzanet
why the heck would you want to store a class in a session var?
lig
daMaestro, just make sure it is in double quotes
mazzanet
if
how i could split numbers of string ?
aidan
if: example?
bamm`laptop
Is there any way to verify if a file exists on another server?
if
aidan: the whole idea is that i want to generate html color for some strings..
inter
i getting 'page cannot be displayed.. blabla' 5 seconds after click on upload with large files .. its php or apache problem?
i changed all possible configs on php
aidan
if: ... what does that have to do with "splitting numbers of string"
inter: use a better browser
Scott-Mc
bamm`laptop you would need to make a connection, best way would be too have a file on the other server that uses file_exists and then returns the output(so your script can read it)
inter
better than firefox ?
if
i'm trying to do that with md5($string) and then to split the numbers of the generated md5string and to use the numbers for html code
aidan
inter: firefox should give you a real error, "page cannot be displayed" sounds like IE
bamm`laptop
Was more of for someone to submit a picture from a diff url... it checks see if file exists first
aidan
if: uh, why?
inter
aidan its same error
'the connection has canceled' ...
aidan
inter: what's the exact error firefox gives please
inter
my firefox is in portuguese
aidan
okay ... well I'm off
if
aidan: i don't know.. :/ how i can do that to generate color for string which i want to colorize ?
inter
The connection was cancelled by the server while the page was loaded.
aidan its apache/php error
less than 50k files = ok .. larger = error
terribleCabbage
So, did that chap from yesterday ever end up securing his site?
bamm`laptop
Ah got it scott-mc.. just allowed fopen to open url's... :]
lig
(Action) munches on some tapioca
Rich97
i need help from a mac user
[elBugz]Away
Rich97, if you expand on your problem, maybe somebody - who's not a mac user - may be able to guide you through the right path
Rich97
yeh its a problem with a format that a client sent me
its written on mac
[elBugz]Away
what is written on mac? Format of what?
lig
define format
Rich97
its a document but my pc cant read it
it just comes up as File on my pc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 next »