Re: [PHP] Is SOAP not really enabled?

2006-09-11 Thread Ryan Creaser


Brian Dunning wrote:

The techs at Rackspace just enabled SOAP for me. I have a command:

$soap = new 
SoapClient('http://geocoder.us/dist/eg/clients/GeoCoderPHP.wsdl');


which works fine on my PHP 5.1.6 development server, but it won't run 
on my 4.3.9 server at Rackspace. The only place 'soap' appears in 
phpinfo() is '--with-soap' up in the Configure Command section. There 
is no Soap section further down on the page, as there is on my dev 
server (which, I notice, says '--enable-soap' instead).


Sorry to say, but there is no native soap extension in php4, it was 
introduced with php5. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Gmail / RSS accessing from script

2006-11-08 Thread Ryan Creaser

Chris Ditty wrote:
I am trying to write a small module to display my gmail email on my 
custom

startup page.  I am using this url with the correct userid and password -
https://USERNAME:[EMAIL PROTECTED]/gmail/feed/atom .

When I put it in the web browser, it acts like it is supposed to.  But 
when

I try and script it, it returns a 401 unauthorized error.  I get the same
error when I try a wget also.

Has anyone had any success in getting this to work from a script?  The
output is supposed to be simple RSS once I get past this error.



I'm only guessing, but you probably need to set the http Authorization
header in the request. If you are using curl, do something like:
   curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
   curl_setopt($curl, CURLOPT_USERPWD, "USERNAME:PASSWORD");

Check out wget's --http-user and --http-password options too.

Ryan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Fatal error: Call to a member function on a non-object

2006-12-06 Thread Ryan Creaser


XeRnOuS ThE wrote:


First, if a fatal error is occurring on line 24, why is it executing 
line 24 successfully and returning data?
Second, if there’s a fatal error on line 24, why is line 25 still 
processed?




Maybe because you're running it twice? Line 41 with the $this->Auth( ... 
seems to be running the constructor again, it might be failing there?


- rjc

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Installation question

2006-12-07 Thread Ryan Creaser


Beauford wrote:
Hi, 


I am trying to install vBulletin and keep getting this error: Fatal error:
Call to undefined function: gzinflate().

The only thing I can find on this is that zlib needs to be configured with
PHP at compile time. So I reinstalled PHP using the following:

./configure --with-mysql --with-apache=../apache_1.3.36 --with-zlib
--with-gd
make
make install

The above finishes with no error.

I rebooted, but still get same error, and zlib or gd doesn't show up in my
phpinfo output. zlib is installed, and from my understanding gd is included
with PHP, all the other libraries for gd are also installed. So what am I
doing wrong?

Also, how do I find out where something is installed? i.e. zlib. If I do a
search on it I get hundreds of hits...

Last. In the above ./configure line I get a message from PHP saying I am
using the built in version of MySQL - if I point it to the actual MySQL
source directory I get the following error.

configure: error: Cannot find libmysqlclient library under ../mysql-5.0.22

Any help is appreciated.

I am using Slacware 10, PHP 4.4.4, MySQL5.0, and Apache 1.3.36

Thanks


  


Did you recompile apache after running php's make install? Using 
--with-apache builds a module that gets compiled *into* apache (as 
opposed to --with-apxs which creates a dynamic module), ie. you need to 
rebuild apache after building php.  My guess is the gzinflate error 
probably comes from an old php module.


- rjc

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] fopen failed to open pipe file in Linux+Apache environment

2006-12-07 Thread Ryan Creaser


mike xu wrote:

Hi, I have problem of open named pipe file in linux.

Here is my sample code:

 $fifo_file = "/dev/pmsg";
 @ $fp = fopen($fifo_file, 'w+b');
 if(!$fp) {
   echo "open ".$fifo_file." failed";
 }
 else {
   $msg_cmd = "ttt";
   fwrite($fp, $msg_cmd, strlen($msg_cmd));
   fclose($fp);
 }

There is an other program which is waiting for messages from /dev/pmsg
forever. You could also test it by running `cat /dev/pmsg` in shell 
console.

Every one have permissions of read and write for /dev/pmsg
prw-rw-rw- 1 root root 0 12-08 10:13 /dev/pmsg

Environment info: php-5.1.2-5, httpd-2.2.0-5.1.2, OS: Redhat FC5

Thanks in advance,
Mike


Are you getting any errors? What if you remove the @ from the start of 
line 2, any errors now?


- rjc

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] fopen failed to open pipe file in Linux+Apache environment

2006-12-08 Thread Ryan Creaser

mike xu wrote:

Thanks a lot forr your reply.

Here is the error msg:
*Warning*: fopen(/dev/pmsg)
[function.fopen]:
failed to open stream: Permission denied in *
/var/www/html/Source/test/register_user.php* on line *31

It still doesn't work even if I move pmsg to /tmp/ directory and 
change its

own to appache...



I don't really know Fedora or SELinux, but since your permissions seem 
ok could it be the SELinux policy for httpd causing you grief?


- rjc

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Upload files problems

2006-05-24 Thread Ryan Creaser

Ing. Tomás Liendo wrote:


Hi!
When the users of my system try to go up files of more than 460 K, they 
receive the message:
Fatal error: Maximum execution time of 90 seconds exceeded in 
c:\websites\iracbiogenar48\iracbiogen.com.ar\virtual\procesa_msjpriv.php on 
line 2


I'm using the following method to up load the files:

if($archivo_name<>"")
{
  $dpath="./archivos_recibidos/".$archivo_name;
if(move_uploaded_file($archivo, $dpath))
{//Se realiza la transmision del archivo al servidor.
echo "El archivo 
".$archivo_name.". ha sido transferido exitosamente.";

}
else
{
echo "sans-serif>ADVERTENCIA: El arcvhio ".$archivo_name.". no ha podido 
enviarse.";

}


Do I have control on these 90 seconds? or is a parameter of the server?
What can I do to solve this problem?

Ahead of time thank you very much,

Tom.

 

See http://php.net/set_time_limit, although it might not work if your 
host uses safe mode.


- Ryan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] calling JS function from php

2006-05-24 Thread Ryan Creaser

suresh kumar wrote:


I am facing one problem in my project.I am trying to call a javascript function 
from php.but it not executing.this is my code.
  
  function clientTime() {
   
   var cNow = new Date();

   var cHour = cNow.getHours();
  var cMin  = cNow.getMinutes();
  var hour= cHour + ":" + cMin;
  return hour;
  } //End function clientTime
 function clientDate() {
var cDate  = new Date();
 var clientYear = cDate.getFullYear();
 var clientMonth = cDate.getMonth();
 var clientDay   = cDate.getDate();
 var year= clientYear + "-" + clientMonth + "-" + clientDay;
 return year;
} //End function clientDate
  
  
 ";
   print "clientTime()";
   print "clientDate()"; ?>
  
i need help from u.



-
 Yahoo! India Answers Share what your know-how and wisdom
Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now
 


Hi Suresh

Unfortunately you cannot call a javascript function from directly within 
php. What you are doing is generating a web page that has invalid 
javascript. Try looking at your output with "view source" for clues.


Ryan


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in

2006-05-25 Thread Ryan Creaser



Mark Sargent wrote:


Hi All,

I get the error for line 15 for this code,

";
18 echo "$_SESSION['text']";
19 echo "";
20 ?>

I have put ' ' quotes around the " " quotes for each font attribute so 
that the parser doesn't think the echo is finished too early. Is that 
wrong? I know that this code would get tedious for lots of text and 
CSS would be better, but, it's just a little study project from the 
book I'm following. Cheers.


Mark Sargent.


any of these will work:
 echo "after the variable.

 echo "http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help with Class

2005-09-08 Thread Ryan Creaser

Ian Barnes wrote:


   require_once (
$fetchd['path'].'sdk/ipbsdk_class.inc.php' );
 



What is the above line doing? It looks like you are trying to redeclare 
the ipbsdk class each time around the loop which is illegal in php. You 
can't do :


class ipbsdk {
...
}

and then (in the same request)

class ipbsdk {

}

because the names will clash. This should  cause a "Fatal error: Cannot 
redeclare class ipbsdk ..." message though. Are you seeing any errors?


- Ryan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help with Class

2005-09-09 Thread Ryan Creaser

Ian Barnes wrote:


Hi Ryan,

I am including a different class.inc.php file each time the foreach loops.
Each one sits in a different dir. Yes, I do get that error. 


My understanding of OOP is that I could null the $sdk variable and re-init
it when the loop starts again..
 

You'd be right if  the name of class was unique in each class.inc.php. 
However, PHP doesn't allow the same class name to be used more than 
once, regardless of the include file it's from. It's the same with  
function names. The problem is if php allowed you to have two (or more) 
classes with the same name it wouldn't know which one to choose when you 
used that name - in your case it is obvious because you want to use the 
most recently declared class but php can't be excepected to guess that.


You can, however, do something like:

Which would set $var to a new instance of the class every time you loop. 
You could null the variable every time but it's not required.


One solution for you might be to redesign the code so you only need one 
ipbsdk class , which could take the path as an argument. This class 
could then be repeatedly instantiated with a different path each loop, 
something like this:


foreach (...) {
  ...
   $SDK = new ipbsdk($fetchd['path']);
  ...
}

I think your current strategy will lead to a dead end, unless someone 
else can see something I'm missing (which is highly likely!).


Hope this helps a little.

Ryan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php