| |
| |
| |
|
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
Comments:
<0> mirage-pt: rofl, which language do you consider is right for "serious scripting" <1> how can i test if a include was successfull? <2> Davey: anything with proper error handling.. <0> mirage-pt: PHP has just fine error handling <1> i wnatet to use require with try...catch but this is not working <0> I mean, if Yahoo! finds it suitable... I daresay it'll work for whatever you're doing <2> Davey: well, i just want to know why a fopen failed and treat the error accordingly <2> and fopen is just an example, any syscall can fail <0> mirage-pt: and it can fail in any other language too <2> Davey: *error handling* <2> but nevermind, thanks for yor replies <2> i was thinking that i was missing some obvious option <3> Computers run on smoke, because when smoke comes out they stop running. <0> mirage-pt: what you're missing, is that displaying of errors should not be done on a production site, and it returns false if it fails. <2> Davey: may i know _why_ it failed and treat the error accordingly? <2> or even inform the user?
<0> mirage-pt: who cares *why* it failed, it failed, the response is the same <2> gosh, i understand that you don't need it, but surely you can see it's a serious lacking feature <0> mirage-pt: if you *really* care, override the error handler <0> php.net/set_error_handler <2> ah! that's more like it <4> hi, could anyone give me a hint on this: http://pastebin.com/592691 ; thanks in advance! <2> lemme see <0> mirage-pt: its pointless though <2> ouch, it overrides all php error handling... <0> yeah <2> Davey: i really don't see your point. i'm not here to bash php, i love it, but a mere error code when something fails is very useful <5> is there a built in function that will just retrun the filename and not anything after ?values=0 <5> so no query options, just the filename <6> just the filename? or the path and filename? <7> lexton : you in a url? <5> I'm parsing a store session url, and just need the filename <5> no path <5> I could do substring search I guess, but was wondering if a function already exists <7> lexton : try phpinfo() you can tell wich variable to use $_SERVER['something'] <8> Hi. <8> I'm using Debian sarge with php4-cgi. <8> I'm looking for a way to set php settings like open_basedir or disable_functions at a per virtual_host or directry level from apache. This seems to be possible when using libapache2-mod-php4 using stuff like "php_admin_value", but not with my php over cgi setup. <8> Is it possible to achive the same thing with php-cgi, and if so how? <5> I have to use a stored file value from the session because it's being called from an include <5> basename($_SESSION['lastpage']); <0> Calestyo: it's not possible with CGI, you should use the DSO <5> this works, but also includes ?values=1 etc <8> Davey: but unfortunately this is not usable with mpm-worker :-( <0> so... use prefork <9> Fatal error: Call to undefined function xslt_create() in <8> Davey: :( ... does not fit my needs :-/ <9> i ***ume it means my php.conf is not pointing to the right xml or xsl library or something <9> i am not root of the machine - can i still do xslt or xsl functions? <9> http://us3.php.net/xslt - it says "run configure with the --enable-xslt --with-xslt-sablot options" - what does that mean? <0> mmastran: first off, php.ini, secondly, you do not have the xslt extension enabled (either compiled in, or as a shared extension), so no, you're screwed <10> mmastran: only if the extention is installed and just not loaded. if it's installed, you can use dl() to load it <0> besides. PHP4 ****s for XSLT, find a host with PHP5 instead <11> i'll be gracefull if someone tells me about a host with php5 <9> i am using php5 <8> Davey: I know, but unfortunately sarge includes only 4,... and I don't want to use my production server with sid ;) <9> actually the server i use handles both php5 and php4 (to use php5 i just name my files .php5) <0> mmastran: then that's your problem, php.net/xsl :) <0> mmastran: that's not possible, unless it's CGI (At least one of them) <9> whats my problem? that i am using php5? <0> mmastran: yes, the XSLT methods you are trying to use are PHP 4 only <9> oh <12> I'm observing some strange behaviour where ob_start() seems to destroy my POST data <9> where do i find the php5 xslt methods? <12> print_r($_POST); before ob_start() prints plenty of data <12> print_r($_POST) directly after ob_start() prints no data <0> mmastran: php.net/xsl <0> bewest|work: uhm, you realise that ob_start() stops output, right? <13> Is there currently an accurate way of getting the maximum file size for file uploads (by not using "ini_get('post_max_size');" ) ? <0> bewest|work: you are calling flush or some such, right? :) <12> Davey: yes, but doesn't it store the output? <9> Davey i tried that - Fatal error: Cl*** 'XSLTProcessor' not found in <0> mmastran: in .php5 files? <12> Davey: this isn't my code; I ***ume the answer is yes <0> bewest|work: rofl, who knows :) <12> Davey: there's plenty of other output though
<14> Using $chkbx = $products_group_access[$products['products_id']][$customer]; if (isset($chkbx) && ($chkbx == 1)){$actualizar = 'on!';}elseif(isset($chkbx) && ($chkbx == 0)){$actualizar = 'off!';}else{$actualizar = 'nochange!';} I know if I get a subnitted 1 or 0, supposedly, I did a couple if aganst the databases data and can always identify 0 to 1 correctly but 1 to 1 is intepreted the same... <14> ...instead of saying it is identical, what am I doing wrong? (I dont want to make the program slow by doing all those unnecesary 1 to 1 queries) <12> it's only _POST that displays this unusual behaviour <9> yeah I actually only have 1 index.php5 that imports/includes/ all my other files (single point of entry) <9> but _construct() and __autoload() work so i know php5 is working <9> do i have to include something to get the cl*** XSLTProcessor? <14> bewest|work only _POST? is there a solution, workarround? <9> is this the solution? - "PHP 5 includes the XSL extension by default and can be enabled by adding the argument --with-xsl[=DIR] to your configure line. DIR is the libxslt installation directory." <12> carlos-the-man: weird, eh? I tried commenting out the ob_start() line, however I then get databse errors <9> i am not sure what the configure line is though <12> so I suspect whoever wrote this is doing some kind of black magic <12> let me just check my sanity here: if using output buffering, when you output a variable, it stores that output in the buffer; if you then change the variable, it doesn't change the original output from before <9> Davey - where did you go? <15> crazy! <16> http://rafb.net/paste/results/gkvImA49.html <-- my code with the errors i get. i tried the sql query alone (in phpmyadmin) and it works just fine ergo no errors. items.cost <-- if i change that to `items`.`const` it complains about un-expected '`', if i change it to 'items'.'cost' it complains about un-expected "'", basically i`m out of ideas what to do <0> mmastran: work <16> any help appreciated <17> Is there a variable that stores both POST and GET info? I'm converting a page that once used register_globals. The problem is, sometimes data is posted and other times is uses get.. <17> So I never know whether to use _POST or _GET <9> your work allows you to be on IRC talking to randoms? <18> Sounds like a great job <15> redduck666, i've never used the mysqli stuff (which i think fetch object is) but i think that it would be $contact->field not $contact->table.field <9> isn't that equal to surfing online - i mean i guess I am working to (I am a TA for some scripting cl***) - but i doubt he would mind me doing other stuff <0> xbeanx: _REQUEST contains POST, GET and COOKIE <15> redduck666, try chaning the sql to do select items.cost as items_cost and then in the code to $contact->items_cost <19> redduck666 : try an table.field as FIELD and work on FIELD <16> BarnacleBob, eljak: thanks will try those suggestions <0> you can also $obj->{foo.bar} <20> can i compare dates > <20> ? <21> Xsploit- yes <20> mmmkays <20> any specific format ? <21> Very carefully <21> Depends how you want to compare them <20> if ('2006-3-10' > date("Y-n-j")) { echo "moo"; } <--- would that echo moo? <20> and not echo moo tmrw... <21> Probably not <21> PHP doesn't have a native date type, so you'd have to use Unix timestamps <12> hrmmm <20> godamnit <9> mmastran@ims$ more /usr/local/etc/php.ini | grep xsl => ;extension=php_xslt.dll <9> is that my problem? <9> ; means commented i believe <21> No <12> if(strtotime('2006-3-10') > time() <21> Did you notice the .dll at the end? <9> sure <21> *nix doesn't use .dll <9> ah <21> Windows uses .dll <22> unix uses .so <9> but is that the file i have to change to add php xslt support? <21> Probably have to compile PHP --with-xslt <21> Or something similar <9> "PHP 5 includes the XSL extension by default and can be enabled by adding the argument --with-xsl[=DIR] to your configure line. DIR is the libxslt installation directory." <21> Installation <21> On Unix, run configure with the --enable-xslt --with-xslt-sablot options. The Sablotron library should be installed somewhere your compiler can find it. <9> what is "configure" <21> The configure command when you compile PHP <23> mmastran: How was your PHP installed? <9> Dragnslcr, and if i didnt compile php (like what if i just apt-get installed) <23> mmastran: apt-get install php-xslt *maybe* <21> Then ask the people that made the package <9> ok <9> but i probably wont be able to fix this without being root right? <23> mmadia: apt-get install php4-xslt # for php4 <23> mmastran: Right <9> damn - have to wait for the server guy to fix it then <23> s/mmadia/mmastran/ <9> s/mmadia ? whats that <24> a typo :P <21> It means your nicks are too close together and kuja got beat by tab-completion
Return to
#php or Go to some related
logs:
how to ip spoof
libdrm.rpm + SuSE qemu change resolution #css mysqldump fast grub loading error 17 ubuntu fn as24 DATESUB INTERVAL UNIX FIREFOX_DSP fedora sn9c102 gentoo
|
|