Okay, I create myclass extends MySQLi
hai, liggy :3
but how to connect from other file? myclass::__construct()?
or myclass::connect() (or other method, I don't remember their
names)
or only new myclass(parameters)
new wrapper()
where can one find phpize on Centos? =/
you need php-dev package
then use function __construct() { parent::__construct(blabla);
}
sorry, didn't read that
I think calling only 1 class is faster than calling to class
through
thing is i already searched for php-dev on yum, no hits
yeah of course but then you are stuck with mysqli and ahving
a wrapper can be damn useful
probably php5-dev in your case
ah, php-devel
And how is it with returning values from method to function?
Aren't they copied too?
again. What php host
does internally should bother you only when you optimize.
«¼¼» §äLäM
£vë®ÿÖñë
«¼¼»
hello
you are SO F*****G LAME
me ?
yeah
kill that script immediately
it's like shouting I HAVE A BOMB in an airport
the capitals or the content ?
It makes this only on startup
it won't make it again
the capitals and "style" xushi
...when not actually possessing a bomb..
heh, the old days of mircx..
bah
die hard3 :p)
anyone have a minute to help me out with making mkdir()
work?
I once wrote a distributed anti spam filter webmail host
eliminator for mirc, back when I was hunting down a turkish dialer
spammer
So I will probably use mysqli_* functions in my class, won't
be it bad?
if you explain your problem
not for me, it wouldn't
SettlerX, don't use that, use $this-foo as you're extending
it
the syntax is mkdir('\directoryname', 0755);
but i keep getting 500 internal server
error
is it possible to use PHP-GTK with normal PHP scripts in
apache?
or it just doesn't work..
i mean to make something with html hosting and GTK
interfaces...
and if so, how do you tell it which DISPLAY to use?
are you running in cgi
host mode?
So you prefer extend; and can't I connect directly calling
MySQLi class? Only throught myclass?
what do you mean? :shy:
probably. See pear
not really an expert with php, but i'm trying
I think you can't do "\path", if it's relative use only
"path" and if it's absolute start with a drive letter
mkdir can not cause error 500. Something else does.
it's me here!
okay let me try that
honestly dude, do as you wish, extending or having a mysqli
object in your wrapper will hardly change anything
but yeah i think extending is cleaner
also, if i set the chmod of the current folder where the file
is to 0777
i get that error
if i set it back to 0755 then there's no error?
«¼¼» §äLäM
£vë®ÿÖñë
«¼¼»
madafaka oh?
ahah
Z3z0 wtf?
someone really wants to get his ass kicked :p
just remember to keep the claws to yourself darlin
I'm not a cat
understood - but even wolves have some pretty big claws
extending is also not good? So what?
Big, yes, but not as sharp as cats'
true
cleaner means I think it's good (or at least better), what are
you saying now about extending being not good ?
do you understand what error 500 is?
doggies are horrible
MikeSeth it's working now
mkdir(foldername,0755) works
doggies like to follow and piss
training++
what's left is just to figure out how to create a folder in a
directory that's not the file's parent directory
Or using interface word?
but again, do you understand what error 500 is?
that there's something wrong in the server's settings?
What sort of dogs you have?
Okay, I will try to make a wrapper
like that it's not configured well
so it could not execute the function
right?
an interface is useless in this case
no, the web server returns error 500 when the script did not
produce headers (in other words, crashed)
OKay
this only should happen in CGI setups. If your server is CGI,
you should switch it to native server module - better performance,
security, and comfortable environment
Is any chance that PDO will be faster and optimized?
hey pplssssssss
stop being stupid and kill your script before your ass is
banned
abstraction == slower
just a second to check if it's cgi
MikeSeth ,, behave your self
MySQLi is also abstraction?
I contend. Abstraction != indirection
MikeSeth ,, you are not polite at all
define indirection
you don't deserve politeness
um thank you for your time MikeSeth, really
vsegda radbI
no it isn't - it hooks directly into the new php mysql web hosting C
api
MikeSeth .. why ?
http://www.zedshaw.com/rants/indirection_is_not_abstraction.html
just one more question? i hope it's not too much.. how to
make it work with another folder except the current one
bjust one more question? i hope it's not too much.. how to make it
work with another folder except the current one/b
i've tried with mkdir(..path/foldername); but doesn't work
just specify the path
../something/
b3(4u53 u k3p7 u g0dd4m|\| 5(rip7 3|\|4b13d (sorry, normal
people)
i think i tried that but didn't work.. lemme try again
So I don't know what should I use if my CMS should be
fast!
flat files.
heh
on that interesting note, off I go, cya.
how can I unrar my files on my hosting server ( dreamhost
)
You know, what's scary thing? I can understand that.
mysqli is the fastest you can get for mysql I think, stop
arguing:p
how do we know? Ask the DH support.
mkdir(../subfolder/newfolder,0755);
eh, i will think about it
assuming you dont forget the quotes and have write permissions,
that should work
the subfolder and the .php file that should create a
directory are both in public_html
Or 2 versions of CMS
I'm using putty and I can log to my hosting directory
dont forget that the webserver runs under privileges different
from your own
but SQLite 3 - only through PDO
err, what ?
permissions are set to 755
I have rar files on my hosting ,, I need to unrar them using
putty
THIS IS NOT A SUPPORT CHANNEL FOR COMMON UNIX QUESTIONS
I thought I told you already. If you care about those few
microseconds, then you shouldn't be using PHP
THIS IS ALSO NOT A SUPPORT CHANNEL FOR DREAMHOST
why dont you kill me better?
if I had the line I would have, trust me
the thing you said to Z3z0.
no the guy really is shouting "I have a bomb please shoot me"
in an airpot
no, I mean on the parent directory
you should add "and I have a gun too!"
now*
behave your selves all , or I will not come here and prevent
you from seeing me
This is PHP help channel, not script / host one.
the parent directory is public_html and it's 750
woof?
oh noes imagine the tragedy of not seing you
i believe i shouldn't set it to 777...
well, it's not that scary I think, I mean it's not that hard
to read after all, just damn ugly
yes, which means you should use other means to allow the web
server to write into it.
on Debian I typically do sudo chown www-data -R directory
And I'm not "normal"
FURSECUTIONZ!!!
is there an easy way to prepend each line of a string with
some characters? just str_replace("\n","chars",$string)
?
ah
god i'm such a beginner..
thanks peer
need to eat, bye
yeah that but add \n to the replacement string
uhm. You can do that, yes, though you probably want
"chars\n"
yeah true. forgot that bit to type. thanks
hmmmmmmmmmmmmmmmmmmmmmm.
I just reinstalled a LAMP setup on my kubunlu laptop, but I
can't get php scripts to run.
I get an internal server error
the apache log reads:
8 2007] [error] [client 127.0.0.1] SecurityException in
Application.cpp:162: Calling user is not webserver user!,
referer:
o.O
any ideas? it serves html files fine
the test.php file I'm using only contains "php phpinfo(); ?"
(no quotes)
Do you have any extra security stuff there?
no, not as far as I know
Do you have maybe SELinux enabled?
er... not that I know of. how could I tell
?
if anyone wants there is a good website on learning
php/html/mysql etc. www.w3schools.com
#kubuntu
?
i dont know
someone might want to learn from there
That's like saying on #SQL "yeah, I found a basic SQL
tutorial on w3schools"
nope, not running selinux
What's application.php line 162, then?
would it be a user/groups thing? php doesn't have it's own
group, does it?
no idea. not something of mine
"There is a new directory in your scripts directory, what it
its name?" - "Yup, there is one."
...
http://www.google.com/search?hl=en&q=error+%22user+is+not+webserver+user%22&btnG=Search
Wow! People can use Google!
you there??
dude. I'm just showing you that there's one other instance of it
on the 'net.
Call to undefined method DOMNodeList::getAttribute()"
error
I AM!!!
Which PHP?
am using PHP 5.1.6
thats because you are trying to get an attribute from a list,
not from an element.
im doing $catt = $entry-getElementsByTagName( "category" );
and then this $cat = $catt-getAttribute('term');
but getElements*() returns a LIST, not a single
element!!
im doing that inside a foreach loop. so each time it accesses
a single element
no it doesnt
i have a xml file an am trying to get only the attribute of
"category term="featured link"/" how can i achieve this
?
probably $catt[0]?
you mean this $cat = $catt[0]-getAttribute('term'); ?
probably.
ok, trying now
how wide spread in mcrypt
Are you running that as CGI?
Woof? What?
for instance, would you write it in to a peice of code that
you were seding off to run on lots of systems?
mcrypt is a standard library. Platform independent.
it is likely to just work on most platforms
without any messing around installing libs?
you NEED mcrypt libraries.
hokay :-) just making sure I dont have to shoot someone
thx
rhy
rhy?
mcrypt, libmcrypt, mhash
hi
hi all
I'd like to learn how to process webpages with php ...
nice
like extracting DOM information and stuff
could someone give me a hint?
see simplexml manual
MikeSeth should he start from xml?
he wants to parse, we give him teh parsink.
oh.. i see..i misunderstood as he wanted to learn basic
php
ordinarily I just stick people face first into hpricot
heh
any other siggestion of xml lib for php4?
doxml
domxml*
heh, thanks, i want to use xml to store config files
well, ditch php4 then, bad idea.
is it a good idea to serialize objects to xml files in order to
make less queries to the database?
to xml? no.
XML is a good transit format. It's a bad format for persistence
and even worse one for transports.
Using XML for more than it was meant is bad idea.
don't you know that XML is like violence?
i see
!+xml
[XML] eXtensible Markup Language - jymmm believes it to be the
spawn of satan and pure evil, but a lil tutorial and introduction
is available at http://www.tizag.com/xmlTutorial/
php-bot: xml is also like violence: if it doesn't solve the
problem, you add more of it
okay
MikeSeth rofl
!+xml
!xml
...
:`
slow learning curve?
php + ajax ?
VERY slow.
!+ajax
[AJAX] Asynchronous JavaScript And XML, See also: http://en.wikipedia.org/wiki/AJAX
It is NOT a topic of discussion in ##php, try #web.
ok thanks
hi
1,
the context is describing array
creating new array
'noob');
yes yes
oh
$array['name'] == 'Joe Sixpack';
?
$value ) { }
thanks
is for like Dotcpu sayd
idd
is for objects :p
i don't know classes nor objects yet ;P
^^
Hi, all I'm using virtual hosting on Apache and want allow using
php scripts only for some Vhosts. I'm using php_admin_flag engine
off in httdp.conf and Engine on for needed hosts but it still not
enabled for Vhosts. What's wrong? Tnx.
I have engine = Off
in php.ini too
!+DavidHKMrPowers
are you on crack? engine=off means PHP is disabled.
MiekSeth, !!!
I think everyone is on crack
I feel like im on crack
hey MikeSeth
MikeSeth, you mean eject_ck
god damnit.
I disabled it for all and then I enable it only for needed
Vhost
!!!
sounds like a dumb idea to me, but suit yourself.
crack, methamphetamine and an evening with the men in
pleather
what the hell did I drink last night
is it right to say that a security system is considered
"opt-out" instead of "opt-in" when it filters everything _unless_
you specify otherwise ?
you want to say that I cannot use php_admin_flag to change
configuration settings?
why ?
MikeSeth is a great guy!
s/guy/girl
trying to screw me again?
perhaps you mean ACL, as in DENY-ALLOW vs ALLOW-DENY
yeah probably I mean something else
opt-out is the only term I knew that ressembled that :p
but it really sucks to talk about programming in a non-english
language
and when you have to talk to guys that don't know shit about
programming too..
opt-in/opt-out are civilized ways of saying "stupid enough to
subscribe to spam" and "stupid enough to confirm the spam"
can we use getAttribute("item"); even if the xml element doesnt
have a closing tag??
php is not working with apache, and i don't know why
is there a way i can store multiple pictures into one file
and later output them somehow? basically im making puzzle, if user
chooses a difficulty of puzzle, the files are stored in
puzzles/puzname/, so bad, so always someone refreshes page the new
pieces are taken ( and new folder ), instead i would like to save
image pieces into PHP file and later parse them somehow
it used to work
IF XML doesn't have a closing tag, then your XML is faulty
and should be fixed.
check the Documentroot
its not my XML its the xml generated by the ibm omnifind
search
in apache's config?
yes
that hasn't changed...
normal files load ok
i mean in a browser
what do you mean by not working ?
?
well, if i open a php page hosted on my machine in a browser,
nothing happens
it looks the same way it does when you have a script which doesn't
have output
is there any way to get that attribute value ?? i.e category
term="featured link"/
i've checked by running the script at command line
then check the error logs
and it worked before
where is that?
you using linux orother os ?
the only change is that i have installed PHP-GTK, but rolling
back to a config file from before doesn't seem to help
liinux
linux even
IF your XML is good, then DOM should be able to read it
properly.
its located in /etc/httpd/logs
/var/log/apache2/error_log?
oh
ok
I'd read it with simplexml, but that's just me.
i think it's /var/log/apache2/error_log on my system
(gentoo)
ok
im using DOM XML
oh now this is odd....
some directories are ok
i think maybe permissions have got changes somehow
hey. where can i see demo of pear forms ? i want to learn how
to use it
I thought about my problem and here are my findings.
If I want to be compatible with newer PHP versions, MySQL,
SQLite 2/3 - I have to use PDO and recude amount of
queries.
cant i get value of term for comparison ?
What?
Comparing with what?
On one of servers my CMS's main page (with one news, poll, menu,
counter and other panels) generates in 8-9 ms.
and one query with fetching in PDO lasts about 0.1 - 0.2
ms.
god bless xdebug and its debug dumps.
so PDO can use even about 10%-20%
i want to compare the value of "term" with "Default"
Why the hell are you worried about those times?
Hi, anyone waked?
My CMS's goal is speed. However, I'm convicted on PDO.
it will not execute test.php
any other name seems fine
Do you know which parameters of server can make PDO faster or
slower?
Why do you thin that 0.1 ms is important?
I will tell ByetHost's admin to enable PDO for MySQL.
You can do it too.
... What the hell...?
I'm still interested in why do you think, that that 0.1 ms is
important...
here is what im working with http://pastebin.ca/571979
10 queries = 10 * 0.1 = 1 ms.; 10 * 0.2 = 2 ms. (and my
script can execute in 20ms.) then 10% belongs to PDO.
Okay, but I decided PDO if I want to use more db's
I'm currious on how to use multiple servers with the
memcached extension. When adding like 5 servers with addServer(),
will it always try the first one, then the second and so on when
getting a value? This would cause a high load on the first one so I
think I'm missing something here. Anyone who can shed some light on
this?
Is there any function i could open a JPEG from binary data?
Would imagecreatefromjpg(base64_decode("binary data"))
help?
aa^way: No. that should be a path.
Admin of a server told me that mysql_* is the best method.
My script have to work on ByetHost too so it's important to be
PDO enabled.
im storing a images into mysql db ( i know silly but thats
the best way i can do my thing ) and how im gonna read them with GD
:O?
Someone has given me a link for good hosting service. Can you
give mi it again?
well... the *speed* will depend on type of the query, complexity
of the query, number of entries in the data, and last, but not
least the optimization of the data.
I'm disappointed of ByetHost - it doesn't work now - http://byet.net
aa^way: Why do you need to store the data into DB?
Never ddid any work with XML via DOM (only DOMXML and SimpleXML)
and xmltramp on PYthon.
ok thanks anyways
noone here, who has used multiple memcached servers with
php?
Or which free hostings with PHP5.2 + PDO can you recommend
me? Ad - only on the bottom or for manual putting
I don't trust free servers without ad
This isn't a channel to recommend hosts. Try webhosttalk.com (or
something)
i am making puzzle, whenever user submits picture, system
cuts it into images and the rest is done in JS, images/pieces are
saved in user/puzzles/id/... But this is realy bad way. there might
be some bot who is flooding site and everytime there is made new
puzzle and pieces and so on.. i thought i can display pieces as
binary data?
?
i got it, now i need to see witch part i need to save so i
could get GD image into binary
hmm I have a regular expression that work great in visual-regexp
but not when using preg_match_all. any idea of what I am doing
wrong? apparently I am not handling the php function correctly...
http://pastebin.com/930690
hi
somebody can help me with a little script?
i have 1 line with code, but it doens't work
anybody?
lo all
I was just curious, could a mimetype be faked?
http://pastebin.ca/572018 anyone
mind looking?
arriving from where?
frank-BUSY: just ask your question
Just a form upload.
mysql_query("UPDATE `[users]` SET `cash` = `cash` + `economic` *
10 WHERE `activated`=0");
yes.
what's wrong with this?
I dunno, normally they're calculated.
wait, one field is derived on another?
frank-BUSY: Why do you have your table in square
brackets?
frank-BUSY: [users] is not a legitimate table syntax
MySQL has no table classes
[users] is a table
believe me
that's not the problem
Crikey.
it's working with all my codes
You called your table [users]?
yeah
Well what's the error then?
no
that's.. original
in a sad way
www.ultimate-warfare.com
my online game
i always use [users]
frank-BUSY: What MikeSeth is trying to say, ['s in table
names is very bad.
never any problems
anywoo, what is your sql error?
nothing
he's just not updating
well I assure you, the moment you want to migrate to a real
database because mysql can't handle the load, being a SQL
interpreter hack over a flat file, you'll run into "interesting"
problems.
1 sec
i try to explain
frank-BUSY: activated = 0, are you sure?
yeah
Sounds like a logic error then.
run the query in mysql console and see what happens
Zend Studio question... somone knows how to disable 'Go To
Declaration' ?
ok
MikeSeth, I was commenting more that he's setting a field
based on the summation of 2 fields multiplied by 10, I think that's
silly and not needed
krupa^: god no
its really sucks sometimes
activated = 0 means activated, 1 means not activated
XD
That's not cool. :/
i know
that's untrue. Albeit field materialization is a dumb thing to
do, especially on joke tasks such as web sites, it may be
useful
MikeSeth, it's not true that I think it's silly?
no. There are situations when you want that.
MikeSeth, I think it's silly, it cannot be true or false
it's an opinion
it's a wrong opinion. You don't have enough context to judge in
this case.
sure I do
I am free to opine
calling someone elses opinion "not true" is stupid
it's better to remove those [] on the table names?
your opinion is not /factually true/, so you might want to
hold your horses when advising other people
MikeSeth, No shit, it's an opinion
frank-BUSY: damn right.
no opinions are factually true or false
you seem to lack a brain
please don't speak to me
you guys can explain me 1 thing? what's wrong with that []?
i never heard that it was wrong
:o
frank-BUSY, what is telling you to use them?
I have very little interest in what you have to say, what I
do have interest in is that you do not give advice that may cause
more harm than good.
They're uneccissary, they're just padding. Also is messes up
alphabetical ordering.
MikeSeth, I will give advice as I see fit
you do not control me
so fuck off
touching
i had a users table for testing my first game
when i made a second game
users was already in use
so i made [users]
frank-BUSY: Call your table "users".
frank-BUSY: there's no guarantee other databases would support
it.
xD
ok
http://pastebin.ca/572018 - whose
code is this
What about it?
*sigh*
frank-BUSY, Some pieces of data do not need their own field,
if you're doing simple arithmetic operations on pre-existing data,
it can be done in the query you use to get the data, it doesn't
necessarily need its own field, it can cause many problems
especially if the rules change on how that data is calculated, and
if you do change the method of calculation, you have to go through
and update all these fields
thats me lal, can you help me =p?
regardless of MikeSeth's incorrect statement that it's useful,
it is not
poutine, MikeSeth, both of you, ssh.
ok
thanks guys
aa^way: I believe the proper format is data:image/jpg;base64;
$content
you have no idea what you're talking about. See
materialization.
aa^way: either way, I don't like embedded content
MikeSeth's comment that his "[users]" was incorrect, was
wrong
works
*flamewar.
What in the world is going on.
Watch your language.
the usual.
kuja, my bad
IE doesnt support this, 6.0 =\ ill think i wont do it like
that then
aa^way: "Don't do it, then"
I'd just be wary of the information MikeSeth gives you, as
he's been proven wrong once
about allowable characters in table names in MySQL
Stop it.
Wolfpaws, stop what?
Trolling.
The attitude.
he's trolling now?
I am not trolling, I am stating facts
I will leave the issue alone if needed, but it was not
trolling
god bless the killfile
Okay, just leave it alone. That will make everyone
happy.
and, someone explain this retard that MySQL's idea of table
names is filesystem file names.
No insulting :P
Keep your personal conflicts out pf here.
okay, s/retard/confused amateur/
That goes for you as well.
JPG VS PNG VS GIF, looking for speed, suggestions?
wait, I get called a retard and I dropped the issue, yet
you're still criticizing me
?
aa^way: What speed?
Wolfpaws, and Kuj
loading speed when browser renders
aa^way: That's called "filesize"
alright :p
I've killfiled him long ago
aa^way: The three are different formats suitable for different
things.
hi all. Does it makes sense to use some generators
(PHP_ParserGenerator?) if I want to parse some text (owl syntax)
and generate a tree-like structure(probably xml)? Or it is easier
to write own parser? Sorry I'm new to php (more familiar with
java)
im oldschool, so i say, if you can do it yourself, just do
it
Writing a small parser wouldn't be a bad idea at all.
nothing wrong with generating a parser
that's what FSMs are for
thanks guys I think I will try this generator first. But I
couldn't find any tutorials/examples for such a generator. Can you
probably help me there too?
I can point you to a Ruby toolset. I don't normally do this kind
of stuff in PHP
Syntax, CodeRay, Ultraviolet? :P
I will hurt you!
die. Time to go write more tests for EventDispatcher
the activity in thinktank is precisely why channels should
have operators in them at all times..
unfortunately it should be php. thanks for your help
This one has operators in it most of the time
yeah, ive noticed, but what about the sisterchannel
you can always give a shout at freenode-social
Who's spamming there?
guess?
who have we just had problems with in here?
poutine?
...
bingo
Great.
I'm currious on how to use multiple servers with the
memcached extension. When adding like 5 servers with addServer(),
will it always try the first one, then the second and so on when
getting a value? This would cause a high load on the first one so I
think I'm missing something here. Anyone who can shed some light on
this?
Is it possible to setFetchMode for all statements as
default?
How can I check if any item of an array is matched on a string?
Any ready function for it?
value or key?
value
id assume array_walk is as close to a premade function there
is.. might be mistaken tho
php.net/in-array
Possibly preg_grep() if you need regexp.
tnx
in which case, also read php.net/preg-grep
Hi, imagine the link "site.php?id=1$action=add" ... then on this
page i have another link with "&buy=true"... how can i add it
to the current link? (sorry about my english)
PDO fetches data into assoc and numeric arrays both as
default.
in_array wont work: like: $arr=(a,b,c,d); $str =
"bdefrsasxa";
I want PDO to fetch data into assoc arrays as default but for
all statements.
Is it possible?
sorry to bother your again. are you there?
noone here, who has used multiple memcached servers with
php?
apparently, yes.
not I, I use load balancing and custom php extensions with
python applications for webserver synchronization :P
Hi, imagine the link "site.php?id=1$action=add" ... then on this
page i have another link with "&buy=true"... how can i add it
to the current link? (sorry about my english)
thanks ok now im testing locally. this is the code http://pastebin.ca/572053. im
making some progress. im able to check whether the category
attribute is present or not. but the problem is that it doesnt
execute further when its not. i get "Fatal error: Call to a member
function hasAttribute() on a non-object in oyetest.php"
mind explaining your setup to me? I'm currently thinking
about different loadbalancing strategies
if it's null, don't call methods on it
you should use a full fledged URL generation, not incremental
hacks over current request URI
yes i understand that, but the problem is that the foreach is
looping through the whole List
this is how im using the if-else http://pastebin.ca/572065 note the
else block
why is there an empty item in the list?
but still i get the same error
You around?
there is no empty item
block
if i have multiple forms that action to the same page how do
i check which one it came from? form name="useful?"
MikeSeth BMCouto: you should use a full fledged URL
generation, not incremental hacks over current request URI
so i have to generate the url again?
cant i just increment the var to the current url?
i mean, is there any point to the name field of a
form?
skip over it
you CAN. You shouldn't.
why is that? and how to do it?
how to skip the remianing list ?
because as you add more and more pages, you will have to add
more and more hacks and track parameters passed to each script
individually
you can break() out of foreach
im still inside the foreach loop
ohh yeah :p
you can also continue()
if you need to skip a step that is
how about sleep() ?
ok, but anyway how can i add it to the current url?
thanks. ill break out and use the same code without the category
lines
see $_SERVER['REQUEST_URI']
ok tks
how do you check for the name field of a form?
You can't, it doesn't get sent in the request.
if $form[name] -- perhaps
oh wait, i misread that completely
It's the key of $_POST, $_GET etc.
What's faster - one field varchar as index (example value:
"15_5") or 2 fields INT as 1 index?
oh, $_POST['???']?
hey but the break just gets me out of the if loop and not the
foreach
how do i get that
that works for post forms yes
Using separators in a database column leads to the darkside,
use the second option.
what goes inside $_POST['whatgoesinhere?']
$_POST["doodle"] = "Whatever you typed in the boxen"
basically
If the field is called 'username' and someone types 'cheese' in
it then $_POST['username'] will = cheese
http://pastebin.ca/572078 is how i
used break
thats for fields
The form name isn't sent in the request.
oh okay.. figured. the form name is... essentially useless
for php purposes then
I wasnt really looking at your code all along
also, you can do break(2) to break into higher levels
and only used for HTML parsing ?
ohh
its in the manual sir
indeed, you use form names for html/javascript purposes
anyways, thanks markL, nexilus
and other client-side scripting
ahh right
can you please see my last code
i even tried break(3) but it doesnt work
*
i must say, php seems to have the best channels for help,
even though php also has the most comprehensive site for
information on syntaxes/functions
wonder why thats the case
your damn right
|| why doesnt he execute the onClick statment?
but if the link is "#" it already execute
i mean if every language had its equivalent of www.php.net ..
nobody would ever need help rly, unless for very advanced
topics
I was just asked for the name of the function that takes a
folder and outputs a gallery with thumbs for it. -_-
... function...?
i mean php is quite complete in escence.. but thats just
rediculous
Yeah. Function.
don't use javascript in onclick and try return smth (url ?) at
end of js code
It's not the worst thing I've heared so far.
"I've often heared of phpBB and now I wanted my own forum... but
phpbb() doesn't work, what's the function for it?"
sorry i didnt understood whats your point
(Really!)
Another question - If I put COUNT(ID) inside a query which
returns X records, will be count(ID) executed X times or only 1
time?
i do recall someone asking about how to make fractals/complex
drawing with php once
I have no idea. Never ever use non-English words for
function/variable names. Never ever write comments in
non-English
Must only be available in PHP6
COUNT() is an aggregate function. The answer depends on
grouping.
try onClick='mostraPedido(); return false'
no I won't.
I told him to use Google... Then he shouted that if I didn't
know PHP, I should GTFO.
nice nick btw
hmm... once again, rediculous people should think before they
ask
Instead of harassing him.
heh
wolnystrzelec MikeSeth : try onClick='mostraPedido(); return
false'
sorry bad letter and tab
I want to count amount of records (but without LIMIT) so it's
probably impossible.
My response was simple.
that was for me right?
yep
/kb stupiduser
The poutine thingy?
why return false?
what?
oh re @ "nice nick"?
Arf. Wrong user.
SlashLife as ive stated in anothe php channel a while back, my
uniform reply to stupidity is basically /ignore
You can both select X records using LIMIT and get the total
number of records (as if there was no limit) in one query
For example, SELECT SQL_CALC_FOUND ROWS * FROM table LIMIT 5
that will select 5 records and the total number of records
s/FOUND ROWS/FOUND_ROWS
My uniform reply to stupidity combined with ignorance and
arrogance is a simple but effective kickban.
but WHERE will be considered?
given that you have the authoritae to do so, i concur
Yeah, it will execute as normal, you'll just get an extra result
containing the total
Search
http://dev.mysql.com/doc/refman/4.1/en/information-functions.html
for SQL_CALC_FOUND_ROWS for examples
Does SQLite support this function?
I doubt it
That's why DB wrappers suck.
You get the disadvantages of all and the advantages of none.
0 pm. Gotta find something for
i have a form that popups another window on submit, and self
closes properly when the popup form page is submitted. question,
how would i autosubmit some form data so it gets sent back?
ui have a form that popups another window on submit, and self
closes properly when the popup form page is submitted. question,
how would i autosubmit some form data so it gets sent
back?/u
!tell palche about away
hey, is there a way to catpure screenshot from a SWF movie
with php script?
If you automate "firefox" and "import"... yes.
what do you mean?
Lumpy^: He means running Firefox and using the `import` command
to take a screenshot of the browser.
What do you call the thing when you do
$var = END
bla bla bla
END;
heredoc.
Ah, great. much thanks kuja
You're welcome.
This is explained at php.net/types.string
ah, thanks!
np
Is 'type' in $_FILES['xx'] something that can be
trusted?
Nothing that comes from user can be trusted.
So that's supplied by the browser and not apache or PHP?
yes
Thank you
god damnit wtf are my users doing
papists
...
?
dont ask me. I have no idea.
What the heck is that, anyways?
audit trail log from my agavi accounting application
I dont know why anyone would write 'zombies' in the requirements
field and THEN change it to 'papists'
hahahaha!
hehe
is this the right place to ask about adodb usage?
I'm trying to work out if an AutoExecute() command can update a
timestamp with CURRENT_TIMESTAMP or if i need to do that
manually
i think here is not for apps
not sure
Yes, this is the wrong place to ask.
I know there is a way to create temp files, but can I create
html or .txt files in PHP? Looking through the manual and I don't
believe I can, but just wanted to ask to be certain.
is there a better place?
Their support page
A file is just a file, you can write what you like to
it.
Couldn't you just try it?
yeah, but before i can write to it, i have to create it,
right?
Yeah, but PHP just creates files, not files of a certain
'type' ..
i see. well, i was looking at tmpfile because i thought that
might work, but i see now that it deletes the file after the script
is done.
See fopen(), file_put_contents(), fputs() etc etc
ahh, thank you MarkL.
if you looked at files, you can't have missed those functions
tbh
i didn't miss them.
i was looking for something with the definition of "creates
files".
When doing exit; in a functoin, it exists the fucntion, not the
PHP doc right?
then came across tempfile
exits *
"exit Output a message and terminate the current script"
From the manual page ...
You want return;
well, I want it so if it goes to a certain point I don't want to
execute the rest of the function anymore.
so I do return false; return; ?
(if I want to return a false)
return false;
so if I do return false; it'll exit the functoin? ah
Yes
thank you MarkL.
its funny, function foo () { print "bar"; return true and foo();
} echo foo(); - in this exmple, the return will not exit the
function, and it will continue to the foo() part
s/its/thats
anyone had difficulties with using PHP with IIS and Vista?
i've been following some instructions I found via Google
no one is that stupid :X
hahaha
well I am! :P
it's not the actual deployment
i just want it local for testing
What tells php where to look for .ini file or can it be that
php is running on my server without a php.ini file?
so I guess that'd be it, i'm stupid for attempting it and
should tidy my own mess
fair enough....
A phpinfo() page will tell you where it's looking for it
Hmm, not sure what I'm doing wrong with this heredoc.
http://drop.us.to/351
MarkL, thanks
tags around the PHP code
uhh sorry they're there, I omitted them for the sake of
simplicity
Sorry, got an element, need to get basename of it, as elem is
"users/puz/yo.jpg", basename(elem) doesnt change anything?
what version of php are you running
josh[n00b]: PHP 5.0.2 or soemthing, the latest of xampp
hmmm
let me phpinfo
No idea. it looks right :-/
PHP Version 5.2.1
should work then, since heredoc was in php4
aa^way: basename() doesn't change anything, it just returns
the basename, so echo basename('foo/bar/whatever.jpg')
exactly.
yep i know
$file = basename($file); echo($file); still /user/puz/a.jpg, but
echo(basename($file)) shows right =(
any idea why a code won't work on linux but it does on
windows
Maybe it has someting to do with this?
http://drop.us.to/352
all the necessary libraries are enabled on both hosts?
Ah, I think I resolved it./
bad coding practice with arrays. Thanks for your help
josh[n00b]
aa^way: You are doing something else wrong, $file =
basename($file); echo($file); works fine ..
http://bozi.rootservers.org/vbox/
- the linux host - not working
http://lorddoskias.silenthate.com/vbox/
- the windows one - working
http://vbox7.com/play:ed573be0
you can try with this url for example
You have an 'Unexpected T_OBJECT_OPERATOR' error
What is line 62 of server.php? You might have PHP version
problems
Sorry, vbox.server.php line 62
$file =
$file-getElementsByTagName('url')-item(0)-nodeValue;
Ah, method chaining
when using the vbox type this code shouldn't even be
executed
hospitalchan.ludost.net/vboxclip4edl.rar
here is the complete code
using date('d.m.Y');, it's showing 2017-06-20
where does PHP looks for the date? in my computer? but my
date/time is correct...
E-vens: On the server (of course)
I am the server
The windows server uses PHP 5.2.1, i'll bet the unix server
is using PHP4 ?
And if it shows you 2017-06-20 for 'd.m.Y', you've seriously
f***ed up something.
so, now I tried date('m.d.Y');, and now I get Incorrect date
value: '06.17.2007' for column 'data' at row 1
http://bozi.rootservers.org/info.php
MarkL yep
Right. Method chaining is only in PHP5
E-vens: Err... "column"?
..?
MarkL so how should i rewrite my code
yes?
E-vens: Get your act together, formulate the _real_ question and
try again.
Break $file =
$file-getElementsByTagName('url')-item(0)-nodeValue; into separate
commands.
MarkL something liek $test = $file-getElementsByTagName('url')
and then $test-item(0)-nodeValue;
That's the idea
Because I'm not going to _GUESS_ where you're using MySQL,
where you're using date() and how they are connected.
ok
gonna try now
$file = $file-getElementsByTagName('url');
$file = $file-item(0)-nodeValue;
MarkL like this?
Try it
If I use date('d.m.Y') I get ...2017-06-20..., and using
date('m.d.Y') I get ...Incorrect date value: '06.17.2007' for
column 'data' at row 1... The question is, how I set the date to
06.17.2007 without errors.
you first statement says you are getting an array result and
you are putting it in a avariable that later using as object
resource
Wrong date format, still no mentioning of MySQL, no queries,
no code, no nothing.
sorry, adding elements to array by elem[] = "content" and
later doing $s = shuffle(elem); the s will be "TRUE" ? what is
that? shouldnt it return array of shuffled elems..
$sqlinserir = mysql_query("INSERT INTO tb_mural (id_mensagem,
nome, mensagem, data, hora) VALUES (NULL, '$nome', '$mensagem',
'$data', '$hora')");
And MySQL wants Y-m-d
$data = date('m.d.Y');
See? That makes a lot more sense.
Any MySQL still wants Y-m-d.
$location = './'; Is that for linux or windows ?
Either
or both ?
thanks
And d.m.Y will *NEVER* give you 2017-06-20
yes it giving this error :P
I did what you said but d-m-Y, but I keep receiving this Incorrect
date value: '17-06-2007' for column 'data' at row 1
...
And MySQL wants Y-m-d
^^^^^
Oh, no, wait. People who can't read are nice.
Unless you have to communicate with them using a written
medium.
d-m-Y
how can I do that?
E-vens: No, you don't
(No, E-vens, this is no invitation to call me.)
MySQL needs Y-m-d
oh
are nice ~ can be nice
Whatever. Gotta type some code. :
ok, thx
Err... I'm not talking about code for you.
-_-
I knew that
Unless you need C++ IRC login code.
what is the simplest way to just run an external binary and get
it's exit status?
exec()
"If the return_var argument is present along with the output
argument, then the return status of the executed command will be
written to this variable."
Must I use PDOStatement-setFetchMode() before each fetching
data if I want to get only ASSOC arrays?
probably
No one thought about it creating PDO.
Nothing is stopping you from defining a wrapper function for
it.
No, I don't want any wrappers. Simply :: lack of
PDO-defaultFetchMode()
hey
i have a question
now im learning about php ( step echo )
so i just want to check if im right
'' this type of quote allows you to put text and like directions
for example 'php is cool ';
and this "" only text?
p1ls, directions?!
i mean things youi want it to do
What's a direction?
Variables are not interpolated insode single quotes. So echo
'hello $name'; will literally echo that
But echo "hello $name" will echo hello fred, for example
so whats the difference
The difference is that variables are not interpolated inside
single quotes.
The difference is what I just said above
aight
ill get it sometime
Does destroying $stmt cursor in PDO free results? Do I need
to type closeCursor() before?
e.g. unset($stmt) or $stmt=null; - I'd like to be sure of
that.
Generally everything is freed when your script ends.
And since your script is only running for 1-2 seconds, you need
not worry.
hello. I have a strange problem. Suddenly sessions won't
work. I have $_SESSION['s_username'] = $inp_username; and use
header("Location: default.php"); and the sessions aren't tranfered
from index.php to default.php (of course I use
session_start())
salah, and of course you're using session_start() in both
scripts, right?
garotosopa, yes
salah, is the browser accepting cookies?
you don't need cookies for sessions
..
you use a free host?
By 'Suddenly' do you mean you havn't changed/edited anything
at all, they just don't work now ?
garotosopa, yes, I use firefox 2.0.0.3 with default values
MarkL, yes
frank9999, so disable it and see if it works, without the
trans_sid thing in the url.
Cookies are what are used to store the session IDs
whats the difference between remoteip and remote_addr?
rook2pawn, where did you see remoteip?
Does a simple stand alone test like http://pastebin.ca/572322 work
ok
$_SESSION['remoteip'] and $_SERVER ['REMOTE_ADDR']
I have to use closeCursor before next query; if It will work
with destroying $stmt only, the result is probably
freed
I'd never heard of that...
The $_SESSION is user defined, it contains what you've told it
to
ah, how do i get the ip?
$_SERVER ['REMOTE_ADDR']
But it's unreliable
hello
unreliable? it might not be the user's ip, but it's
definitely the ip of the "user" that got to you, or I'm missing
something?
i've got a question about destructor in php5
how does php5 manages garbage collection?
Nope. It might not be the ip of the user, and it might change
on every request.
MarkL, yes, then probably my script is wrong
Yup
hi, can i start an encrypted php-site with zen-optimizer from
console?
i'll find out what's wrong. thanks a lot
But nothings changed right? 'Suddenly' ...
MarkL, whose is the ip from when it's not from the user's
network?
MarkL, nothing is changed, I haven't been changing anything
for weeks.. but I was drunk yesterday so that might be the
problem
heh, that will be it
That's the point, you can never be 100% sure ..
Proxies
I've install imagemagick/magickwand extension for php, added
extension=magickwand.so to php.ini, and i can't call to magickwand
function from php, did i miss anything?
Usually this isn't important. If you user wants to be
anonymous, that's their decision.
proxies are part of the user network imo
indeed.
The proxy server doesn't have to be on the user's network.
The point is to use someone else's network.
hi all, am just learning PHP but i pass a string to a
function and in the function I have the line "$str[0] =
strtoupper(str[0]);" and when i run it it says "unexpected '['" in
that line
sysctlx, I've never heard of this extension but did you
restart the webserver after editting php.ini? also did you edit the
right one? see in phpinfo(); what the correct path for it
is.
See ucfirst()
That's http://php.net/ucfirst
3 PM", is there any kind of time functions for
MarkL, thank you
kuja, I meant if it's not mine, it's their network. if the
user is changing the proxy to one in another country just to mess
things up, np, it's still right the REMOTE_ADDR imo.
What about round robin dns servers that some ISP's use, a
different IP on every request is possible then
One client could be representing itself in 500 different ways
to the server.
garotosopa, thnx i figured i may haven't edited the right
php.ini when i asked the question... indeed it was another
ini
MarkL, i see that one as much easier but why do you think my
original line had an unexpected '['
Does that mean it's 500 different users, or still 1
user?
MarkL, isn't it the right remote_addr anyway? wasn't it the IP
address that got to you?
You had str[0] instead of $str[0]
when using Memcache::set() right after Memcache::flush(), the
entry set by Memcache::set() will also be invalidated although the
flush was already done before the set(). I think this is bogus,
isn't it?
It 'might' be, but what use is it to you anyway ?
MarkL, thanks again, one day i will get used to the $
I could increase a website's unique hit tracker by 5000
unique hits single-handedly. But am I 5000 unique people in
one?
That's why X-Forwarded-For exists.
MarkL, kuja, have no idea.
kuja, actually I could use a proxy here in my own box and spoof
the x forwarded for without even knowing about it.
You can do that, but HTTP proxies are usually nice about it
:P
$res=null; is the same as unset($null), right?
No
So does $res exist?
after $res=null;?
How do i create 10 random numbers of which none are the
same?
No
I noticed something funny...mime_content_type() is deprecated
in favor of the Fileinfo PECL extension...which isn't in a release
yet?
So what is the difference between setting to null and
unsetting?
See rand() and/or array_rand()
Subtle differences, like $foo = null; uses less memory than
unset(), unsetting session/array vars etc.
The effect is usually the same but they are not identical
So $res=null; is better for destroying PDO result?
If you read the user comments at php.net/unset you'll see the
differences
Okay
!tell SettlerX about unset
What do you mean not in a release? http://pecl.php.net/package/fileinfo
?
!tell me about PDO
oh, i was only looking at the php.net doc
i guess i have to actually install it
That's where I looked too
lol
'(No version information available, might be only in CVS)' was
what got me
Where does it say that?
http://us3.php.net/manual/en/function.mime-content-type.php
Right there...
Er, whoops
http://us3.php.net/manual/en/function.finfo-open.php
I mean _there_
And what led you to that page?
You must have passed through http://us3.php.net/manual/en/ref.fileinfo.php
first?
The page for mime_content_type says it is deprecated, use the
_Fileinfo_ extension
Anyway, never mind ..
but, yes, i didn't notice I had to install it first
MarkL, the comment was written in 2005
And?
I will use NULL - probably faster and better.
I have a php script, which works locally (apache2, php4.4)
but gives me an error "client stopped connection before rvputs
completed" on the remote server (apache 1, php4.3) .. google doesn'
say much about that error..
this is driving me crazy..
people in #apache seem to think that's a php error..
I'd agree
What is the script doing that causes this? A file upload, some
sort of lop etc ?
$stmt object is probably always created from the beginning
after query() method in PDO (even if it exists), right?
MarkL, yeah, a big loop doing database (mysql) stuff
Sounds like it's an infinite loop
ah, no.. works fine locally ..
Sounds like it's an infinite loop on the server
If PDO-Query return no rows, will be it false or
something?
we'll see .. I'm re-re-re-running the script .. it does part
of the job everytime..
so I'll just keep running it till the job is completely
done
Who is best? Anyone wanna test this PHP and JS mix :P? http://nero.pri.ee/erti/aron/test.php
press link and solve the puzzle, im 35 secs heh
-query returns a result set
and no way for checking if it has some rows?
without buffering of course
"no comments", "no news", etc. are often used
See http://php.net/manual/en/function.PDOStatement-rowCount.php
MarkL, thanks for your help
is it possible to send a POST request to a form by php
means?
I've got a script that works differently on Windows (Apache
2.2, PHP 5) than on Debian Linux (Apache 2.2, PHP 5). It's using
array_merge and array_unique a lot, and loops over some stuff from
a file it reads in. What could be different? Nothing in PHP could
behave differently, right? It's gotta be the file, like linebreaks
maybe?
Yep
See http://dodds.net/~cardinal/sendtohost.txt
or php.net/curl
thanx
What's the difference?
Hold on...
i have used the xml_into_struct function and some extra code to
pack the xml into a nice object, now when rendering it i have a bit
of a problem
what's the best way to render a linked list ? ( get all
children)
is recursion necessary here ?
MarkL, it skips some elements from an array when looping or
something like that
Everything isn't there that needs to be there, in the end
I don't know exactly what happens
You'll probably need to echo/var_dump at various points to see
what's happening
hey
Yes
Doing that
what is the difference from ' and "?
zabin, ' doesn't parse variables inside the string
so you mean that '$time' will just print $time
exactly
what about for assigning my book seems to mix them both
Your book? Assigning what?
like $time = "tuesday" and $time = 'tuesday'
Doesn't matter in that case
k
branstrom thanks.
single quotes are some nanoseconds faster, perhaps, because
of not even looking for variables to parse
But always use single quotes in that case
k
http://blog.libssh2.org/index.php?/archives/28-How-long-is-a-piece-of-string.html
is worth a read too
the samething as setting the form action to the same page that
you are on/
what does $_SERVER[PHP_SELF[ do?
is there any client side php script methodology ?
Use the manual
http://php.net/manual/en/reserved.variables.php#reserved.variables.server
http://phail.org/paste/?show=1
i was right though.
thanks thats a good reference guide
You mean apart from the PHP CLI ?
Cotton-swab: What about it?
My pastebin isn't working
!+doesn't work
Look buddy, doesn't work is a strong statement. Does it sit on
the couch all day? Does it want more money? Is it on IRC all the
time? Please be specific! Examples of what doesn't work tend to
help too. Finally, showing us the code is helpful (after you've
explained your problem). /msg php-bot pastebin for more
information
haha
Cotton-swab: Can't you just use highlight_file() anyway
?
can you give it a try
?
Cotton-swab: You need to know why it doesn't work, so add
some error reporting to it
php-bot is the dadddy
woof?
I know what isn't working, I just don't know why it isn't
working
right at the very top, before the HTML
$CONF['this_script']='/paste/index.php';
I tried
no errors reported
Cotton-swab: Yeah, you need to see the errors/warnings so
you'll then know what's wrong
Cotton-swab: display_error On too ?
*errors
php thinks nothing is wrong, it ignores
$CONF['this_script']='/paste/index.php';
the is the dir the script it in
when navigating an object using $this-var would it not work
if i used $this-$var?
Hey im having a problem with my connection file
does someone know if the classes from phpclasses.org are ok ?
because the strange subscription system
i have a database stored on a different computer that what my
php scripts are running from
im my connection file i have $con =
mysql_connect("192.168.1.152","root","password");
192.168.1.152 is the ip address of the computer that the database
is stored on
$this-$var is a variable property, not a normal property
hmmm
what report engine do u guys use??
Cotton-swab: I'm not sure what http://phail.org/paste/?show=1
is supposed to be showing/telling me .. I see no mention of $CONF
..
it is supposed to show you what you just pasted
The MySQL server on that other computer must allow remote
clients to connect.
Cotton-swab: But I didn't paste anything, I just went to the
url you pasted ..
shouldnt it work locally?
ohhhhh
I got it
but thanks
in it ..
yea
that's a code I made
hi there
can anyone help me understanding something ?
Doubt it, but try anyways.
If both the client connecting to MySQL and the MySQL server are
local to each other, it will work locally using localhost or
127.0.0.1 most likely.
well i'm using send sudio for php editing .... and i want to do
a litle framework on what i need... but the problem is that i
dont't know how to make zend studio to return me the methods of
another class .... http://rafb.net/p/xs3u5w90.html
This isn't Zend support channel.
is php related
i haven't finnished
well if you watch on line 17 of my paste ( http://rafb.net/p/xs3u5w90.html
) that method ( GetLoaderErr() ) should return me error() method of
the "error" class but it doesn't
any phing experts? I'm trying to see how to apply a filterchain
with ReplaceTokens to a file
ask on #zend channel
is invalid and it doesn't return the method, it reutns the
return value from the method
You only ever call error::error() when you initialize ..
that's the only time an error would be set, but as the method
doesn't return anything anyway ..
!tell deuce868 about g10
yeah .... but it should show me the something (methods of the
error class) btw the should be
$this-GetLoaderErr()-error();
no
why not
?
what do i do wrong?
$this-err = error::error(); doesn't make the error::error()
method available in $this-err, it assigns the return value from
error::error() to $this-err
hi
not even $this-err = new error(); doesn't do that
hi adfgsdf
Yes, that will create an instance of error
$GetLoaderErr() should return $this-err-error();
Then echo $this-GetLoaderErr(); will display the error
is there a function in php or mysql that will change a string
like 3k\"ÝÆí~»Ü:Ó_ì
Ù¹Ù5%u ½DÏ®T÷N into
0x9ad39f1ac4428dbeeb2727ac3edd37e6bb88d7cbac60d9b1779b111b7fcb6b92
?
Change it into what?
oh, nm
well it does'n do "method hinting"... there are two function
.... i wonder what would i do whel i'll have 30 or 40 ?...
really
Well that's a Zend issue PHP doesn't care about Zend.
In the editor sense anyway ..
Just get the PHP right and Zend should take care of itself.
Maybe that's something php.net/unpack can handle?
If you, as a complete PHP gnub, could only get one PHP book,
what would it be?
The Da Vinci Code
i foun'd somethin on their site
?
As a gnub? I hear http://www.sitepoint.com/books/phpmysql1/
is pretty good
right
are any of you good with php-cgi?
No, we all suck
lol
im trying to start an fcgi process
and it runs, but it doesnt work
No, we all suck
lol!
doing telnet 127.0.0.1 8888 doesnt work
.
One of the many things I hate in this world is the phrase
"doesn't work"
ok
connection refused
Much better.
Now we know the actual problem.
Tried port 8000 ? Or have you configured it to be 8888
?
netstat -an *shrug*
i started i on port 8888
*it
even on a different port
netstat doesnt show it listening
All that tells you is that it isn't starting. Check the log
files and see if it says why?
hmmm
but the process is still running
is there any way for testing php+html+js??
Running but not listening?
non-interactive methods i mean
wamp or xampp
where are the logs located?
ie. file name
the default one
lol
No idea. /var/log is a good bet though, should be a config
option too somewhere
(xampp, wamp) linux or win?
wamp is windows
xampp is both i think
the logs are kept into [xampp root]\apache\logs ... if want
the web logs
oh
im looking for the php-cgi logs in linux
oh....
see your php ini what sais ....
it may be possible that you haven't set it
if I have a mysql table with two columns - variable and value -
how can I get the data, then put each value into a variable so that
mysqlreturnarray['variablename'] will equal value?
See php.net/mysql_fetch_assoc
MarkL, that will cause mysqlreturnarray[1]['rowname'] = some
value
see if the variablename is in a cell and not a field name
mysql_fetch_assoc doesn't help me
I want to make a site that is "virtually mytown". with news,
weather, and classified ads. any recommendations for a
CMS?
i suppose you want $first_array_var =
$value['second_array_var'].. to define text from first array as
variables...
are pear questions answered here?
alecs, right but I want it done automatically as there might
be lots of variabels
ok
let me see something
try to array_flip() the first array ....
getName()); in php?
evenin all -
hey krisp question
getName()); in php?
and have the getName function return the value?
you only need the name of the function in order to call
it
so just leave off the parenthesis
?
alecs, that won't work either - see I have something like
array['variable']="foo" and array['value']="bar" and I'll want a
variable called foo containing the value bar
how does the chmod and fileperms functions work on
windows?
i think you want to use call_user_func()
call_user_func_array()
!!!!!!!!!!!!!!!!!!
faked?
windows use ACL
yeah, I want to know how it is faked
it can't be emulated by chmod i believe
to be technical, windows uses both filemodes and acl
win 98 only got filemodes
sweet thanks elijak
but I want to know exactly what is faked
I have something like array['variable']="foo" and
array['value']="bar" and I'll want a variable called foo containing
the value bar
if I have some data in a variable, lets say "foo", how can I
make another variable with that name?
${$array['variable']} = $array['value'];
Except... this is really nasty and bad code.
wtf
what are you tring to do
you cant make two variables with the same name. an array will store
many values inside keys, but its not the same as making 2 variables
with the same name on the same scope.
idan, no, see I have some results from a mysql table that has 2
columns - variable and value . I want to, for each row ( I know how
to do a foreach loop yes) take the variable name $array['variable']
and put the data in it $array['value']
how do I find what c file a php internal function is implemented
in?