logs archiveIRC Archive / Freenode / #php / 2006 / June / 7 / 29
Mer`Zikain
heh
cythrawll
represent
Mer`Zikain
yeah now if you could just fix exec and my server so they would work all friendly like ;)
i could have sworn i went through this sh*t with this server once before and had it fixed
(Action) stabs it again
brb
cythrawll
im grossly inexperienced with using exec
qbert
you are gross
cythrawll
o snap pwnt
qbert
talk to the hand
sista
Mer`Zikain
well nothin to worry about there, exec sucks for the most part
it's just one of the only ways i know to execute imagemagick though
which is WAY better than the GD lib
qbert
arent their imagemagick extensions for php ?
         

Mer`Zikain
dunno
are there?
qbert
yes
SunShineLady
Hello
How can I pad woth zeros? 1 -> 01
Mer`Zikain
well nothing comes up at php.net
arpad
SunShineLady: sprintf/str_pad
qbert: pecl/imagick
kavok
Whats wrong with this syntax? mysql_query("SELECT * FROM cars WHERE `VIN`=\'$_POST[vin]\' AND `Color`=\'$_POST[color]\' AND `Model`=\'$_POST[model]\' AND `Company`=\'$_POST[company]\'");
SunShineLady
arpad - Thanks, was looking for str_pad() :D
cythrawll
Mer`Zikain, did you check pair or pecl?
SunShineLady
kavok - no slashing
Noriega
also, should the column names really have ` ?
cythrawll
Mer`Zikain, it's in pecl
http://pecl.php.net/package/imagick
||cw
Noriega: that's mysql's escaping method
kavok
SunShineLady: Didnt work without the slashes
Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Car 2 AND `Company`=GM' at line 1
Mer`Zikain
yeah but the big question is, how do i use it
Noriega
||cw oh, I've always written the column names without any kind of apostrophes  is that bad? :)
Mer`Zikain
i'm not a 'l33t php guru'
kavok
@Noriega: I don't think it matters :)
Noriega
ok
kavok
But if anyone can tell me whats wrong with my query I would appreciate it
Its not like MySQL errors EVER help you fix the problem -_-
Nathe
kavok: #mysql ;)
         

||cw
Noriega: not if you stay away from reserved words
Noriega
aha
zaydana
if I was passed an object as a function argument, how would I access that object's static data?
kavok
Nathe: So MySQL supports $_POST[] now? :P
Im pretty sure this is more of a php
||cw
if you want a col named from you need to write `from`, but that's a bad name for a col anyway... from what?...
kavok
I just needed to ' ' my $_POST's
Nathe
kavok: you were asking whats wrong with the query not the code :P
cythrawll
Mer`zikain, im guessing your already familiar with image magick, and the comments say that there's examples with the package...
Nathe
possible errors are $_POST[vin] containing ', $_POST['vin'] ['color'] etc containing malicious code, etc
Mer`Zikain
cythrawll: well the problem is getting my host to update
Nathe
http://php.net/mysql_escape iirc. don't have a mysql server so I haven't used it myself
Mer`Zikain
it costs me $15 everytime i want to ask them something >_<
cythrawll
you can't add extensions?
Mer`Zikain
greedy bastards
cythrawll
really?
ouch, hosting bad
Mer`Zikain
i probably could add extensions myself if i knew wtf i was doing
which i don't
Nathe
kavok: btw, the above was to you
cythrawll
well, if everything goes right
it's pretty easy to do
Nathe
kavok: always always always always check user input for malicious values ;)
cythrawll
granted, not as easy as pear
Mer`Zikain
what does it take to add one?
i've never done it before so i really have no clue what i'm lookin to do besides adding an extention line in the ini
brokencard
I have a question as to why a regexp won't match something
this
(Processing Location\:\s)([A-Za-z\,\s]*)(\<\;)(\D\w\s[a-zA-Z0-9]*\D\D[a-zA-Z0-9\'\:\@]*[$@myels.com]*)(\D\D)([a-zA-Z0-9]*[$@myels.com]*)(<\/a>>\;(<br>)[\s]*<)((\D\w) (href)\D\Dmailto\:[a-zA-Z0-9]*[$@myels.com]*)(\D>)([a-zA-Z0-9]*[$@myels.com]*)(<\/a>>)(<br>)
won't match
cythrawll
well there is a command that basically 1. downloads the package then 2. compiles it and adds it to your extensions
Mer`Zikain
"basically"?
brokencard
Processing Location: bradenton, <<a href='mailto:rrivera@myels.com'>rrivera@myels.com</a>><br>
<<a href='mailto:faffolter@myels.com'>faffolter@myels.com</a>><br>
cythrawll
it's been a few years since i've used pecl so I don't remember if you have to change the ini or restart php
Nathe
brokencard: wow that's one heck of a regex... lol
cythrawll
and i can't remember the syntax
Mer`Zikain
^^;
sp00k_
plop
brokencard
any ideas?
cythrawll
im sure the package has install docs ...
Mer`Zikain
would phpinfo() list pecl?
Anti-DeVeRaS
hello
caffinated
brokencard: you don't understand how character classes work
brokencard: that is your problem
cythrawll
it would list extensions after they are installed by pecl
but pecl is like pear, it should be included
JoeyJoeJo
On my network I have an exchange server that does all the mail. Is there any way that I can use this exchange server to handle outgoing mail from a linux/apache box using php's mail() function?
brokencard
caffinated: What can I do to learn them/fix my problem?
cythrawll
pecl are c,c++ language extensions, and pear are php written classes
Anti-DeVeRaS
i have a function like function foo($var1,$var2..$var30){ then inside this one i call a new function foo2($varX1,$varX2) $varX1 is declared on funtion foo. funtion foo2 gives me 5 new variables that i need to check on the 1st function. How do i passe values from foo2 to foo
caffinated
brokencard: i'm betting you don't understand what [$@myels.com] actually does. but it likely does not do what you think it does.
ZbouhhhTaff
piff > Epipgasp
oups
benjr
is there a security issue if all the usernames from my database are visable in the source code of my page?
caffinated
brokencard: i suggest you read up on character classes at http://php.net/pcre
cythrawll
benjr visible in the php source? or html source?
benjr
cythrawll: the html source
Mer`Zikain
cythrawll: well when i check out phpinfo it's not listed
Nathe
benjr: yes
caffinated
brokencard: also, read up on regex 'greed' as that could very well be the next problem you're having
Nathe
benjr: that gives them a point to start grinding on
mm2000
I dont understand... PHP5, installed on my server adds slashes without any reasons. input \ gives \\
Anti-DeVeRaS
benjr you still need a password, but ppl normaly use the same passwords and the same usernames, so having a username they know... can cause problems. but still need password :)
cythrawll
benjr it would just give them a dictionary to brute force passwords
mm2000
PHP4 does not. Not PHP5 on my laptop either..
can this be a configuration-thing?
SinnerG
what escaping must I do to be able to put html code in a hidden input field of a form?
Nathe
Anti-DeVeRaS: yeah but if they have a valid user name, they can start grinding on what the actual password is
benjr
ive got an issue since im putting all of these usernames into a javascript array, which makes them visable
cythrawll
mm2000 might be magic_quotes_gpc is turned on in configuration
sharmeen
i want to allow users to input words, number and spaces only
Anti-DeVeRaS
can someone help me with the function :) ???
Nathe
benjr: why are you doing that?
mm2000
cythrawll: ok
JoeyJoeJo
On my network I have an exchange server that does all the mail. Is there any way that I can use this exchange server to handle outgoing mail from a linux/apache box using php's mail() function?
sharmeen
how can i write its regular expression please
Mer`Zikain
goddamnit, is today just going to be a big ball of sh*t or what? >_<
now a CLEARLY defined array is not showing up at all
sharmeen
i want to allow users to input words, number and spaces only
how can i write its regular expression please
Mer`Zikain
(Action) goes on a stabbing spree
benjr
Nathe: for the registration page, i check the input of the text box against javascript arrary to see if username is taken
Anti-DeVeRaS
i have a function like function foo($var1,$var2..$var30){ then inside this one i call a new function foo2($varX1,$varX2) $varX1 is declared on funtion foo. funtion foo2 gives me 5 new variables that i need to check on the 1st function. How do i passe values from foo2 to foo
Nathe
benjr: just do that on the back side. rethrow the registeration page with an error message if it's taken
caffinated
sharmeen: /^[a-z0-9 ]+$/i
Nathe
benjr: or if you want to be fancy use XMLHTTPRequest() to check for it
benjr
Nathe: im getting it to check after theyve entered data into the input box, btu before they submit the form
cythrawll
yeah benjr, don't do it client side
benjr ajax can do that and keep the check server side
benjr
whats ajax?
cythrawll
ajax aka XMLHTTPRequest()
ajax is a buzzword
caffinated
aka not a topic for here
Anti-DeVeRaS
not explainign ok ?
2 function ... one inside the other...
mm2000
cythrawll: it was on. Can i turn it off somehow?
Anti-DeVeRaS
the 2nd ove gives vars i need to evaluate on the 1st
cythrawll
for using XMLHTTPRequest, javascript, and xml (xml is usually created by server side app like PHP)
benjr
that will check if username is taken before they submit the form?
cythrawll
cythrawll, is it your server?
er
mm2000, is it your server?
do you have permissions to change php.ini?
mm2000
yes
Anti-DeVeRaS
:(
cythrawll
yeah just change it in php.ini
philip
php.net/magicquotes
mm2000
yes.
Anti-DeVeRaS
can i be read here? CAN SOME READ ME? do i need to identify?
« 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 »