| |
| |
| |
|
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 29 30 31 32 33 34 35 36
Comments:
<0> AaronCampbell: You can't override the function of the operator, but if you use __get() you can make that string concatenation work <1> you guys know of any packages that can parse html ? <2> retroneo: could be a couple of things. does the user running cron have access to run the executables, does it have access to the directories that mplayer and lame are in, does it have access to /home/conv/ and are mplayer and lame in its path? <1> i'm thinking parse tables <1> and links <3> yes it is run as root, it has access to everything <2> retroneo: thus your question appears to be a linux question and not a php question. <4> retroneo: Sure it's not a server issue. I've had some issues of that nature with my ISP and it was apparently something wrong on their end. <0> AaronCampbell: http://pastebin.com/594694 <4> retroneo: Sorry, that first part should have been a question. :P <4> retroneo: And not ISP, hosting provider. <3> it's a dedicated, so I have full control, but I don't see what might be wrong <2> retroneo: i would suggest checking in with the room related to your distro. <3> in addition, i have another very similar script wich works well <4> lepine: Looked at the tidy extension at all? <1> looking it it now ...
<3> does a chat room for rh7 still exist ;| <5> retroneo - its most likley using a different environment PATH and can't find the executables <2> retroneo: there's #redhat but the folks at #fedora might be helpful <3> thanks, I'll already try calling the commands using full paths <5> how are you calling the script via cron? <6> how can I get the key name when looping through an array? <3> cd /home/conv/ ; /usr/local/bin/php poster.php >> /home/conv/log.txt 2>&1 <7> m0dulus: foreach? <7> m0dulus: foreach($array as $key => $value) <8> how do I use ldap_compare to compare values of "ou"? <5> ok <6> thanks <5> lose the cd.... command retroneo <5> /usr/local/bin/php /home/conv/poster.php >> ... <3> the problem is that a command I run in PHP (mplayer) creates a file in the current work directory <1> Elazar thanks for the tmention of tidy, but apparently it's not what i want. I want to capture data from tables and links (for example) <9> What's the command to not display any errors? error_reporting(E_NONE)? <5> use absolute paths then retroneo <10> error_reporting(0); <5> explain a bit more lepine <11> [Karlprof]: ini_set( 'display_errors', '0' ); <9> Ah, thank you. <3 <11> don't disable error_reporting, that will prevent errors from being logged aswell! <3> Jeewhizz : I do, but mplayer dumps the audio track into audiodump.wav in current directory, and there is no way of changing it <5> hmm <5> no idea then retroneo <1> Jeewhizz ... ok, example <1> fopen(url) <5> ok <1> then see, there's a table here ... <5> aye <1> create an array, dimension 1 is the rows ... dimension 2 is the cells <1> perhaps there's a cl*** that can do a little bit like js ... <1> document.form[x] etc etc ... <10> DOM? <5> "Tidy is a binding for the Tidy HTML clean and repair utility which allows you to not only clean and otherwise manipulate HTML documents, but also traverse the document tree." <1> whoops ... going back to do some reading <1> you can join count with is_array() <12> when you count() something and it returns 1 you expect that to be the count and not the error! <4> lepine: Look at the properties listed near the top of php.net/tidy <5> count will return 1 if its a strong <5> string <5> if(is_array($foo) && count($foo)>0) <12> lepine: yes, I already did that, but I find the behaviour of count ...wrong! <4> lepine: You can get an array of child nodes and use the extension constants to determine what each child is, its attributes, etc. <1> ah <13> in a cl***, how to be able to re-use a variable (an array) from a function to another in a cl*** ? <14> serialize($miVar) <1> $instance2 -> yourotherarray = ($instance1 -> yourArray); <1> ? <15> alainlucas: in the first function, set it to $this->array_name; In the second...use $this->array_name <16> Hi. Could anyone explain what the @ is used for in PHP? <14> ok, now I understand this question from alainlucas... sorry <10> Skrot, suppressing errors <16> ah. thanks <17> hello ... i think this is not the right place but ... this switch is giving error: http://phpfi.com/106585 <0> g***, labels in switch statements need to be in quotes <10> yup <0> so case 'see': <0> and case 'list':
<0> default: is fine <17> ds-: oh ... forgot <0> :) <15> unless you are comparing against a constant see <15> and a constant list <17> ds-: thanks ... no .... '' missing <0> AaronCampbell: did you get my msg about __get and __set? <15> ds-: yeah <0> with the link? <15> I re-thought the way I was doing it. <0> k, just making sure <15> ds-: because I was adapting a cl*** that someone else wrote, and they used $this->vars = array()...and put all vars in that array...which wasn't all that smart <15> and I just kept using that instead of changing it. <0> heh <13> AaronCampbell: thanks! :) <9> if ( $check == E_WARNING ) { // This code is correct, right? I want to check if a function returns a warning. } <15> when I realized what was going on ($this->title = 'something'; ALWAYS called __set, because it doesn't check a vars array)...I just got rid of it. Works great now <15> alainlucas: no problem <0> [Karlprof]: what function are you checking <18> im trying to have a link to clear a session, and it doesnt seem to be working. <18> still shows as if the session has data contained in it <19> ashows bas <9> include(), ds-. <0> most of the built in ones don't return error status <18> I did $_SESSION["sess_name"] = ""; <9> Ah. <2> what would you suppose will be the implications of generating a company purchase order above an amount that i'm authorized to approve? lol. i guess i'll find out. <2> i guess i'm the acting maintenance manager today, so i will use that as my authorization. <9> All the PHP site says is 'include() produces a Warning on failiure'. <0> just a displayed warning <9> Ah, right... I'll check for ( $check != 1 ). <14> maybe if you use session_unregister("sess_name") <0> the function will return either 1 or a a vlue supplied to return; within the script <2> [Karlprof] you can do this: if(!@include('filename')) { <include failed> } else { <include success> } <0> I wouldn't recommend that <2> ds- why not? it works <18> yeah but I cant use session_unregister, cause I didnt use session_register <0> @ is not much longer for this world <2> ds- heh, that would ****. <0> if I remember right it is inline to be deprecated <2> ds- there are times i want to supress displayed errors/warnings for some functions but not others. <2> ds- so what will be the alternative? <4> lepine: Tidy look like what you need? <20> how would I parse rss feed, the same way i would with with simplexmlparse? <4> lepine: In the past, I've actually just used preg regexp to parse HTML, but now that I look at it, I may start using Tidy myself. :) <5> tidy is the way forward :) <0> b1n0ry: php_ini_set('display_errors'); <5> written by john coggeshall i think <0> I might be wrong, I am finding out for sure <21> I am trying to create a page that measures bandwidth when loaded. What is a easy way to have the user download 5mb worth of data? <14> try session_unregister... <0> nevermind, I was wrong, I must have heard it from the lying gnome again <0> @ is fine <2> ds-: so i would have to use an ini_set twice for every time that i want to supress displayed error output? <18> uh ok <2> ds- heh, ok <18> thnx :] <2> ds- i was gonna say... <22> I have an array of strings, and need to work out if $mystr is in the $array and if not return false <14> because a $_SESSION its same = $sess_name = $a['user']; session_register("sess_name"); <0> I do personally think error supression is a bitch <5> EvilGuru : in_array() <22> Jeewhizz: I like it <0> but when you have 2 people you'll have 3 opinions so there you go <14> and if you like to validate this sentence, try if session_is_registered("sess_name") <2> ds- there are times it's useful to me. for example, i establish a database connection. if the connection fails, i don't want it to display because i have my own routines that check success/fail status. yet if i have other errors elsewhere in my code, i want to know about it. <0> php.ini: display_errors = off :) <2> ds-: exactly, that would **** <0> and then log them <5> yup <2> because i'd have to do something like this: ini_set('display_errors','off'); $db = mysql_connect(<blah>); ini_set('display_errors','on'); <0> imo displaying errors in a production environment just looks bad <5> and a security risk <0> No, I mean turning them off completely and just logging errors to a file elsewhere (in production only)
Return to
#php or Go to some related
logs:
not found or not a block device grub centos
#css #nvidia opera problem ubuntu fall undefined symbol __glXLastContext ubuntu openvnc fedora kde cannot move window #mysql ninan ubuntu free.partitioner windows
|
|