@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 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



Comments:

<0> i actually downgraded php last night to fix a parse error
<0> and it worked
<1> what?!
<0> i know
<1> do show us the code
<0> apparently heredoc string parsing changed from php4 to 5
<0> ok
<0> actually first
<2> ok somebody could have just said str_replace(utf8_encode(''), 'a', $string)
<0> its a framework i have to learn for a project
<1> so your ENDHEREDOC; had spaces before?
<0> my friend is one of the developers
<0> still on php4
<0> no



<0> all i know i was getting one of the $end syntax errors
<0> i downgraded at his advice
<0> and it was gone
<1> do consider finding the bug
<0> this is the program: http://sourceforge.net/project/showfiles.php?group_id=95474&package_id=158002
<0> i would appreciate if someone could reconfirm before I do
<0> someone running php 5.1
<1> my mac came with 4.4.1 :)
<1> pastebin the file, or something
<0> its 1400 lines plus
<1> you aren't making this easy :)
<3> lol why do you think i am hesitant about trying to find the bug
<3> :)
<3> i wanna know its not jsut me before i go digging
<1> consider putting it somewhere to download so someone can lint check it
<3> you know what ill do
<3> let me switch back to php5
<3> and see if its still there
<1> i'm working on docs to install php on mac so will have 5.1.4 soon :)
<4> Anyway, lads.. I'll be back soonish. Farewell
<3> yeah it is still there
<3> philip: i will post the file to pastebin
<3> u may have tod ownload from the link above, cause i ams ure their are files included in this
<5> !tell jfarrell[a] about u
<1> heh
<6> itrebal: If that's the only problem you have with that sentence, then dude, ur my hero
<1> :)
<5> lol
<7> can someone help me with strange behaving apache/php set ? php scripts runs only when there is PHPINIDir variable set within Apache and ONLY when its path is wrong :o
<5> Pollita: unless php-bot is a grammer-bot :)
<7> Apache 2.2.2/Win32 + PHP 5.1.4
<5> (beyond 'u')
<8> Pollita It's spring time... any woodworking projects in mind?
<6> nah
<8> Pollita I ask because there is a parking lot sale coming up at HF in Newark
<1> Sol: where did you get php5apache2_2.dll?
<9> itrebal: I got my company to do it.
<9> As you can see by my awesome vhost.
<5> juliano: good for you, i dont have a company to get to do it :)
<9> Oh, well that's a good place to start.
<3> to anyone who wants to the error in heredoc string processing
<3> have at it: http://pastebin.com/738447
<3> Pollita: something you might be intersted in
<3> i am working with this framework
<3> and a parse error was occuring in php 5.1.4 - after some basic debugging i could not find the problem, my friend recommended i downgrade to php4.4
<9> jfarrell[a], there's a whole lot more than a heredoc there.
<3> and walla, no parse error
<3> Julian|Work: yes i know
<3> but i believe it is the heredoc that is the problem
<9> The only limitation I know is that the ending delimiter cannot be tabbed in.
<9> Needs to sit on the beginning of a new line.
<3> what i woudl liek is someone to confirm they are having the same problem
<3> Julian|Work: i know
<9> I can test on a bunch of versions.
<9> 4.3.8, 4.3.10, 4.3.11, 4.4.2, 5.0.1, 5.0.3, 5.1.2 <-
<3> for the record: THAT IS NOT MY CODE
<9> Which ones do you want me to try?
<8> liar



<3> Julian|Work: please do so
<10> Hi. I have a textbox that lets users add comments to articles. Some of them add too many <br />'s at the end. how can I remove all the <br />'s at the end?
<10> sort of a trim() but for <br /> :D
<9> jfarrell[a]: which versions?
<3> Julian|Work: the actual files for the project are here: http://sourceforge.net/project/showfiles.php?group_id=95474&package_id=158002
<3> in particular 4.4 and 5.1
<3> i must get some food and relax for a but
<3> *bit
<3> good hunting
<9> Eh, I can't just run this.
<9> Errors galore.
<3> yeah youll probably need the whole project, the link i sent to you
<3> just remember, i had no hand whatsoever in creating it
<3> i think its abomination
<9> And how do I reproduce the error?
<11> what function do you use to find the file type e.g. whether the file is bmp, jpg or gif?
<5> O.o i hate embeded ternaries.
<1> php -l
<1> Julian|Work: he just wants a lint check
<12> http://www.fundisom.com/phparadise/php/file_handling/strip_file_extension
<12> http://www.webdeveloper.com/forum/showthread.php?t=107088
<12> lilkid: Then you compare the extension string with your string array containing the file types you accept/want or whatever you want to do.
<13> jfarrell[a]: ok, it did work when i started the session on every page... i still don't quite understand why, since $_SESSION is labeled as global in scope, but, as long as it works
<12> lilkid: those are just examples, you should google for some other code, but that should give you a hint of how to strip the extension.
<1> lilkid: use the fileinfo() extension
<1> er, no () :)
<11> GuShH: ok thanks
<1> gymsmoke: scope of what?
<1> global in scope means $_SESSION is a superglobal meaning it's available in, for example, functions
<13> philip: global used to mean accessible across an entire application until the main{} function died
<8> !+globals
<14> [GLOBALS] There is $GLOBALS --> http://php.net/manual/en/reserved.variables.php#reserved.variables.globals or you might have meant Register Globals --> http://php.net/manual/en/security.globals.php
<1> but your example of x.php and y.php, those are two different applications
<8> and then there's pp.php
<11> philip: i only need the extension, it's not to check an upload script or anything it's just for an image thumbnail maker to determine the content type to send etc.
<1> lilkid: pathinfo() will tell you that
<11> philip: ok thanks
<15> am running a script into a loop, it's a php script, it works on first loops (3-10 iterations) and then, the php script does not respond and freezes, the paren loop freezes waiting for the php script to unfreeze and return to the parent loop, i would like to detect when the script freezes, ps give STAT=R and stay forever, it happens when server is swaping and the script does not get enough memory to run so it blocks there.
<16> Maybe someone can help me here. I'm running Linux and I'm trying to send some raw data (hex) to the serial port with PHP to control a servo board. How would I go about doing this?
<13> philip:ok, so the fact that x.php contains a form which posts to y.php takes y.php out of application scope from x.php ...
<13> eric4: with C
<5> eric4: you really shouldn't, you should use C or something similar
<10> can you make the argument of a function optional ?
<16> Well, could I execute a program with php that sends that data?
<13> philip:if that is true, then that's why the session array seems to 'lose' elements
<17> function foo(arg='');
<16> Is there a program that usually comes with Linux (I'm using Ubuntu) that I could execute from within PHP and send it that way?
<13> eric4: you could run a php script which gathers the data and outputs it to a file, which a c program could then read, but why not just setup an ipc program to gather the data and p*** it to the c code
<5> eric4: the point is, you shouldn't be using PHP to control hardware
<5> eric4: but if you really really really want to do it with PHP, you'd open a connection to /dev/whateveritis using fwrite/fread/fgets/etc
<16> Yes, but instead of writing a C program, isn't there a serial port controlling program that comes with Linux?
<5> probably - ##linux
<13> eric4: like serial?
<13> eric4: and all of those functions are part of the C library
<16> Hmm. Okay, thanks.
<13> eric4: so why not take advantage of them
<5> eric4: dont get me wrong, i think PHP is a great language, but for web based things - NOT for hardware interaction
<18> hey itrebal
<5> hey surf, whats up
<18> nm
<18> man you?
<16> Well the main reason I wanted to use PHP is because I'm trying to control a serial device from the web.
<18> eric php rules
<18> eric have you tryed the new talk and generate wizard? you tell it what you want it to do and it makes the code?
<19> I dont know how you'd go about gettting to a serial device
<18> its not out officially im a beta
<16> Does it work under Linux?
<18> erik yep
<19> I'd like to see that!
<16> Anyway, if I'm trying to control a serial device from a website, would PHP be logical to use, or should I try and execute a program that does that?
<19> trey and execute a program
<20> man. PHP's got more ****ing bugs than NYC.
<19> what exactly do you want to do with said serial device?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

#physics
ubuntu es1688
group by variable restraints sql
installing KLibido for Suse
best practise htmlspecialchars
ubuntu default resolution headless
recompile-world gentoo
#debian
pastie hotlink
monitor is switching off



Home  |  disclaimer  |  contact  |  submit quotes