how often will your average english author were talking fiction or news papers or blogs or something not math
because i want reliable data
native language is not encoded, you do not have to decipher your native language
There are tons of databases people buy
so my client can buy it and i can be confident i didn’t make him buy crap
brian, coords to miles is a constant, you can either use a cricle or do approximation with outer/inner squares
you *do* have to decode symbols with computer programming, like / means division
rofl… you don’t decode/encode the english language? :-p
that’s an extra step during the reading/writing/understanding/creation process that does not occur with natural language
ekneuss, i suck at math
When you hear the. you don’t have to decode the context?
it’s an *extra* step
ekneuss, i mean, i’m not very well educated in math
dude, look up the definition of code some time
There are 10 extra steps in native languages…. take into account the source, the pitch, the tone, the context, etc.
just the word code, in general
ekneuss, what type of algorithm should i be looking for in google
brian, well, you’ve an X and Y coordinate, square approx means that the difference between the two X and Y ccords have to be less than Z (calculated)
whatever, you just don’t wanna see my point. i see yours.
I see yours.. I just don’t agreee?
X – Y Z?
ok then we’re both right, ala einstein
together the answers we have conflict, but the only truth lies when both answers are correct, but i don’t really wanna do the math right now
sqrt((X1-X2)^2 + (Y1-Y2)^2) but also more difficult to compute
lol abstrakt it’s fine I see your point.
k
brian, no, ABS(X1-X2) Z && ABS(Y1-Y2) Z
i’m just not sure how to store the data
just to beat a dead horse, you’re telling me it’s just as easy if not easier to understand “sqrt((X1-X2)^2 + (Y1-Y2)^2)” as it is to understand “hello john”
and implement it programatically
that’s math..
that’s language man
math is it’s own language.
computer language
exactly
I am going to come up with a solution I’m sure…
hold on.
math, a language to describe them all! :]
computer language includes not only the language of logic and flow but the language of math as well
I just want a good database of US city and state longitude and latitude coordinates
I’d prefer if the database hosting was from a US government agency
that trumps c# or php or most languages you do in a computer
and that is not a comptuer language
not really, because you can do all that *with* C# if you want to
is a constant like a variable which you can’t change the contents of?
computer languages have the inherrent capability to express mathmatecal language too
drkm, basically yes, it has a different scope too
How does that support your language? English has that capability too?
some have “more capability” than others sure, but still
drkm, and you can’t store anything you like in a constant, only scalars
I wis the post office had longitude and latitude data
if anyone has correct data for us city and states and zip code it’s usps
think of it like this.. native languages both support and encompass ALL other languages and levels of communication. Thus making it the MOST complex, robost, and scalable language to ever exist
how often will your average english author (we’re talking fiction or news papers or blogs or something, not math texts) use or have a use for math language like that? now how often will your average computer programmer have a use for mathematical language constructs?
Without native languages you wouldn’t have programming and without them you couldn’t explain programming.
whats a scalar?
So is your debate that a programmer is more intellegent and mathmatically inclined than an author? Or that one language is more complex than another?
whatever, you’ve gotten in to semantics, i was expressing a simple point that makes perfect sense and that point was meant for a specific person.
drkm, take a look at php.net/constants
my point is that reading a computer program is much more difficult and requires much more mental processing for your average person than does reading a fictional novel
I agree that programmers are usually more intellegent; but complexities of languages…. native tongues take the cake.
I agree whole heartedly.
you’re getting all nitpicky on the fact that i said “complex”
that’s the only reason i said otherwise in the first place
how can I call on an class and have a switch within that class to call on an extension of it?
It takes more brain power to learn english then it does php webhosting syntax.
and in that sense that i just described… yes… computer language *is* much more complex than the language in a fictional novel
now to be a good programmer… that’s another debate.
NOT THE LANGUAGE :-p
Programming is more complex than authoring.
in all the other senses yeah sure, definition, denotation, context, subtext, implication, tone, voice, audience, purpose, intention, etc etc
mathematica gives you programming language that allows you to do a _lot_ of maths, now is maths more complex than native languages ? I believe so
i think math is the most complex language to exist.
but i have a hard time rationing that since native tounge inspired & encompasses math
na mean?
dude, just in the sense that I’m talking about, yes computer language is more complex because it is basically a form of math that deals with the logical progression of events and values
take out language and substitute computer with programming :]
and there’s an extra level of encoding and decoding that people have to do that they don’t have to do with their native languages
k, programming language
your killingme
joshteam, well, put the checmical reactions that produce language into equations, and we obviously have a winner
there, now it’s done
?
EVERY language has encoding/decoding… EVERY single one.
english, german, php, music, math, etc.
but there’s an extra level in programming language
yeh and there’s an extra level in music and in math
i have read it + i also know Depesz’s method (all connections) and i don’t know
is it possible to use php as a wrapper for a script written in different language?
a* different
which language?
levels that are beyond your *native* language, and in the same way there is an *extra* level in a language that is NOT your native language
it’s in perl
why would you want to wrap perl w/ php?
joshteam and it’s a module for my forum
e.g. if you’re a native english speaker and you learn chinese, there’s an extra level of encoding/decoding that’s going on
Exactly absstr
joshteam that’s because my forum takes php scripts only and i have no idea how to force perl in there
robboplus, you sure can get the perl result “under the curtain” by using shell_exec and the like
joshteam while it would take a while to rewrite it in php
i don’t really care discussing more; just agree to disagree
yah, i’m with you on that at least
robboplus, what are you trying to do with perl
ekneuss hm so shell_exec would be the “wrapper” allowing me to run anything
hmm – I have included a .php file within an existing one, though the text is just being outputted, and not processed….
brian i’m accessing mysql several times and doing some fancy stuff with the data, then returning results
robboplus, you can call whatever interpretter you like with that, and fetch its result, yes
are you sure you’ve got php inside your include() file?
robboplus, why not just make the perl script run indepdent of the PHP
ekneuss thank you, i will read on the syntax and try to wrap the thing
brian hm
brian the forum engine accepts just php hosting files or at least i think so
not to mention it’s often perfectly desirable to have an include() produce output
it wants me to give the full path to my .php script – name and all that
robboplus, don’t worry about the forum engine.
include ‘file.php’;
one sec…
brian do you think that i would be fine just forcing blah.php on actual perl script?
robboplus, no
hm
robboplus, i don’t think that would work very nicely
Hello, I get debug error “Creating default object from empty value” at line 100 in the following code — http://pastebin.ca/638403 . I am new to php, any hints? Thanks.
$this-replaceable_data[$i]-string is wrong?
robboplus, why is the script in perl?
brian but then you said that i shouldn’t worry about the forum engine
robboplus, what does the script do?
$tmp_string is not empty, I can see in the debugger
brian that’s because i use perl more often and it’s easier to use perl for me
i just adopted some work i had done last year – took me 10 mins
robboplus, ok well
it basically talks to mysql and does some fancy stuff after
adapted?
robboplus, don’t wrap perl in php
yes, adapted
robboplus, let the perl script be independent of the php and ask #perl if you need help running the perl as a CGI
hm
brian it’s not exactly about CGI
I added it, and it nows works. weird how it was referenced in another file, and outputted fine…
robboplus, how do you figure
robboplus, you are making this a lot more complicated than it actually is
brian let me explain
… so it was supposed to output? or it wasn’t supposed to output?
robboplus, explain then
in the other file it sent output and then in this file it sent output and then you were confused that it sent output in this file?
it is going to work as a module for a php based forum script (vB)… and what i have to do is to give the full path to the php file which does the job… so what choice do i have?
it just wants me to show the module and the file has to be .php
!tell robboplus about g10
call vBulletin support
in both file1.php and file2.php (in different sections), I had: include ‘extra_code.php’;
abstrakt that’s beyond their support
abstrakt reading up…
well it’s beyond our support too
extra_code.php didn’t have and ?, though it worked with file1.php, though not file2.php
we don’t support vbulletin host or things like it
abstrakt that’s absolutely wrong what you just told me
you’re asking a question that only the vBulleting devs can answer for you?
doesn’t matter.. i asked a simple question – how to efficently wrap other language with php, right?
wtf? what exactly did i tell you that was wrong?
and you are suggesting that i’m HACKING something, i’m not
sure but your question is vBulletin specific and has to do with the fact that this situation has arisen because you’re using vBulleting
wtf? you are way off base man.
… n/m
i told you one of our chan guidelines: we don’t support scripts
i don’t want your support for a script
i asked nicely how to wrap a perl script with php code
if you are hacking (in the sense of modification as opposed to cracking) vbulleting and you have a direct question about the PHP code that you’ve written we’d be glad to help
what’s wrong in this?
robboplus, i told you not to worry about the forum engine
robboplus, this is a perl question not a php webhosting question
abstrakt man… i’m WRITING my OWN module
i have a legal copy etc.
what’s wrong is you don’t have any code yet to show us and you don’t actually have a question about PHP code that you’ve already written
good for you, show us the code and tell us where the problem is
you talk too much and it really doesn’t make much sense, that’s pure flaming what you are doing now
then we can help
robboplus, you are breaking the rules buddy
um, no it’s trying to get you to ask a question we can actually support
you don’t even understand what i’m doing and you make false assumptions
and you seem to be the one getting angry about it
robboplus, we know what you’re doing
no we don’t understand because you haven’t shown us any code
robboplus, your problem is vBulletin-specific
brian so again, what’s wrong with shell_exec?
brian++
vbulletin specific
nothing, you tell us… then maybe we can help you
robboplus, you shouldn’t run perl within vbulletin
brian and why not?
robboplus, you should run it independent of vbulletin as it’s own CGI script and it’s a perl question to be asked in #perl
it’s all about a simple mysql job in there
ok thanks brian.
robboplus, can you stop overcomplicating this problem?
dudes, calm down :] robboplus, with the functions at http://php.net/exec you can execute whatever perl script you want and get its output as well
doing a “simple mysql job” is pretty darn simple in PHP
robboplus, and i really don’t recommend executing perl within php
foutrelis that’s what i needed to hear and those guys are trying to confuse me, many thanks foutrelis
i know PHP and i’ve had to modify perl before, but i didn’t go and try to get Perl to run PHP, i just learned Perl
they’re very similar languages
abstrakt, he wants to do it the stupid way so whatever
yeah obviously… so whatever
heh, sighs even
abstrakt, we can’t get everyone to use good practice i presume
but there’s a particular digitory sign i could think of that would be appropriate for this situation
just more proof that #perl is assholes
When testing if a certain button was pressed in a HTML form, how come i see all the examples use isset($_POST['button_name']), when one simply can evaluate if the key “button_name” in the POST array exists? I don’t see why this is a problem, unless people assign the value of the submit button
to false (which makes no sense?)
my guess is “writing the script with PHP” and not “wrapping a perl script with PHP”
um… because that’s how you evaluate if the key exists
Rewritting the perl script in php that is?
isset($arr['key']) is iirc better and faster than array_key_exists()
abstrakt, well if the key does not exist, it’s null, and therefore false?
well i mean like if ($POST_['key']) …
if the key does not exist and you try to evaluate it then you’ll get a warning/notice
That would be better I guess. No need for exec functions and possible security holes
foutrelis, if the script is perl, it should be executed as perl cgi script or with mod_perl
foutrelis, just like if it’s a php script, it’s executed as a cgi script, fast cgi, or with mod_php
stefan54, heh, it’s $_POST not $POST_
http://www.youtube.com/watch?v=LrixhUg1SCg
$POST_?
But if he need some kind of output from that perl script to use it in php?
s/need/needs/
foutrelis, then he shouldn’t be using perl probably
$_POST . But abstrakt you see, i don’t get a warning.
I see. Thanks for the heads up, brian, abstrakt :]
the same way if you evaluate the 100th element of a 99 long element array, it will also be null.
or am i taking my perl knowledge where it does not belong?
does anyone know if there is anything that can effectively convert PSD templates to HTML?
If the key does not exist then you will get a notice, assuming you have error_reporting(E_ALL);
*warning
stefan54, what are you talking about?
well i’m not sure on that. I did not setup the installation. how would i check this?
stefan54, error_reporting(E_ALL); is a function.
i see, thanks.
stefan54, put it at the top of the script during development and remove before it reaches production
cheers.
brian++
kind of a php pragma?
stefan54, you can also set error reporting level in .htaccess, google how to do it though
brian, thanks, but it will be enough during development
.
That’s not a php question.
ah yes, undefined index. good.
rimad, yes a human being can convert PSD templates to HTML.
stefan54, that’s a warning or notice, i think
stefan54, make sure you check if array keys are actually set with isset()
jep, i just repeated it loud as i read it, heh.
brian, that’s what i’m going to fix now throughout my project.
stefan54, it’s just bad practice and ugly for there to be notices and errors in your php script because you didn’t do error checking
agreed.
stefan54, and sadly lots of sites in production don’t do error checking
and worse they have their error reporting level turned on
reporting level?
yes
could you explain?
error reporting level E_ALL, E_NONE, E_NOTICE, etc
ah, i see.
stefan54, php manual explains it better
yes, i’m on it now.
stefan54, those are really basic concepts of php, you should know them if you write php.
well, i’m fairly new to it, only a week of “practice” so far.
thanks for the help brian, appreciated.
I’m not trying to do that
well php is a little different and the fact that it’s not as strict as other languages can sometimes get you in trouble
if you are unsure about something you should refer to the manual php is really well documented
yes, that was also my first observation (the strictness), when i came to php from perl/python.
whats the easiest way to add read write sql query splitting for an existing application ( using mysql )
Yep, I have been using it the past week a lot to find function equivalents from other languages
.
http://www.youtube.com/watch?v=xWkZ_StRjU0
haha
hey guys, is there something build in to parse HTML in a similar way like doing XML with DOM
abstrakt, rofl, that was funny.
heh, yah
abstrakt, i haven’t laughed at a commercial in a long time.
yeah, my friend got married and got this disease after a couple years, it’s called ‘babies’
i am going to nap abstrakt
oops loadHTML()
nap, masturbate, you know… same thing
i guess DOM has it build in
abstrakt, definitely napping.
anybody up for discussing a problem im having with searching through ‘blocks’ of content?
!tell tmpvar about g1
oh yes, the rules.. hrm
hey guys, can anyone suggest a good ORM for PHP?
I have built a sort of cms which uses ‘blocks’ of content as well as regular old pages. I am attempting to implement a search feature, but am running into the issue of ensuring that the ‘regular page’ is loaded and not the block iteslf
s/ORM/ORM framework/
hi everybody
tmpvar, what huh
as it stands, the block will load into the page like ‘regular content’
instead of loading the regular content and it as a block
tmpvar, and we are supposed to help you how?
im curious if anyone else has experienced this, or has any ideas
tmpvar, we can’t help you unless you show us something
i doubt that would be helpful, hrm
tmpvar, you must be using phpnuke
i need a help
i’ve ubuntu 7.04 64bit
emirbugra, i need 1 million dollars
it is in my pocket
brian, no im using a heavily modified seagull 0.6.2
anyone any idea what to install or configure to get the letters(e, o, u) with points on top. It’s a phpwebpage..
with a user/group database in php/mysql, what is the best setup for having a user being able to join unlimited number of groups. separate table for each group, then a row for each user, with yes/no?
again.. does anyone know how to get the german o with points on top.. on my webpage?.. I think I’m missing a language pack or something..
make your page UTF8
I did.. same..
or is there something in httpd.conf?
how do i append to an array? (add to last value?)
you mean make a new element, or change the last element’s value?
hi
$foo[] = “new entry”
;
add a new element
^
nvictor, hi
so adding to the list i guess
ok cool thanks
or array_push()
or array_pull();
actually I dunno about that last one.
guys, can I assign a new entry of an array by indices just after creating it? Like this, $a = array (); $a[0] = …; $a[1] = …;
ya
same as saying
$a["foo"] = “bar”;
I see
but the indexes will be in order?
yes
cool
thanks
anyone know of a few good walkthrough sites for learning php?
I can search for them, but I don’t know which ones are “good”
can i write cosnole application for windows on php, like it’s done using python?
*console
php.net is a very good reference. and if you have trouble come here and ask
of course
i’ve got one for ya hold on
yes, I know of php.net I’m just wanting to see a “here
http://devzone.zend.com/node/view/id/627
sorry… a “here’s a problem and here’s how we are going to solve it using php”
^^ read
excellent thanks
don’t let the title throw you, it’s useful for more than just “absolute beginners”… e.g. if you’re already a coder but want to get up and working with PHP fast
vano512, you can but it’s not really as easy as with Java, Python, etc
Java?
the programming language
yes, and I am.
or are you trying to insinuate?
i know what it is… who writes command line utilities in Java?
you are what?
at any rate, the problem is you don’t have the main(string[] args) to work with
you will be better using python, c, perl, or c++
…
so getting input is more work
wtf?
“already a coder wanting to get up and working with php”
php is not a very good choice for cmd line app
you obviously don’t know what you’re talking about
i have two arrays. i want to get a list of items that one array has that the other one doesn’t. how can i do this?
abstrakt, instead of falling off your seat why don’t you use complete sentences to elaborate your feelings
I didn’t say I was writing a command line app
then php is good
abstrakt, I’m perfectly willing to accept ignorance on this matter, why don’t you take the time to tell us how to access passed variables in a command line script for PHP?
it’s called $argv
Basically, I already know ASP, and I want to know how to do the things I know how to do in ASP in PHP.
huh. i just wrote a command line app in java.
http://us2.php.net/function.array_diff
and $arc as well
lol @ ManUnderground
doh, $argc
just read http://devzone.zend.com/node/view/id/627
command line – cause no resources were left for GUI?
get started then
oh, I am
To accept arguments from the command line you could open a pipe to std and read from there.
yeah, on my 386 i totally can’t run leet graphics
you are “willing to accept” your own ignorance, which is what i don’t like
you just freed from stdin.
fread*
abstrakt, you really just seem to be looking for a fight
is that what you wanted me to be looking for? if you want me to be looking for a fight then i guess i could humor you.
at any rate, don’t misconstrue my words
it’s certainly possible to make words dance when you can put them in any order you like and out of any context
hi all, is it possible to dynamically extend from another class e.g. class foo extends $bar {…}
you see dancing words? have you considered seeking professional psychological help?
wtf ..
bye
rofl
that’s just pathetic
Regular Expressions problem i don’t know why i don’t get a match here http://pastebin.com/d40e8ef9e
but you’ll agree that ‘at any rate, the problem is you don’t have the main(string[] args) to work with’ is incorrect?
alright, I’ll leave the channel to you abstrakt, you clearly can’t share it
clearly
Xyphoid, I openly accepted that I was wrong and misinformed
do’h
I’ve been nothing but polite and helpful
I know why LOL
if wrong in this case
sorry
good, and now you are re-informed, the way you worded your “acceptance” was a little different than how you just put it
or maybe not re-informed, but now you are informed
it’s about the first time I see someone actually using ip6
hi matt_
right, after you finished sputtering and typing exclamations you were actually helpful
“polite and helpful” doesn’t get you very far on IRC… correct and accurate usually does better
I can tell that’s your credo
The two aren’t mutually exclusive.
TVSET, its been around for years, sit in #ipv6 and you will see loads of people
no? posting an answer to your question wasn’t helpful?
yeah, right…
I’m not following you
i know
that’s obvious
ipv6 was there for the same years, as java cross-platformity and web w3c compliancy
uipv6 was there for the same years, as java cross-platformity and web w3c compliancy /u
what are the diferencies between php and asp.net and ruby?
lol wtf?
huge… PHP is a language, the latter two are frameworks/libraries
you can’t possibly compare them
ruby is a language.
ruby is a language
but everyone uses rails which is a framework
short of going out and learning all three no one here is really going to be able to tell you
hey guys anyone know why i get this when loading php into apache
Cannot load /etc/apache/libexec/libphp5.so into server: /etc/apache/libexec/libphp5.so: undefined symbol: apr_pool_cleanup_null
ahh, my bad i misread as RoR
php is like c, java, c++ in syntax
ruby isn’t
so if you’re familiar with those languages you’d have an easy time learning PHP
is php easy?
php is poorly constructed, ruby and the .net languages aren’t.
Yeah, dead easy.
ya
has ruby got the working-well-with-apache thing going yet?
I don’t think so
it has worked with apache for quite a while.
sweet
how long time that can i learn php basics?
trsrimple, oh ya? that is good news
a week
a couple days
that has everything to do with you and little to do with PHP itself
Are you familiar with any other programming languages?
how smart are you? have you ever programmed before?
how much experience do you have programming?
ya i code with c/c++
and html
many things will contribute to how fast you “learn” PHP but just knowing the language doesn’t do much, you will also need experience to learn how to best use PHP
“how long” have you been coding with c/c++
about 1 year
an hour a day for three years? an hour a week for two months?
The fact that he refers to it as c/c++ suggests not long.
heh, true
hello
http://devzone.zend.com/node/view/id/627 is a good place to start
I’m using PHP’s GD to shrink some images, how can I make it keep the EXIF data?
abstrakt, that s not true, PHP is Windows like language, easy to use but hard to maintain secure etc etc…
surely that comment was meant for someone else
what about php jobs?
not to mention your statement doesn’t make much sense
what about them?
this is not the place to ask for them
check your local PHP User’s Group mailing list
abstrakt sorry
visof, could also try the job board on 37 signals
abstrakt, you lame
there are lots of websites for freelancers
rentacoder, guru.com
you care! I’m touched, thanks for thinking of me.
no he’s totally right, i see lots of jobs go by on my phpug list
abstrakt ok
abstrakt, nice.
me? no not very.
ahha
sometimes i get a random urge to be nice… it usually passes quickly
abstrakt, i can understand u.
i’m sorry to say but rentacoder and scriptlance are just not worth it… you’ve got a bunch of people in third world countries willing to sell themselves for $3.50/hr because it’s more than the average $0.25/hr they’ll make in the sweatshop factories
Akifemre, shut up and sit down like ferruh.
Savvy, ahahaha… ferruh is really n00b.
the competition is insane on those boards… you’ve got people with like a zillion star rating bidding out a $3000 two month project for $10 and one week
not too mention they are all 12 year olds who think they have skills lol
yah
hrm.
that’s weird
I’m doing an array_shift() on some array
and I can’t set it to a variable or echo it, but I can use var_dump() on it
also impossible to work together, i hired em a few times when busy, and just trying to get them to understand what was wanted was like a 6 week ordeal
i agree, local project work’s always going to be better
they say they udnerstand and deliver something not even close
EdBoy, try print_r ?
nope
gives me the blank page
which means there’s an error
nothing works except var_dump(), but that’s useless
blank page means an error? how do you know what the error is?
enable error_reporting..
Techinally you could var_dump between an ob_start and ob_end and grab the data that way, but it’s one hell of a hack.
and a what?
stupid XChat cut off the rest of your message
you said but it’s something
a hell of a hack
hehehe, xchat sucks… i noticed it starting to do that to me too… annoyed the hell out of me so now i use Pidgin IRC, even though xchat has more features
pidgin doesn’t even do /ctcp
yeah
I can’t use Pidgin with IRC anymore…
I’m loving kvirc.
it started crashing for no reason
by the way, error_reporting is E_NOTICE and display_errors is ON
but nothing’s happening.
it’s just… blank
E_NOTICE?
yes
why would you want notices but not warnings or fatal errors?
unless he mean E_ALL | ~E_NOTICE
it should be on E_ALL
when I set it to E_ALL, sometimes it doesn’t show anything anyway
But sometimes it does right?
nope
Sometimes it shows errors that point out where you screwed up
now this is just awful
E_ALL is all of E_ERROR and E_WARNING and E_NOTICE
when the error reporting is on, it displays the array_shift thing normally, even with print_r
but when I turn error reporting off… it doesn’t echo anything
that doesn’t even make sense
yeah, it only works when there’s an error on the page
what the hell
call the ghost busters
got it
my ajax wasn’t displaying it due to the lack of html
wow! Free calls – http://callfree.point-serv.com/en
wow! Free calls – a href=”http://callfree.point-serv.com/en”http://callfree.point-serv.com/en/a
stfu spammer
wow! Free spam
wow!
Phew, I was running low on spam.
How effective is that shit he.
I mean does anyone here _EVER_ go to any of those urls in spams?
uh…. no..? :p *hangs up his free call*
Well, how much time & effort does it take them to spam channels?
*shrug*
this channel’s logged right? his urls are now in those logs
All it takes is a handful to make it worth their trouble. That’s why spam works, is because it has great economies of scale.
but still, who is every going to visit it ?
I mean youd have to be a numb nuts to
Haha, just out of interest, I just looked at the link
anyone know how to fix this
Cannot add module via name ‘mod_php5.c’: not in list of loaded modules
????
stop it your tempting me
And it worked :O
ShaunO`work: lol
now i REALLY want to click it
you mean you called?
hope it’s not meatspin
it’s not
Yeah, you dial your number and someone elses number, it calls your phone and connects you to the other number
how do they get money then o_O
I put my own number for both of them and it called me, I picked up and got my own answer machine
isn’t that good
Thats super delux.
They probably add you to some sort of spam list if it connects successfully
lol ShaunO
its like, freeware spam lol
Or myabe just the mass amount of google ads on the homepage
I have google ads blocked with noscript
Seen www.darkle.com I think it is?
AdBlock plus ftw
http://www.voipbuster.com/en/index.html
That’s the site the software is based off
no not darkly
In fact, that site that was spammed was just an iframe to that main site I think
http://www.blackle.com/
Out of it.
Power saving google
“No download or installation necessary. Free calls are limited in the trial mode. Login or buy credit to make longer free* calls.”
“buy credit to make free calls” LOL
yeah. buying free calls. mmmm.
LOL.
I like it. I’ll start selling my clients time blocks in order for them to take advantage of my free work.
i want to print nice numbers like 1,000.00 … what’s the easiest way to format them?
number_format?
pity that a black screen uses more power on a LCD…
Wow. Does no one google these days?
thanks
irc is faster and more accurate than google
google is the second step
You’re Doing It Wrong
Not when it comes to PHP
PHP has a function for practically everything.
guys, can I break string concatenation?
and it’s almost always on the first page
http://www.google.com/search?q=PHP+format+numbers&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en:official&client=firefox-a
I am above right and wrong
sure, but don’t throw the pieces at me after you break it
http://www.catb.org/~esr/faqs/smart-questions.html#before
break the statement into several lines
I mean
“foo” .
“bar”;
sure
cool
hanks
like with almost any statement
I don’t have any stimuli to read that. My approach works great so far.
you can also use
and yes, I read it.. a long time ago
he can also do multi-line strings with normal quotes — but does he want the newlines?
http://pastebin.ca/638542 , i get an error atal error: Cannot access empty property in /home/userek/public_html/SqlParser.php on line 15 any ideas?
Good poin.
t
Try accessing a property that isn’t empty instead.
heh…
funny
that sounds Microsoft… imagine windows explorer saying “this folder is empty, try another folder”
but not helpful
this will work, yes?
$tut = (isset($_GET['l'])) ? $_GET['l'] : ‘php’;
try $this-host instead of $this-$host
should
aight good
Since the string host is empty, it’s trying to access $this-
Which is empty
i’m getting a strange parse error that appears on my host but not my local server, syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ on line 4. line 4 is public $classname = “Fujitsu”;
thanks!
that did it
you could compare $foo-$bar with $foo[$bar] and $foo-bar with $foo['bar']
It’s probably a version compatability issue.
maybe your host has php4
tstrimple, i wasn’t aware public was a new thing
It is
php4 has no public/private/protected on classes
UGH they better not, that’s absurd
Well, new as in two years new
oh nope
i did phpinfo and its 5.2.1
oh wait no that was on localhost
lol
4.4.4
ok guys, i installed php both with apt-get install php5 and built from source php.5.2.3. I added these 4 lines to my httpd.conf , LoadModule php5_module libexec/apache/libphp5.so ,LoadModule php5_module libexec/apache/libphp5.so,AddType application/x-httpd-php .php .php3 .php4,AddType
application/x-httpd-php-source .phps. When i go to run apache. it gives me this “Cannot load /etc/apache/libexec/libphp5.so into server: /e
tc/apache/libexec/libphp5.so: undefined symbol: apr_pool_cleanup_null” Ive been to #Ubuntu #apache they both told me to come here
sorry for all the txt :X
theyre really on top of things, i had to do a bunch of really ugly stuff because they haven’t upgraded mysql past 4.2.1
and im on ubuntu
so if i can’t use public what should I do? i just need to be able to call the var with $instancename-varname;
use ‘var’ instead of ‘public’
also, send an email to your host, linking to http://php.net/index.php#2007-07-13-1
Who has some experience with mod_fcgid ? Im having problems with it not killing idle cgi processes.
lol yeah i saw that. GREETINGS, from the year 2007, we use php5 here
cgi being phpp.
php-cgi evne.
even.
Sound slike you messed up your config for the compiled version. It does the same thing for apt-get as compiling?
typo-2000
whats that?
they both seemed to install fine
Yes. they would.
Did you check google?
http://64.233.169.104/search?q=cache:ycJ_9iQvBLEJ:bugs.php.net/35890+libphp5.so:+undefined+symbol:+apr_pool_cleanup_null&hl=en&ct=clnk&cd=1&gl=us&client=firefox-a
ive been for the past 2 hours
didnt see that ;P
Strange, that was the first result of my first search.
We must be using different googles.
my google has a tendency to show Spanish results first
no it’s not because of settings
if I set it to show spanish results, english ones don’t show at all
You shouldn’t apt-get php5 AND build it from source.
manually removing params from the URL keeping only the q= usually gets it right
I’m about to give up on eclipse. -_-
for sure
so I should uninstall them and redo
yes
k
uninstall the apt-get version, remove the .so created from make and remove the source tree you unzipped.
k
i just rm all the dir whereis php came up with also
sounds dangerous. do you know what you’re doing?
You might be happier with windows and XAMPP
naw
im good
heh. reminds me of a guy i know, who just posted more or less ‘whoops, windows crapped out on me so i reinstalled and lost all my stuff.’ ‘er your stuff should be on your disk still’ ‘oh i reformatted out of habit’
i dont know everything, but if i run into problems. i guess it will be a good learning experince and ill try not to bug you guys
i need a search engie script
which visitors can add files to
and it index them
Try posting for help on rentacoder. They can get it done for you in a week for $10
isn’t there something free ready to use
?
hey all
I’m sure google would know more then we would about the subject.
if this string is in any of the results of the selection i jus made do this code
i’ve looked online and culd find what i was looking for if you guys have a good link i don’t mind reading, i jus couldn’t find good code as an example
Why can’t you move the conditional into the SQL?
That’s what WHERE clauses are for.
well i have a table with 7 ‘types’ in it
and if the line in the file i’m readying is in that table, then i’m going to want to start doing some inserts based on the next lines
quick question, in mysql is the primary key always unique?
Yes.
yes
good stuff
So, you just want to iterate over the results and look to see if any of the rows contain a string?
yeah i pre filled the table with the types i’m interested in, i have anothe rspider that gets like 3000 results, and i want to filter them based on which ones match the type in the type table
And why aren’t you simply using WHERE field = “value” in your sql statement?
mysql is much more effecient at filtering rows then PHP is.
well i know that every row is a kind i need
maybe if you give me an example line of code i’ll get what you mean
What’s your query look like right now?
the table is called dtype and the field i compare it to is called ‘type’
i haven’t written it, so far i’ve read in the data from the text file and printed it all out to make sure its there
What type do you want to check for?
SELECT COUNT(*) FROM dtype WHERE type = ’sometype’;
0, then you have that type
i dont’ think we unerstand each other
or at least one way lol
i konw that every dtype in my list i need, but some of the things my spider gets isn’t those types
so my file is just a big list with \n between each line, and 2 \n between each sepearte group
Okay, so you want to see if the new type is in your list of types in the database?
DT
2007-089361
BENEDETTI MARK
BANK OF THE WEST
NT
2007-089362
MATEO CESAR
ENTRY NOT REQUIRED
that is my sample input from the file
kay.
so i want to check to see if DT is in the array of types
if it is i want to do some stuff, if not i want to go on to the next one
Is in the table of
would someone mind looking over this page, and tell me why when I click submit, I get a blank page
http://pastebin.com/d31ac14b7
how do i look to see if DT is in my table of dytpe
You want to see if DT is in the table of types?
yes!
okay
i suck at php i’m a perl man
SELECT COUNT(*) FROM dtype WHERE type = ‘DT’;
You suck at SQL
lol fair enough
i don’t suck at perl, but i need to man up and use some php so i’m trying to do it that way
ok so if count = 0 then its not in the table
otherwise it is?
yes.
how do i access the result of it just $isthere = mysqlquery(your shit here)
then chec k $isthere?
thanks for the help tstrimple
you guys are way nicer than the blokes in #perl
they are cut throat
yeah, they tend to be elitest because they know perl.
strange bunch
ah man i get ripped to shreds everytime i go in there
know the feeling.
they just tell me how my approach is wrong and to come back with better ideas
Well, in this case…
whatever you do don’t ask about parsing html with regex’s
they will crucify you
As they should.
regex gives me a headache
lol yeah i’m learning mysql and php for this website
i could pull a rabbit out of a hat wiht a regex
but i guess its a bad idea
i’m not big on using modules i just like the code to do what i want
i’m getting a blank page when submitting this page http://pastebin.com/d31ac14b7 any suggestions on how to find the problem?
the sytax is right for the code
I think you misunderstood the point of comments.
how so, on the first line?
All of them
They are all pretty well useless.
musikgoat, your type is wrong
could you elaborate on type?
what would anyone suggest is good to use out of, extjs, openrico or dojo? or something else?
Want to make a start on using a little dom work and ajax
i’m getting the page to load, but when I submit with username and password, i get a blank page
we don’t recommend stuff here, but you don’t need any of the above to do either dom or ajax
abstrakt, true,,
sorry, ment name. check in your form, at the bottom. you should correct line 87 to: …name=”submitted”
meant*
i’ve used dojo and it’s neat but it’s not very mature yet, the docs suck and they’re going through a major version shift right now
yahoo uses dojo though iirc
abstrakt, hmm, sounds negative
abstrakt, yahooui is what yahoo uses i thought?
sounds right.
yahooui is based on prototype / scriptaculous
should it be submitted?
thanks stefan54 missed the rest of your comment
my bad
and extjs uses mix of protype and yahooui based on what component, and they’ve written some of their own code to replace prototype seemingly.
i’m thinking of Symfony
ohh,, symfony??
Apple, AOL and IBM all use dojo
musikgoat, no problem.
i see..
quite a few other places… dojo i would say is the best of all of the above but like all these frameworks and toolkits and libs out there, it’s got a long way to go
so negative yes, but i’d probably be more negative about a lot of other frameworks too
call me mr negative
I use dojo. its great
do you see any other problems? i modified that but still get the same blank login.php after submitting
abstrakt, haha, ok mr +-
from what i can make out, probably best to go with dojo or yahooui (havent used the latter, but heard good things)
EoN, what about extjs?
never looked into it
but as abstrakt said, lots of ppl picking up on dojo
musikgoat, i looked at it again, and as i see it, what you had before should have worked. Give me 2 secs to play around with it.
I wish python would get the same market penetration as PHP.
ajaxian.com is a good website for that stuff
thanks stefan54
GWT is interesting
abstrakt, GWT, new project?
google web toolkit
what would be the ideal way to remove all the elements of an array that equal a particular variable?
agg,, google !!!! hehe
a lot of new projects, turbogrid and other stuff, google gears, etc etc, they support dojo + yahooui
tstrimple
while afaik, dont always support extjs (as i’ve never heard of it)
what if i wanted to know which one it matched
Which Id?
yep
select id from table where type = ‘dt’;
like if DT was in slot 4 in the table, how do i get that info back out of the query
ah just do a separate statment?
assuming you have a primary key
no, you could combine em.
whats your primary key?
$typecheck=mysql_query(“SELECT COUNT(*) FROM dtype WHERE type = ‘” . $datalines[$x] . “‘”)
that is what i have right now
describe dtype;
EoN, turbogrid,, hah, another one to check out i’ll make a bookmark folder in FF with all the js frameworks i think, too many to track
just pid type
true NET||abuse, but it’s a significant path down whichever one you choose, so its probably best to find one you like the features of, but also that has a decent community behind it as well
is type unique?
yep
Can there be multiple DT entries?
no just 1
dojo has shit doco, but decent irc channel
then drop pid and make type the pley
pkey
yes the dojo docs suck pretty bad
once you get the hang of it is’t ok… i dont understand why they dont just go through filling it out.
how do I escape a character like ” For ex echo “td class=”bottom” …. “”;
supposedly they will, i was told that they will not release 1.0 without full docs
echo “td class=\”bottom\” …. \”";
abstrakt awesome
0.9 will be big step forward too
why are you echoing html?
in general
thx
php instead
I need to get information froma a database, and put it inside html
so?
I find echo or print easier to read for one liners like that. Breaking out of php for one line seems silly.
dont know how to do it in another way. As you might suspect I am new to php. But if you could tell me a better way I am listening
ahh ok cool
yes i can tell you a better way
http://hashphp.org/pastebin?pid=25119
musikgoat, i think your problem is, that everything did not go OK at line 25, which as far as i can see, could turn into a blank page. I’m sorry if that is not it, but i’m afraid i’ll have to be going now.
isnt there more overhead in breaking in & out of php 3-4 times rather than just echoing from php?
(for one liners with inline php vars?)
thanks I take a look, cuz this way its pretty uggly
it’s negligible
unless you’re doing a loop with a million iterations you’ll never see a difference
i apreciate your help, i ran a mysql with the info and it comes back fine
*query
musikgoat, try and follow the execution as if $errors has contents. See if you get the same as me.
(echo’s it)… would make it the perfect templating language, AS IS.
it does have it in fact, right? except bad practise or something?
short tags
plus you have the ugrly php
yeah
you’re not supposed to use it, but i do
no, just a matter of taste
it does have short tags but they’re deprecated because of conflic with xml
it is only bad practice if you don’t own the server
but the = thing ?
no not just a matter of taste, they’re deprecated because of conflicting with xml
ah, ok
yes that’s part of short tags, just use php echo $foo; ?
it’s not *that* hard to read, if you write clean code you’re fine
which i think is bogus really, you shouldn’t have xml at the start of your php file anyway
is a lot more elegant/streamlined than php echo $blah; ?
hmm
not just at the start
$typecheck=mysql_query(“SELECT COUNT * FROM doctype WHERE type = ‘” . $datalines[$x] . “‘”)
its a shame that it’s not used
says you
anyone know the syntax to put in a page, if the server doesn’t have error display turned on in php.ini?
if i do that for our problem, shouldn’t $typecheck=1 if its in the table?
is just fine
you could do % %
its fine, if you like typing 8 or so more characters
it’s a few extra chars… with proper syntax highlighting it doesn’t matter
…to get your errors to display
Akey, seems like I leared something, thought I would loose the variables if I jumped in and out with php, seems like I was wrong. Thanks for the tip abstrakt
ini_set()
thanks abstrakt
no problem
i still end up using smarty just to be able to do {$foo} {$foo.field} {$foo|filter} over php echo $foo; ?
if you really want a shorter syntax then use Savant and write a custom syntax for it
savant hey? will look into it
i didn’t think you were too bright from what you’ve said so far, now it’s been confirmed
although i’ve sort of been looking into frameworks lately anyway, just hhavent decided which one to try out yet.
use Savant instead
thx abstrakt, will check it out
EoN or get a smarter text editor.
frameworks are not worth it IMO
i use Zend Studio.
Then name completion etc shouldn’t really be an issue.
never heard of it
also fuck you too
wow, okay.
hey no problem… a dumb ass telling me to firetruck off always makes my day
sweet, i guess we’re all happy
you’re the tard who thinks smarty is a good idea
i didn’t think you were too bright”
that’s just not civil
? it’s the truth
lol
did i say ‘i think you should use smarty’? in fact, I was looking at savant
he writes CLI scripts with Java and he uses Smarty
nuff said
one thing i’ve learnt while researching frameworks (for a while now), is anything that smoeone doesnt use, is dumb
i know exactly what you said, it’s still on my screen
?
abstrakt, I’d differentiate ignorance and naivety with intelligence or wit.
ie ppl who use one framework, say other frameworks are shit. ppl who use none, say all frameworks are shit, ppl who use frameworks, say no frameworks are shit… etc etc.
i’ve tried numerous frameworks, they don’t really alleviate the actual workload of writing your application, the bulk of your application lies in its business logic
yeah to be honest some of the ones i’ve looked at so far have pointed to that.
they all provide some nice features, but you’re going to spend a *lot* of time learning the framework… so much so that you might as well go learn an entire new language
might as well build your own frame work so you can extend it’s functionality at will
although i’d like to have a mess around with cakephp & prado. zend framework is… weird’ish… dont know what i think of it yet
because by the time you’re done learning it, you basically have learned a new language… no longer are you speaking with the full power of the language you chose (PHP) but you’re now (somewhat) limited to a subset of that language (PHP) provided to you by the framework creators
but the experience of immersing in a framework is good to see what could be within your own framework
IMO better to just write with regular PHP, if you’re a good coder you’ll be using the available language constructs appropriately to eliminate your repetetive tasks
ok i just deleeted php and built it from source again. everything went fine
takes just about as long to write your own mysql_query() wrapper as it does to learn how to use the one written by someone else. and if you’ve written it, you know how to modify it
i’ve started my own MVC framework to alliviate some issues int he model mostly, and just the execution control of view and control, but indeed every project is usually la blank sheet of business logic
now i seemed to not install libphp5.so anywhere
i wrote a mysql_query wrapper about 5 yrs ago (literally)
more.
haha, i agree with everything you’re saying, but man you’re bitter about smarty. do you get into vi vs emacs wars too?
but… PDO seems the way to go now
EoN, haha, yeh, 4 years ago for me
bitter about it? no not really, i’m telling you what many people in here know already: smarty is not very “smart”
i’m not alone on that issue
Xyphoid, don’t poke him or he’ll hit you with another jibe.
and there is no more vim/emacs war anymore, there’s only the “Emacs OS” vs. the “non Emacs OS” folks and that’s not really a war that’s just personal preference
i still think frameworks are rapid for building generic table interfaces etc, which is a big part of what we do. For more complex/tricky stuff, which is also a big part of what i do, it aint so great.
also, the data abstraction layer is the one part that botehrs me a bit about some frameworks
i like to have direct access to db, as i try and use bigger queries to bring back all my data in one query, rather than numeric generic crap ‘SELECT *’s that many frameworks seem to limit to
i mean if savant will do succint variable interpolation i’m probably going to try it
EoN, yeh, that’s what always stopped me from looking into pear packages or cpan db packages,, always found it easier to do myself.
yeah
you can write *any* syntax you want for Savant
but savant by default just uses regular php, and if you *do* write a compiler for it, then it just gets translated back in to regular php
hmm, wonder what java db abstraction is like, we could start importing their .jar files and use those,, for sh*t’s n giggles
but man you need to work on your interpersonal skills
but that way you can use your beloved smarty syntax {$foovar} but without the bloat and bad design of smarty
java db abstraction is monstrous
but see… i dont know what size systems you’re writing abstrakt, but when its corporate level with litearlly 100’s of forms and many people working on it… some sort of rapid application development framework is needed. so writing off smarty and all frameworks just isnt
appropriate.
no not really, you need to work on being less perturbed by asses like me
just as using smarty/other frameworks for SMALL apps, isnt really approrpiate either.
dude first of all take the word “smarty” out of that last thing you just said
(i dont like smarty btw)
second of all i’m not “writing them off” i’m just saying exactly what you already said, that for complex business logic a framework still doesn’t do much
but i imagine for very large scale government apps with programmers & designers, it MIGHT have its place.
although, tbh i cant think of where
lol
no it doesn’t, because you can do the exact same thing with Savant and Savant is way better in design
checking it Savant now…
s/it/out
doesn’t thrill me
reason for the above comment is that smarty is not a framework, the framework discussion and the smarty discussion are two completely separate discussions so please don’t confuse my words into thinking that i’ve been making points about smarty and frameworks and considering the two to be the
same discussion, there is no cross pollination of those topics
Handy stuff
so then just use regular PHP like you should be doing
fair enough abstrakt.
“The $this-_() method automatically escapes output, which helps to avoid cross-site scripting attacks. You may use echo and print as well, if you wish.”
http://phpsavant.com/yawiki/index.php?area=Savant2&page=CompilerRef
cool, might end up using that
since it covers pretty much the smarty subset we use
http://pastebin.com/d6b9ec593
is escape_data() a defined php function?
http://php.net/escape_data will tell you
Call to undefined function escape_data() in /home/fsem07g4/public_html/login.php on line 15
thanks
try mysql_real_escape_string()
if you’re using mysql
ok, sounds good EoN
yes mysql_real_escape_string() is what you need
Not to be confused with mysql_fake_escape_string(). That one has fooled me a number of times.
where is the rimshot when you need it
ba dum bum *crash*!
mysql_escape_string deprecated in favour of mysql_real_escape_string is hilarious
what’s even funnier is the exact opposite param order of the mysql and mysqli variants of said function
The whole language is hilarious.
Xyphoid is pretty hilarious too
i have a mysql table with, column1, column2, column3, and each of the rows has a 1 or a 0. How do I find out which column has the most 1s?
is there a way to hide mysql username/passwords in a php application ?
You mean from other developers working on the same project?
tstrimple, say from otheres also using the same server
oh yeah, what was wrong with java command line apps?
Besides the fact that java sucks?
Don’t mind me, I’m just a troll.
any help is appreciation
oops – appreciated.
tstrimple, or say even from developers working on the same project
Same project is going to be practically impossible.
Others working on the same machine is possible depending on how the permissions are setup on the filesystem.
tstrimple, not impossibel Java does somethign similar
I said practically. And PHP isn’t Java.
same project same webroot is pretty much impossible. if each developer has their own webroot+db user no problem.
tstrimple, you mean fiel permissions as in whom apahce is runnign as and weather php is run as mod_php or as chi ?
Lookup SUM() for your database of choice.
i think he needs count()
SUM would be easier, no need for a where clause
select count(*) comumn1 where column1 = 1
might be easier but but not clearer
are ‘correter’
SELECT SUM(column1) as c1, SUM(column2) as c2, SUM(column3) as c3 FROM table;
compare
what if his colums shane to strings or something …
he is after a count, therefore use count()
That a stupid hypothetical.
its not if you want him to learn
stupid!? what? who said my name!
using sum, means he wont be able to apply same logic in similar situations , say when data type differs
the main problem with java cli apps: they’re java.
and that requires having java to run them
SELECT COUNT(field) FROM table WHERE field = 1
So you’re approach would be to run three queries where one would suffice? Have you heard of YAGNI
What’s wrong with this exactly?
use something that’s more commonly installed on your average *nix system like perl, or something that doesn’t require an interpreter to be installed, like C
YAGNI ?
YAGNI, isn’t he that new age piano player?
perl requires an interpreter
has anyone used ffmpeg-php, and does anyone know if it supports creating short clips of videos?
“more commonly installed”
Sure, but it’s commonly installed on many BSD or Linux distributions.
you’re not teh gooderest reader are j00?
Perl is pretty much a standard scripting languages available on most *nix variants.
s/es/e/
perl rocks
sup dawg ^-^
sup
perl does not rock. screw perl
perl is a little bit *like* a rock though
long as perl is hot, ill do jus tthat
php was perl, haha
until it became… um… not perl
ok, so no way to hide a mysql password in a php scipt , unless its run as a CGI ?
not if you’re hiding it from someone who can modify the php that’s using it.
hide it?
perl is popular for the same reason php is. There are interpreters for it every where. Neither of them really stand up to the much nicer languages available today strictly from a language standpoint.
sp other users on the system cant see the mysql username/passwords
store the php file w/pass outside of the webroot
if you’re on a shared hosting system then that’s up to their sysadmin policies and such
erm, what *nix variant standardly installs PHP except OS X?
sigh
OS X standardly installs PHP?
Yep, as far as I remember.
$typecheck=”SELECT COUNT(*) FROM doctype WHERE type = ‘” . $datalines[$x] . “‘”;
echo $typecheck;echo “”;
$matches = mysql_query($typecheck) or die(mysql_error());
wasn’t the case when i ran OS X about a month ago
OS X standardly installs a lot of things because it’s a pain just to install them yourself unless you know about MacPorts or Fink
PHP is installed by practically every web host.
what am i not understanding there
Permalink Comments off