|
From: Leo C. & C. H. <le...@cr...> - 2004-11-02 23:08:36
|
<html><body> <font style=3D"font-family: arial,helvetica,sans-serif;" size=
=3D"2"><br> <br></font><font style=3D"font-family: arial,helvetica,san=
s-serif;" size=3D"2"><br>>HOWEVER, the files need to be written by Rolod=
ap into the Unix filesystem. The <br>>filehandles need files of the form=
/var/www/rolodap/temp/file.csv<br>>Unless these is some PHP feature of =
which I am unaware (I'm an experienced <br>>programmer but PHP newbie) t=
hat enables opening filehandles from URLs then <br>>the proposed change =
should not work.<br>
<br>
I am not a PHP expert by any means but this works. I get the correct output=
(see attached file caro-mergelist.csv).<br>
Attached is also a diff command from the original makelist.phtml rolodap-v1=
(file diff_makelist.out)<br>
<br>
I actually print the filehandle in the makelist.phtml and it is blank. Foll=
owing is the output:<br>
<br>
filehandle: <br>
summfile: Resource id #13<br>
<br>
</font><font style=3D"font-family: arial,helvetica,sans-serif;" size=3D"2">=
I also test it the way you originally suggeted and it also works. As matter=
of fact, it is a better solution (less messy).<br>
<br>
This change also apply to the palmexport.phtml (see diff_palmexport.out fil=
e attached)<br>
</font><font style=3D"font-family: arial,helvetica,sans-serif;" size=3D"2">=
<br>
>Also, could you explain what the issue is with ownership?<br>
httpd run as user apache so if the temp file is not own by apache you get t=
he following error:<br>
<br>
Warning: fopen(/var/www/html/rolodap-v1/temp/caro-mergelist.csv):
failed to open stream: Permission denied in
/var/www/html/rolodap-v1/makelist.phtml on line 41<br><br><br>On Monday 01 =
November 2004 22:24, Leo Cruz & Caro Hernandez wrote:<br>> Philp:<br=
>> Thank so much for this chamges. I have to do this in the past but I<=
br>> hard-code to make work.<br>><br>> In my test I found the fol=
lowing:<br>><br>> 1) In the file that you sent with the difference y=
ou miss the following:<br>> diff -Nur makelist.phtml /var/www/html/rolo=
dap-v1/makelist.phtml<br>><br>> -  =
; $filehandle =3D fopen ("$=
filename",w);<br>>
- &n=
bsp;
$summfile =3D fopen ("$sumfilename",w);<br>><br>>
+ &n=
bsp;
//$filehandle =3D fopen ("$filename",w);<br>>
+ &n=
bsp;
$filehandle =3D fopen ("$fileurl",w);<br>>
+ &n=
bsp;
//$summfile =3D fopen ("$sumfilename",w);<br>>
+ &n=
bsp;
$summfile =3D fopen ("$sumfileurl",w);<br>><br>> 2) /temp ownership<=
br>> [root@nightmare rolodap-v1]# pwd<br>> /var/www/html/rolodap-v1=
<br>><br>> [root@nightmare rolodap-v1]# ls -ald temp<br>> drwxr-=
xr-x 2 apache apache &=
nbsp; 4096 Oct 22 15:57 temp<br>><br>><br>> Carolina<br>>=
; <br>><br>> --- Philip Ward <p.g...@st...> wrote=
:<br>><br>> From: Philip Ward <p.g...@st...><br>> Dat=
e: Fri, 22 Oct 2004 09:52:05 +0100<br>> To: rol...@li...=
forge.net<br>> Subject: [Rolodap-develop] Intro and Mailing List Patches=
<br>><br>> Hi folks,<br>><br>> This is my first time on the mai=
ling list, so here's a brief intro.<br>> My name is Philip Ward. I'm one=
of the Unix admins at the University of<br>> Stirling in central Scotla=
nd. I've been doing this for nearly two months,<br>> previously having b=
een a developer doing all sorts of things from Unix<br>> daemons to embe=
dded C on microcontrollers with some Oracle and Visual stuff<br>> in bet=
ween. I've been a Unix user since 1992 and a GNU/Linux home user<br>> si=
nce 1998, having started hacking since receiving a BBC Micro in 1983.<br>&g=
t; I used to use Rolodap 0.9 at home. It was a pain to setup, but a joy to =
use<br>> once working. When I moved things around at home I tried to ins=
tall Rolodap<br>> on the new server, but gave up and instead got ldap-ab=
ook working, and am<br>> still using it at home.<br>> My interest in =
Rolodap was rekindled when a friend asked me for a contacts<br>> databas=
e that supported contact categorisation. I reckoned that Rolodap was<br>>=
; what he needed. I spent a bit more time trying to beat Rolodap into<br>&g=
t; submission and finally got it working.<br>> This friend wants a searc=
hable email audit trail, so I may end up adding<br>> this functionality =
into Rolodap and sending in the patches. If anyone has<br>> any ideas on=
how to add this then I'd love to hear them.<br>> I'm thinking that the =
best way would be to make Rolodap do ALL the emailing<br>> (so remove th=
e mailto: link from contact display and send all emails<br>> through the=
rolodap email client) and then record all transactions in the<br>> dire=
ctory. Another way of doing it (probably more complex but will enable<br>&g=
t; users to use their preferred email client) would be to launch the defaul=
t<br>> email client but add ro...@ho... in the cc list. A mail r=
eader<br>> could then received the message and feed it into the director=
y.<br>> Whaddya think?<br>><br>> Right, now for a wee gift. I noti=
ced that Mailing list generation is<br>> broken. Rolodap generates the f=
iles in the temp directory<br>> (/var/www/rolodap/temp/ in my case) but =
when you then click to download the<br>> file it<br>> passes /var/www=
/rolodap/temp/filename.csv to the browser when it should<br>> pass http:=
//host.domain/rolodap/temp/filename.csv to the browser. The<br>> attache=
d patch adds TEMPURL to rolodap.conf and uses TEMPURL in generating<br>>=
the url for the file download.<br>> Please accept my apologies if this =
has already been fixed in CVS.<br>><br>> Bye for now,<br>><br>>=
Phil Ward.<br><br>-- <br>The University of Stirling is a university establ=
ished in Scotland by<br>charter at Stirling, FK9 4LA. Privileged/Confident=
ial Information may<br>be contained in this message. If you are not the ad=
dressee indicated<br>in this message (or responsible for delivery of the me=
ssage to such<br>person), you may not disclose, copy or deliver this messag=
e to anyone<br>and any action taken or omitted to be taken in reliance on i=
t, is<br>prohibited and may be unlawful. In such case, you should destroy =
this<br>message and kindly notify the sender by reply email. Please advise=
<br>immediately if you or your employer do not consent to Internet email<br=
>for messages of this kind.<br><br><br><br>--------------------------------=
-----------------------<br>This SF.Net email is sponsored by:<br>Sybase ASE=
Linux Express Edition - download now for FREE<br>LinuxWorld Reader's Choic=
e Award Winner for best database on Linux.<br>http://ads.osdn.com/?ad_idU88=
&alloc_id=12065&op=3Dclick<br>_____________________________________=
__________<br>Rolodap-develop mailing list<br>Rol...@li...=
orge.net<br>https://lists.sourceforge.net/lists/listinfo/rolodap-develop<br=
></font><br> <br><hr>Sign up for FREE email from Everyone.net email at=
http://www.everyone.net<br></body></html>
|