| |
| |
| |
|
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
Comments:
<0> *buck = back <1> berry__, sweet <2> danols: when the script is done, it will be unset <3> $_SESSION['array'] = array ( 1, 2, 3 ); <0> aidan: that's what i thought but it dosen't ? <4> I would imagine PHP would become angry if you tried to unset a constant. <1> berry__, yep <1> ***oc array for me tho <2> danols: how do you know? <0> aidan get_defined_constants() <3> danols: when? <0> whine my define() is commented out <2> danols: then the script hasn't ended <0> while <0> aidan this is a new run of the script with the define being commeted out <2> danols: if you're putting get_defined_constants() at the end, the script hasn't ended, has it?
<2> danols: oh <0> aidan yeah see ? <4> eml: Define your array and do $_SESSION["MyArray"] = $myArray; <2> danols: ... then it's unset and you're looking at a cached page <1> Etriaph, yeah I'm doing that =) <1> making an examination script for me and my cl*** mates <0> aidan i'm thinking it's cached or something <4> If that doesn't work, I dunno. :D <0> aidan how would i flush the cache ? <4> Hold down 'Shift' and press reload. <4> That'll avoid your local browsers cache. <2> danols: press ctrl-f5 in firefox <0> Etriaph no; than this is not the issue <4> Is it being defined in a file you're including or requiring? <4> aidan: Would Zend Cache cache constants? <2> it caches the whole script, including the constants, until the script is changed <0> Etriaph good point, i have the defined in a cl*** file, and i include it in another test.php file <4> Ah visa vis JSP <4> Recompile when modified date > cache date I suppose? <5> Hi, just a quick question - does PHP5.1 support windows 98? I found a section concerning installation under windows but it looks like it is about php4.x <2> once he uploads the script, which has the constant commented, it's gone <0> Etriaph ok i'll upload both files again that should change date <2> I suspect that's not the issue, and the issue is danols doesn't really know what is going on <2> adamg: probably, try it and see <4> aidan: Most likely true. <6> hey guys, i have a question: i want to execute a bash script i wrote, but he doesn't execute. I use shell_exec <2> adamg: why are you still running 98? <0> aidan well i doubt that, however that's why i'm here cause right ? <4> Aap: exec("myscript.sh", $output); <4> $output will be all of the output from the script. <6> yes but it's just a copy script, it doesn't output anything <4> Or even better, exec("script.sh", $output, $retVal); if (!$retVal) { print_r( $output ); } <4> Aap: exec() will give you the return status though.. <6> ok i'll check <4> if the script fails to execute, you'd want to know. <4> But if you're just copying files, use the PHP functions for it. <6> no output <4> http://www.php.net/manual/en/ref.filesystem.php <4> But did it work? <6> nope <4> Do you have the path set correctly? <4> exec("/path/to/script.sh", $output, $retVal); <4> And does the script require arguments? <6> it's in my other php files' directory <6> nope <0> aidan , Etriaph http://www.estatemaps.info/admin/ look at the show_source result and look that even though it's unset i can still print the damn constant <0> *unset = commeted out <4> If that's not working then I would say either the script isn't executable (ie. it's mode is incorrect for you) or your PHP installation is messed up. <6> damn <0> constant in question is MLS_GET <0> now tell me that's not wierd ? <6> i have to find it <4> Do me a favour and: echo MLS_GET; <4> Aap: Why not just copy the files with PHP's copy() ? <0> yep it's the first line <0> i echo it from _SearchMLS <2> print_r("MLS_GET is: " . MLS_GET); <6> well, the files are in /etc, i don't want to take a risk <0> Etriaph well i print_r it but that shouln't make a difference <4> It shouldn't have a value at all. <2> danols: if I run that code, I don't see any MLS_GET
<0> Etriaph I know i got puzzled last night and just gave up <4> Lemme try.. <0> aidan exactly i'm thinking one of my prior exec. didn't finish or something but that's from last night <6> brb <2> danols: the constant is allocated new memory every request, that isn't the issue. You must be defining it somewhere else <0> i'll check my test.php <0> IT IS <0> damn it <0> *slap on forehead* <0> i had left over code in my index file <2> which is what we both said at the very start <3> :) <0> aidan that's correct; i forgat however i had that code there <0> thank you guys <4> Yeah, it has no value. <4> For me. <4> Oh, it was in an include? <0> Etriaph yeah figured out that i had left over code in my index <4> Ah, test test test. <7> what is the quickest way to check if i have write access to a folder ? <4> I wish I could type cast in PHP. <8> http://www.php.net/is_writable <9> you can <7> thx Dragnslcr <4> Well, I wish I could type cast to my own objects. <9> I mean, it's totally pointless and useless and serves no purpose at all <9> oh <0> thanks again guys <9> nvm then <4> Like (User)$user = Session::get(S_USER); <6> Dragslcr is it safe to use the copy function in PHP to copy from /etc ??? <4> There's something about __autoload() that makes me feel like it's a hack. <10> Hello PHP people. Ereg question. Does it only match one instance in a string, or is my regexp ****ed? <11> what the hell is __autoload :P <4> Aap: If the user the webserver is running as cannot read that part of the file system it doesn't matter if it's safe. <9> it's like an automatic include iirc <7> Dragnslcr, that only checks if a file is writeable, i want to check the full dir <6> true <12> choongii: Not accurate :) <9> yo aapke <6> yoyo <8> "The filename argument may be a directory name allowing you to check if a directory is writeable." <9> kuja, damn <7> thanks <11> omg! __autoload is weehee! <9> and here I thought I was sounding smart <4> Ciantic: It's a callback function for unserialize. <12> __autoload() is invoked when a cl*** is trying to be instanciated without existing. <13> Ciantic: __autoload lets you intercept whenever new Cl***() is called, and the __autoload function is called with the cl***name, which enables you to include files etc.. <8> lost_and_unfound- did you even bother reading the manual page? <11> Etriaph, not really, it includes the same named cl*** <12> Ciantic: It doesn't "include" <4> It does whatever you want it to. :D <6> Dragnslcr : so i made a script for it in bash, but it doesn't execute it with PHP (it executes in shell) <4> function __autoload($cl***Name) { echo $cl***Name; } <11> kuja, anyhow, its callback mostly <4> That could be your __autoload() <12> Ciantic: Yes, its logical purpose is to include files that contain a given cl***. <12> Though it is not a preset. <11> I must try this <11> I have bunch of cl***es i include on every page load, they take like forever to process <12> Heh <4> I had a problem last week with session_start(); and an object I had stored in the session. <11> and this solves it all1 <4> I had to define __autoload() because PHP unserializes the data in the session on session_start(), not on the request of that data. <12> Of course, backwards compatibility goes out the window if you decide to use any of this PHP5-specific stuff :) <11> *grr* who cares about PHP4 ;) <10> Ew, php4! <12> Ciantic: Millions of websites still powered by it? :P <10> So is mine, alas, doom. <6> maybe i have to install something? <6> and Etriaph, i retVal , returns 127 <10> Right, I pastebin the problem I'm having with ereg. I'm not sure whether it's my regular expression, or how I'm using the function. http://pastebin.com/637604
Return to
#php or Go to some related
logs:
gentoo thepanz file is not an audio stream ntfs #gentoo download codescs restore rgb database gentoo disconnected imposter eggdrop
ubuntu noswap tomcat5 backport sarge #css crond BAD LINK COUNT
|
|