hi i have an urgent problem with php program please help me i am in CEST time zone and I need to get the time
$labels
that will throw a warning (that the size is exceeded) but it prevent php trying to parse it
setting post_max_size to 0 makes it not return anything
http://www1.seenly.com/
that's odd, i've used that trick before
http://test.seenly.com/phpinfo.php
401
ah wait sorry
http://test.seenly.com/
try again
got it
Have you verified the upload works via a normal HTML Form?
might it have something to do with Registered PHP streams not having "data"
i'm having trouble checking whether it works, with this: http://pastebin.com/d1fbd4621
i get unexpected $end
I've tried blocking out sections, but cant find the problem
no that's for the data:// wrapper
ok
I really don't know what to do anymore
why are you bypassing the file upload mechanism anyway?
arpad I need to do some modifactions on the file, and then move it
php writes files to the disk by default
it's added overhead
this way I can just work on the $_POST variable and then save it
musikgoat, unexpected $end is usually a missing }.
it's only 20KB data, so it shouldn't be much of a strain on memory
yeah, i think i found it
one moment
you could set your upload temp path to to a ramdisk
-to
i timed out :/
arpad yes, I've considered that, but I like it better this way
hey.. python has an interactive shell. so does bash (duh).. so i was wondering, does php have such thing? I'm guessing no?
if it has it, how can i get it? I've never seen it and assumed there was none
yes xeon
php5 -i
php -a
hmm
or that ^
ive tried that before, i msut have done something wrong. ill try again right now
there's a nice shell package in pear too
# php -a
Interactive mode enabled
system("id");
yea ive run php -a before, but this is where i got stuck
id type some shit and it wouldnt spit it out.
i must be doing something wrong
i.e syntax
echo "hi";
Like in ruby or python it spits out the answer to you
arpad
maybe I could try setting magic_quotes_on
im running php4 tho
i think using the upload mechanism would be much more elegant (and known to work!), but if you're dead against it then keep playing with php://input - the post_max_size trick may not work anymore but it's probably the best bet
so im not sure if that matters
huh? what does that have to do with anything?
Maybe this is not the interactive shell i was thinking of. like the one im looking for is where i can experiment and type out a command and see if it spits out the answer
like ruby python and bash
i think perl too
arpad when I had magic_quotes_on my data would be screwed up because php added slashes to every non-ascii-byte
I then solved it temporarily using stripslashes, which would return the binary data perfectly
later I set magic_quotes_gpc = Off (this was on, sorry) and I hadn't need for it anymore
it still worked on those two servers it works on though
so it would be a work-around rather than a fix
yes of course, but you're talking about it truncating the data right?
yes
0 no?*
there would be no null-bytes anymore
yes
it could at least offer a clue
http://pear.php.net/package/PHP_Shell
thx man, checking now
ahhhhhhh
so it has to be php5, ok cool.
http://pastebin.com/d25ba199f I get it to parse, and display, haven't tested whether the results come back, cause on the line with the while condition, i get: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
/home/fsem07g4/public_html/articles.php on line 106
weird
no slashes at all
Change $result = @mysql_query($sql,MYSQL_ASSOC); to $result = @mysql_query($sql,MYSQL_ASSOC) or die(mysql_error()); and see what the problem is.
oh sure
$result = @mysql_query($sql,MYSQL_ASSOC) or die(mysql_error());
and now there is no parsing up to the line right before this command
don't use @, it's supressing the error that will tell you what the problem is
let me try that
Which I neglected to mention.
Whoops.
ahh, found it
bad syntax on the query, i'm dumb
$sql = 'SELECT article_id,rank FROM users_articles WHERE user_id = ' . $_SESSION['user_id'];
$result = mysql_query($sql,MYSQL_ASSOC) or die(mysql_error());
mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/fsem07g4/public_html/articles.php on line 104
before i was missing the FROM table_name
added that, but get the same error both times
look up mysql_query(), the error is telling you that you haven't passed it what it expects
it wouldn't fail cause the table is empty, should it?
you seem to be confusing mysql_query() and mysql_fetch_array()
no it wouldn't
suhosin — anybody use this?
so far I have used forms and $_post to send info to php page but can I have a link which will send in some info(don't need user submitted)
how am i confusing mysql_fetch_array() with mysql_query()
make your link like index.php?foo=bar
musikgoat, you're passing MYSQL_ASSOC to mysql_query.
well MYSQL_ASSOC makes no sense with mysql_query(), it belongs with mysql_fetch_array()
oh
Rewt`, and it can then be read as $_POST thing?
yes
$_GET
okay, thank you
people suck - instead of reading what is below their nose (http://www.php.net) they try to get around asking stupid questions!!!
Surpresses our boredom, though.
Marginally.
hi, i have an urgent problem with php program, please help me, i am in CEST time zone and I need to get the time in EST zone format from the time() function in php5, how can I do that ?
anyone out there ? please help me
thanks Rccsv, its working great
anyone having any idea how I can solve this problem ?
hi, i have an urgent problem with php program, please help me, i am in CEST time zone and I need to get the time in EST zone format from the time() function in php5, how can I do that ?
look at date_default_timezone_set()
and don't repeat yourself
go to http://www.php.net - search for time - and look at the time functions displayed on the left hand side
sorry abt that , i used date_default_timezone_set and i get the time in EST but its is one hour less than the actual time in EST
DST, perhaps?
I guess its something to do with the daylight savings time
yes
how do I make that correct ?
do u mean I should use DST instead of EST in the date_default_timezone_set parameter ?
how do I become a channel op here?
is there some irc command to make it happeN?
php should be including it already, you may need to add it yourself
there is no irc command to make it happen; this channel has operators.
if I put DST in the date_default_timezone function it gives me the time in my localzone and not EST which I want
ok
DST isn't a timezone
i did mean daylight savings time
thx
sorry I didn't understand, what do I need to do ?
oh ok
if you're certain it's not returning the correct time, you could always add 3600
uif you're certain it's not returning the correct time, you could always add 3600/u