Anyone run into that issue before? I've got a script that will login into Adsense just fine if I run it off my thumbdrive's wamp install. But if I install it onto my host's webserver, it doesn't work. I know for sure that the host has the php and apache ini files edited to allow curl...what else should I be looking for?
Check curl settings, or try checking your server's error log and see what the error it spits out. If you don't have access to your error log, add this to the top of the php code, and run the script from a browser and see what error it gives you. ini_set('display_errors',1);
Here's the curl info from wampp curl cURL support enabled cURL Information 7.19.4 Age 3 Features AsynchDNS No Debug No GSS-Negotiate No IDN No IPv6 Yes Largefile Yes NTLM Yes SPNEGO No SSL Yes SSPI Yes krb4 No libz Yes CharConv No Protocols tftp, ftp, telnet, dict, ldap, http, file, https, ftps Host i386-pc-win32 SSL Version OpenSSL/0.9.8k ZLib Version 1.2.3 and all i know from my host is this: curl cURL support enabled cURL Information libcurl/7.21.1 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Ok, i found this on another forum: Im opt to think that something may be wrong with the permissions for the apache/php user that calls curl. I say this because the script works fine on a test bed where PHP/Apache/ModSSL/Curl have been compiled from source - and not on this server, where they are using stock RPMS for Redhdat Fedora 1. Can someone suggest how I go about checking the user that PHP is running as? Or is it actually the user for Apache that is calling curl? --- I'm apt to think this may be the case..not sure though. How does one tell what user php/apache is calling curl?
I posted already and deleted it, because you didn't post your code.... unless you do that, its just a guessing game. The problem can be anything, cookies if your using them, or some of the curl functions might be blocked, FOLLOWLOCATION is a common one some providers block, so that means you need to make 2 calls.
yum install php-curl yum install php-ssl service httpd restart PHP: If php works, the permission for php curl will work.