logs archiveIRC Archive / Freenode / #php / 2006 / March / 26 / 1
zircu
i'm not sure if imagick docs are upto date
Jymmm
zircu you need something with IM ?
Stormchaser
mazzanet: o.O
zircu
Jymmm: ?
grendal_prime
machines A and B running same php, same web server they are both pointing at machine C machine C has a page of html that both machine A and B are pulling down and running preg_match on. Extracting data from the same page. Machine b for some reason misses one variable
Stormchaser
mazzanet: um.. we *know* Sal o.O
Jymmm
zircu are you trying todo something in IM?
JetBlackT
I find that ImageMagick is better than GD for picture management.
tempest1
Stormchaser: i still submit that unbanning most of italy is a good idea =/
         

JetBlackT
Faster with better optimized files sizes and proper proportions.
grendal_prime
preg_match('(Author<\/td><td class="bodytext" align="left" valign="top"><.*>(.*)<\/a><\/td><\/tr>)s', $contents, $author);
Jymmm
JetBlackT IM is better for a LOT of things.
JetBlackT
Jymmm What is IM ?
Jymmm
IM == ImageMagick
JetBlackT
oh, sorry, too many screens.
zircu
JetBlackT: true but considering the documentation on gd vs i/gmagick gd is easier to use
Stormchaser
mazzanet: Better put: We know Sal
's stupidity
MarkR
JetBlackT: I am sure Imagemagick is much better than the GD library for some tasks. The easiest way to use it is to invoke the imagemagick binaries directly as external processes.
zircu
i have a sharpen image patch for gd i wish could be added
Stormchaser
zircu: Post it to internals or bugs.php.net
MarkR
The imagick extension is an experimental PECL thing
tempest1
Stormchaser: even if there's a problem with Sal, taking it out on all of italy on ##php 's main support channel?
mazzanet
now i'm scared
the irc time in xchat is different to my system time
Jymmm
tempest1 enough already.
tempest1
"irc time" ? mazzanet, i don't think the IRC protocol sends time
Jymmm: it's still a valid point
mazzanet
it doesn't
Stormchaser
mazzanet: Means the internet thinks of time differently as your system does o.O
mazzanet
i mean, the timestamps
tempest1
yea, that's weird
         

mazzanet
Stormchaser: yeah i'm trying to find a patch
we're currently in daylight savings which would normally end today
JetBlackT
I just ripped out IM and will attemped install using up2date
mazzanet
but it's been extended for a week or two because of the commonwealth games
Stormchaser
mazzanet: Hm... Try #xchat...
JetBlackT
I just ripped out IM and will attemped install using up2date
mazzanet
oh dear...
the clocks on all my pcs on my lan have a total of 4 different times
Jymmm
mazzanet: Spring, Summer, Fall , Winter ?
MarkR
grendal_prime: Well, it sounds entirely possible that that could happen, particularly with larger web sites which may deliver content based on location of the requester.
LionKMP
Hi all! I cannot create XML files with ", can someone please help? Either it contains " or &quot;
MarkR
grendal_prime: Moreover, are you sure that you've got *exactly* the same PHP version and options on the two servers?
grendal_prime: Have you saved out the HTML and diff'd it?
LionKMP
here you can see my test code in a forum, none of them works: http://weblabor.hu/forumok/temak/12569
grendal_prime
MarkR, working on getting that now...
the server checks referer and then redirects so its kinda a bi**h but i think ive got it
mazzanet
Stormchaser: http://www.linuxsa.org.au/pipermail/linuxsa/2006-February/082329.html
see what pain we've been put into
Stormchaser
$entry->nodeValue = "&quot;"; <-- *blink*
MarkR
LionKMP: Because " and " are equivalent, in an XML text node. The XML implementation simply chooses to use " instead
Stormchaser
mazzanet: wtf?!? o.O
mazzanet
Stormchaser: commonwealth games.
Stormchaser
mazzanet: Stab them. Tell them I told you so :)
christi
how can I get the URL of the current page without parameters?
Stormchaser
__FILE__?
Er. No. scratch that.
christi
something like REQUEST_URL or whatever without ?xx=yy&...
zircu
$_REQUEST['SCRIPT_URL']
JetBlackT
Ok, found in my php.ini file that I have extension=/usr/lib/libMagick.so.6
LionKMP
MarkR: I made a very big program which processes files, uses data in database, then exports the files back. And I am unable to export the same file content due to those changes.
christi
zircu: thanks
JetBlackT
Causing error : PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4//usr/lib/libMagick.so.6' - /usr/lib/php4//usr/lib/libMagick.so.6: cannot open shared object file: No such file or directory in Unknown on line 0
zircu
JetBlackT: that looks like a wrong extension= setting
Stormchaser
o.O
JetBlackT
file is located /usr/lib/libMagick.so.6
LionKMP
MarkR: isn't there a way to force it? At least until I can run my "diff" tests to see that the output is correct in other regards (thousands of xml files).
Stormchaser
no
JetBlackT: You should compile PHP imagemagick extension.
zircu
JetBlackT: did you compile ... see Stormchaser's comment ^
JetBlackT
That is actually a symbolic link libMagick.so.6 -> libMagick.so.6.0.7
LionKMP
Stormchaser: $entry->nodeValue = "&quot;"; that results in &quot; in the output file too.
JetBlackT
No, havnen't compiled with it.
zircu
JetBlackT: still wrong
MarkR
LionKMP: This is one of the problems with XML, several different files can represent the same XML document. You should consider transforming your XML files into canonical form before the diff. This is nontrivial, by the way.
JetBlackT
I am not really at that level of recompiling PHP. I don't want to screw anything up on this box.
Jymmm
JetBlackT: Then just use ``
zircu
JetBlackT: you can do compile it without rebuilding php all together
JetBlackT
Before I used to use Cpanel I had an auto config thing, but now I am pure command line.
zircu: How so?
LionKMP
MarkR: ok, thank you. I'll try to examine the resulting ~80-100 files manually then. :-)
I mean the different ones.
gvim -d is not that bad tool ;-)
zircu
JetBlackT: http://php.net/install.pecl.phpize">http://php.net/install.pecl.phpize
be sure to read http://php.net/indtall.pecl.php as well
steveb
wondering if someone can help me with something - i have two classes, one for auth and one for db. i create a db object in the header for every page and need to pass a reference of it to the auth class so it can use it. how can i assign the db object to a global in the auth class?
does that make any sense?
zircu
MarkR
LionKMP: The only thing I can suggest is that you read in and output the documents, with no changes, before and after, however, it's still not good. I've discussed this with other people before, the issue is basically that XML is non-canonical, i.e. you can have two dissimilar files containing the same XML document
There is something called XML "Canonical form" which defines various things - like encoding, and entities
steveb
oh im using php 4.4 as well
MarkR
SO that there is hopefully exactly one canonical form per possible XML document, or at least, that's the idea.
grendal_prime
aaaha
something to do with magic quotes i think
the data that the other server is getting has all the quotes escaped
zircu
steveb: well you will either have to set the db to a auth class so it knows about it
LionKMP
MarkR: I hoped that I can provide the same format as I received for the process, so unless there is no way to export " in PHP-DOM, I'll need to manually check everything and the convience the receiver :-)
160 different files. replace " to " and then compare again.
steveb
zircu: i tried passing the db object to a function and setting it to a global var
it didnt like it
Questutis
hmm, why does $qz['file'][0] = explode('|', $qz['file'][0]); throw error: Notice Error: (Array to string conversion) in file main.php on line 69
?
straterr1
Hey guys..its me again
I still can't seem to get sockets working
All I want is to be able to read...but my code doesn't seem to work
http://straterra.info/nick/email2.phps
archivist
Questutis, it CREATES an array not 1 entry to an array
grendal_prime
MarkR, ya...that looks like the problem..two differnt pages compleatly..and now that i think about it, the only text that is located in all that is being harvested that contains..." is that particular field because it has a link aound the author.
so the other server has magic quotes enabled on it.. the page that it sees(because its thinking of the included file as input) needs to have the " escaped
mazzanet
Stormchaser: great... now i have all these apps that ignore the system clock
Stormchaser
LionKMP: Why don't you the current one? If the parser has no problem with that, you're okay.
zircu
(Action) looks in fridge and notices some left over pizza
Stormchaser
mazzanet: o.O The best solution: Move somewhere where DST doesn't exist.
mazzanet
:(
LionKMP
Stormchaser: do what? use the current one? I looks fine, but I work on files provided and must deliver back, and I am unable to reproduce the original format, so it may not be okay over there who knows...
zircu
I could make up a name for D in the DST
mazzanet
as could i
zircu
this is the 'Down Under' Stantard time right?
MarkR
LionKMP: The whole idea of using XML, is that if your documents are well-formed, you don't need to worry about whether the other party can understand the format. A valid XML implementation should be able to accept any well-formed document which conforms to the schema
Questutis
hey, how do I eliminate this error ? "Warning Error: (mysql_query(): Your query requires a full tablescan (table quatrux, 23 rows affected). Use EXPLAIN to optimize your query.) in file functions.php on line 121"
MarkR
And the difference between " and " for this purpose is none
LionKMP
MarkR: Ok, I'll keep this format, thank you. It's fine! Just makes trouble finding if there is any real error (import - no change - export results in 160 different files due to that :-/ )
zircu
Questutis: turn off mysql.trace_mode
Questutis
thanks
LionKMP
MarkR: hmm... ok, doesn't matter, I'll compare that way. Just wanted to know if I could switich the XML module to produce " to make test-comparing easier...
MarkR
LionKMP: You may be able to, however, that won't solve the problem, because there may be other cases too, where the same XML is written differently. For instance, encodings, or other entities.
JetBlackT
when I try to run phpize I get command not found
Stormchaser
JetBlackT: Do you have php-dev package installed?
straterr1
So, can anyone help me with my socket problem?
JetBlackT
StormChaser: Checking that rignt now
Stormchaser
It's Stormchaser. It's a name not status
MarkR
straterr1: You probably don't have the socket module compiled into PHP. It's deprecated in favour of fsockopen, which gives you higher level functions and lets you use the stream functions with it
straterr1: Moreover, if you want to send mail, you should use mail() !
straterr1
I can't use mail()
MarkR
In which case, you should change whatever you need to, until you can use mail()
straterr1
Why?
MarkR
Because it is the Right way to do things.
straterr1
Why is it the right way?
MarkR
Because PHP provides the mail() function so you don't have to write your own SMTP implementation; moreover, this takes advantage of the OS's mail queuing facilities, and is far more likely to have a correct SMTP implementation, and error handling etc
crazyjoe
how do i insert a php file into an html document. I have a counter.php file that i would like to put in my html file???
JetBlackT
Stormchaser: It wasn't installed so installed it and the PECL build worked but I have to add a extension line to the php.ini file.
straterr1
So, you think I should use fsocketopen instead of the functions I am using?
MarkR
straterr1: You *could*, but no, you should not. You should use mail()
JetBlackT
Do I need to add the locatation of the extension ? /usr/lib/php4/imagemagick.so ?
straterr1
I am going to use sockets anyway
JetBlackT
or just extension=imagemagick.so ?
straterr1
I just don't understand why I should spend so much time getting mail working on a server that won't have sendmail and that I can't add sendmail when I can do it so easily in telnet
MarkR
straterr1: That is simply the Wrong way of doing it. You're not going to get any gold stars for efficiency (I mean, code-wise, not runtime performance)
straterr1: That's not the point- mail() should work, if it doesn't, something is wrong, and you should fix it
JetBlackT
Is there a commandline commmand to run that shows me what is complied into php?
« 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 next »