http://sausage.no-ip.org:88/paste/php-httpd-conf
how is that, i tried to make it atleast slightly compatable with
apache ;-; mainly for simple deny access htaccess files
hi
http://www.google.com/search?q=populate+select+AJAX+PHP
you can have multiple server { } blocks
aswell, though i don't see a use for that
hrm, i see
i figured it would be easier to work around a config
file
that's nothing like apache's config
I don't know what is LOCK_EX. Will file_put_content lock file
if I use it for writing reason?
i just wanted to support htaccess that say "deny from
all"
oh, i see
I need to do a POST in the middle of a script to get some
offsite XML host
data. How do I do this in PHP
I'm going to be serializing some arrays to be stored in text
files and was wondering if anyone had suggestions on what to use?
So far I'm just using 'serialize', but I was hoping to be able to
find something that was more human readable/editable.
curl
Dynom is curl a standard thing in php web hosting or do
I need to install it?
php.net/curl
ease of parsing - JSON (standard in php 5.2+) ease of human
editing - YAML
I have done a C script which extract each page of a pdf and
convert them to swf and jpeg, I'm calling this script in php using
exec(), I noticed that the script doesn't do all the work, is there
any limitation when executing a command from php exec funciton
?
not really
i was looking into yaml, but the only library i found was
http://spyc.sourceforge.net/ and
its still in a 0.3 release, Do you by any chance know if there's
anything more stable/standard?
.ini files
sorry, I don't. I've only used YAML in ruby
Dynom, so why do my script stops ? (when executing it with
the same params from a terminal it does work)
did you checked your return codes, and/or error logfiles
your php web
hosting script might be timing out.
Dynom, the strange part is that I'm doing the same stuff for
60pages and just 15 of them are done
fyrestrtr, no because my C script do fork for each page so the
script returns before the end of the work
then childs process do the real work
and besides, timeouts of PHP doesn't calculate shell
executing
try debugging your C code; don't think it's an eec() bug
tbh
I retrieve some binary data from a database, add some headers
(content-type) and try to output it to the user. This works fine,
except for a whitespace that is added in front of the data
retrieved which makes the file unreadable when downloaded. Any
input on this problem?
remove the whitespace.... ?
bom dia
Dynom, erm ok :s
sounds like one of the files has some whitespace after a
closing ?
remove the ?
ending a file with it is asking for trouble
hmm ?
is trouble ?
well you can end a file with 100 newlines if there is no
php
end tag
thats a bit double double
I've checked the files involved pretty close, and can't find
any whitespaces. Could it have something to do with the headers?
Outputting the retrieved data before adding the headers seems to
give me the correct data without the whitespace.
that was the end of the explanation ?
maybe he meant that if using a tag youll get an error if a CR
or CR/LF or LF even is below the tag ?
sounds like it has some relation :-]
good morning all. Can you help me 2 secs with a stupid
regex?
I just need the content of path /
I mean, path(.*)/
well there you go
?
.*?
you don't want it to be greedy
yeh, make it ungreedy and done
is there an easy way to intall apache/php/mysql like netserver
xampp, BUT with php 5 ?
or it will steal your diamonds
i'd use [^]+
xampp runs php 5
oh cool
and NanoBNC, there's a channel for regex
shepherd_work, oh, sorry, I didn't know
shesek, sorry, I didn't know
wamp ?
np
use [^]*
PHPadam, use Linux; use Super-cow-powers;
i bet 50% of emotes came from regex expressions
of what? what's emotes?
heh, "regex expressions".. just ignore my stupidity
Help, http://phpfi.com/250553
That's javascript
host ...
ups
sorry
emotes ?
^_^
isn't it num.value btw ?
you mean emos?
iirc ...
no, rofl
what then
i meant emotes =\
hello
XD =\ _
and the like
emoticons
blah ..
textual representations of an emotion/feeling
but there not icons, theyre 2 or 3 character representations
of faces XD
now everyone has an acronym for everything
m(^-^)m
o, feeling like a winged jiggly puff
s/o/im/
emoticons are those annoying flash ads that appear all over the
internets
???
:P
they keep growing, theyre like, 92x92 now =\
...i know what emoticons are, didn't knew its short form
i like the one that says "oh behave"
emote is:
but i wasnt referring to emoticons
emoticon is the smiley (afaik)
im shitting you, of course, i want to smash the screen everytime
i see them
/me ??
you're from .il too aren't you
no, dont slash me :P
yep
you too?
Yep. And PHPadam
./me performs action. is an emote
and a bunch of other folks
ah. cool
il rocks
ftw
... alright
know anyone specializing in MSSQL DBA?
what is .il btw IreLand?
no, Jewland
Germany ?
no, the other one
LOL
israel
he was asking for that one -_-
illinois is a country ?
:P
.IL - Israel
a company
is hiring C++ developers, VOIP people, and they're looking for a
DBA
I KNOW :P
are they greedy ?
or they payment is good
jewland sounds so.... not correct for some reason
MikeSeth, sorry.. nope
I dont know. I'm not the one running it. They are my neighbours
who asked for help.
leave it as .jl
hahaha
3
You know what I want? a .keke TLD
start guessing what .rt means then
redneck trash?
I'd want that one fo sho
er
Alabama I mean?
no ReTard
.rn Redneck
so Alabama?
I know a few who I would love to give a few tld's with
that
ahahaha
"Sir would you like a fried TLD with that"
.ah
bb, smoke &
^+^
start guessing what that means :P
hmm, alcoholics, tbh .aaa would be nicer, not so anonymous
though
i was thinking about .ah being adolph hitler but it can stand as
asshole aswell
.ca crack addict, no, wait, that stands for canada doesnt
it?
how can i inclue a page.php with arguments?
include('/path/page.php?element='.$num); and also:
element=3 ; include('/path/page.php'); without success
=\
$_GET['element'] returns nothing ;(
$_GET['element'] = $num; include('/path/page.php');
ah! ok, thanks
query strings are broken off by the webserver
ok
$_GET contains the query parameters for a GET request. Do you
know what a GET request is?
b$_GET contains the query parameters for a GET request. Do you know
what a GET request is?/b
i'm really starting php, i think i understand what it is, i read
the docs.php.net for the moment
it's not PHP, it's HTTP that you need to understand
it's true
hello
I installed php
webhosting 5 on windows from the installer
I did not enable any extensions during installation
so do i need to do any extra stuff to access MySQL?
yes, enable the mysql extension :P
I mean do i need an extension or the defult installation
supports that?
TehSausage, just uncomment that line in the ini file?
I mean, i did not install any extension..
should do
let me try
extension=php_mysql.dll
hahaha check this out
http://www.bankofinternet.com/
TehSausage, where exactly will that dll be?
I do not find it in the PHP directory
php_install_dir/ext/ probably
The Windows installer doesn't ship with the external
extensions, use the zip file.
I am receiving this error "phpSHIELD loader
phpshield.5.0.lin. The phpSHIELD loader has not been installed"
please help me
MarkL, i guessed that.. i am downloading it separately
hmm, i've got an interesting situation where an app i'm
toying with is using session data (I can access it between pages
and everything) and the session even has a session id, but for some
reason I cannot access the sess_[sessionidcomponentstuff] in the
directory where it saves (according to session_save_path())
..
is there some way to force it to write?
hi, how can i check if a message have a file attached?? im
using the IMAP functions..
where i add the phpshield.5.0.lin in php.ini
(the reason this is important is because I want another app
to use the same sesion data as this other app... so I'm passing the
session id between the apps, but since the first app isn't writing
the data to /var/lib/php/session the other app isn't able to grab
the session data... )
you'll probably have to use the mime functions
are there php built in functions to handle this
is msvcr71.dll needed for php_mysqli.dll??
yeah look at the mime stuff and imap functions on php.net
i'm sure theres some nifty pear/pecl libraries you can use
because when i enabled php_mysqli.dll and put the required dll
in the PHP directory it is saying that msvcr.dll is missing
and later it says php_mysqli.dll is not found
though it is present there
I need to add phpshield function in php.ini kindly advice
me
anyone, any idea?
where can i get this msvcr71.dll from?
pecl does not have it
no idea, i've never used it... does it have a manual or
readme?
Kobaz:Thanks for your reply
Any developers based in Ireland?
Telemachus, why, are others not good enough?
:w!
...
:set pthreat!
f00li5h:
sean`, No, not at all, just have possible position if anyones
interested in moving to Dublin..
^-^
yeah sure im interested do they pay me the airplane ticket and
everything ?
:P
can I telecomute?
Telemachus, I believe looking for coders here to work for you
is against the rules
Are your work facilities ORBO powered ?
!tell Telemachus about jobs
|!tell f00li5h about being a muppet
!tell Telemachus about meow
?
so are you orbo powered or not ...
interested in a telecomuting programmer from australia?) - tut
tut
i'm not asking on the channel
hehehe
ask me ask me
hence i'm obeying the rules
!tell pthreat about meow
good boy
!tell Danielss89 about meow
purr at you too
whatz width katz ?
:P
cats are evil!
OMG dont look at me
it would be like a deep purr right ?
yes, sinister
neat
Telemachus, such topics you can discuss in ##php I think
but you own your own company?
sean`, No I dont own the company, I hold a senior role, but
having trouble finding good phpdevs in this land
Telemachus, there are ways around that.. freelancers, other
companies..
sean`: pthreat ....
or you don't fancy outsourcing
sean`: yeah pthreat is a way
sean`, Im aware of this, but we want a full time, inhouse
person.
pthreat, you live in dublin?
sean`: no, i was actually expecting to have a penthouse in
dublin and a private jet from argentina to ireland smoking a fine
cuban
Telemachus,do you have other coders?
pthreat, great minds think alike ^^
sean`: of course, we cannot pretend less
is the syntax in the link right.
sean`: oh and pass the 100 dollar bill for me to light it up
with a benzine lighter
shoonya, why is this a PHP problem?
Yes
yes
can you notice the company link to me, Telemachus ? I'm kinda
curious
yeah me too
* not in the job, just the company.. I live in the
Netherlands, so getting to work would be a lot of time
:P
my ass is itching, i dont know if it has something to do with
it
(?)
I can't believe dublin has no coders :p
shoonya, you can't answer 'yes' to a 'why' question..
sean`: he said 'no good coders', not no coders
!tell pthreat about Haemorrhoids
f00li5h, I find that the same.. if someone is not good at
coding, he or she should not carry that name
f00li5h, I find that the same.. if someone is not good at
coding, he or she should not carry that name
sean`: i find it ironic that you're saying that on ##php
why?
sean`: because the entry requirements for php are: n/a
f00li5h, sean`, Its swings and roundabouts, sometimes
flooded, sometimes none. seems to be in 3/4yr cycles..
anyone can start doing php without any trouble
then come here and ask stupid questions
=_=
can i make html call a php function with variables from
javascript and css?!!?!
Telemachus, get one from another company ^^ offer him some good
stuff
why doesnt include('page.php?this=that') not working?!!
exactly
IT WAS MAKING ERRORS, SO I TURNED ERROR_REPORTING OFF
f00li5h, anyone can do PHP, as anyone can do C or Python, but if
you can't do it correct, hyou should not have the name coder,
programmer or scripter
WHATS A HTTP
sean`, wanted to verify if the syntax used is ok as there is
error while parsing this statement (blank browser
screen)
f00li5h, w00t w00t!
sean`: true enough
bah, i can't beat that last one
shoonya, have you tried error displaying methods?
something about variable variables and register_globals would
have done ok
sean`, like
??
display errors, and the function error-reporting
hi
are variables nested in php*?
oh nvm
was that you just now?
If only he would've waited 1 minute before joining..
?
are variables nested in php*?
no, rofl
that'd have beaten my error_reporting comment easily
is there a way to get INT_MAX in php?
hey, anyone knows what this errors means ?: DB_DataObject
Error: You cannot do run count without keys - use
$do-keys
TehSausage rtfm
krupa^: yeah, you haven't configured the data object
oh yes, because that wasnt the first thing i did moron
was that before or after you spammed the channel with your
"fun"
krupa^: DBDO being stupid.
speaking of that, why did i not see this function yesterday
when i actually searched for it
good day !
because you were too busy being an idiot in here
wait, thats not it
On some platforms (such as Windows) RAND_MAX is only 32768.
shut the fuck up wannabe whatshisnametroll7
TehSausage, hey calm down, + language
8yo neice
Hi guys
hi claude money
so? if they want to be idiots i can be an idiot
back
i have a quickie - i'm posting urlencoded data to be saved by
a script from a Flex app, but despite being encoded, it still
doesn't save the plus (+) sign, and a few other
characetrt...
how can I do to query a whois for .it domain?
i'd lock my 8 year old niece in a draw if she
complained
claude_monet_imp, find out what the server is ^^
then again, my niece is 0, and she would probably fit in my
draw quite well
how do i send the plus sign?
bwaha
find the whois server for .it and query it
which appears to be whois.nic.it
dammit... my bluetooth headset went in the washmachine
-.-
there is a list?
for the whois server?
yes, Google offers it to you
Good Morning. Yesterday MarkL was helping me with a problem. I
have a query which runs and prints up the results. If one of the
entries has a name of 'Truck' I wanted the output to be displayed 6
times. He showed me a method of OB with str_repeat, the only
problem with this is that I also have a custom counter running and
it is not increased for the rows wich the name is Truck it simply
gives it the same number 6 times. Thought
cmon, does nobody know how to send the plus sign through
GET/POST?
Where you have the if($row['name'] == 'Truck'){ ..
str_repeat() .. } bit just but inside the loop, $count += 6; to
increment the counter 6 times ?
s/but/put
El_Neng, + gets interpreted as a space when sending it thru
the URL
Anyone know of a good book that focuses on php 5 oop?
I will try it again, thanks.
Use %2B ?
print a copy of http://php.net/oop5
okay, how do i decode it into + ?
ah, oK!
glasscasket, google
are there any other characters that i need to be careful
about?
El_Neng, str_replace ('+',
'thisisaplussignandimsendingitthrutheurl', $url)
why ("$000111222333444555" == 0) returns true? basically
("$\d+" == 0) returns true (of course, === returns
false)
That was my first thought. Thanks!
because type casting a string that doesnt start with a number to
an int returns 0
vudu, a string is int 0
a non numeric string is equal to 0*
hmm ok
that's logical, thanks
first language i learned had types like php, but it didnt
have an === operator +_+
sean`, that's not exactly true
vudu, sean` : http://php.net/string#language.types.string.conversion
true, not exactly
What are windows users using php5.2.x that cannot install
Fileinfo pecl extension do to get the mimetype for a file ?
mime_content_type is deprecated, and Fileinfo isnt an
option
ah, didnt consider floats
steal apache's mime.types file and parse it yourself
Thats not going to work - there isnt any default path for
that in a shared envoriment
i mean keep a copy
*blush*
thanks all
morning....
hi... i'm trying to figure out the 'best' approach to building
an app/system/site... if i'm looking to build an app, and i don't
want to start from scratcch, what's the best approach? any sites
you can point me to...
this is more of a philosophical approach...
i'd say it's better to use some form of framework, or perhaps
pick a cms kind of app and rip it apart..
figured i'd ask here, and see what other devs say..
any thoughts?
while this isn't an actual php code question, it is germane to
building php sites!
germane ?
relevant
is there anywhere i can read up on creating a receiver to
handle a php request?
i'm trying to install the PEAR MDB2 library. it says that it
doesn't find the file PEAR.php. does it mean that Pear is not
installed on the system?
it means that pear.php isn't in your include_path
get a framework
what is a receiver?
okey, thanks
sorry its just a file i want to create to handle the post
request
dont steal someone's code even if its ok, thats modifying
stuff is pathetic
s/is/,is/
floating point math looks complicated =\
hi, I'm with a little problem.. the error: "Undefined index:"
and its about the index of $FILES[], where I define this?
$_FILES['USE_SINGLE_QUOTES_DAMN_IT'];
pthreat - ripping apart/using a cms app is what's behind lots
of sites, and is pushed by lots of the cms apps
(joomla/drupal/etc..) my question if whether this is the 'best'
appraoch... as opposed to just going with a more raw framework like
cakephp...
if I have an array of 20 elements, how do I chop of the last
10 elements without re-instantiating the array?
what's the difference between single and double quotes?
its better to start something from scratch, you can even do
the reasoning yourself
El_Neng, some characters are evaluated in a special way inside
double quotes.
pthreat - don't see it...
dont see what ?
El_Neng, try print '$hello' vs. print "$hello"
for ($i = count($arr); $i = count($arr)-10; $i--) unset
$arr[$i];
pthreat - your statement on doing something from scratch...
it depends on what you're building..
El_Neng, thanks.
don't work
El_Neng, o.O
yeah well, or if youre going to use something done, just ...
use it as it is
as an example, a number of cms kinds of apps have fairly good
(apparently secure) login functions..
Has somebody got experience on performance issues, and types of
server hardware?
El_Neng, err, I mistook your question for what it was.
??
ekneuss, is that good or bad... ?
oh
My root server is too slow
why reinvent the wheel in these cases..
why are there so many cms's ?
i dont know
10
anyways ... do as you like
pthreat, because there is so much C.
lol ?
however, it might be a bitch to extend the functionality...
which is the root of my question.. what's the direction guys have
gone in..
pthreat, (C being content)
:P
the single quotes to the $FILES[]; error: Undefined index:
privatekeyfile[/home/zabbix2/zabbix1_frontend/include/forms.inc.php:885];
and my code: if($_FILES['privatekeyfile']==null...
i thought you meant C as in #C
ekneuss, he wants to chop off the last 10 elements, so if the
size of the array is greater than 20 initially, that condition will
not work
pthreat, there is no #c channel anyway.
##C ?
pthreat ;P
.... ¬¬
if i'm creating a site.. the issue becomes whether using a base
"cms" kind of app as a framework gives me enough of a start, but
doesn't get in the way with other functions/features that i don't
need...
in which case, using something like cakephp looks better...
what was the question?
El_Neng, yours neither
hence you wuold have to rewrite a huge part of it for it
making it do what you want
do as you like
El_Neng, then what he wans is for($i = 0; $i 10; $i++)
array_pop($arr);
ekneuss, for sheezy. why will mine not work though?
hi MikeSeth - i was asking if the guys/devs use frameworks
when creating scalabel apps, or do you pretty much do it yourself,
from scratch, or do you base the app on something like a ripped
apart cms (drupal/joomla/etc...)
bhi MikeSeth - i was asking if the guys/devs use frameworks when
creating scalabel apps, or do you pretty much do it yourself, from
scratch, or do you base the app on something like a ripped apart
cms (drupal/joomla/etc...)/b
El_Neng, $i = count($arr)-10 will fail when $i == 0, meaning
count($arr) == 10
how I define an index of array $FILES[]?
most people in here will tell you that they have a framework
of their own
henrik_s__, you mean $_FILES ?
pthreat - which is pretty much what i think/suspect is
happening.. that over the course of time..you build up a set of
functions/basic structure that give you a start on the app you're
building..
of course, the main thing for doing things is doing your own
things as you like to
henrik_s__, take a look at http://php.net/features.file-upload
the $_FILES array is filled by PHP
is it possible to get the name of a variable as a
string?
if someone likes calling mysql_query as pig thats ok, he likes
it
yes.. sorry!
like $test = 'wooo'; echo get_var_name($test); // would echo the
string 'test'
thanks!
jonwage, what would be the point ?
value for the arguments from a function where the key is the
name of the variable and the value is the value
func_get_args() just gives me the values, the name of the
variable i need..
jonwage, why would you need those?
are you there?
why would you need the name of the variables? arguments are
ordered, you know the names depending on the index
Because I do. Is it possible?
try with get_defined_vars()
thank you
that did it..
That is what I needed..thanks
ouch.
Why I need it isn't really that important
but, the reason why is because I have dozens of functions with
different amounts of arguments, and the arguments need to be passed
to another function as an array, the function simply returns a
template, and the passed array of variables are instantiated as
variables in the local scope of the template/function
why don't your functions take an associative array as argument
then ?
value pairs
it is easier to document a function with multiple arguments
rather than 1 argument named options..
it is harder to support it though
I don't see how..
I have a MySQL query running that returns a bunch of results
that are printed. The problem is one of the entries needs to be
printed 6 times. I am using the OB and str_repeat method, but I
also have a counter running with the while loop. When the truck
entry is printed the 6 times the counter doesnt advance for each
one. So all the truck entries end up with the same number, in this
case 25. Here is the code: http://phpfi.com/2
get_defined_vars() contains all the variables
but only from the scope within the function i am calling it
in
cache return of get_defined_vars() at ghe beginning of your
function
to only have the args
and the only vars are the ones being passed via a
function
if i have a script that contains this line, $s_Request =
"POST /handle.php/ HTTPS/1.0\n"; how can i create the handle.php
file to capture the data in the post request?
You... Don't know anything about sockets?
not really.
php.net/sockets
you're not going to be able to use output buffering to do what
you want. Why exactly do you need to print it six times,
anyway?
it is for a daily log script I am writing, the company usually
has up to 6 trucks, so I need to give them 6 liens for trucks to
begin with
hi
and they don't have multiples of other equipment?
well, anyway, output buffering is of no use to you here
not useually, and I am writing some JS to go in and
dynamically give them more if they need it
the only reason I used that was because MarkL suggested it
the goal was to not have to copy the code
factor your code to print the row into a function
I did think of that
and then call it as many times as necessary
it seems as though that is the only choice, thank you.
is there a stress test tool that will get a page and then all of
the objects on that page as well (images, other scripts, css, etc).
I'm looking for more realistic traffic/load patterns than just
getting a single page
is there a function to flip an array so that the keyes become
the values and values become keys?
array_flip ?
array_flip — Exchanges all keys with their associated values
in an array
some things in php are _so_ self evident
its enough to think about a name and it'll be on the
manual
or just by consulting the ref page for whatever you want
TimRainey - this is one of many possible answers in the wee
hours of the morning - it might have bugs. http://phpfi.com/250570
how I pass String to Int?
time to sleep
wolfpaws, is there anything else i can look at about these
sockets?#
i've got it
use pack to convert -1 to unsigned
err, not pack
sprintf
does anyone know of sample code or how to generate a
alpha-numeric ID from a numeric ID?
so that way I could have mysite.com/?id=a92la1d instead of
?id=10
just convert the number from base 10 to base 36
then multiply it by 82 to make it look bigger, rofl
hi
ok
is there an alternative to exec() wich do the work in a fork
and doesn't wait for the child ?
theres hacky OS specific ways
proc_open might do the job.
oh yeah, theres actual forking on non-windows XD
or letting bash send it into the background with & might
work. not sure about that one.
dunno about windows :0
on windows theres start
stroop, ok I'll try
but proc_open etc should also work on windows.
start /B /I /LOW /SEPARATE program.exe args or something
similar should be good for windows ;-;
the first way I've done it is to do a fork in the C part but
it waits for childs too... :s
how might I count the number of iterations through a while
statement i have made
thanks for the help
$i = 0; then $i++ in each iteration
what sausage said.
$value and use $key
keys are query results so no
then make your own counter
i have to declare the $i=0 outside of the while statement
right
yeah
how do I do a sql query inside a query?
logik-bomb, give us an example of _why_ you want to do
ti
$i = 0; while($i40){ echo $i++."\n"; } // lame version of a
for loop :P
*slaps forehead* no wonder my "powers" werent working, i was
using ^ :P
id use a for loop but the keys of my array aren't integers
am i correct in my assumption
you can iterate arrays manually
for ($i=0;$icount($array);$i++){ echo next($array); } // the
function name is probably wrong and used incorrectly
stroop, exec("command &") doesn't seems to chang
anything
oh ok great ill do that then
you said your not sure its "next"
it might be
I'm getting incomplete PHP class definitions when
unserializing from the session. I've double checked all the class
definitions I need are included but it's still not working...is
there a way to find out exactly what is causing the
problem?
you should also call reset($array) after the loop to reset the
pointer
jessy_ hmm was worth a shot.
cya people
Could anyone give me advice on what I should use for searching
in my web pages? it is a php based site, should I use mysqls
FullText search or some other stuff like Zend_Search_Lucene is
possible?
after the loop i could give a shit about the array
Mysql 4.1.15 and php 4.3.something
stroop, I'll try that http://www.php.net/manual/fr/ref.exec.php#70135
thanks though!
foreach
If you're looping over the contents of an array, foreach() is
your buddy
but in the statements of the loop i need to reference what
iteration it is
IA-Outdoors: You have the class definitions loaded BEFORE you
call session_start()?
$i=0; foreach($foo as $bar) { $i++; }
$row = fetcharray($sqlevents)
so i need to pull out
$row['name'] $row['date'], etc
i have a (strlen(decbin(sprintf("%u",-1)))+1) bit cpu
Any particular reason you're not using the builtin
_fetch_array variant for your database?
and i need to know the i=1 or so
i am using it i just wrote that as shorthand
$row = mssql_fetch_array($sqlevents)
So you prefetch all rows into an array and are now trying to
do something with the individual rows?
yeah
Any particular reason not to do it in the initial loop?
what intial loop?
i had a while loop before
while($row = mysql_fetch_array($sqlevents)) { do your stuff here
}
i was doing that
butt
in the { } i need
I wrote a simple php uploader that looks like this
input id="numberofiterations" value="row['datahere']"
hahaha http://www.suturesound.com/stwpt/tracks/0023_i_am_bjork.mp3
how am i supposed to get the iterations out of the while
loop
in a mysql table i have a field type timstamp
is this different format to time()
sorry, that just made me crack up.
http://rafb.net/p/WWoc6k63.html
, and it works on small files, but when I try uploading larger
files it doesn't work anymore, I get possible file upload attack
message
I did set the max filesize in php.ini, is there any reason why
its not working?
With the large file, $_FILES['userfile']['name'] has nothing stored
in it
You don't have a primary key on the row that you could
use?
shing`: see php.net/features.file-upload
i do, but the query isn't going to give them to me in
sequential order, and whether or not administrators delete certain
rows there can be gaps
Can using "global" keyword slow down function much? SELF value
in WinCacheGrind is 55ms and cumulative too.
TML, thats exactly where I got the code from
so i can't use that as a counter
http://secunia.com/advisories/26102/
is $row multidimensional?
how to check if a folder exist ? with file_exist ?
is_dir()
so could i do a for loop .. and then do something like
$row['data'][0]
or in my case
shing`: Did you read the "Common Pitfalls" section?
$row['data'][$i]
$i = 0; while($row = mysql_fetch_array(...)) { ...; $i++;
}
ok
Although I'm not sure why you need sequentially indexed
inputs...it implies to me a weakness in your
assumptions.
TML, thanks
so that the javascript on the html side can pick up the
data
thnaks for the link. Luckily I have never used any of those
functions. But I will update anyway.
The javascript on the HTML side doesn't care if they
sequentially numbered
Unless you did something foolish in your javascript
it does if im referencing them by id number
mrpoundsign:
hrm?
TML, which option do you think is causing the script to fail?
Or is it all of them?
shing`: Go find out
check their current values, change them to values that are more
appropriate to your system, etc.
can i reference $row like its multidimensional?
is it?
hm, never had to identify myself before joining this channel
ever before
No
can someone point me as to how to parse http headers from a
curl response?
how do you in principle parse HTTP headers?
kk thanks
you guys know of any useful functions that can be used to
parse curl_exec output?
god damnit
are you serious
oh wow. I didn't even see that 2 others asked that question
lol
curl doesnt produce any output that you wouldnt have to parse
with any other http access layer
why are these questions curl specific?
doesn't have to be curl specific at all
well, forget curl then. I know you get the full HTTP-styled
response
Because some Professor just assigned a class to use
cURL?
full HTTP headers and the body
god damnit
HTTP/1.1 200 OK
so you want to RETRIEVE a header, not to parse it?
someone should post the email of said Professor
no professor. I'm just curious. I know HTTP headers can, by
standard, be multi-line
as far as i understand curl_exec returns data from the
webserver with the headers at the top, i just want to retreieve or
parse or however you call it the first header
and there are probably all kinds of other uniqueness that I'd
never be able to expect for without something breaking
Luckily for you, there's an RFC which defines EXACTLY what
can and can't happen
heh
It's RFC 2616
you could explode the returned data into an array and read
the first line
Go, read, and be fulfilled
doi, hah! thanks
The response code generally is not considered a
header...
oh really?
What do you think about using $_GLOBAL instead of defining
globals variables in function of creating navigation blocks (or
widgets)? Can i speed up the script?
PHP has functions for adding commas to a number so that it's
pretty. you're telling me there isn't one for parsing HTTP headers
and that I have to read a RFC to come up with something?
i was thinking of doing a regular expression match for the
response cod
1) you almost certainly meant $GLOBALS, as "$_GLOBAL" isn't a
super-globally scoped variable in PHP; 2) assuming 1 is correct,
what makes you think using $GLOBALS isn't "defining global
variables in function"?
if you're using curl, send the NOBODY option and just get the
first item in your exploded array
I think the question was, is $GLOBALS better than the global
keyword
In which case, I'd have to answer, use the global keyword
how do i encode a string such that it can be used as the
value in an HTML entity??
And my answer is "What makes you think it's any
different"
i need the body, later on, i want to see if the response is
200 OK before parsing output from a web service, want to be able to
output an error if the web service fails
cut off one line of the output and parse it, then?
global $foo is the same as $foo =& $GLOBALS[foo]; from what
i recall from the docs
http://us.php.net/manual/en/function.htmlspecialchars.php
that's about what I recall
yay references that aren't really refrences at all
but I'd rather type global $foo; once, than have to use
$GLOBALS['foo'] twice.
Thanks
You're using a web service that uses the HTTP response code
to communicate that there was an error?
I am outta here
This is why people invented things like SOAP and JSON...the
response code should only indicate whether the resource was reached
and returned an HTTP response. The body of the response should
declare whether or not the web service had an error.
i thought that 5xx was to indicate errors
what's wrong with sending an error code?
btw, there's http_parse_headers(). thanks for your help
the web service doesn't use soap, it just returns an xml
document, but im thinking if the page is not available, if it
moves, ,something like that
if i get a 404 one day so i can see the reason it's not able to
reach the web service is because of a 404
I'm having a bit of trouble with my Database class, http://rafb.net/p/uhvDIx28.html
. First off, in my connect() function, how can I make it return a
connection?
php 4.4 class problems http://paste.uni.cc/16763
thx
I am working on an application that handles various sorts of
events through the course of the day. I need some housekeeping
tasks to be performed every night. What are the pros and cons of
cron jobs vs having the site check for pending jobs when certain
events happen?
after I've add a string the getQuery() returns0
why?
I'm looking at http://us2.php.net/http for my own
needs. might be something that could help you also
Hi all!
The availability of the http module, and the functions inside
it, depend on your version of PHP
hi H20 I need you help can u take a look at http://paste.uni.cc/16763
!tell poguy about u
any idea if the information header is always sent? i'm getting a
HTTP/1.1 100 Continue [blank line] and then HTTP/1.1 200 OK
what's the best method to cut of everything after the Nth
character of a string?
Strings in PHP are concatenated with '.' (dot), not +
substr
ah okay, thanks
as does just about everything in this language
i can't find this info in the rfc
For example, the http module won't run on the majority of
existing PHP installations
What do you mean by "information header"? If you mean response
code, it is always sent.
where can i read about DateTime object?
php.net/datetime
http://pastebin.com/m77380d94
this is the header i'm getting back from this service, will the
status code always be on the 3rd line
hmm, i was just here. I didn't know these were the same
thing
thanks
There's frankly just not a lot of documentation on it
yet
$http_response[2]; i'm wondering if i should use this after
the explode if the status code will always be on the third
line
You can't be certain the status code will always be on the
third line, no.
They might make their service faster, which would obviate the need
for an HTTP 100 response
See RFC2616's documentation of the "Continue" response code for
more
5) into a unix timestamp (!disclaimer: format will always be
the
Just because it's not nice doesn't mean it's not miraculous.
-- (Terry Pratchett, Interesting Times)
serialno=key=auth code ?
php.net/strtotime
It's basically a fancy hash
gosh,.... thx TML
except it appears that one cannot, for example, take the cd
home and install it on the laptop using the same key/code... so how
does it know?
have a client who wants to protect his ebook from people just
handing out the userid/pass to access it
ok this brings be back to my original question, how can i
extract just the status code that i need, as in non-informational?
what would be the best method?
Because it dials home to Adobe
Try it on a laptop with no internet connection whatsoever
In fact, somewhere, I have a little wedge that you can plug into
your networking stack to watch Adobe apps phone home, and munge the
response
If i use "global $x", $x will be global in function and
function can change the variable in global scope. If i type
$GLOBALS['x'], it won't be global in the whole function (to the
end).
php+embedded sqlite or php+mysql?
hey i have lots of strings of the type "/cs/courses.html" i'd
like to recurse through and echo the directories eg "cs", i've only
been able to come up with realy inelegant methods looking for the
position of the second slash and getting a substring from there ie
echo substr($entry, 0, strpos($entry,"/",1)); is there a more
elegant method?
You mean you don't have a local reference to the global
variable. It's still a global variable.
sqlite is almost certainly faster
php.net/explode
well, you can choose to not authorize online... but the auth
code to put back in has to come from adobe, yet one only provides
them the key, so there must be some way from that key that they
know what the serial no is and whether it's already been
authorized. But if that's the case, why bother with the
intermediate key, why not just give a code based on the serial
no?
maybe yes, but how about the difference in speed and
flexibility?
TML, tks!
You'd have to ask them why. There's no good reason.
What difference?
Why would it be different in speed?
TML Whheeeeeeeeeeeeeeeeeeeeeee ty!
I can't find the value in php.in to get exec()
authorized
Does anyone know if there's a way to get php to link with
libxml2 statically?
ok...let me ask a different way then. is there any code out
there to hash an authorization code based on, in part, something
from the machine itself that a function can return, serial no or
something? Or, is there some manner to make a user/id something
that cant just be passed from person to person (for online
access)?
ive this script http://pastebin.ca/624864, and im
trying to telnet to it but i can only enter one character and it
halts. anyone any ideas?
It's possible in theory, but it'll require some deep magic
with your automake/autoconf files
Generally speaking, there's nothing that is passed over
traditional HTTP that can uniquely identify a machine.
best you could hope for is IP address, but that's not much of a
solution
If you're willing to step outside the request cycle, you can
require an RSA keyfob or some such
Even that doesn't uniquely identify a person or computer, but it
at least narrows the distribution channel severely
I thought so. I hacked aclocal to use libxml2.a rather than
the output of xml2-config and that got the tests to pass but the
link line at the end of the compile still has -lxml2. any ideas
what else i need to change?
Why on earth would you even want to do that?
Look into ext/libxml/config0.m4 for starters, but it's really going
to be quite difficult
curl_getinfo($ch, CURLINFO_HTTP_CODE); HA!!!
yeah, what I was thinking was that if the client is really
paranoid about access to his product being passed around (after
all, even without giving away user/pass, one can save the browser
page to disk or even screen scrape if right-click is disabled),
that he can resort to having them receive a cd image instead and
have an adobe-type install
returns last http status code
well the system I am putting this on doesnt have libxml2 so I
can either copy the .so myself or static link it. the problem with
copying it myself is that I can only put files in /opt so tt
requires me to either export LD_LIBRARY or add something to
ld.so.conf.d which i cant do either ....
*LD_LIBRARY_PATH
You can't ask the sysadmin to install libxml2?
unfortunately not
look around the internet, there are some studies that have shown
that locking your product is less effective at bringing in new
customers than unlocking your product and selling "service
contracts" (i.e., upgrade protection, support, etc.)
if i could only add something to ld.so.conf that would solve
my problems too but i'm ont allowed to do that either
Have you considered getting a better service?
it's a client...
Well, libxml2 gets added as a dynlink in about 40 places at my
count
Have you considered forming a strategic partnership with a better
service provider and pushing your client to use your
partner?
trust me - I wish i didnt have to do that - it's not up to me
though
sure, but this is an ebook...once they read it, it has no
further value
php gurus. i need your kind assistance. First, im not a php
programmer. i know java and thats about it. this is what im looking
to do. I have two pages and i want them to each load 50% of the
time. thats it.
do you know if there's a way to get the loader to look at a
specific path for an .so based on what path was provided during
compilation?
That's a pretty crappy book
how do I use ereg in an if statement? atm I have
if(ereg("[][{}~#|%]", $test) but I don't know how to finish it. I
want to check if $test has any of those characters in it, but I
don't want it to have them.
man ld
Read about "rpath"
!+ereg
Ereg should be avoided in favour of Perl-compatible regex.
PCRE functions support non-greedy matching, assertions, conditional
subpatterns, and a number of other features not supported by
POSIX-extended regex. Also, the PCRE functions are binary safe and
are often a faster alternative.
hahahaha, well, even Lord of the Rings...what? I'm going to
sell an upgrade contract?
-.- Great, after last night someone tells me to use ereg to
do validation.
sorry TML I know it's not your fault thanks for the help I'll look
into PCRE
Do i have to look at Random?
An eBook which provides no further value once its read isn't
worht the paper it's printed on. But, if you're doing eBooks, there
are already standard methods of protecting those.
I have many pages in foo/ and foo/bar/ including foo/baz.inc
via a relative path. baz.inc needs to reference an image located in
foo/, which requires no path when included from foo/ but needs
"../" when included from foo/baz/, how can i resolve
that?
The question doesn't really make sense.
You say you " have two pages and...want them to each load 50% of
the time." What exactly do you want them to do the other 50% of the
time?
that looks like it could work. If i change the Makefile to add
that option and point to where my .so are gonna be then it should
work. what do you think?
I have two front pages. since i cannot show two front pages
at once- i need to alternate.
php.net/realpath
In short, don't use relative paths, use absolute paths...but
calculate the correct absolute path so you don't have to hard code
it
well, I guess that depends if you're just looking at ebook as
a delivery mechanism for a book instead of pulp. In the past mmmmm
years I have tossed hundreds of paperbacks over my shoulder that I
highly enjoyed but have not used since (computer texts for that
matter, and I've written some of them)
That's really, really sad. I've never in my life finished a book
that I would ever consider throwing away.
err, that seems to stick me at the same problem, what do i
put for the $path parameter to realpath?
The relative path to the thing you want an absolute path
for
that path is different depending on where the file is included
from
ahhh... never threw away. Either I still have them, or
donated them, or gave them away, or sold them. BUT, most I have not
touched again, except some reference books, or the best of the best
novels. And it's the 'passing along' of the book to someone else he
wants to avoid.
which is what i was asking about in the first place
TML is PCRE case sensitive?
As I said, there are already known solutions to that problem
If you ask it to be. See php.net/pcre.pattern.modifiers
Did me rephrasing the question make more sense?
yes you did...can you save me an hour of reading spurious
google search returns and point me in a good direction
Not really. I'm not sure what "two front pages" means.
TML that pagedoes not exist
ugh. i have to index.html pages
Well, what format is the ebook saved as
php.net/pcre.pattern.modifiers
i cannt show both at once. i need to alternate.
to/two
It does exist, I just loaded it here.
simplest way would be to check the timestamp, load one page
on even seconds and one on odd. as to how to load which page, use a
location: header, or just include the page code into the front page
with the half/half logic
Err...how do you have two files named index.html in the same
directory?
what kind of filesystem is that?
i dont. but thats besdes the point.
that's the same page
uncertain...I haven't accessed his kit yet. I was bidding on
adding logon script etc to his sales site, and he threw this curve
at me
it works fine here, I'm not sure what you're doing wrong
"Sorry, but the function pcre.pattern.modifiers is not in the
online manual.".....
realpath is going to complain about the [lack of] "../" in my
relative path
realpath returns the absolute path given a relative path
The following script is running everything, except the while
loop only runs once. It go ahead and prints out everything in the
for except the whats in the while. http://phpfi.com/250587
Which mirror are you using?
They've screwed up their configuration
uk3 is the subdomain
Does my question make sense yet?
yes, but the relative path changes.
Try us2.php.net/pcre.pattern.modifiers
naturally that works fine lolo
is $pov[04] legal?
When you run a query and use a while loop to handle the
results, is there a limit of only one use?
You know the absolute path of the thing you want. You can
know at runtime the absolute path of the the thing you *have*.
Getting the path from the thing you want to the thing you have
should be a trivial mental exercise.
Adobe, for example, has one; as does Microsoft's "Reader"
format.
i dont know what you mean. the problem is that i dont have the
relative path. its wrong half the time.
Let's say your entire application lives on the disk under
/srv/www/vhosts/mydomain.tld/myapp
can we just say /myapp to make it easier to type all the
hypoptheticals?
No
ok
Because we need to be clear on the distinction between a
relative path, "myapp", and an absolute path,
"/srv/www/vhosts/mydomain.tld/myapp"
So you have /srv/www/vhosts/mydomain.tld/myapp/foo/bar.inc,
right?
ok, thanks. I'll check into those.
let me restate, more completely
Both are part and parcel of the authoring toolkits in
question
please do
(ugh, long path breaks irc length limits)
I have /srv/www/vhosts/mydom/myapp/file1.php and
/srv/www/vhosts/mydom/myapp/directory/file2.php and
/srv/www/vhosts/mydom/myapp/something.inc and
/srv/www/vhosts/mydom/myapp/images/picture.png, and something.inc
references "images/picture.png" or "./images/picture.png", which
breaks when something.inc is included from any directory other than
/srv/www/vhosts/mydom/myapp/
sparrw, use constant relative paths
does anyone here know smartytags?
namely, when it is included from
/srv/www/vhosts/mydom/myapp/directory/file2.php
sparrw, e.g. dirname(__FILE__) . "/../../blah";
something.inc should reference something like
"/images/picture.png"
__FILE__ works for the included file and not the
include'r?
so the path will _always_ be relative to the directory that
he current file is in
sparrw, __FILE__ is the full path to the file the code is being
called from
great
uh... the current file
your browser will interpret "/images" as a directory
immediately under DOCROOT, which is probably something like
'/srv/www/vhosts/mydom'
yes, and thats unacceptable, the application cant know that
it lives in docroot
__FILE__ seems to be my salvation
I never use anything but dirname(__FILE__) for relative
paths
I have used mysql_real_escape_string to escape strings before
i put them into sql queries. When using phpmyadmin, all strings
appear with all quotes escaped. Is this how it should look, or have
I somehow escaped the string twice??
crap
I use dirname(realpath(__FILE__)) because I found myself getting
"foo/../foo" in some paths.
too optimistic
of course __FILE__ is a filesystem path
how do i get web accessible paths from that?
WWWill, that's because you have magic quotes turned on
guys I know what I am doing is resource intensive, I have a a
loop that runs in the loop I send mail now the loop does this 5k
times, is there a way that php will not through out memory
issues?
sparrw, depends on how your site is setup
it isnt.
tage and use absolute paths for everything in the HTML
layer
The point is that every PHP file knows where it is in
relationship to "/srv/www/vhosts/mydom/myapp" from __FILE__, and
where it is in relationship to the request from one of the various
$_SERVER variables.
Does anyone here know smarty?
Everything else can be calculated from there
I upped the max_mem to 80mb but I think its not the right thing
to do
!+smarty
##PHP doesn't support smarty. Try #smarty.
does magic quotes remove the need for me to use
mysql_real_escape_string or should i be doing that anyway?
that requires it knowing about /srv/www/vhosts/mydom/myapp,
no?
Turn off magic quotes. They're an ugly hack.
WWWill, yes it removes the need to use mysql_real_escape, but
it's an _ugly_ horrible hack
care to lend a hand mate?
Liquid-Silence: What's the question?
hi
guys I know what I am doing is resource intensive, I have a a
loop that runs, in the loopI send mail now the loop does this 5k
times, is there a way that php will not through out memory
issues?
Liquid-Silence: Normally provided your initial SQL query does
not exhaust your memory, you should not be using gradually more
each loop. What are you doing in the loop which could allocate
memory? Have you reproduced this issue in the CLI and are able to
use a memory profiler?
It requires each file including something that knows where it
is in relationship to the "application root", and that calculates
the difference between "absolute root" and "application
root"
can I pm?
1=tc, 2=tl ... instead of 1=tcp, 2=tls...
i would prefer an answer that is not based on application
root.
Liquid-Silence: You may but I think the channel is the preferred
place for technical disucssions
Liquid-Silence: Don't use PHP for a long-running process.
Send the emails one at a time out of band with your HTTP
request.
do you know if this could be a bug? PHP is a debian
precompiled package
There's not any other good answer
im of the naive belief that moving a php application should
not impact its performance
So am I. I don't see how that's related to the question?
yeah I know I suggested a perl script
but you know these people dont listen
Miles_Prower, any reason for that? can you stop spamming
if application root has to be coded somewhere, then that has to
be changed if the app is moved.
hi! is there a FAQ? how do I parse xyz from
www.example.com/index.php?xyz ??
Which version of debian, which version of the PHP
packge?
aioobe, php.net/globals
No, the application root never has to be coded anywhere
Look at predefined variables specifically $_GET
aidan, $_SERVER['QUERY_STRING']
The application root is calculated using __FILE__.
thx!
What is a standard way to turn them off. I know of the method
set_magic_quotes_runtime ( int $new_setting ) but how do i execute
this just once, as opposed to having it standardly on a page to be
repeatedly called (unneccessarily!)
i can think of an overly complex solution wherein the
includer's path and the includee's path are compared and the
appropriate number of "../"s are added (or directory levels
removed) based on which is deeper. but that seems like insane
overkill for a problem that should have a built in
solution
HarryR, only if you agree to do the same.
how does it know where to cut __FILE__?
Miles_Prower, ah I'm not spamming
You can't turn off magic_quotes_gpc at runtime, they must be
turned off earlier. Normally I use if (ini_get('magic_quotes_gpc'))
{ throw new Exception("Magic quotes must be disabled");
}
HarryR, me posting one url as the only thing I've said in an
entire day here, isn't considered spamming.
HarryR, so neither am I.
Hello. I send data in file.php to file.php. When I refresh
file.php, the data are still there, and written to the database
again again and again. What can I do to avoid that?
oh sorry, I thought you were a bot
what if http://www.php.net was
coded with ASP?
what if a href="http://www.php.net"http://www.php.net/a
was coded with ASP?
can someone help me please ?
i have some problems with cookie
i use setcookie
i get that it is doable by comparing directory levels, but
that seems wrong
so this is a server setting. I am on a shared (non dedicated)
server. Does this mean i must live with it?
but the cookie isn't created
It boggles my mind that you're having so much difficulty
understanding what is, to me, a simple and painfully obvious
solution
TML PHP 5.2.0 in debian etch
simple enough for you to write the code here?
adema, you have to use setcookie before any content is
output
i hace been trying to find a bug in some of these packages but i
don't find it
It is not a server setting, it can be set per directory or less.
But it must be set before PHP begins executing, as the "magic" is
done then.
gsm4, i know
A rough approximation of it, sure:
"/srv/www/vhosts/mydom/myapp/includes/paths.inc": php
define('APP_ROOT', str_replace('/includes/paths.inc', '',
__FILE__); ?
adema, ah, and its still not working?
and this is what i've done
yes
It is very important that your application checks
magic_quotes_gpc, as failing to check will cause your data to
become full of unwanted backslashes. Remember the "fail fast"
principle
do you suggest I code a python script to send the mail and then
just invoke it through php?
Hello. I send data in file.php to file.php. When I refresh
file.php, the data are still there, and written to the database
again again and again. What can I do to avoid that? Can I delete
the POST-data or something like that?
Everything else includes "number of ../'s to
approot/includes/paths.inc", or relies on include_path having
"/srv/www/vhosts/mydom/myapp/includes/", depending on how anal you
are
http://nopaste.org/p/aeGfzzxEI
adema, can you make a pastebin of the part that doesnt
work?
Then all other includes are include
APP_ROOT."/path/file"
thats still way too much "work", then you have to reference
APP_ROOT and do non-trivial string operations every single time you
want to output a local filename. thats what bothers me. this SEEMS
like it should be a 10-20 character problem, with a single function
call involved
That's a really rough swag at it
gsm4, well setcookie return true
It's not
but there is no cookie in firefox^^
what you are saying makes complete sense, i grasp how and why
it works
but i expect there to be a solution wherein the included file
can say directorychangefromincludertoincludee("images/foo.png");
and that be that
The "PHP answer" to the problem is "put everything in
include_path"
include_path isnt the issue
gsm4, http://rafb.net/p/qOZQGH38.html
Liquid-Silence: It is generally possible to carry out limited
amounts of work in PHP without memory leaks. Place the entire code
in a function and call other functions as necessary. Nothing should
generally leak memory unless you have circular references or are
using an old or crap PHP.
There's no such solution in PHP
i dont have any problem doing the include
this is the code
the problem is the included file outputting html that
references other local files, which seems extremely
overcomplicated
why does [a-zA-Z] return 1 for "123"?
whn i do preg_match
RubberDucky132, it doesn't ?
my predecessor on this bit of code took the easy way out, he
just duplicated the entire includes directory at each level and had
the proper number of ../s on every path. but that is hell to
maintain.
4.x
or something
Liquid-Silence: Don't use 4.x
I'm not sure how many ways I can tell you "there's not a
better solution"
bro I dont have a choice
at this point, i think his way was a better solution.
I got thrown into this crap and it runs on php 4.x I cant
change it now
the 1 meaning it found [a-zA-Z] in there somewhere, not the 1 in
123.
Liquid-Silence: Make the business case to your manager and/or
colleagues. It is an easy one to make.
gsm4, i see something wrong ?
RubberDucky132, well, but it won't, you've an error somewhere
else
Liquid-Silence: In PHP 4, OO is fundamentally broken as are
references, you can't use them sensibly.
php -r 'var_dump(preg_match("/[A-Za-z]/", "123"));'
adema, im testing it on my localhost. sec.
int(0)
k
thx
You're doing something wrong.
yes I am
I have it as "[a-zA-Z]"
That's not significant
no forward slashes
Oh
You didn't read the documentation
I am a .net developer so yeah lets not go there
php.net/pcre
Enable all errors and notices, see if any are produced.
Related Topic:
Ok so heres a theory question sort of so i have this script which uses the GD library and outputs a dynamic image