| |
| |
| |
|
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
Comments:
<0> is that something i can get help with in here? <1> asdx: Then keep it with $first_row = $row; and at the bottom, you can echo $first_row['id'], $first_row['name'], $first_row['wahtever']; <2> richardlynch, should I store the data that I want to catch for these checks in a DB or just in textfiles ? I want to make graphs of it <1> Ompaa: First, name the checkboxes as name="counter[1]" name="counter[2]" name="counter[3]" and then you can use $_POST['counter'] as an array. <1> Ompaa: The update should be fairly easy, but pastebin what you got. <1> MatBoy: I'd store it in a DB. You'll end up in grief in textfiles very rapidly. Race conditions, locks, data management, sorting, etc. are all taken care of by DB. <3> richardlynch: ok thx <2> richardlynch, indeed <2> that is true ! <4> Hi guys, what is the best function to split a text file into \n ? <1> epaphus: http://php.net/file does that for you from the get-go. <4> tnx <5> richardlynch: http://pastebin.com/709763 <2> richardlynch, now I have to find out how and where :) <6> hey, I just tried to upgrade a php app from 4.0 to 5.0 and am getting a slew of "undefined variable" errors <6> it seems like this was tied to some php.ini var, but I can't remember what
<1> agliodbs: It's E_NOTICE for your error_reporting. But you should FIX THEM!!! <6> hmmmm <6> no, it's not just that, stuff is definitely broken <6> let me paste some of the errors to paste site, hold on <7> hi <1> Ompaa: Only checkboxes that are actually 'set' are going to get transmitted, so you will need the checkbox name="checkbox[0]" with isset($checkbox[0]) to know which is which. <5> mkey, ill try <6> http://www.rafb.net/paste/results/7HV9Xo23.html <6> this is a really old app <6> might have been developed in php3 <1> agliodbs: Every one of those is caused by E_NOTICE. Fix them. <8> or you could keep your error_reporting the same as it was on the previous server <1> agliodbs: You can just turn "off" E_NOTICE for today, but long-run, you really should fix the code. <6> it's not my app, actually, I'm just hosting it temporarily while the owner gets a new server <9> agliodbs find error_reporting in your php.ini, and set it to E_ERROR <10> Then just turn off display_errors and/or turn down error_reporting for that directory and "pretend it doesn't exist" <1> agliodbs: And are they switching servers because the old one got hacke?... <11> when using the exec or shell_exec command, why does it not keep my environment variables (they're put in /etc/profile)?? <1> You should probably use .htaccess and change it only for that directory. <12> Mmm... any SOAP (the programming technology) user here? <6> richardlynch: because it died .... was an original VA Linux server <1> airwave: Because those are YOUR environment variables and not the PHP User as defined in httpd.conf <10> WOOO! <10> VA! <1> yeah, I like those guys. IPO stock made me very happy. <6> richardlynch: I've never set a php var via .htaccess <6> docs? <7> http://pastebin.com/709774 <- that code is right.. i know it, but are now working, i cant open the files, i think its a headeer problems, can be ? <10> php_flag display_errors off <6> Pollita: thanks! <10> Just put that in an .htaccess file and go <1> ***uming you have it on, php_value error_reporting 2037 <10> Note: You need AllowOverride Options for that to work :) <11> richardlynch: apache runs on the user account "nobody", so why doesnt php recognize "nobody"s environment variables?? <1> airwave: I don't think it opens up a true shell... I think it just uses some C function to run the command. Perhaps you want to play with http://php.net/putenv <10> airwave: Because apache isn't launched from nobody's shell, it's lauched from root's shell then set_uid()'d to nobody <13> Pollita, maybe you can help me? I can't seem to get the session data to cary from page to page, php 5.1.4 using a session cl***. <1> Would PHP have the ENV of root, then?... <10> richard: Usually.... yes <14> Hello is any one availiable to write me a regex? <13> Pollita, http://www.tuxmafia.com/dev/TuxSTAT/index.phps http://www.tuxmafia.com/dev/TuxSTAT/process.phps http://www.tuxmafia.com/dev/TuxSTAT/include/TuxSESSION.cl***.phps <1> Sure! '/.*/' is a regex, and i wrote it. :-) <11> Pollita: /etc/profile applies to everyone...including root <9> lol <14> Nice richard <1> I would make a wild guess that maybe Apache and/or PHP nuke the ENV so root ENV does not leak... I know I would, if I was writing the software... <15> hi, how to get the list of fields(columns) form any query with more than 1 table ? <1> chipzoo: mysql_field_names maybe? Or use mysql_fetch_***oc and look at the keys. <10> Crazy: You didn't implement openSession <15> aham!!, let me try, richardlynch <13> Pollita, openSession ? <6> Pollita: hmmm, doesn't seem to help <13> Pollita, isn't that only for file system stuff? <15> richardlynch i can get the columns, even if there is no results in the query ? <6> hmmm .... this is going to be real trouble, I can see <1> chipzoo: With mysql_field_names, yes. With they mysql_fetch_***oc, no, cuz there are no rows to get the keys of. <6> clearly I need to load this in the old version of PHP <6> because it's going to take hours to fix otherwise <13> Pollita, still here? :) <1> agliodbs: What now?
<6> pretty much the whole app is non-functional. I can't even get past the login <6> I think it was buggy in PHP3/Apache1.1 and trying a direct upgrade has been fatal <1> agliodbs: Problem is, the p***words may be encrypted with old MySQL functions as well... So do you really wanna downgrade that as well, if my Wild Guess on that is correct?... <14> OKay I have this table that happens to be all in one line, dont ask my friend wrote it, I would like to just run a regex to a) break it up into seperate lines like it should be, and b) the table has cells which contain links. I would like to take the current link location and stick my own link in front of it, BUT apart of my link needs whats inbetween the <a><li>TXTHRE</a> I need the TXTHRE as well. Can any one help me? <1> agliodbs: Seems to me that at this point, you've done your friend the favor of hosting it, and it's up to them to sort out the bugs. :-) <11> umm...guys...putenv doesn't work, and neither does exporting the variable inside of the exec function, like: exec(EXPORT myVar=blah; mycommand); <15> wow such a large question <6> richardlynch: <grin> not MySQL. But it's not a public app <6> so security isn't a big concern <9> airwave you can use SetEnv in .htaccess <6> unfortunately, I'm covering for another developer who's gone for a week <1> airwave: You'd need to puteven() in every call to the script -- It won't survive a script ending... <6> I'm not really a PHP developer <16> agliodbs: those notices aren't likely to be relevant, check that settings like register_globals and magic_quotes_gpc are the same (nasty as they are, they're at the root of many bc problems) <17> is there any way to do threading in php? <9> SetEnv VAR = 'VALUE' <6> aha <1> zinor: not in a web environment. [shudder]. In CLI you can do fork(), which is not really threading, but multi-process, but could, perhaps, be suitable substitute <16> zinor: creating threads within pgp or running php multithreaded? <16> s/pgp/php/ <17> well, to be rank, im creating an irc bot, as php is my most experienced language, but i need to handle multiple servers (multiple pfsockopen's) <17> *frank <17> looking for a working solution besides doing exec() on files 5 times :) <1> zinor: You don't need threads nor multiprocess to fsockopen multiple sockets. You just need to make them all async and put them in an array and run through all of them fast. <16> zinor: pcntl_fork() is pretty much the only alternative <1> zinor: http://php.net/stream_select is your buddy. <17> well to read data, im doing while () for reading the data <6> arpad: aha, magic_quotes! the bane of my existance. that was it <1> zinor: I understand that. I'm suggesting you stop doing that and use while () stream_select() <16> stream_select() won't help you run servers at once unless you're doing your own multithreading <6> hmmm ... is there a way in PHP5 to turn magic_quotes on for some vhosts but not for others? <17> im not even sure how I would do that arpad :) <17> as all im doing is a while() loop for reading data (it never ends) <1> agliodbs: .htaccess ? Or just cram the php_value magic_quotes_gpc 1 into each vhost, section, I think. <16> agliodbs: using <directory> blocks or .htaccess files in apache, or registry settings in windows <1> zinor:arpad: I must disagree. You can open up multiple async sockets, store each socket in an array, and talk to as many servers as your bandwidth and data-processing in PHP can handle. Tho data-processing in PHP could be a weak point. <16> zinor: i meant to fork a process for each server, then you do the same for each as you are now <17> do you happen to have an example? <1> But the whole point of stream_select is for that express purpose. <16> richardlynch: so... you're essentially doing you're own multithreading <16> your own^ <1> arpad: No. You're essentially doing your own multi-streaming. There is a gazillion more stuff in multithreading of an actual process. <17> well all I need is a way to read from multiple connections at once :) <17> and be able to actually identify what those connections were <17> i have a nice cl*** setup for processing it all <1> For an example, find the post from Rasmus Lerdorf in PHP General from about a month ago in response to my old-school post on doing this "by hand" (no stream_select): http://l-i-e.com/FeedMulti/FeedMulti.phps <17> but of course, it wont work because it uses a while() for reading <11> richardlynch: I finally got it to work...and it's the weirdest thing but all I had to do was take the command, and put it in a variable, and p*** that to exec...like this: $cmd="my command etcetc"; $output=exec($cmd); <1> The link above will "work" but it's very much out-dated way to do it. <11> richardlynch: any idea why? <16> richardlynch: happen to know what essentially means? <1> airwave: I know one thing: It has nothing to do with putting it in the variable instead of hard-coding it. <11> richardlynch: seriously, it's straight copy and paste... <1> airwave: put it back and try again? <11> richardlynch: doesn't work <1> airwave: I dunno. I'm not gonna sweat if if you've got it working. <11> richardlynch: me neither, thanks :) <1> airwave: Bonus Tip: Use the extra optional args of exec() to check your error conditions. <17> richardlynch, alright i will read it over and see what I can come up w/ <1> zinor: Take off the 's' on the phps to see it in action... <6> arpad: ok, I'll need to look into how to do that. My first attempts didn't work, low apache mojo <18> Alright I want to write to another php file a url .. with a <br> at the end of each line .. and then have it return down to the next line... <18> but it's just typing \n and not actually returning down a line <18> How do I solve this? <1> z0rz: http://php.net/nl2br perhaps? Or maybe you are using '\n' instead of "\n" <14> okay in a regex how can I set something to be on the next line? <18> well I see the \n in the next file .. it's not a return carriage it actually says \n <1> TimjR88: You can use $ to mean "end of line" with some of the modifiers such as /s /m etc. http://php.net/pcre <1> z0rz: Then almost for sure you are using '\n' instead of "\n" <1> z0rz: Or something similar, such as "\\n" or '\\n' or... The number of ways you could have managed to do this is endless. <14> Well I have a HUGE line and need to put in a line break (NOT <br />) I mean like a carrage return at every ">" <18> Bah <18> I'm retarded.. I was typing /n <18> thanks man
Return to
#php or Go to some related
logs:
hide icons in gaim #linux #perl could not save master table mysql 5 bitfields null #linux why does ps2 mouse lag on gentoo #iptables postfix cannot create file exclusively: no such conky
|
|