| |
| |
| |
|
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
Comments:
<0> zircu, huummm <1> why, oh why won't the pgsql extension build?? <2> hey iam using php5/mysql5 and very basic script which connects to the mysql database... here is the error iam getting <2> mysql_query(): supplied argument is not a valid MySQL-Link resource <2> what could be the problem ? <3> hey guys <3> i have a squid problem.. I am trying to post to the cybercash API, and squid is blocking it.. anyone know why? I have been reading all through the access controls in the manual but havent found anything that works <2> i dont get any errors from mysql_connect() <0> Viper007Bond, you are right, use fwrite ($fp,"GET / HTTP/1.0"); stream_set_timeout($fp,5); <4> __hrz__: what does mysql_error() say? <4> __hrz__: also you should probably use mysqli or PDO with php5/mysql5 <1> has anyone had problems building php 4.4.2 --with-psql? <2> mysql_query(): supplied argument is not a valid MySQL-Link resource <2> thats the error iam getting in mysql_error() <1> --with-pgsql, excuse me <4> jessupx_: probably try a squid message board will help
<2> iam using functions in my code.... <2> so is this error because of functions ? <4> __hrz__: ah, i read your error wrong, that means you mysql_connect didn't work, check your logs or make sure that display_errors is on and error_reporting is at least E_WARNING <4> pmark: no, but i ***ume that you are though <5> how do you get sessions working on sles 9.3 with apache2 and php4, i am trying to get it to run phpmyadmin and it says it cannot load the session extension <4> pmark: what is the error you get when trying to build php? <1> zircu: I have no idea why it's not working <4> pmark: first thing to check is your config.log <2> zircu: i used die() when iam connecting to mysql.. i dont see any messages from die.. <4> look and see if it recognized pgsql <1> thank you - i'll look there <4> __hrz__: what does your mysql_connect() line look like, including your die()? <4> pmark: like a 'checking for pg_config' <1> zircu: i see that, but i'm not sure what to look for after that <4> themoleste: you will have to change your package install options to include --enable-session when it configures php <4> pmark: did it complain about it? <5> what do you mean by "package" install options <5> it was not compiled <4> themoleste: how did you install php? <2> zircu: here is my line $db = mysql_connect($db_hostname, $db_username, $db_p***word) or die("unable to connect to server!"); <5> was installed through rug (rpm util for suse) <5> similar to apt-get <2> zircu: here is where tis failing $res = mysql_query($sql,$db); <4> themoleste: and i would ***ume rug went and got the source, compiled it and installed it <5> no... its precompiled <5> i would like to keep the installed packages for ease of updates in future... theres no way to dynamicly load sessions as an extension? <3> zircu, ive been searching message boards but cant find anything specific, it almost seems like since we are doing a raw GET / without useragent headers, its just flat denying it <4> themoleste: then I would ***ume there is a php-session module as well <5> i wouldn't imagine suse would remove all possibility <4> ^name may not be the same <6> what is the default length a session stays open?... and can you change it? <1> zircu, in debug.log I see /usr/bin/ld: cannot find -lpq <5> there was a php4-session package... i installed it, but sles is a bitch about not editing config files (whats the point of packages, which just copy things) heh <5> i tried adding extension=session.so but that did not effect it <4> pmark: that is a start <5> however.. i have a feeling theres a second php.ini somewhere <5> cause if i execute a php file from cmd line, mysql is working, but from web it says mysql_connect is invalid <1> is there a library called "pq"? <4> __hrz__: then try adding a ini_set('display_errors', true); ini_set('error_reporting', -1); at the top of your script <2> zircu: okie... <5> is there a common second conf file somewhere for web only php4? <4> pmark: it appears to be pgsql related <1> yes - seems like it should have come with my pg install <4> themoleste: you can confirm the php.ini that it is using by creating a web page with <?php phpinfo(); ?> <5> hrmm... it says its using the right one <2> zircu: i still see the same errors.. <5> hrmm <5> i restarted apache, that seemed to fix the one problem... <4> themoleste: doh <2> i have a single php file... which connects to the database.. and has functions... which does various tasks. <2> is it that iam not able to p*** $db to the functions ? <5> ok, all working well... i coulda swarn i restarted it already <5> thanks anyway <4> __hrz__: do a var_dump($db); just before your mysql_query <2> zircu: ok <2> zircu: it is returning NULL <4> so that means it is either not set or out of scope <2> zircu: if its not set then mysql_connect shuld give error right ? <2> zircu: mysql_connect is not giving error at all !
<4> __hrz__: what does var_dump() say right after your mysql_connect() <2> zircu: resource(3) of type (mysql link) <2> zircu: thats all i got <7> print_r on the val for my $file returns: inv_change.gifimage/gif/tmp/phpO6F1mG0721 <7> how am i supposed to separate that into its 4 elements? <8> Would someone please give me a simple example of posting data to a page using fsockopen()? Please do not suggest cURL. I already am familiar with cURL and would like to work a bit with fsockopen(). <4> MihewaCANADA: well, one of the pre-resquites is that you have a rather solid understanding on how HTTP generally works <8> I'd just like an example scriptl <4> do you know how to do a GET request via fsockopen? <8> No. <8> Well, here is my ultimate problem. <4> MihewaCANADA: well check out Example on on php.net/fsockopen <4> Example 1.* <8> I am trying to p*** data from a form on my website, posted to a form on an external webpage. The only problem, though, is that the I have to send an input form (type: file) to that form. <8> It is not receiving the file correctly. <8> #$ch = curl_init(); <8> #curl_setopt($ch, CURLOPT_URL, "http://www.".$cfg[srv].".org/uploadfile.php"); <8> #curl_setopt($ch, CURLOPT_POST, "1"); <8> #curl_setopt($ch, CURLOPT_POSTFIELDS, "fil=$HTTP_POST_VARS[fil]&submit=Upload&from=tree"); <8> #$data = curl_exec($ch); <8> I have is commented out for now while I try other methods. <4> MihewaCANADA: use a pastebin when pasting that <8> OK, one moment. <8> http://pastebin.com/641502 <8> I have some stuff commented out at the moment. <4> wait.. so you want to learn the HTTP protocol and fix any common HTTP protocol issues you *will* end up having instead of using curl? <8> The external script is not receiving the file properly. <4> oh you even want to do a file upload <9> how can i adjust the timeout for file_get_contents()? i'm opening a remote url <8> Zircu, yes. <4> at this point you better not even consider using fsockopen, just stick with curl and properly set the parameters for a file upload <8> Would you help me with that? Because I'm stumped. <4> Viper007Bond: socket_set_timeout() didn't work? <9> zircu: i think that's only for fsocketopen <8> I've never cURL'd a file upload form before. <10> how come when i do $two = explode(":", $cast[$c]); $chax = $two[1]; it onyl saves the first letter, but when i do $two = explode(":", $cast[$c]); echo $two[1]; it displays the whole thing? <4> Viper007Bond: it is the general stream/wrappers setting <9> zircu: http://viper007bond.pastebin.com/641504 <9> zircu: hmm, alright <4> it may be buggy with versions of php earlier than php4.3 <8> So, Zircu? Do you have any idea what I can do? <11> how do i disable dir listing via .htaccess? <11> starting from the doc root <4> MihewaCANADA: yeah, read the docs on php.net/curl <4> deadcat: that is more of a apache question <11> ah <4> now you made me loose track on what i was doing :) <4> __hrz__: than somewhere between your mysql_connect() and mysql_query() either $db is getting unset or set to NULL or you are ***uming $db in in a global scope <4> ak47: what does var_dump($cast); describe? <8> Zircu. <4> ak47: wait <8> I'm reading the docs, and although it says cURL can handle HTTP form uploads, I'm not seeing any examples. <12> MihewaCANADA: When you say "form uploads", what do you mean? <13> TML: files <8> TML: http://pastebin.com/641502 <14> TML, he is refering to uploading files as if it was from an HTML form <4> MihewaCANADA: well, there is an example in the curl_exec notes <4> from fifa_2k <15> How could I use preg_match to find something, but it's all messed up with newlines, tabs and other stuff <8> MadSekkai: Tabs = "\t", New Lines = "\n" <4> MadSekkai: well the newlines can be handled with the 'm' modifier, <12> MadSekkai: Well, you have two choices: either try to match the "all messed up with newlines, tabs and other stuff", or normalize the data first and match normally <8> Zircu: Those are FTP uploads. I'm talking about posting to a file upload form. <12> zircu: You probably mean 's'. <1> zircu: could it be that php doesn't play nicely with mysql/pgsql if they're installed via rpms? <15> TML: By normalize, you mean? <12> pmark: No, that can't be it. <4> pmark: usually not without the -devel rpsm <12> MadSekkai: I mean un-mess it up <15> hehe <15> TML: I understand that, but what function/ what should I do to clean it up? <4> MadSekkai: or you can make your expression expect spaces <15> TML: It's just data gathered from a website (that I dont own) using file_get_contents <12> MadSekkai: Well, there are numerous string manipulation functions in PHP. A few that come to mind: str_replace(), strstr(), substr(). See php.net/strings for more.
Return to
#php or Go to some related
logs:
unix nice command multi-cpu #lisp Wikkan facts
bind dig returns nothing
/dev/dsp-1: Device or resource busy ubuntu skype #gentoo #linux #perl Bad protocol version identification pscp fasttrak 378 376 driver vista
|
|