[PHP] non-blocking sockets + newbie compile question
1) socket_set_blocking()... what the devil's up with this? *I* get socket_set_blocking(): supplied resource is not a valid stream resource, which is obviously a lie, since I can connect to the server program and socket_recv and socket_send both work. I'm using PHP 4.3.1 (cgi) 2) I figured I'd compile the latest CVS snapshot, too, to see if maybe my non-blocking socket will work with that. I've done configure and make, but not make install. What do I do to get my nice new php without replacing the old one? -Josh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Curl request works on command line but not in script
Hi folks, I'm trying to send an XML request to a server to get its response back... I can get it to work on the command line (with passthru) but not with libcurl. I'm using libcurl 7.9.2 which may actually be different from the curl on the command line... the latter came with OS X, the former came from entropy.ch with the PHP package I installed. Of course my host is using 7.9.4 and the script doesn't work there either. I've tried it with both GET and POST... here are some setup variables. $testrequest = "$server?API=Rate&XML=EXPRESS2077020852100NoneREGULAR"; $post['API']="Rate\n"; $post['XML']= "'EXPRESS2077020852100NoneREGULAR'\n"; # (I've tried it with the 's and without, with the \n's and without) $d1 = "API=Rate"; $d2 = "XML='EXPRESS2077020852100NoneREGULAR'"; $ch = curl_init(); # doesn't work, returns Error 400 curl_setopt($ch, CURLOPT_URL, $testrequest); # also doesn't work, returns BAD REQUEST curl_setopt($ch, CURLOPT_URL, $server); curl_setopt($ch,CURLOPT_POSTFIELDS,$post); # what DOES work passthru("curl -d " . $d1 . " -d " . $d2 . " $server"); Any ideas? -Josh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CC Processing Merchants
We use an Authorize.net reseller, merchantexpress.com. While the sign up process can be a hassle, I'm pretty happy with Authorize.net. Since we use the ADC Direct method, we don't lose control at all. When the customer submits their credit card info, our PHP script uses Curl to securely request authorization from Authorize.net and then decides what page to show the customer based on the response it gets (i.e., card declined, card accepted, etc) -Josh >A few months ago I setup a client with Authorize.net. I always hated >using them as I lose control for a click but it worked out well. I save >all the data before I send them off and then update their record when >Authorize.net sends them back to the url that I gave them. It has >worked well. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: PHP & XML
>To me this is a lot of work and processing for limited benefits, a simple db >abstraction layer provides you with a divide between you db queries and the >presentation of your site, what benefits do you see in doing this? I have to agree with Simon. I am at a loss when it comes to seeing any benefit to XML that doesn't involve data exchange between at least two parties. I've spent the last two years building database-backed websites, so I'm constantly trying to improve how I build them in order to make design and maintenance easier... I used to rely heavily on SSI for this, and now I rely more on PHP... if XML would make things easier, believe me, I would LOVE to know how... but I just don't see it. -Josh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: PHP & XML
I still wouldn't use XML for this. I mean, all the articles are in the database, and I'm already using PHP to pull them out and format them into html, right? I can just as easily use PHP to put them into all those other formats. So again, why waste time with XML unless I need to feed these articles to others, like in a newsfeed situation? >But if I were ever I would definitely invest the effort that is required, >but until then I will save myself from the extra work. >Let's imagine you create a website of an online magazine, this magazine >publishes in HTML, PDF, TXT, PS, etc, etc, etc. How would you do it? > >I would use XML to write the articles and then stylesheets to transform the >articles to the formats I want. Write once, publish anywhare ;-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] what kind of weird problem is this?
I just installed the php 4.2.1 from entropy.ch and when running this script: I get this error: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /Library/WebServer/Documents/west.php on line 3 Anyone know what *that* is about? -Josh
Re: [PHP] what kind of weird problem is this?
Thanks, I didn't know about od 000< ? p h p \n \n $ t e s t 312 = 312 " 020j u s t a b o u t a n y t h 040i n g " ; \n \n e c h o " t h i 060s w a s j u s t a t e s t 100" ; \n \n ? > 106 That is REALLY weird. I use BBEdit. I've always used BBEdit. -Josh >Are you using a broken editor of some sort? All I can think of here is >that your spaces aren't really spaces. Try an od -c on that file from >your prompt. > >-Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what kind of weird problem is this?
Opening the file in vi shows that BBEdit is, for some reason, using \xca where the spaces should be. Off to BareBones.com I go... >Well, 312 is not a space. Please use a text editor that knows what a >space is. The other lines look fine, but your $test<312>=<312> stuff >there is bogus. > >-Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OSX + Apache + PHP + MySQL
You don't need OS X server. OS X includes Apache and Perl.. you can get MySQL and PHP4 from http://www.entropy.ch -Josh At 6:06 PM +1000 6/21/02, Justin French wrote: >Do I need OSX SERVER to run everything I'd need for a development >environment, or will the base version of OSX have the capabilities I need >(running a test server of Apache/PHP4/MySQL/Perl/etc? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Gradients in PHP & GD
"It seems pretty straightforward to me." is more responsible than "It's pretty straightforward." Nice time to be changing your story ;) >Anyway, thank you for your input on this thread. THAT was really helpful. It didn't seem straightforward to the original writer, or else why the question... I think a more helpful response at that point is to ask questions, rather than suggest that the person simply "write it". There seems to be some hostility and impatience here toward new users who aren't as familiar with how to ask for help. If this exchange prompts anyone to examine themselves and respond (or ask) in more gentle ways, I think my input will have definitely been helpful. -Josh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web Printing
>Don't tempt them, people _do_ come up with the most oblique of reasons why >their question is related to php. According to the Discordian Law of Fives, their questions share with PHP (and everything else) a relation to 5. So you always have that. -Josh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Drop connection, keep running?
This sounds like the right track to me... the script has to finish for the page to stop loading, yes? So exec("your_other_script &"); and be done with it, yes? >I have never heard of someone wanting to do this, but you might want >to look into methods of executing shell commands in the background, >which seems like it should be possible. Basically, you're wanting to -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Gradients in PHP & GD
>Well, I'm deeply moved by your concern - I don't think I was either >hostile or impatient however - I was just stating the obvious and >implying a question (why isn't it straightforward). That was my problem with your post--why imply the question, and leave it open to interpretation? Why not just ask? Who would mistake a direct request for more info as hostile or impatient? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Gradients in PHP & GD
By this point, I am trying to speak generally. Not trying to pick on Bogdan specifically, since communication can always be improved. >Please tell me what would be a question which would leave all these >answer opportunities open while also being brief and obviously not >being hostile? Hmm... not sure... how about, "I don't have enough info from your post to help... please tell us more about what exactly you are having problems with?" How does that sound? That's fairly general, based on a post I saw here recently. Of course it could be augmented with questions like "Are you new to PHP?" and, in the specific case we've been discussing, "Are you trying to create a basic gradient or something unusual?", etc. -Josh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Editing Word Documents
It sounds like a job for WebDAV to me... -Josh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] shtml & php in the same file?
I'm working on this site that is all shtml files... in order to add some dynamic content, it just includes php scripts in different places. However, sessions don't work unless you start it before outputting anything to the server and that's what's needed now... I don't want to change all the links to end in .php and do the includes in php just so I can put at the beginning of all the pages. So I was trying to get the server to treat shtml files as both server-parsed and as php scripts. Not working too well. ;) Anyone have any ideas? -Josh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] shtml & php in the same file?
There are people who don't use Apache??? ;) >ending in .php and add the same thing for .shtml. Then, both will be >parsed by PHP first. But then will it be parsed by SSI second, as we would like? Doesn't seem to... -Josh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php