logs archiveIRC Archive / Freenode / #php / 2006 / February / 3 / 1
aidan
should I buy a 3Ware hardware RAID-1 card, or just use software
shale
we use 3ware cards in all our servers
aidan
shale: do you think it's worth it over the software mirroring?
GarethAdams
hmm
I type /j ##php, and I get a message from ChanServe: Hi! We've moved to an "about" channel,... You should join ##php directly from now on.
aidan
GarethAdams: yeh, that's normal
Stormchaser
That's what it's supposed to do
BlackShuck
Hi, anyone know if there are any open source tools to create a PHP form from a MySQL .SQL file?
||cw
weird, but normal
GarethAdams
heh
         

aidan
BlackShuck: db_dataobject
BlackShuck
I want a quick and dirty way to create a page to add DB entries..
aidan
BlackShuck: PEAR, pear.php.net
itrebal
what is the theory behind having every item in a database be an object?
GarethAdams
BlackShuck: Ruby on Rails ;)
lig
(Action) waves Good Evening to Stormchaser
aidan
itrebal: just makes it easy to update things, you update an object, it updates the database
itrebal
aidan: is it actually effective?
BlackShuck
Is PEAR something I need to install on the sever? If so, it's no good, as it's not my server...
aidan
I've not used it before, so I shouldn't comment
BlackShuck: nope, pear is just a bunch of scripts, it's probably already on your server
itrebal
aidan: any examples of it?
aidan
itrebal: I'm still looking for a good example, if you find one let me know :P
itrebal
aidan: will do
BlackShuck
hmm, looking at the docs for db_dataobject, it seems to be the wrong thing. " Builds SQL statements based on the objects vars and the builder methods." I want to supply a SQL and it generate a PHP page
noflux
how can I delete an elment out of an array? IE array("one", "two", "three"); I want to delete "two" so now the array contains only "one" and "three"
Stormchaser
hi, lig! :)
aidan
noflux: you can array_flip and unset(array['two'])
noflux
I'm trying array_splice($array, $i, 1); where $i is the position of the elmenet I want to delete, but its not working correctly
aidan
noflux: or you can array_search and unset
BlackShuck
this may do the trick, unless someone knows anything better... http://sourceforge.net/project/showfiles.php?group_id=110745
         

noflux
aidan: if I did unset $array[$key_name]; that would totally remove the element from the array?
aidan
yes
noflux
its a KEY based array
sweeet thanks
GarethAdams
aidan: array_flip isn't a good idea
if 2 elements have the same value
maestrotech
hello people, has anyone ever used docbook ?
I was wondering if there is a php toolbox/class/function that will allow me to directly parse Docbook XML.
berenguer
hello all!
voidy
does jpeg need to be enabled in apache as a module or something?
hash_this
voidy: what is the problem
berenguer
i'm trying to document my source files with doxygen, it dosen't work
voidy
i'm having no luck.. php-gd says it's enabling it ok, and it all says it's ok, but phpinfo() still has no jpeg listed in the gd section
the only instances of 'jpeg' on the phpinfo page are actually in the configure string at the top
hash_this
voidy: I think I recall gd needing an external library for jpeg support
voidy: let me glance at the gd faq for a second here
voidy: did you compile your own setup?
... regardless, the gd faq specifies common setup issues: http://www.boutell.com/gd/faq.html
berenguer
ok, someone knows an irc channel for doxygen?
syl-2
hi plz what's the syntax to access an array in a template using an index from a function
using MyArray[ $MyObj->GetIndex ] i get "unidentified token" error
oops, i meant $MyObj->GetIndex()
aidan
syl-2: php doesn't support native templates, so I don't know what you are talking about
roboo
hi..
when i use a function like " doit($bla); can i get "$bla" variable's name in function ?
||cw
no, why do you need to?
roboo
i want to debug some lines..
and i want to write a function to show values like
$var=value
otherwise i need to add line like " echo "\$var=".$var."<br>"; "
i want to add this line easier :s
like
s($var)
kombi__
is there a way to prevent declaring a class twice? something like: if not already declared, include "foo.class.php"?
||cw
ah, yeah, you'd have to do s('var', $var
Julian|Work
kombi__, you can check if a class is defined.
||cw
kombi__: include_once
roboo
hmm
||cw
ALWAYS
Julian|Work
class_exists()
roboo
wow :)
Julian|Work
kombi__, you should structure your application so you don't have these problems though.
kombi__
||cw - Julian|Work: ;)
roboo
i can use class_exists too :P
||cw
kombi__: alwyas use include_once or require_once unless you know why you are not
Julian|Work
||cw, how do you figure that?
kombi__
Julian|Work: true, coudn't ommit it here
||cw
Julian|Work: it's very rare that someone really wants to include the same file more than once
and when they do have a reason to, well, they can
kombi__
what's the diff between include and require though?
Julian|Work
||cw, and therefore, they should make sure they don't. Not rely on PHP to fix their laziness with added overhead.
kombi__, the difference is what happens upon failure.
kombi__
I remember..
||cw
kombi__: require throws a fatal error if the files doens't exsist, even if the program logic doesn't use the file that time
kombi__
require breaks, include not, right?
Julian|Work
include() throws an E_WARNING I believe, require() kills the script.
kombi__
ok..
||cw
for instance, if($devmode){ include('debugging.php'); }
StarLeaf
Morning... I got a problem with histograms in Excel... anyone with skills or knows where to find someone with the skills?
Julian|Work
StarLeaf, what does that have to do with PHP?
||cw
if you are not in dev mode, you might not want debugging.php top be ont eh procudtion system, and so log devmode isn't enabled on the server, no problem
StarLeaf
Julian|Work: Not much, but there are lots of programmers in here and they IF anyone could possibly know the answer
||cw
!tell StarLeaf about g8
Julian|Work
Programmers don't necessarily have MS Excel skills.. I'd try somewhere more relevant./
||cw
excell is for poeple who are not programmers
StarLeaf
The more relevant the channels the more ignored I get...
||cw
try ms's news groups
StarLeaf
||cw: I disagree... but then again Universities uses a lot of weird things...
shale
anyone know the correct way to put a javascript <script src=> tag inside a php page?
kombi__
StarLeaf: nobody ignored you..;) we are just busy with other stuff here
Julian|Work
shale, echo
DeathCore
test
shale
Julian|Work.. that isn't working for me... i have echo "<script src=\"DynamicOptionList.js\"></script>"; but it isn't working... any ideas?
StarLeaf
kombi_: :) I usually have patience for it... but I haven't the time for it... I got almost 10 hours left until it should be done...
SunSparc
Shale: what is the output of that?
Julian|Work
shale, have you viewed the page source that's returned? PHP doesn't treat one string differently from another.
dexion
How do i set my pass and username for phpmyadmin ,I'm trying to view it on localhost as this box will be the server
kombi__
shale: what does html source look like?
StarLeaf
Sorry to go offtopic again, but doesn't ASP use Excel?
Julian|Work
Make sure output buffering or hidden errors aren't preventing the string from being echoed.
shale
SunSparc when i view source it just shows <script src="DynamicOptionList.js"></script>
Julian|Work
StarLeaf: ask #asp :P
StarLeaf
:P
SunSparc
shale: you should try specifing what type of script it is <script type="text/javascript" src="...
StarLeaf
It takes to much time to write /join ##asp
kombi__
shale: problem must be in js then
pacopacino
hello everyone
dexion
I'm on a linux box :P
Julian|Work
Hey pacopacino
StarLeaf
Julian|Work: Now that was a real dead end... :/
shale
SunSparc tried that, no worky
it works fine if i put the src tag in the <head>
but not outside??
||cw
dexion: we can't support phpmyadmin, they thier channel
Julian|Work
shale, #web or #javascript
shale, once PHP echoes the <script> tag to the browser, it's out of our hands.
shale
roger that, thanks
Julian|Work
Yup
dexion
ok thanks
pacopacino
i used a php form handler script to authenticate users by comparing a username to a password in an mysql table. my question is this: one they have successfully entered in their password, and they see the 'congratulations' page, how do i then re-direct them automatically the the content they were orinally looking for?
DeathCore
woot, i've actually for the first time in my life OPTIMIZED code by hand!
and my nose starts to hurt :S
rodenta
does anyone here use phpmailer
DeathCore
we don't support third party applications
ChrisCalip
hello folks
JohnnyC
Anyone can help me with ereg ?
http://pastebin.com/536121
||cw
pacopacino: javascript or a html META-refresh
ChrisCalip
I am trying to learn the pear DB package could use just a text file documentation where can i get one... i only see the HTML documentation: http://pear.php.net/manual/en/package.database.db.php
CryWolf
JohnnyC: use preg instead.
maestrotech
hello people, has anyone ever used docbook ?
I was wondering if there is a php toolbox/class/function that will allow me to directly parse Docbook XML.
pacopacino
||cw, since i dont know the first thing about java (other than how to use azerues) then i should probably use the meta html refresh.
JohnnyC
anyone know how can I get the first ocorrence with a ereg ? http://pastebin.com/536121 ?
Jymmm
I hate ordering stamps
||cw
pacopacino: javascript != java. if you are making website you almost have to know javascript
kumi|gone
hi all, I can't find any information in the manual about multiple installations of PHP on linux (there is info on that for windows, however)
can someone point me in the right direction ?
JohnnyC
kumi|gone: why do you want to install several PHP versions on same machine ?
maestrotech
inquiring minds want to know...
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 next »