is there a way to load in php
hosting modules at run time of my site?
Also I'd only set those options for the single upload file,
not for a whole directory.
php.net/dl
Running Apache?
okay so i have these 2 lines in my htaccess file:
php_flag upload_max_filesize 209715200
php_flag max_input_time 3600
does that look right?
looks OK to me.
SlashLife, hang on ill check
Just to make sure, your filename IS ".htaccess", right?
yes it is
(note the preceeding dot)
lol
Okay
just notice what dl() says about multithreaded server environments.
lets try it now then
(Apache is one)
phpinfo() says ISAPI
at 30kbps how long will it take me to upload a 10mb
file?
uat 30kbps how long will it take me to upload a 10mb file?/u
roughly
while i wait
lol
341.3333 seconds
about 5:40
Get calc.exe and think for yourself?
It isn't that hard, you know?
((2^20)*10)/((2^10)*30)
time * upload rate = upload volume
i know
he's trying to calculate the time, not the upload volume
Err... Are Americans *THAT* bad at maths?
which is still, volume/rate=time
echo "hi"; into a $str, and pass this to a function, is there
any way i can process this and execute the echo() function call
contained in the string?
obviously assuming that anything could be passed..
let's make cultural blanket statements. that doesn't make you
an asshole at all.
php.net/eval
thanks
You could use eval() ... but you'd be crazy to.
though why you'd want to do that is up to you.
nah its ok i know what im doing
IMO it's an adjust question, as everything needed is to
reorder the formula a bit.
theres no user input involved
This is at most 6th grade maths in Germany.
Then why do you need to execute arbitrary code?
SlashLife, dl() not suported
yes. that's easy enough, though when he asked how to compute
x=y/z you gave him y=x*z
hello
Vystrix_Nexoth give over trolling would you. it gives me a
headache.
don't judge all americans by your opinion of a few of
them.
It's easier to remember multiplications. :
Instead of the usual R = U/I, I'm remembering U = R*I... which is a
nice URI-multiplication. :/
No need to worry about the order once you know what is on each
side of the =
yes, but ultimately you need a division in order to compute R
when you know U and I.
U=R*I is of no use if you already know U but don't know
R
Sure it is. I can simply reorder that formular in no time.
But it's much easier to remember this way.
hello everybody, any way to get rid of eval in code please
?
like writting a script on the fs ...
why would you be using eval() ?
You could file_put_contents + include -gg-
simpleTest is, but it's not working in xdebug
But that's even worse. .)
hmm
i don't thinkt he file upload workd
"As of PHP 4, eval() returns NULL unless return is called in
the evaluated code, in which case the value passed to return is
returned."
http://pastebin.ca/568187
and it appears to work on one server, but not on another. is
this some option in php that you need to change to make it work or
something?
uand it appears to work on one server, but not on another. is this
some option in php web hosting
that you need to change to make it work or something?/u
8388608 in mb's is like 8mb right?
and indeed SlashLife, there are return
eval($this-_extendClassCode($methods)); in the code
though the end result should be the same
right, 8 MB
Stop relying on register_globals.
8388608 bytes = 8 MB
This is not ##calculator :
damnit
register_globals shouldn't matter if he's explicitly checking
$_POST
since $_POST gets populated whether or not register_globals is
set
Change $cv-deleteEmpl($delete); to
$cv-deleteEmpl($_POST['delete']);
though I think $_POST was only introduced in PHP 4.1.0... so
if he's running an older version of PHP it won't work.
thank you, that's the option, just wanted to know whether this
was some option in php hosting or
not
so, what do you think now ?
oh, I missed that part. heh.
umm wtf
will alter his code to work without it
What do you want me to do now? Òo Guessing your
eval()ed code?
Also.. if that code does what I think it does, you might want to
reconsider it a bit to add some permissions validation. $_POST is
just as easy to fake stuff into as $_GET.
don't be mean because you have no idea, thanks anyway
Yeah Slash, you meanie. Try to be more psychic in
future.
he's being mean because he thinks you're asking too much of him.
I'm inclined to agree.
My car isn't running. What's wrong?
Oh, btw.: I entered it through the driver sides door.
whether or not he should be *mean* is another question; I'm
just trying to explain *why*.
if i want to delete one of these giant mp3 files i should use
unlink, correct?
hey, you post a mistake, i tell you why, if you con't fix it
it's not a big deal
Yep
i have yet to write a delete file script
do i need to do this check they recommend to see if it's
open?
yes, unlink()
i'm bored, someone ask me a tough question
if (file_exists($file)) { unlink($file); } ... that sort of
thing.
GameGod2, its called file locking
file locking?
GameGod2, you dont need to do it before deleting but you
should do it when reading
ah okay
heh. turns out most of the problems themselves aren't usually
all that tough; more often than not it's a lack of proper
explanation on the part of the one seeking help.
how to debug eval'd code with xdebug please
But it's just some dirt on my screen. :/
LOL
is_null, hmm I cheat when i need to do that. I output the code
to eval and use require_once in its place
I was under the impression that if you want to
read/open/delete/frobnosticate a file, just do it and see if it
worked, rather than using file_exists() first.
there are innumerable reasons why an operation might fail,
beyond just whether the file exists. you might lack permissions to
read it for example.
why does eval() not allow the use of local variables?
I always check for existance first.
or maybe another PHP instance (another page request) will delete
the file between when you do file_exists() and when you try to
delete it.
Force of habit I guess.
but what when the code waits for eval to return something
(eval'd return) ?
Especially because we're living in a multithreaded
world.
so if you want to read it, just go ahead and try to open it
for reading, and check for error conditions. if it works, off you
go, and if it doesn't, you can find out why by looking at the
error.
you can't return from a function wiithin eval
[SCRIPT 1, TIME SLICE 1] if (file_exists('foo')) { [END OF
SLICE]
Why do you want to use SimpleText and XDebug at the same
time? Surely you sure use SimpleTest, and if the code fails any
unit tests then use XDebug to debug it.
basically eval is a new scope
and trying to actually do it will invoke all the checks the
OS can do, rather than merely the checks you can think of and/or
bother to actually check for.
[SCRIPT 2, TIME SLICE 1] unlink('foo'); [END OF SLICE]
so having while (true) { eval('break;'); } won't work
[SCRIPT 1, TIME SLICE 2] $f = fopen('foo', 'r'); [END OF
SLICE]
i am trying to debug unexpected relults from simpletest
wouldn't want to have to do file_exists(), check permissions
of the file, check permissions of the directory it's in,
...
every single time
ah
so just do it. the OS will check all that for you and give
you the result.
and it'll be an atomic operation, meaning it won't clobber
itself in a multithreaded environment, as SlashLife is pointing
out.
note also that flock() operates on already-opened files, not on
filenames, for much the same reason.
right
learn something new every day..
if you want to update a file, you open it (don't check, just
open, and see if it worked), then obtain an exclusive lock, update
it, and release the lock. that makes the whole update operation,
which takes more than one function call, atomic.
unless you're on a borked nfs implementation
echo eval( 'return strpos("aqjkx", "j");' );
2
well, yeah.
heh, this is what confuses me with eval
is_null, yeah you can return values from eval but its within
its own scope
so function foo() { eval( 'return strpos("aqjkx", "j");' ); echo
'this shouldn't happen'; }
bah that will parse error
but you get the ideal
s/\'t/\\'t/
What do you call a programmer who obtains sexual gratification
from the breaking of software licensing protection schemes?
Miles_Prower? :P
A Crack Whore. *bada..bump!*
DVD Jon?
echo foo( );
this
works with s/eval/return eval/
counter.php:
1 php echo 'STRIKE!';
u 4 t3h l33t
hi guys , got a question ; i have to make download dialod pop up
when user clicks on like for resized image
i have some notions that it might do something with header() and
streaming file through resizer.php file
header('Content-Disposition: attachment;
filename="yay.jpg"');
the key being the 'Content-Disposition: attachment' part
it's non-standard but works on most browsers.
emm , and about resizing part , i cant put it right throug ,
what should i google for this kind of resizing ?
header("Content-type: application/force-download"); helps
too.
ew.
resizing the image hosting is
another matter altogether.
goal is to create
hostna.me/download.php?galleryID=13&size=1280
or my idea is flawed in basics
dammit, I tried actually loading that. just then did I notice
'hostna.me' = 'hostname'
.
=D
That should work fine.
anyhow, yeah
but how should i perform that resizingpart ?
do i need two php's ? one resizes, and one streams throug to
force download it ?
bah, I assumed you already had that part done and just wanted
the browser to invoke a download dialog.
if you have HD2 installed, imagecreatetruecolor() and
imagecopy().
GD*
GD2 even
lol
Or... if you were being dead fancy, you could do it on the
client with Javascript.
no, you won't need separate php web hosting files.
ew. the server-side method doesn't depend on browser javascript
support, on it being activated, ..
and won't make you download a 1280x1024 image if you're going to be
displaying it at 320x240
Yeah, but JS is cool.
hehe
jss resizing is a bad bad idea .. think about IE
I'd rather not.
write a PHP interpreter in PHP.
Nah, that's no fun.
Write a bf to php translator ?
triage some bugs at bugs.php.net
ok .. one more question , how can i force page to go to 404
error page ?
header('HTTP/1.1 404 Not Found');
well, I'm not sure how to invoke the HTTP daemon's default
404 mechanism. but you can always do header('HTTP/1.1 404 Not
Found'); and a custom 404 page.
k
then display your own error page
That's even less fun. :
write a JVM
host in PHP then
or 6502 processor emulator
And that's total nonsense.
it's possible though
Already did a 6809 emulator.
heh, I was just thinking, an NES emulator
In C++ and Java, though.,
I know of a guy who just might be dumb enough to do that.
.
(Nice and clean in C++, messy and sucking in Java)
php can't handle sound & graphics
he did implement a patching format in PHP, and the distribution
of that program includes a full standalone PHP interpreter.
Sure it can.
It can handle graphics.
gd2
ok.. frame by frame
http://trashbin.slashlife.org/php/div/midi.phpx
(might as well have written it in UnrealScript, IMO)
Hi again. I want to put a combo box filled with the coutries
of the world. I'm trying to avoid JavaScript, and that's all I
find. Can anyine help, or suggests some sites?
you shouldn't need javascript for that. try something like
this:
ebay.com
amazon.com
whateverinternationalshop.com
hideous...
midi from php!
$countries = array ('us'='United States', 'uk'='United
Kingdom', 'el'='Greece', ...); foreach ($countries as $code=$name)
{ echo "option value=\"$code\"$name/option"; }
:
of course
wouldnt it be better to push it from file ?
Greece? O_O
there are many countrys, ya knoe
ellada = greek for Greece
So?
national stuff!
just as de for Germany (deutschland)
Is there no ready list I can borrow from (with proper
referencing of course I wou;d like to avoid typing each country or
missing any
how do I enable the display of errors on script?
hey anyone knows how can press the submit button in an html host form from code
yah, but .gr is greece, not .el
ebay.com amazon.com ...
error_reporting(E_ALL);
hello, is there a way to insert automatically an ip on this site
? http://www.browseip.com/
tnx Vystrix_Nexoth
thank you
You don't happen to be an amateur radio operator?
http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
GreekFreak, There should be a table around the internet that you
can copy into either a file or a database table. That's what I did
when I needed a list of countries and codes.
how do i press the submit button in a form using php
code
???
bah, that one uses .gr instead of .el... might have been
thinking of el=ellinika (Greek for Greek)
hmm, apearantly my 'ejaculation' is too limited. I've received a
mail from Mr. Richard H. Griffen, who - apperantly knows about my
sexlife and needs - suggest me to try 'Wondercum'
greenberet, you can't. That would require JavaScript.
I must admit, the spam-senders do get funky when it comes to
product names
thanks crrj
You're welcome
women get that kind of secure webmail web
hosting too. heh.
thankx guys
Vystrix_Nexoth, there is no .el
is't insanely anoying, but this particular mail was
hilarious
its *.gr
did you see http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
yeah, I just noticed that from the link I posted
'There is a solution now!!! "WonderCum"' I mean.. c'mon
-_-
.el is used for greek language
yep
greece r0x
do they receive spam ?
btw i have a list of ips, is there a way to insert them
automatically at http://www.browseip.com/ ?
Thanx it helps. I'll het it from there
By the way, I take it you're greek?
no, but of greek (among other things) descent
;-) Still makes you greek
I know its alphabet, and helped with a greek translation project
once (just the coding side, not the translation side)
Mh. Knowing the alphabet isn't /that/ much of an
archievement.
im having some problems with passing a string (mysql query)
about in my page.. this is the error and code used: http://pastebin.ca/568216
better than nothing. :P
can anyone take a quick look at it please
i'm not sure my max file size thing has been done
properly
what's the error message you get?
but i'll deal with it tommorrow
gooooood morning all,
it says it on the paste
nm, just saw that
0' into
but i can't see anything wrong with the syntax, so im thinking
it is how php passes the string
strtotime
Does it come from MySQL?
yep
UNIX_TIMESTAMP()
ack. simple error.
:o
INSERT INTO foo (a, b, c VALUES ('...', '...'
forgot a )
after the foo(a,b,c
if you look at the print out above the error
echo $query;
yes, I see that
the query is fine.
you forgot to close the parentheses after the list of field
names
:o
OMG
INSERT INTO foo (a, b, c VALUES ('one', 'two', 'three');
OMG OMG
lol
guys, i need help - can someone give me advantages of putting
site HTML into a PHP variable and then doing an echo at the end,
instead of embedding php code inside html code?
your a genius Vystrix_Nexoth
thanks alot!
heh. np.
it's cleaner
we all make such mistakes.
personally, i hate that approach, but i'm biased so i'm
hoping i can find other ideas here
thanks, already got that on my list.. the only one in fact
Well... you could still access and modify it.
It'll uselessly take up memory otherwise, though.
as opposed to php in html where you cannot modify? :P
yeah, i know all the disadvantages
Plus you have to escape it, which decreases readability,
etc...
i'm looking for advantages
lol
Better put your HTML into seperate files and include()
them.
someone i work with is giving me a hard time about this
and what can I call to get the current timestamp?
include? would that work?
time()
Of course it would.
time() in PHP itself should work
i suggested a templating engine like smarty, etc.
he said no, that doesn't scale
and niraj if you include $files somebody can inject code into
your site
include('foo') is -nearly- equivalent to
?CONTENTS_OF_FOO_HEREphp
PHP *is* a template engine.
yeah, thats what I figured, but I get error when doing:
echo time()-strototime($row['whenstart']);
it's more like eval(CONTENTS_OF_FOO_HERE).. lol
and what error is that?
no, it's not
It's not.
where I know that $row['whenstart'] is a date prior to current
date
in an included file, you have to use php to start PHP
code
I would not know, the server has error-loggin off
Ever tried to eval 'PHP' ?
so annoying
note the "more like"
It'll slap you.
I think the main advantage is the seperation of business
logic from markup
but it's NOT "more like" ?CONTENTSphp
it's less like
somebody can inject code into your site niraj
i'm saying including html is more like eval
but if you wanna go there you might as well pick up a mvc
framework like cakephp, code ignited, etc
meh
and I'm saying it is not more like eval
Did you ever eval() HTML code?
ok, i get it
anyway
sorry,forgot to nick you, I replied above
how is including html like eval??
advanteages to the approach!
advantages!
seperation!
whoa
you sound likehim
how is it separation?
him?
if you are mixing it altogether
the guy who thinks it is super sweet to put html in php and have
only one php interperetter call
you say you're including the html ?
Do you want _how long_ it was ago or *if* if was longer ago
than *some period of time*?
i mean, for separation, isn't templating better?
s/\*if\* if/*if* it/
yeah
otherwise html in php and php in html is like.. just as
separate
As I already said: PHP *is* a template engine.
i mean a templating engine that separates html and php
'hehe' ) ); then in the html I could do {BAR} and it would
replace with hehe,
PHP does exactly that. it separates HTML and PHP.
What would that be good for?
well just put your logic in one file, and the html in
another
uwell just put your logic in one file, and the html in another
/u
that way, my PHP is exactly, that - PHP - and I use the
simple tag replacement engine to include html and assign it
values
yeah, do what HarryR said
how many seconds the current time is from the row-value
= combined
If you follow this thought, you'd then have to write a
template engine that seperates HTML code from Smarty (or whatever
engine) code.
well just put your logic in one file, and the html in
another
= separate
i know, thats what i WANT to do
Err...
but he wants it to be all in one file
like what I said above?
with the html being in the php
why do you need to store the data in variables? use echo,
heredocs, ...
and html=$hello?/html?
who wants it?
php $html = 'html...'; $html .= '..' ... echo $html; ?
that is his approach
it's much much easier to do {FOO} than php echo $foo; ?
my display team is going to commit suicide if that is
adopted
you should also not use =
but you have no loops
Yeah. And much harder to escape it if you have to use a
literal {FOO} :
You even do.
actually, I love = :
but it's not as reliable, since it's optional in the PHP
config.
SlashLife that's why with my PHP tag replacement I an use both
{TAGS} and php $tags; ?
Smarty is one heavy beast.
And everything on top of PHP, which already is pretty slow.
if you intend to write portable code (code that won't just be
run on just your own site), you shouldn't use =
s/an/can
true.. but I maintain all servers my stuff is deployed on
makes sense
in that case, that's fine.
I just used the minimal example for niraj.
hmm? *wasn't paying attention to that discussion*
well the point is to allow flexibility in development so
people who never heard of php can make the pages and the php devs
can do the php code, possibly even at the same time
and html=$hello?/html?"?
yes, that's why you seperate it, with a small
template/tag-replacement engine
exactly
in my html
yes, but instead {VAR}
So you want to make people who don't know PHP to learn Smarty
syntax?
That's ridiculous.
well not necessarily
they could put in dummy data
and i could replace it with tags
not a problem
I feel sorry for your enter key, but yes - you would assign
'foo' a value, then in the html just do {FOO} and it will replace
it
approach?
!+enter
nm. it just PMs me. .
imagine a team based environment, where some people are php
gods and others are html/js/css gods
Don't use the enter key as punctuation. Think in complete
thoughts, then type.
Wow. I wish
hence the imagine
you seem to be going around in circles asking the same question
every time we anwser it,
Why are you only using unnecessarily complex and stupid
approaches? -_-
I am good at PHP, HTML, JS and CSS. But everytime I make a
good layout, it isnt for one of my projects.
because we need parallel development to occur
for the display code
then use a simple tag replacement engine thign
and the server code
s/thign/thing
Its for a friend, or one of the many projects that I own 49%
of.
So your options are to teach templaters full-scale PHP or
full-scale Smarty syntax...
... instead of just telling them about echo, variables and loops in
PHP.
like i said, the server peopel can do the smarty work
not at all,
how is {TAG} full blown smarty?
smarty is meant for designers though!
{TAG} alone isn't sufficient.
well as of now, the server team is more adept at smarty than the
display team..
it should change in the future
'bar' ) ); echo $view-get_output(); ?
i'm familiar with templating syntax, thanks :P
then I have no idea what you are asking, your just going around
in circles here
then I have no idea what you are asking, your just going around
in circles here
a better approach than templating using smarty or
similar?
i think it is not
thanx again guys
cheers
but someone else who has more influence myself does
I'd always go for a simple templating engine,
so how do i convince him
he claims templating doesnt scale
dance?
i personally think his technique is almost templating
Christ. What is wrong with php include "top.php"; ?CONTENTphp
include "bottom.php"; ?
That is my templating engine
only a lot uglier and will make WYSIWYG editors shit their
pants
wont?
WYSIWYG... rofl.
i am saying that apprach will, templating will not
s/apprach/approach
then just use templating like many of us have said for the
past 20 mins instead of going around in circles asking the same
question every time we anwser it,
the problem is how to convince that code nazi
not which approach to use
join #mind-control or something like that
lol
In my business we use XML/XSL. Backend and frontend people
decide on a XML vocabulary and of we go! It's simple, easy and
everybody just "gets" it.
So I guess that's another "templating" option
hmm
right, but we have hundreds of thousands of lines of code and
some 200 pages done, so that would be too radical a
change
If you already have that much work done, why are you even
considering a change? Unless the current system is completely
broken?
Yeah. And you can easily throw in an option to turn off the XSL
filter and send raw XML if necessary.
Yes
because the client hired somebody and he is a "super genius"
and has been brainwashing them
It makes it so damn easy to create output for different
platforms.
I like that approach... I just don't know enough XSL. :
Well, if he really is a super-genius, then i guess you have to
go with what he says..
Can you recommend any learning resources?
well, i don't think he is one.. he's a 50 or so year old
harvard grad who has been working since before i wore
diapers
Hehe. Our client hired a super genius as well...
XSL is easy. Tons of great documentation.
I couldn't find a single one.
Join the XSL maillinglist (mulberry-tech) and go from there.
Lots of really nice people.
I've got a gread reference, but the inner workings are much
more complex than in PHP.
Mailing list. : I hate mailing lists. :
If you can work your way around PHP, then believe me: XSL will
be a breeze..
But I'm going to try it anyway, thanks.
I'm sure it will as soon as you're familiar with it...
... but becoming familar is a completely different beast.
There are some good beginner tutorials at w3schools. Check 'em
out.
time() aways return GTM timestamp?
always-
GMT-
or server time?
well, i'm going to go write another big document explaining
why the code nazi's ideas are going to kill any chances of meeting
any deadlines
I believe so, yes
thanks, everyone
UTC, yes.
yeah
VysTrix, Slash thanks..
Still, the output of date() will be according to server
time.
is there any quick way to format seconds into
hours:minutes:seconds?
IC Slash so I need to pass time()? or should I use gmdate
with time?
time()-
is it possible for apache to set a php session variable for
php to pick up?
time() rimad
date() sorry
hi
php can pick anything up you need apache to output it
somewhere
file() $_GET are both options.
how can I call a php page from within another page?
require_once('pagename.php'); ?
that's one way
`Mace: and another?
require() include() include_once()
`Mace: I have a site that currently reads a session var set
in an index.php in for arguments sake the "hu" directory. it then
redirects to the /ext dir, which reads the session var and shows
the right content. "sk" also redirects to /ext
i'd suggest using mod_rewrite to output the url in $_GET
format
i don't really want to hear the rest tbh heh i'm dead
busy.
if you can output it from apache PHP can pick whatever up
lookup php.net session_start(_the_id_)
etc..
apache will be the ahrder part
harder*
`Mace: think I'm not explaining myself properly
probably not explain it to someone else
`Mace: thanks
but I've found a solution
k
np Kartagis
must dash.
`Mace: mod_rewrite /hu to /ext with [PT] and read the
REQUEST_URI in php and set the session accordingly
u`Mace: mod_rewrite /hu to /ext with [PT] and read the
REQUEST_URI in php and set the session accordingly/u
Go Annoying bugs
me and a colleague have spent an hour tracking down a really
hard issue, came down to a one line change 3 years ago
someone commented out a delete query
^^
(`Mace) simmerz: i'd suggest using mod_rewrite to output the url
in $_GET format
..
glad you figured it yourself though :p
does vbulletin have spelling check facilities?
not natively, relies on browser extensions
ah nm
we have it in the works for the next release
i'm after a table of common mistakes and their correct spellings
:p
its fairly complicated since we need to build a tree of any
text including markup then extract all the text nodes
is there any wait to not disable, but to limit mail()
function on server?
check the text nodes one by one and then throw it back in to
the tree without screwing it
i want to stop spammers from sending 1000 mails one by
one
juice`, not really. ilia has a patch for mail()
where can i find it
juice`: i think you can restrict that on ur mail server?
sendmail or exim or whatever
how? php mail() is for every user the same
juice`, sorry the patch doesn't do restrictions but it adds
HTTP_HOST to the headers so you can track down who did it
you'd need to do something in the mail server side to parse the
HTTP_HOST header
i have the same patch already, it logs every usage of mail to
a file with pathname of script called
juice`: I think it;s mostly a server related question than a
PHP i'd assume
pathname on my server contains username
juice`, mail.add_x_header is what it was and you could extract
that using a script in your mail daemon
is fairly easy with postfix to insert filters
Is it possible with curl to only get the first 2048 bytes of
a document (URL)?
i use postfix
where can i find this ptch?
juice`: on the server side you could create an firewall rule
to limit outgoing smtp connections
there isn't a patch its a feature of postfix
to insert filters
you'd need to create a script to insert a submission filter
syntax error, unexpected T_LOGICAL_OR in
/var/www/localhost/htdocs/sinif/duzelt.php on line 14 mean?
and then check the header on outgoing email
well, I would say use man curl, since this is ##php.
well the curl site is down..
look at line 14 for |
i have 50 000 users, i can't limit the number of outgoing mails,
i have to see which user is sending too much mail, and mail() from
php is the same for every user
yes, but postfix doesnt know who is sending it, for postfix,
every usage of php mail() is the same
You use mail()?
juice`: ah, i see
juice`, yeah bu you can extract the header added by ilia's
patch from the mail, and do whatever you want with the
script
extract username and lookup a hash table and drop those sending
lots of mail
so this ilia's patch is included in postfix?
i don't know who is ilia, really
line 14 is $conn=mysql_connect('localhost','root','bantha'); or
die(mysql_error());
-r will do the trick for you.
no semicolon after the mysql_connect.
oh durn, how could I leave that
thanks owenm
np
i really don't know where can i find ilia's patch. :/ if it's
feature included in postfix why do you call it that?
via the php curl extension, not command line
juice`, ilia is a PHP Developer
I always do it, esp. if I add the 'or die...' after I wrote
the mysql_connect
the patch is to added headers to the php mail() call
Aah, now were talkin!
and it is already included in php ?
ScottMac i meant.
juice`, http://ilia.ws/uploads/patches/mail_log.txt.gz
once you add that and recompile you'll get X-PHP-Originating-Script
in all mail() calls
not sure if its in yet
thats why i asked for a location of the patch
and i heard it's a feature so i was confused.. thanks
if you do a curl_setopt with a CURLOPT_RANGE, you can do it. see
http://www.php.net/manual/en/function.curl-setopt.php
aha thanks
juice`, that will let you track down users spamming mail()
which is a start
too bad they don't list what each of those constants does
(although most are obvious)
is there any explanation on the net how to use it ?
juice`, you dont run a hosting company do you?
nah, just a free hosting project
people tend to abuse things for free
well all this patch does is add a header to outgoing mail
lets you track down things quicker
I'm analizing this example - http://pl.php.net/manual/pl/function.PDO-query.php
like for example, does that include the header as well (i
presume so)
How to get assoc array instead of PDOStatement?
you'd need to write a program / script to integrate with
postfix to read this value. Nothing exists to do it
I get only 1 record so I don't need any loop
which is better cakephp or prado framework ?
oh then i probably dont need this patch, because i already
have my friends patch to write PATH and filename of every script
that used mail()
well, then you probably want to call fetch() on the returned
record (and set the fetch style to PDO::FETCH_ASSOC)
http://pl.php.net/manual/pl/function.PDOStatement-fetch.php
i thought this patch will be easy to add specific filters to
postfix
try them,
without additional programs
But isn't it possible without getting PDOStatement?
juice`, nope you'd still need to do some coding
well, the biggest drawback of prado is the lack of organised
documentation
we could say one is better, but better for what? we don't
know what you mean by better, what features to you make it better -
only you can make that choice
Look on the example - PDOStatement object isn't written.
so basicaly, this patch you gave me does the similar thing
(in my case similar!) to my patch...
hmmm, but i thought someone mentioned that postfix just needs
some filters to add
isnt it possible to use ilia's patch and someone configure
filters in postfix ?
somehow i mean
ooh, I just noticed that, yes. the comment at tbe bottom says
it isn't possible, but I'm not sure. I haven't used those functions
much.
hello people, please look here http://tools.wikimedia.de/~mohamed/users.php
.. can you tell me how to make each entry on a new line? every new
entry starts with *
in $result = $GLOBALS['sql']-query($query) how would you check
if the result is an mysql empty set?
juice`, that is what I was telling you. You can use the postfix
submission filter to parse email.
juice`, but all a postfix filter does is execute a script. You'd
still need to write said script.
Hello folks
or would i just look at sizeof
$result-fetch_array(MYSQLI_ASSOC)
hi
I have mysql-server -client 4.1.22 installed on fbsd 5.4 via
ports. Now, when I installed php 4.4.x will it automatically find
the mysql 4.1.22 client libs rather than some older ones?
install+
od will I need to force it to use the newer libs
or+
Haris, PHP 4 from ports?
or from src
ports
any ideas?
no idea, behaviour is undefined when you use a freebsd php
version. Ask in #freebsd
urm, put a between em all?
the add various patches and there version is slightly out of
sync compared to the stock PHP version afaik
how do you determine if you have no results from an sql
query
because php 4.4.4 with mysql client lib version 4.0.27 were
giving me the unable to connect to mysql, client libs general
error
owenm, i'm using while ($row = mysql_fetch_array($result)) {
printf($row[0]);
}
hi if i want to prompt a download using a php script is it
possible to call that download script via ajax?
printf($row[0] . "");
owenm, thanks
using mysql or something else? (pdo or the mysql
extension?)
When I select use system mysql version, does that mean the
version of mysql installed on the system rather than the libs that
come with php?
source
we dont ship a version with the source
licensing issues
Are variables of objects (e.g. $db) always global or must I
make them global inside a function?
they are just the same as any other var
and, globals are nasty - try to stay away from them :P
Why? DB object should be global in a function
o.o
But there is one with the windows version, right
correct
they get all binaries
and we use 5.0.37 for that
for what
global in a function? you mean global (can be used by all
functions), or global inside the function (usable by everything in
that function)?
Haris, Windows users get MySQL client 5.0.37 but there isn't
any shipped in the source
it uses the system one available, but FreeBSD has its own
configure scripts for ports and I don't know what that
does
I want to use $db object inside a function so I have to type
"global $db;", right?
/seen pollita
Well, maybe. Where did you create the db object? In a
different function? If yes, then you would have to use globals, or
pass it in by reference.
No, inside no function.
Got it
Hi, anyone seen Sara Golemon?
Outside a function or a class.
But I want to access object inside a function.
schultzconsult, its too early for her to be on
schultzconsult, she's UTC - 8 afaik
Using the system mysql didn't work. I got the old mysql libs
compiled in with it :|
So, you created it when the script was first run, and then
you do some function calls. You want $db to be available to every
function. You can use globals or you can pass $db by reference to
the function
I prefer "global $db"
To each his own
thanks.. I need to know, which security impacts runkit has on a
shared hosting enviroment
schultzconsult, what sort of impact do you mean? runkit is a
per process thing.
unless there are bugs, i wouldn't think any... it doesnt allow
you to do anything nasty to the serer
you might be able to rename a function that is in
disabled_functions but thats about all I can think of
so no overall security risks
disabled_functions is kinda lame anyway
My questions is because a customer of mine wants it in, but
cant seem to figure, what it excactly does
extra tools that php doesnt have by default
schultzconsult, it's mainly a set of development tools for
debugging in my case. What do they want it for?
I got that far ;-)
When I use $stmt-fetchAll() with only 1 record, will the
array be 2d? ( $array[0][0] )?
2-leveled
heh
or only 1-leveled ( $array[0] )?
so what's the main question then
other than security
for lenting some PHP code...
lenting?
for my part, I'm only conserned about security and performance
of our servers ;-)
performance it's not gonna be any different than any other
extension
adds more functions to the global namespace
etc
i wouldn't think the functions are all that intensive..
rename_function etc would run rather quickly... you could profile
them to make sure
but i wouldn't really worry about it
how can i take a image with mencoder ?
its possible ?
foo.png
a random frame of video
damn
wrong channel
sorry
okay, then I'll go satisfy my customer, with enabling it for
him
syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or
T_FUNCTION or '}' in ..... - my server is on php 4 and my test
server is php 5. dont know if thats it but i wouldnt have thought
so. any ideas?
short tags?
Thanks for the help
are you using or php
illegalc0de, its different php.ini settings. You just need to
find out which ones.
That'd just echo out the code on the server that doesn't allow
short tags wouldn't it?
function ABC() { ... return $var; } $x = ABC(); - will $x be
a copy of $var or a reference?
I want to fast solution with good performance.
ScottMac, were you asking me if i was using short tags?
A copy, but $var will have been garbage collected so there'll be
only one version of the variable.
yeah
copy
Unless $var is a static.
not in my code
illegalc0de, can you put the lines of code on a
pastebin?
is it short_open_tag?
if so then yes sort tags are on
illegalc0de, oh I know what it is
its your class file
have you declared something as public / private?
bbl
class....{ private String, String;....
well PHP 4 doesn't support private / public
ok thanks
it only supports var $foo
you'd need to re-write your code or just upgrade your server
upgrading your server is the most sensible thin
+g
right well im getting the servder upgraded to php 5 anyway at
the moment so
And PHP 5 chucks a warning if it finds "var $foo;" in a
class.
unfortunatley they are not going to move to mysql 5 yet
oniion, ScottMac, thanks for the help
np
hi, i need help with a regular expression to get the text
between two html tags (say and )
can someone point me an easy tutorial?
the one in regular-expressions.info is quite long.
or is there a way to do conditionals to deliver mail to
different destinations within a transport?
er
why cant i ever write in the right channel
Do you know what the tags are going to be? And roughly what the
content will be?
It just that if you don't then what you're asking for is really,
really hard.
yes. I know exactly the tags and I know the contet is multiline
text.
where are the function docs - i need to figure out what this
does: ctype_space($string)
the tags are actually comments
http://php.net/ctype_space
thanks
$a=ABC( CDE() ) instead of $a=CDE(); $a=ABC(); )??
In that case, something as simple as "/(.*?)/" should work
argh... wasp
this is crap'
tag.
PDO query returns a PDOStatement -- so you could probably do
a $foo = $db-query()-fetchall()
Good I think it won't be slower.
obviously with proper spelling, parameters, etc
oh, wait. i was echoing the original text...
lol
Thanks, that expression works great
how draw rectangle with rounded corners?
test
anyone can make to me a test command of foo.avi to
output.png
i want take a frame from foo.avi and put it on output.png
Using?
mencoder
Not used that.
why ? not support ? :x
Because I used ffmpeg instead
hmm
what you use for that then ? (the command)
For grabbing frames from video.
dman
wrong channel again
i want write on #player
sorry
*mplayer
Hmm I have an odd one..... I'm doing a: while ($row =
mysql_fetch_assoc($result)) {
But on a certain pass I'd like to insert the result from another
query
like, on the nth row, do something else?
owenm, okay but what with closeCursor() and unset()? I have
read that it's required for correct working of next
queries.
owenm, No not really... .say I get a $result = mysql_query()....
but I want to insert something else (from another query) as the
third result
Hmm in this case I could perhaps replace the current $row.. with
another one... but I don't want to lose that data
bHmm in this case I could perhaps replace the current $row.. with
another one... but I don't want to lose that data/b
I don't know whether PDO is good solution. Too much code and
combinations.
eh? oh, well, you would probably have to use some variables
for that (can't chain it that much!)
so, let me see if I get this. you have a few rows in a
mysql_query() and you want to fetch them... but you want one of the
results to be from another query, that right?
owenm, I want to insert one from another query yes
why not just combine the querys?
not practical in this site
I think I'm missing something when calling this class. any help
is appreciated. http://pastebin.com/929633
And I need to insert the resutl from one as the 4th result in
the other
DJTrey-work, ehm... there's no function formfield?
line 37.... shouldn't that be createTextField?
DJTrey-work: what ver. PHP you using? IIRC, php 5 fusses at
var $foo in classes (must be pub/priv)
Guys I need help with a little javascript.
owenm, I'm on php5 here and var hasn't fiven me any
issues
actually it should be 'formtype'
do you know that it will always be at the 4th position? will
the first query always give 3 rows back, or does it
vary?
right?
owenm, it varies of course.... hehe
I'm tempted to just stick all the $row's into an array and
insert one extra
http://phpfi.com/241941
anybody speak german? can you translate "geh doch mal mit
deinem Mac rauf ..."
I think it isn't so good solution.
might be the easiest
http://xyz.com?product_id=443
SlashLife, yes debug_print_backtrace(); is perfect thanks !!!
:-D
Anybody can plz help me with this...
warreng_, strange sentence... something like 'go out with your
mac already'
but my german isn't very good
babelfish didn't do well with it either
samkhan245, radio buttons are part of a form, its the form
submit that gets a new page
What does the term Use System Mysql
I don't think it will work at all. Closecursor returns bool,
so you will probably get a boolean result there.
mena
mean
got it. it has to be $create-create_form(text, 50);
What does the term 'Use System Mysql' mean when compiling
php
Right.
debug_backtrace is your friend
I can't even see closeCursor in XDebug (WinCacheGrind).
Chaining the calls is nice, but you did it a bit too
much
Okay, i will use $stmt or $res var
closeCursor is a method, so it is closeCursor().
but I won't create a function or a class for doing it
automatically I think
you will need to store the PDOStatement and then call the
function to get the array and close the cursor on it.
Contratulations, then.
$PDS = $db-query(); $arrayval = $PDS-fetch();
$PDS-closeCursor();
I think PDO will have functions to getting something
automaticaly - let someone tell PHP developers about
it.
i'm kind of rusty on php, so i'm confused about null. when i
say $x = null; isset($x) returns false
the documentation says exactly the opposite
SlashLife, yes I've tested few hours after but that's work
:p
"isset() will return FALSE if testing a variable that has
been set to NULL."
http://us.php.net/isset
can someone make this not echo the last 4 chars of the string
http://pastebin.ca/568421
zomg ... how did i read that three times and still get the
sense flipped in my head?
sorry bout that
hehe no problem
you should see me with De Morgan's laws :/
oh i'm a beast with DeMorgan
i prefer Captain Morgan's laws tho
aye
aaa801, http://pastebin.ca/568421
i'm probably the only person in my department who uses the
verb "DeMorganize" on a regular basis
so...
http://us.php.net/manual/en/language.types.string.php
then again i maintain spamassassin rules, so..
look at ex 11.5
is there an easy way to get php to connect php to
mssql?
http://us2.php.net/mssql
sproingie, does Captain Morgan's law include coke?
thanks
cause I'm quite good at that too
but I prefer Jack Daniel's Law
that's one of the laws: Acceptable Additions
do you happen to know if that works from a unix box with php
connecting to a windows server with mssql?
though there's an amendment that Coke and Parrot Bay are not
acceptable to mix
kaylee, man... is php.net down? http://www.php.net/mssql
"Everyday we'll make it, we'll make it the best we can"
*
Is it guaranteed that the __destruct method will be called
before the script ends?
yes
kaylee, no. It's not down.
isn't there a saying about "ask a stupid question"?
kaylee, indeed. So what's your excuse?
...
bash material, anyone? ^^
__destruct should be called the moment an object goes out of
scope, right?
I read when all references are destroyed
same thing in OOP
hello everybody, i don't understand how php unit-test frameworks
are better than writing a script to test unitand throw error ? any
idea please ?
should I take out the create_form() function and just make a
function for each event (ie. createTextField(),
createRadioButton(), createDropdown()) http://pastebin.com/929644. Or how
should I go about approaching this?
tho "destroyed" could be "whenever the gc gets to it". but i
believe php refcounts exclusively
wouldn't $GLOBALS['a'] = $DestructObj; not destroy it?
Is it safe to call mysql_close from the destruct method of a
Database object?
in the docs there it tells you how to run it on UNIX
systems.
tho i imagine quercus uses the java gc, not refcounting
right, it would still be in scope. the global scope at that
point
i have implemented simpletest on two units but all it made me do
is use their includes and use assretFunctions
what does it mean when php is compiled with
--with-mysql=/usr/local
sorry if this is a newbie question i am new to unit
testing
it means it will look for mysql libs in /usr/local/lib
Does it mean, it uses mysql libs already installed on the
server?
I have mysql-client 4.1.22 installed on fbsd 5.4 here
what don't you get, is_null?
but its not picking up this! version of client libs to
compile with
you may be able to change it in php.ini ... not sure
How can I encapsulate utility functions without needed to
create a $utility object? or should I leave utility functions in
the global scope?
i don't understand the point of using a framework for unit
testing instead of simple scripts to test a unit an report
errors/unexpected
well, it's same reason as to why you'd use an application
framework rather than writing from scratch
group the related ones together as static functions in their
own class. the real "junk drawer" stuff that you can't classify,
see if they're used only in one place, and if they are, move them
to global functions in that file
you can use functions an properties statically
DJTrey-work, ehm... sorry... I'm at work as well, so I'm not
quick
i have implemented simpletest on two units but all it made me do
is use their includes and use assretFunctions
I seem to be able to call functions without the static
keyword using just ClassName::function(); Is this an ok way to
accomplish static functions in php?
what else do you want to do?
if you have functions you can't classify that are used all over,
then you probably have problems in your design to work out. which
isn't too uncommon, so don't feel bad if that's the case
assertions are really what unit testing is about
heh. np
DJTrey-work, personally I like giving every function in a
class it's own name and triggering them manually... but maybe
that's just me
that's how you call static functions, yes
DJTrey-work, I mean I wouldn't have a class with create_form
with a function in it called create_form
without the static keyword? well, it's kind of a misfeature of
php that it lets you do that
using a formtype works fine though...
i'd stay away from that
i expected you would answen that for me
anwer*
ok. well let me try to rewrite this a bit and see what I can
do.
the usage of using a framework assertion that i understand is
the same thing that using simple ifs
s/ifs/conditions
header refresh only destroys $_post/get not $_SESSION ?
Is it possible to block a script from including from an sub
directory?
yes. but frameworks like simpletest provide a whole bunch of
features to automate those conditions, e.g. assertions, mock
objects
if you want to unit test theres nothing to say you _must_ use
simpletest, or phpunit, or anything at all. It just makes things
alot quicker and easier.
i understand, about simpletest Mock ::: how to use it on a
magical class ? using only magical functions
Learn about cookies and headers and HTTP requests. :
i think it'll cope, but i'm not 100% sure.
nvm, it must be somewhere in the man
Hey guys
I have no PHP experience at all
my question is about performance
Does a page 100kb in size is expectable size for a
web-page?
100kb of pure PHP or combination PHP / HTML?
the HTML returned to the user
the rendered page
100k of html is pretty big
how can i minimize that?
that seems large
#web
EBSMobile, ask #css
us a smaller font ?
thanks
^^
the thing is
my developers told me that running the php application on apache is
very slow and iis is much faster does it make any sense ?
The thing is that question is not connected to ##php.
Shoot them dead.
:-)
fire those idiots
EBSMobile, they're lying because they are MS fan boys
I'm not joking. Do it right now.
I think we need to do some performance testing
real one
how can I address that ?
I have to do PHP/IIS. Trust me -- you can make it slow and
reliable, or fast -- as long as you don't mind it crashing _hard_
consistently. I mean, _hard_.
Is there a benchmarking / performance tool?
http://news.netcraft.com/archives/web_server_survey.html
56% using Apache
EBSMobile, speed is less of the issue. the primary issue is
the compatibility problems you're likely to run into when trying to
run PHP with IIS. PHP was designed for Apache (afaik) and as such
PHP with Apache is more configurable.
I'm sure you are all correct , but I need to prove that
dont bother. it has been done. if your server is having
problems, fix the problems. if there is no problem, don't worry
about it
hi, is there an existing image code verify class or
script?
EBSMobile, setting up and maintaining PHP on IIS as your
primary web server is just, kinda dumb.
something existing
That's overall websites. Not PHP specific
i agree, apache is better
It doesn't mention nginx in it yet
Have you ever heard about a system called smarty?
I think it is build upon this system
ew.
EBSMobile, yes and I'll tell you why it sucks over in #phpc
EBSMobile, and i'll tell you what's better instead too
Smarty is *TEMPLATING* system. Completely useless.
really?
:-)
yes, really
EBSMobile, or #php.thinktank, but it's off topic for here. and
Smarty sucks.
and if you still want to compare Apache and IIS, google a
bit. there are 100's of case study things out there
owns Smarty.
no I don't want to compare , I just want to know how can tdo
some benchmarking tests
EBSMobile, sounds like a comparison to me
so I can come to my boss and tell him look :
helo
the developers have no idea what they are talking about, but
they are wrong
EBSMobile, how is a benchmark not a comparison?
Hi all
want a benchmark? Put PHP/IIS with ISAPI, try to do serious
work. case closed.
"http://vpn.server.com/heartbeat.php?clientid=123"
== how can i get the clientid in my script???
I meant performance testing
ive delt with smarty quite a bit and have yet to like it
enought to deploy it on a new app
Dodong, $_GET['clientid']
php.net/faq.html
they told me that the website is just slow because of the
100kb
and that is got nothing to do with iis
to do the tests yourself, you will need to setup IIS (and set
it up right) and then hammer both till they break (including your
current Apache) or setup a 3rd box with just Apache, so that you
don't hammer your production server. too much work.
if you concerned about site load time grab a ff extension lets
you see what part of your site taking more time
EBSMobile, is there really 100k worth of HTML in that file?
or 100k worth of data which is formatted with HTML?
data formated with html
formatted that is
100kb is still a large site. Keep in mind, that people still
exist that use dial-up modems.
"Great website:www.domain.com!". What would be pattern for
it?
EBSMobile, is this a dynamic page? i.e. does it come from a
database?
can we see one of these 100k pages?
Hey. I am having trouble with my PHP/MySQL IIS Server... more
the trouble is setting it up. I hoenstly dont know the name of my
MySQL DB and I cant get the localhost/index.php to show up. Says
page cant be displayed. This the right channel?
yeah I know , but they told me that is Smarty , we can do
nothing about it
yes
it's all on MySQL
Why don't you simply strip it for all domains that *have*
it?
on Windows of course
It's a bit easier and it looks much nicer.
Why would you want to use regex?
wolf, i feel regex is a good tool for the job
Slash - there is a technical reason for it, but it's a longer
story
EBSMobile, Smarty could easily be the problem
why is that?
Get a regex that matches the domains for you and then put a
negative loog-ahead in front of it.
EBSMobile, i'll tell you in #phpc
*look-ahead
You feel wrong. Use strpos()
negative look-ahead.... gotta read about tihs one
to see if basic PHP works
Thanks you all guys, you were a great help
darn
cleared the backlog _again_ -_-
regular-expressions.info
Ok just a second
slash, thanks!
Did you mean: phpinfo()
proably
What's wrong with simple strpos()?
gah. Sugi, I'm an idiot, darn it.
Index works fine. Let me try the printinfo
no!
no?
phpinfo(); I'm dumb.
lol ok sec
It prompts me to save the file.
not knowing something !== being dumb
So my PHP isnt installed right?
hey, anyone have exp with domxml?
if i do $str[strlen($str)-1] = ''; it is replaced by a space
how can i just delete it
screwing up the simple stuff that you know is, though
is it possible to validate xml using php4's domxml against an
xml schema file?
That's good.
probably. http://us2.php.net/manual/en/install.windows.php
Alright thankyou
good luck
i dont want there to be a space
How can I ask if a MySQL table already exist and then return
true if it is and false if it isn't?
Should I be using the latest php install?
Doesnt PHP 4 and PHP 5 make a difference...?
som1 answer if i do $str[strlen($str)-1] = ''; it is replaced by
a space how can i just delete it
deviance, run the query SHOW TABLES
well, if you use the 4.0 series, follow the instructions for
5.1.0 and earlier. If you use 5, do it that way.
aaa801, use substr() to delete it.
example please
aaa801, substr($string, 0, -1) will strip the last char
kk
What, run show tables;, then if it returns nothing, it doesn't
exist?
deviance, technically mysql_query("SHOW TABLES LIKE '" .
mysql_real_escape_string($table_name) . "'");
Well, his version works, too
how do i tell if i am using IIS CGI or the other
IIS?
Ehm actually aaa801 isn't there a function that just removes
trailing spaces.... or isn't that what you're trying to
do?
deviance, yeah no rows means the table doesn't exist
hello everybody, what to do when i need n empty loop please ?
for instance while ( ($o_query = $o_iterator-hasNextQuery())
&& ($o_query-name!=$queryNameToGet)) {}
why do you need empty loop?
Wolfpaws, resetting a char won't delete it afaik.
IT should set it to ''
because i just need to wait for this loop to end then i'll
have the right $o_query
Wolfpaws, strlen() will still remain the same, it will
replace it with a null char iirc
ekneuss, wasn't he just looking for the 'trim' function?
macouno, from what I understood, he was looking for a way to
remove the last char of a string, which is not equivalent to
trim().
ekneuss, hmmm yeah you might be right.. in that case.. I
concur :P
Ok. so that should be read "bad idea" :o
Wolfpaws, indeed
because i just need to wait for this loop to end then i'll
have the right $o_query
substr($string, 0, -1)
easy way to strip the last character
Are you talking about threading?
Hi folks. I just upgraded from php4 to php5, and am having a
problem with sessions. On one page, I have: session_start();
$_SESSION["foo"] = "bar"; header("Location: http://domain.com/page2.php"); .
In page 2, I have session_start(); echo $_SESSION["foo"]; and it's
empty
Hi, just had a look at domxml but read that it isn't thread
safe - so is there a xml lib that is usable in multithreaded
environments?
no, just iterating until the $o_query has name set to
$queryNameToGet
I print_r($_SESSION) and it's totally empty
session_start()
have it on both pages
Do sessions in general work, i.e a simple test like http://pastebin.ca/568491 ?
Do you maybe do some fancy redirection?
http://pastebin.ca/568494 try to
start session with this
*
hmm, guess not. the counter does not grow
My bad. I have failed to read everything. again. You need to
save session first before redirection
+g
http://pastebin.ca/568499 does that
look ok to you?
Check your php.ini file, for things like session.save_path ..
make sure it's correct.
is there any other check I need to run on strings besides
mysql_real_escape_string before using the string in a
query?
it is set to /var/lib/php/session which exists and is
writable..i also tried changing it to /tmp
want to try a database abstraction layer ?
Whats that is_null/
You want to read php.net/session_write_close
in php_info() it says session support is enabled
And you're checking the php.ini file that's mentioned at the
top of the phpinfo() page?
yep, /usr/local/php5-fcgi/lib/php.ini
deviance, use mysql_num_rows not isset
hiker13526, not really
That counts the number of rows then?
Did you've read what I've said?
hiker13526, it depends on what you consider valid data. if
you need emails to be valid emails you might want to run a regex
match on them to be sure they actually look like emails. but as far
as being safe against SQL injection, mysql_real_escape_string()
should do it