| |
| |
| |
|
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
Comments:
<0> I have 2 servers...both have PHP 5.0.4. On one, highlight_string($var, true) returns a string with no line feeds. The other HAS line feeds. Any idea why that would be? On both servers I first echo htmlentities($var) and it displays on multiple lines. <1> that might be a good idea o.O <0> Both servers add <br /> where line breaks are, but one leaves the line breaks in, and one removes them... <1> your $var is different, then <2> auto_detect_line_endings is a wild stab <0> Stormchaser: actually, in all cases...it's file_get_contents('paginate.cl***.php',1), and the files don't differ (I even did file _____ on the server to make sure they had the same line endings) <3> php_admin_flag do_what_i_mean_not_what_i_say 1 <4> BigE: ok, it's working <0> philip: I'll have to admit that I had never heard of that, but checking both phpinfo files, I see that is set to 0 for both <4> BigE: I get this "Use of undefined constant title2 - ***umed 'title2'" <5> nein, that's for macs and their crazy \r...don't think it does anything for what you are looking at <6> selim: Then there's your error. :) Or at least... one of them. <5> that's not a fatal error <2> AaronCampbell: is one of your servers an old mac? :) <0> philip: both linux...both centos. <7> how do you reset the internal pointer for mysql_fetch_row()?
<2> ..._seek <0> unfortunately, one is public, and one is a local test server :| <4> BigE: but why undefined constant? It worked before? <2> E_NOTICE can be hidden, usually are <2> and it's not fatal as ds- said, i doubt this was the issue <5> AaronCampbell, you can always try diffing the two php.ini files and seeing what is different...sounds like a configuration difference <8> Is anyone familiar with the pastebin code from http://paste.uni.cc ? I may be wrong, but the SQL table it provides doesn't seem to match what the code uses: Query failure: Unknown column 'syntax' in 'field list' \ insert into pastebin (poster, posted, code, description, parent_pid, syntax) values ('Matty',now(),'asdfasdfasdfasdfsdfasd','',0,'none'); <7> philip: thank you <9> Hi <10> ok, i'm having a problem with a script, I can get it to poll the database, I can get it to pull up the fields for editting but it fails on submitting the editted fields back, any ideas? <9> Is there any way to validate an XML with XML Schema using PHP4? <10> http://pastebin.ca/47519 <10> ok, i'm having a problem with a script, I can get it to poll the database, I can get it to pull up the fields for editting but it fails on submitting the editted fields back, any ideas? <10> teh variables are being populated ... <9> soop, sql error <0> ds-: they seems to be pretty different (mostly in a different order), but I don't see the issue. Here is the diff: http://ezdtest.com/diff.txt <11> Hey all. <10> kmilo not that i can see <11> I am having a problem with some global variables. <9> soop, echo $quey; <12> alex: be more specific? <9> soop, now copy a paste it to mysql <1> !+mysql_error <13> Handle SQL Errors! For MySQL, always check if mysql_query() returned false; if so, print mysql_error(). I.e. $result = mysql_query($query); if (!$result) { echo $query.'<br>'.mysql_error(); exit(1); } <11> I have three files: index.php, includes/config.inc.php, and includes/db.php <5> ugg, how about diffing the output of phpinfo() <11> Vystrix_Nexoth: I am getting there. :P <11> Vystrix_Nexoth: I have three files: index.php, includes/config.inc.php, and includes/db.php <11> I include config.inc.php and db.php from index.php <11> require_once("./includes/config.inc.php"); <11> require_once("./includes/db.php"); <11> Like that ^ <12> ok <10> kmilo: the query works, if i manually enter it into mysql, but the query doesnt seem to be parsed to mysql via the script, but i can pull and compile the info <10> its almost as if the final part of my script cant talk to the dbase <11> Vystrix_Nexoth: In config.inc.php, I have this: <11> $cfg['db']['server'] = "localhost"; <11> $cfg['db']['useranme'] = "dan"; <11> [...] <11> You get hte picture. <12> right <10> kmilo: UPDATE packageinquiry SET wssquotenumber='1234',customer='matthew',fluid_type='fluid_type' WHERE id=2 <11> Now, in db.php, $cfg['db']['server'] is empty. <5> AaronCampbell, I am not seeing anything that matters :/ <10> thats whats supposed to be being p***ed <12> are you defining those inside a function in config.inc.php? <11> Vystrix_Nexoth: However, when I do print_r($cfg) from db.php, it prints out the array correctly. <11> Vystrix_Nexoth: No. <12> odd. <11> Yeah <11> Vystrix_Nexoth: And $cfg['sesskey'] works from index.php <12> are you *using* $cfg[etc] from within a function in db.php? <12> and trying print_r() at the same location? <4> BigE: any idea what this error can be? Anything wrong with this definition: ($myrow = mysql_fetch_array($result) or this: >'.$myrow[title1].'</ <11> Vystrix_Nexoth: Yes. <9> soop, $result = mysql_query($query) or die('Query failed: ' . mysql_error()); <12> strange indeed... at this point, I suggest scouring it looking for typos; from what I've heard so far, there doesn't seem to be any other explanation that I can see. *shrugs* <11> Vystrix_Nexoth: Maybe it's a bug in php? <0> ds-: thanks, and here is the diff of the output of "php phpinfo.php" on both systems...again I'm at a loss http://ezdtest.com/diff2.txt <12> something like that would have been found a lot earlier by now if it were a bug, I think. <10> kmilo: where $query = my var for my query?
<11> Vystrix_Nexoth: http://www.pastehere.com/?yxnfma <11> db.php ^ <12> I thought you included it from index.php? <12> bah. you ARE using it inside a function in db.php <9> soop, $query ="UPDATE packageinquiry SET wssquotenumber='1234',customer='matthew',fluid_type='fluid_type' WHERE id=2"; <12> a cl*** function. put this at the start of the function: <12> global $cfg; <11> Yes. <11> 18:08:37 < Vystrix_Nexoth> are you *using* $cfg[etc] from within a function in db.php? <11> 18:09:17 < alex323> Vystrix_Nexoth: Yes. <11> ;) <14> ;) <11> yay me! <14> hi <11> I got it to work! I win! <14> yay <11> Thanks, Vystrix_Nexoth. <12> praise be to yevon <12> np <15> http://pastebin.com/629644 <15> whats wrong with that <10> kmilo: thanks, fantastic <12> imk: what error are you getting? <12> so we know what to look for. <16> imk- you never define $testVar as a property of the cl*** <5> AaronCampbell, I have absolutely no idea. Do you have access to php-cli on both of the boxes? <9> soop, ok <15> Dragnslcr: how is that done <16> Also, I don't think PHP calls parent constructors automatically. You have to use parent::__construct <0> ds-: sure <5> I would try comparing highlight_string output that way <16> imk- private $testVar; <15> yeah, i was trying the parent::__construct but wasnt working, probably because testVar wasnt a property <12> that $testVar is local to the __construct() function anyway. do as Dragnslcr says, and use $this->testVar instead of just $testVar <5> maybe something in the server is changing output <16> Yeah, PHP requires $this for properties and methods <16> Since PHP doesn't require defining variables in advance, it doesn't try to resolve undefined variables to properties <15> hmm <17> You should declare it as a property of the parent cl***.... 'protected $testVar;' <17> if you want to follow the rules :) <16> Yeah, good point <14> I did this a while ago, but I lost my php stuff due to a server fail. Is there any good links to a php upload script tutorial? (Hopefully including how to limit filetypes, that's the part I had a hard time on). <12> Eleaf: PHP's online manual has a section on handling file uploads. have you looked at that yet? <0> ds-: I did this on both servers: php -r "echo highlight_string(\"test\r\ntest\r\n\");" > test <14> Vylen, yea I did. <0> it makes the SAME file... <14> Vylen, I didn't see much on limiting file types though <14> oops <14> Vystrix_Nexoth, ^^ <15> you throw that in the parent cl*** or in the construct function in the parent cl***? and then call the parent inside the child function? <12> hehe <12> thought that was an odd abbreviation of my name <15> ive never done OO before :o <14> is_uploaded_file ? <14> lol <17> imk: I'll fix it for you... <12> eleaf: that should be self-explanatory. there's a gettype() function or something like it, that might help. <18> unexpected $end << what would this mean? <14> hummm <15> Viflux: as long as an explanation is in there somewhere :) <12> libervisco: you forgot to close a function or string or here-doc or something, and PHP hit the end of the file when it wasn't expecting it <5> AaronCampbell, then it might be a server issue...I really have no clue about where to start looking at that point. <12> Eleaf: *looks in manual* filetype() rather <18> hm yeah.. <14> hummm lol <1> libervisco: Missing } or ) <17> imk: Done...any questions...ask and ye shall receive. <12> libervisco: syntax highlighting in text editors helps a lot. ^^ <18> $template->***ign_vars(array("COPPA_FAX" => $new['coppa_fax']) <18> ); <18> Vystrix_Nexoth, indeed.. but this is a big file (admin/admin_board.php) of phpbb <18> and I can't seem to find a culprit <18> or just don't get it :D
Return to
#php or Go to some related
logs:
Fedora 4 jsm package update fulltext #physics install ViewVC Debian #perl #gentoo torcs gamepad configuration Can't locate object method IVX #perl #linux
|
|