[Zope] RE: [PHP Object]

Norman Khine khine@btinternet.com
Tue, 10 Apr 2001 15:30:56 +0100


Hi,
Sorry, it is not working, I did ALL you had suggested, but am still getting
the same error:

Error Type: IOError
Error Value: [Errno 2] No such file or directory: '/tmp/986911909_683.out'

Currently I am sub hosting so I had to a ln -s php ~/www/cgi-bin/php

I also changed the PHPProduct.py, restarted Zope, but nothing, the product
is OK -- ie not broken -- but I still get the above error when I execute the
following PHP file

<? phpinfo(); ?>


Hopefully this should have given me all the PHP information.

Any ideas

Norman


=========================================
"Eternity is Time
Time, eternity
To see the two as opposite
Is Man's Pervisity"

The Book of Angelus Silesius



-----Original Message-----
From: Ioan Coman [mailto:ioan@usa.net]
Sent: Monday, April 09, 2001 8:24 AM
To: Norman Khine
Subject: Re: [PHP Object]


Hi!

First put php somewhere into your path
(make a symbolic link with :
ln -s ...where/is/php /bin/php)

Look into PHPProduct.py which is in ...zope/lib/python/products/PHP/
and find the code :
        for i in REQUEST.form.items():
           os.putenv(i[0],i[1])
        tmp=string.replace(str(time.time()),".","_")
        file1=tmp+".txt"
        file2=tmp+".out"
        f=open(file1,"wt")
        f.write(decapitate(r, RESPONSE))



change
tmp=string.replace(str(time.time()),".","_")
into
tmp='/tmp/'+string.replace(str(time.time()),".","_")
and keep the spaces, don't change the align of text code.


This is a fix for unix.
Tell me if you get another error.

Ioan.



"Norman Khine" <khine@btinternet.com> wrote:
> Dear Ioan,
> Could you help me to implement PHP Object. I have installed it on FreeBSD
> which is running Zope 2.3.1b1 with python 2.0, I installed the PHP Object
> Product which is NOT broken and can add PHP objects within the Zope tree.
>
> To test this I created a new DTML Method, called test with the following
> script within it.
>
> <? phpinfo(); ?>
>
> I was hoping this to bring up ALL the details for PHP, but I get the
> following Error:
>
> Error Type: IOError
> Error Value: [Errno 2] No such file or directory: '986726657_427.out'
>
>
> Traceback (innermost last):
>   File /usr/home/khine/usr/local/Zope/lib/python/ZPublisher/Publish.py,
line
> 222, in publish_module
>   File /usr/home/khine/usr/local/Zope/lib/python/ZPublisher/Publish.py,
line
> 187, in publish
>   File /usr/home/khine/usr/local/Zope/lib/python/Zope/__init__.py, line
221,
> in zpublisher_exception_hook
>     (Object: Traversable)
>   File /usr/home/khine/usr/local/Zope/lib/python/ZPublisher/Publish.py,
line
> 171, in publish
>   File /usr/home/khine/usr/local/Zope/lib/python/ZPublisher/mapply.py,
line
> 160, in mapply
>     (Object: <string>)
>   File /usr/home/khine/usr/local/Zope/lib/python/ZPublisher/Publish.py,
line
> 112, in call_object
>     (Object: <string>)
>   File
/usr/home/khine/usr/local/Zope/lib/python/Products/PHP/PHPProduct.py,
> line 107, in __call__
>     (Object: <string>)
> IOError: (see above)
>
> My setup presently is that I have a PHP project which I would like to
manage
> from within Zope which sits behind Apache.
>
> Regards
>
> Norman
>


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1