#php
06 November 2007
Total 48 pages. You are browsing page 1/48.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Tue Nov 06 00:00:08 2007
--- Day changed Tue Nov 06 2007
00:00 <****> aikie: because your apache has a screwed up umask
00:00 <****> and where should I look to unscrew it?
00:01 <****> aikie: php.net/umask to set it manually, or contact your sysadmin to fix it correctly
00:02 <****> Temp4: Something like "function url_exsits($url) { $x = curl_init($url); curl_setopt($x, CURLOPT_FAILONERROR, 1); return (bool) curl_exec($x); }" works just fine for my purposes, but YMMV
00:02 <****> TML: thanks. I'll try that :)
00:03 <****> t would have been better for you to have actually attempted to understand the code yourself.
00:03 <****> s/^/I/
00:03 <****> Will it be ok to add CURLOPT_HEADER,CURLOPT_NOBODY ?
00:03 <****> isn't it better to use the HEAD request type?
00:03 <****> TML: that's why I am searching for small code and tried the code without _exec() first
00:04 <****> Temp4: "searching for small code" is an incredibly poor substitute to "reading the manual"
00:06 <****> Hello all. I am missing the predefined variable $_SERVER['HTTPS'] on a server. It just isn't there. Do any of you know what I need to set to get it populated?
00:06 <****> OlaX: Are you using SSL?
00:06 <****> TML: yep.
00:06 <****> OlaX: Are you using Apache?
00:06 <****> TML: should I add CURLOPT_NOBODY=1 / CURLOPT_HEADER=0 ? and what about curl_close() ?
00:06 <****> TML: Indeed.
00:07 <****> OlaX: Are you using the Apache SAPI?
00:07 <****> no need for close()
00:07 <****> Temp4: I sketched the basics, the rest is an exercise for you
00:07 <****> how would i go about counting the number of files in a directory?
00:07 <****> brantleyr: count(glob("dirname/*"))
00:08 <****> Or something like it
00:08 <****> TML : phpinfo() reports sapi_apache2 is loaded. I do not have admin access to the server (but can email the admin when I find the problem)
00:08 <****> if i use a form post to select files how can i take those files and upload through ftp with curl
00:08 <****> as the file is not local
00:09 <****> OlaX: Which Apache version?
00:10 <****> slb_: They will have to upload the file to you, so that it IS local, then you'll move it to its final destination
00:10 <****> so i work with the temporary file
00:10 <****> TML : apaceh/2.0.52 (Red Hat) PHP v 4.3.9 (also Red Hat)
00:10 <****> 4.3.9?!
00:10 * TML sighs
00:10 <****> Mmm, time to upgrade
00:11 <****> OlaX: Can you link me your phpinfo?
00:11 <****> Well, it's a university, things move slowly in some departments.
00:11 <****> 4.3.9 is like what? 3? 4 years old?
00:11 <****> Oh, and someone typoed 'Apache' there, too.
00:12 <****> Yeah, that was me. Oops.
00:12 <****> TML: the function is returning the whole file :( and if I add HEADER/NOBODY then I get errors: curl_setopt(): supplied argument is not a valid cURL handle resource
00:13 <****> Temp4: Sounds like you need to do a bit more reading on how to use curl
00:14 <****> TML: can you please tell me the reason for the errors ? is it because of my server or I did something wrong ?
00:15 <****> you did something wrong
00:16 <****> For example, you don't seem to grasp what CURLOPT_HEADER is going to do
00:17 <****> this sounds like a dumb question but $keyword = "boo"; $pos = stripos($keyword, $keyword); shouldnt $pos always be true?
00:17 <****> TheHodge: $pos will be 0
00:17 <****> when connecting to a SOAP server with SSL, does one need to "install" the certificate on the client?
00:18 <****> or just send it with the certRequest?
00:18 <****> (nuSOAP)
00:18 <****> TML: thanks. works now. I copied the NOHEADER lines from that php.net page and forgot to rename the handle vars
00:18 * Temp4 reads about setopt and exec
00:21 <****> CURLOPT_RETURNTRANSFER: "TRUE to return the transfer as a string of the return value of curl_exec() instead of outputting it out directly." --- out directly ? where ?
00:21 <****> TML so if ($pos != FALSE) { } should work with that then?
00:22 <****> I have a question regarding the subject line of a mail function in regards to a $_GET from a URL
00:22 <****> Whenever someone is available
00:23 <****> TheHodge: No
00:23 <****> !tell TheHodge about ===
00:24 <****> Where will the transfer output if I set CURLOPT_RETURNTRANSFER to false ?
00:25 <****> what was the command... dump_r() or something to see what's in a varible/structure??
00:26 <****> var_export?
00:26 <****> or print_r
00:27 <****> var_dump
00:27 <****> oh.. yes.. that's it..
00:27 <****> one of those
00:29 <****> http://pastebin.ca/762883 returns Warning: file_get_contents() expects at most 2 parameters, 3 given
00:30 <****> anyone know why?
00:30 <****> because it only expects 2?
00:30 <****> Because the function expects at most two parameters, and you gave it three.
00:31 <****> Uhh... http://php.net/file_get_contents states that more can be given.
00:31 <****> It also states that additional parameters were added in 5.1.
00:31 * StevenBao is an idiot
00:31 <****> how to see the type of something ? I want to find if a function returns a string or something else
00:31 <****> sorry.
00:31 <****> thanks
00:32 <****> Temp4: php.net/var-dump
00:32 <****> what's the best solution for importing the PEAR libs into my script ?
00:32 <****> should I turn safe_mode off do you think ?
00:32 <****> Thanks TML
00:32 <****> babo: safe_mode is generally more trouble than it's worth.
00:32 <****> Is there any way on PHP4 to use file_get_contents and emulate a certain browser?
00:33 <****> No, but you can always just issue your own HTTP request.
00:33 <****> Using fsockopen, one of PEAR's HTTP packages, etc.
00:33 <****> Curl..
00:34 <****> Of course, it'd be a lot easier to just upgrade PHP.
00:34 <****> mattmcc: not possible on this hosting account
00:34 <****> I'm looking at an example that just does an ...
00:34 <****> Get a better host? :)
00:34 <****> heh
00:34 <****> require_once('Mail.php');
00:35 <****> when I echo bool(true), I get 1 but If I echo bool(false), I get nothing(0,false..nothing) ? why?
00:35 <****> I know I can use if/else but just curious
00:35 <****> If they can't be bothered to provide PHP5, which has been around for 3 years, what other old crap are they sticking you with?
00:35 <****> to import the pear class. My php won't find Mail.php in the path like that. I can do a require_once('/usr/share/pear/Mail.php')
00:35 <****> but then safe_mode will block it cause Mail.php is owned by root
00:36 <****> how is it that http server tells a client about a cookie?
00:36 <****> I can't remember how I did that before - but I'm sure I used to use the PEAR libs on that server while having safe_mode turned on ...
00:36 <****> Renski: With a Set-Cookie header.
00:36 <****> ah
00:36 <****> babo: Read about the "include_path" configuration setting. php.net/configuration
Total 48 pages. You are browsing page 1/48.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
