php-windows Digest 17 Oct 2007 04:07:05 -0000 Issue 3352
Topics (messages 28564 through 28569):
Re: Can't load 'SimpleXML' as 'libxml' is not loaded in Unknown line 0.
28564 by: Rob
Free unlimied hosting for you!
28565 by: dungdm001
Re: PHP-memory leak with COM-objects?
28566 by: Rafael
28567 by: Rafael
Re: PHP Install problems
28568 by: Jeff White
sms service
28569 by: Nishantha Pradeep
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
I will be fixing this soon to support the new .30 libxml2 builds (just
been lazy). For now, all you need to do is edit the config.w32 file in
ext/libxml with the following (not on my windows system so might not be
100% accurate):
change:
if (CHECK_LIB("libxml2_a.lib;libxml2.lib", "libxml") &&
to
if (CHECK_LIB("libxml2_a_dll.lib;libxml2_a.lib;libxml2.lib", "libxml") &&
change:
ADD_FLAG("CFLAGS_LIBXML", "/D LIBXML_STATIC ");
to:
ADD_FLAG("CFLAGS_LIBXML", "/D LIBXML_STATIC /D LIBXML_STATIC_FOR_DLL ");
do buildconf, then configure again and finally nmake. That will now
build using the new static for dll lib of libxml2.
Rob
Chhaya Sharma wrote:
I am trying to integrate libxml2 with PHP by linking it with
libxml2_a_dll.lib.However this is not happening.Apache throws following
warning.
PHP Warning: Cannot load module 'SimpleXML' because required module 'libxml'
is not loaded in Unknown on line 0
I have added libxml.obj to STATIC_EXT_OBJS and libxml2_a_dll.lib to
STATIC_EXT_LIBS and LIBXML_STATIC_FOR_DLL to STATIC_EXT_CFLAGS.
Following are the two crucial lines in the makefile for obtaining library
libxml2_a_dll.lib .
.c{$(LIBXML_STATIC)}.obj:
$(CC) $(INCLUDE_FLAGS) $(CFLAGS) /D "LIBXML_STATIC" /D
"LIBXML_STATIC_FOR_DLL" /Fo$(LIBXML_STATIC)\ /c $<
all: $(STATIC_OBJS) $(SO_OBJS)
lib.exe /nologo /OUT:$(LIBXML_STATIC)\libxml2_a_dll.lib $(STATIC_OBJS)
I am novice to such kind of job.Can anyone please help me.
Thanks,
Chhaya
--- End Message ---
--- Begin Message ---
Space: 250 MB Ads (Banner). Unlimited bandwidth
Upload: FTP, Browser Scripting: PHP
Other Features: MySQL databases, PhpMyAdmin. AHCS c-panel. All file types
allowed. No file size limit. POP3, Web-based Email. 30-days Inactivity
limit. Automatic scripts installer.PHP flags manager. Free web hosting
instant activation. Addon domains. Same company and servers as ByetHost.
http://www.boy.us.com/freehosting.php
--
View this message in context:
http://www.nabble.com/Free-unlimied-hosting-for-you%21-tf4635234.html#a13237050
Sent from the Php - Windows mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
I'm a little late on the thread, so I apologize in advance if I say
something out of context / already mentioned.
Thank's God, I haven't had the need to use PHP + COM + MS Office, but I
did use C# + MS Office, and I found that for desktop applications
Application.Quit() was enough, whereas in ASP (.Net) I had to kill the
process --and yes, I did made all the dance about calling the GC,
ReleaseComObject and such. So, if possible, don't use COM.
Now, as for what seem to be want, is it like...
a) open "x.doc" with PHP+COM+Word
b) the user makes changes
c) "x.doc" gets saved with the changes
Is it like this?
If it is, then you are trying to do something I don't think is
possible, because the user will be working on the Client machine, not on
the Server, hence, PHP will have no access to it unless the client sends
you his "x.doc" version and you replace the existent one with it.
So why don't you simple take it as a file server? Something like I send
you the current version, you make the changes (on your PC) and them you
deliver it to me once again --yes, there will be "synchronization"
issues with this approach, and you can only _help_ the user check it
with a time-stamp or something similar.
Hope this helps.
Gustav Wiberg wrote:
Hi again!
I noticed I didn't pay enough attention to your question... Sorry for that.
The file is stored on the server!
And with COM-objects I managed to do a PHP-script - create a
(Word)-COM-object to open a certain file (say c:\test.doc on the
server). I changed te c:\test.doc from within the php-application and
pushed Saved (in the Word-object that open up). And Yes, the content
changed in the file c:\test.doc which is on the server.
TinyMCE or whatsoever is out of question. It must be word. I don't want
to change a whole organisations policy about using word... :-)
Best regards
/Gustav Wiberg
----- Original Message ----- From: "John Mertic" <[EMAIL PROTECTED]>
To: "Gustav Wiberg" <[EMAIL PROTECTED]>
Cc: "PHP-Windows Group" <[EMAIL PROTECTED]>
Sent: Wednesday, October 10, 2007 10:07 PM
Subject: Re: [PHP-WIN] PHP-memory leak with COM-objects?
Using PHP ( whether via COM or not ) in a web application to interact
with a file on the local user's machine isn't possible. PHP is a
server-side language in this context, and it interacts with the COM
object on the server which has no access to the user's local machine.
If the file is on the server, you can't push changes to it from the
Word editing control in IE, it will only allow saving changes to the
local computer.
If you are looking at doing the first option, then a PHP web app is
out of the question; perhaps a short VBScript to do any preprocessing
of the document would be in order. If you are looking at the second,
you may want to consider one of the Rich Text Editing tools that you
can drop in a webpage, such as FCKEditor or TinyMCE; these typically
will want input and output in XHTML however.
John
On 10/10/07, Gustav Wiberg <[EMAIL PROTECTED]> wrote:
Hi!
It was just an example, but say Yes. Does it make a difference?
Best regards
/Gustav Wiberg
----- Original Message -----
From: "John Mertic" <[EMAIL PROTECTED]>
To: "Gustav Wiberg" <[EMAIL PROTECTED]>
Cc: "PHP-Windows Group" <[EMAIL PROTECTED]>
Sent: Wednesday, October 10, 2007 7:55 PM
Subject: Re: [PHP-WIN] PHP-memory leak with COM-objects?
> Is c:\test.doc a file on the local user's machine or the server?
>
> On 10/10/07, Gustav Wiberg <[EMAIL PROTECTED]> wrote:
>> Hi again!
>>
>> I want the logged-in user to able to open a word-file (or an >>
Excel-file
>> or
>> whatever) and then Push Save-Icon and make sure that changes are
>> actually
>> made.
>> Example:
>>
>> John opens up file c:\test.doc. He writes "Ugly cow" in it and
pushes >> the
>> save-icon. Ugly Cow is now stored in file c:\test.doc. Working with
>> COM-objects is the only solution I have found!?
>>
>> Normally If John opens up c:\test.doc Internet Explorer (or whatever
>> browser) saves the file temporarily in some temp-folder (don't
know >> exact
>> location), lets say c:\temp\sdifiuweoriu2734872.tmp. When John pushes
>> Save-icon he saves the new information TO the temporarily stored
file >> IF
>> he
>> doesn't use Save AS...
>>
>> Please come with suggestions :-)
>>
>> Best regards
>> /Gustav Wiberg
>>
>> ----- Original Message -----
>> From: "John Mertic" <[EMAIL PROTECTED]>
>> To: "Gustav Wiberg" <[EMAIL PROTECTED]>
>> Cc: "PHP-Windows Group" <[EMAIL PROTECTED]>
>> Sent: Wednesday, October 10, 2007 1:30 PM
>> Subject: Re: [PHP-WIN] PHP-memory leak with COM-objects?
>>
>>
>> > I've worked a lot with the Word COM and while it works well on a
>> > single desktop, I wouldn't recommend it for a server process. It's
>> > rather slow and while the memory eventually gets cleaned up, it
>> > still
>> > takes up a lot of memory for as little as it does. I'm not so sure
>> > OpenOffice is much better in this regard.
>> >
>> > You could push these tasks to another server, but I'd also look at
>> > what you are doing and see if you can do it another way. We >> >
currently
>> > use Word documents as template for a mail merge type operation
and >> > are
>> > looking to move these to RTF since that enables us to take Word
out >> > of
>> > the loop when doing the mail merge ( we actually just do a
global >> > find
>> > and replace in the document since we've found more consistent >>
> results
>> > with that ). But again, this all depends upon the application.
>> >
>> > John
>> >
>> > On 10/10/07, Gustav Wiberg <[EMAIL PROTECTED]> wrote:
>> >> Hi!
>> >>
>> >> I want to use COM+ objects (especially with Word). I have >> >>
understood
>> >> (a
>> >> lot of reading on the Internet) that when initiating
COM-objects >> >> with
>> >> Word (even if the object is released in variable in the code).
Word
>> >> leaks
>> >> a lot of memory. I have also read that if I want to use Word-COM+
>> >> object
>> >> I should have a dedicated server because it takes so much memory.
>> >>
>> >> I have tested some and I easily get out of memory even if there
is >> >> 4GB
>> >> on
>> >> the server I tested against.
>> >>
>> >> Then I run PHP as ISAPI, and the suggestion on the php.net site
was >> >> to
>> >> run PHP as CGI because COM-objects are run in the same
memory-space >> >> as
>> >> ISAPI when running as ISAPI-module.
>> >> http://php.oregonstate.edu/manual/en/class.com.php
>> >>
>> >>
>> >>
>> >> What do you guys thinks about above? Give me some feedback,
please >> >> :-)
>> >>
>> >> Best regards
>> >> /Gustav Wiberg
>> >>
>> >>
>> >> No virus found in this outgoing message.
>> >> Checked by AVG Free Edition.
>> >> Version: 7.5.488 / Virus Database: 269.14.6/1060 - Release Date:
>> >> 2007-10-09 16:43
>> >>
>> >>
>> >> --
>> >> PHP Windows Mailing List (http://www.php.net/)
>> >> To unsubscribe, visit: http://www.php.net/unsub.php
>> >>
>> >>
>> >
>> >
>> > --
>> > John Mertic
>> > [EMAIL PROTECTED]
>> > http://jmertic.wordpress.com
>> >
>> > "Explaining a joke is like dissecting a frog: you understand it
>> > better, but the frog dies
>> > in the process." --Mark Twain
>> >
>> > --
>> > PHP Windows Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>> >
>>
>>
>>
>
>
> --
> John Mertic
> [EMAIL PROTECTED]
> http://jmertic.wordpress.com
>
> "Explaining a joke is like dissecting a frog: you understand it
> better, but the frog dies
> in the process." --Mark Twain
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
John Mertic
[EMAIL PROTECTED]
http://jmertic.wordpress.com
"Explaining a joke is like dissecting a frog: you understand it
better, but the frog dies
in the process." --Mark Twain
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I'm a little late on the thread, so I apologize in advance if I say
something out of context / already mentioned.
Thank's God, I haven't had the need to use PHP + COM + MS Office, but I
did use C# + MS Office, and I found that for desktop applications
Application.Quit() was enough, whereas in ASP (.Net) I had to kill the
process --and yes, I did made all the dance about calling the GC,
ReleaseComObject and such. So, if possible, don't use COM.
Now, as for what seem to be want, is it like...
a) open "x.doc" with PHP+COM+Word
b) the user makes changes
c) "x.doc" gets saved with the changes
Is it like this?
If it is, then you are trying to do something I don't think is
possible, because the user will be working on the Client machine, not on
the Server, hence, PHP will have no access to it unless the client sends
you his "x.doc" version and you replace the existent one with it.
So why don't you simple take it as a file server? Something like I send
you the current version, you make the changes (on your PC) and them you
deliver it to me once again --yes, there will be "synchronization"
issues with this approach, and you can only _help_ the user check it
with a time-stamp or something similar.
Hope this helps.
Gustav Wiberg wrote:
Hi again!
I noticed I didn't pay enough attention to your question... Sorry for that.
The file is stored on the server!
And with COM-objects I managed to do a PHP-script - create a
(Word)-COM-object to open a certain file (say c:\test.doc on the
server). I changed te c:\test.doc from within the php-application and
pushed Saved (in the Word-object that open up). And Yes, the content
changed in the file c:\test.doc which is on the server.
TinyMCE or whatsoever is out of question. It must be word. I don't want
to change a whole organisations policy about using word... :-)
Best regards
/Gustav Wiberg
----- Original Message ----- From: "John Mertic" <[EMAIL PROTECTED]>
To: "Gustav Wiberg" <[EMAIL PROTECTED]>
Cc: "PHP-Windows Group" <[EMAIL PROTECTED]>
Sent: Wednesday, October 10, 2007 10:07 PM
Subject: Re: [PHP-WIN] PHP-memory leak with COM-objects?
Using PHP ( whether via COM or not ) in a web application to interact
with a file on the local user's machine isn't possible. PHP is a
server-side language in this context, and it interacts with the COM
object on the server which has no access to the user's local machine.
If the file is on the server, you can't push changes to it from the
Word editing control in IE, it will only allow saving changes to the
local computer.
If you are looking at doing the first option, then a PHP web app is
out of the question; perhaps a short VBScript to do any preprocessing
of the document would be in order. If you are looking at the second,
you may want to consider one of the Rich Text Editing tools that you
can drop in a webpage, such as FCKEditor or TinyMCE; these typically
will want input and output in XHTML however.
John
On 10/10/07, Gustav Wiberg <[EMAIL PROTECTED]> wrote:
Hi!
It was just an example, but say Yes. Does it make a difference?
Best regards
/Gustav Wiberg
----- Original Message -----
From: "John Mertic" <[EMAIL PROTECTED]>
To: "Gustav Wiberg" <[EMAIL PROTECTED]>
Cc: "PHP-Windows Group" <[EMAIL PROTECTED]>
Sent: Wednesday, October 10, 2007 7:55 PM
Subject: Re: [PHP-WIN] PHP-memory leak with COM-objects?
> Is c:\test.doc a file on the local user's machine or the server?
>
> On 10/10/07, Gustav Wiberg <[EMAIL PROTECTED]> wrote:
>> Hi again!
>>
>> I want the logged-in user to able to open a word-file (or an >>
Excel-file
>> or
>> whatever) and then Push Save-Icon and make sure that changes are
>> actually
>> made.
>> Example:
>>
>> John opens up file c:\test.doc. He writes "Ugly cow" in it and
pushes >> the
>> save-icon. Ugly Cow is now stored in file c:\test.doc. Working with
>> COM-objects is the only solution I have found!?
>>
>> Normally If John opens up c:\test.doc Internet Explorer (or whatever
>> browser) saves the file temporarily in some temp-folder (don't
know >> exact
>> location), lets say c:\temp\sdifiuweoriu2734872.tmp. When John pushes
>> Save-icon he saves the new information TO the temporarily stored
file >> IF
>> he
>> doesn't use Save AS...
>>
>> Please come with suggestions :-)
>>
>> Best regards
>> /Gustav Wiberg
>>
>> ----- Original Message -----
>> From: "John Mertic" <[EMAIL PROTECTED]>
>> To: "Gustav Wiberg" <[EMAIL PROTECTED]>
>> Cc: "PHP-Windows Group" <[EMAIL PROTECTED]>
>> Sent: Wednesday, October 10, 2007 1:30 PM
>> Subject: Re: [PHP-WIN] PHP-memory leak with COM-objects?
>>
>>
>> > I've worked a lot with the Word COM and while it works well on a
>> > single desktop, I wouldn't recommend it for a server process. It's
>> > rather slow and while the memory eventually gets cleaned up, it
>> > still
>> > takes up a lot of memory for as little as it does. I'm not so sure
>> > OpenOffice is much better in this regard.
>> >
>> > You could push these tasks to another server, but I'd also look at
>> > what you are doing and see if you can do it another way. We >> >
currently
>> > use Word documents as template for a mail merge type operation
and >> > are
>> > looking to move these to RTF since that enables us to take Word
out >> > of
>> > the loop when doing the mail merge ( we actually just do a
global >> > find
>> > and replace in the document since we've found more consistent >>
> results
>> > with that ). But again, this all depends upon the application.
>> >
>> > John
>> >
>> > On 10/10/07, Gustav Wiberg <[EMAIL PROTECTED]> wrote:
>> >> Hi!
>> >>
>> >> I want to use COM+ objects (especially with Word). I have >> >>
understood
>> >> (a
>> >> lot of reading on the Internet) that when initiating
COM-objects >> >> with
>> >> Word (even if the object is released in variable in the code).
Word
>> >> leaks
>> >> a lot of memory. I have also read that if I want to use Word-COM+
>> >> object
>> >> I should have a dedicated server because it takes so much memory.
>> >>
>> >> I have tested some and I easily get out of memory even if there
is >> >> 4GB
>> >> on
>> >> the server I tested against.
>> >>
>> >> Then I run PHP as ISAPI, and the suggestion on the php.net site
was >> >> to
>> >> run PHP as CGI because COM-objects are run in the same
memory-space >> >> as
>> >> ISAPI when running as ISAPI-module.
>> >> http://php.oregonstate.edu/manual/en/class.com.php
>> >>
>> >>
>> >>
>> >> What do you guys thinks about above? Give me some feedback,
please >> >> :-)
>> >>
>> >> Best regards
>> >> /Gustav Wiberg
>> >>
>> >>
>> >> No virus found in this outgoing message.
>> >> Checked by AVG Free Edition.
>> >> Version: 7.5.488 / Virus Database: 269.14.6/1060 - Release Date:
>> >> 2007-10-09 16:43
>> >>
>> >>
>> >> --
>> >> PHP Windows Mailing List (http://www.php.net/)
>> >> To unsubscribe, visit: http://www.php.net/unsub.php
>> >>
>> >>
>> >
>> >
>> > --
>> > John Mertic
>> > [EMAIL PROTECTED]
>> > http://jmertic.wordpress.com
>> >
>> > "Explaining a joke is like dissecting a frog: you understand it
>> > better, but the frog dies
>> > in the process." --Mark Twain
>> >
>> > --
>> > PHP Windows Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>> >
>>
>>
>>
>
>
> --
> John Mertic
> [EMAIL PROTECTED]
> http://jmertic.wordpress.com
>
> "Explaining a joke is like dissecting a frog: you understand it
> better, but the frog dies
> in the process." --Mark Twain
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
John Mertic
[EMAIL PROTECTED]
http://jmertic.wordpress.com
"Explaining a joke is like dissecting a frog: you understand it
better, but the frog dies
in the process." --Mark Twain
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hello Bob,
Regarding the "MSI" file, it seems that you have downloaded the Apache
'source code' used for compiling into executable binaries. I believe that
you want the precompiled Win32 binaries available at this link:
http://apache.tradebit.com/pub/httpd/binaries/win32/apache_2.2.6-win32-x86-n
o_ssl.msi
Delete the Apache files that you have now and install the .msi file from the
link above; ensure that the lines below are in your httpd.conf file.
Hopefully that will get you going in the right direction.
These lines should be present in your Apache httpd.conf file:
In the section:
<IfModule mime_module>
AddType application/x-httpd-php .php .html
</IfModule>
# Other PHP-specific parameters at the end of httpd.conf:
# the path to PHP on your machine may be different
PHPIniDir "C:/PHP/"
# again your path may be different
LoadModule php5_module "C:/PHP/php5apache2_2.dll"
Jeff
-----Original Message-----
From: rjdani [mailto:[EMAIL PROTECTED]
Sent: Monday, October 15, 2007 3:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] PHP Install problems
I'm trying to work my way through the "Beginning PHP5, Apache, MySql Web
Development" book by Elizabeth Naramore, et. al. -- i.e. a newbie. I'm
having trouble getting Apache to recognize my php code files on my HP
Windows XP machine. It has service pack 2 and is current with updates.
I followed the examples in the book and added a documentroot line and a
directory line to the httpd.conf file. The index.html file worked witn IE7
but not with Fire Fox when I used the http://localhost URL. Next I created
the second check which had me create a php testing file phptest.php in the
same directory as the index.html file. Which included the following code: --
<HTML>
<HEAD>
<TITLE>PHP Testing</TITLE>
</HEAD>
<BODY>
<?php
echo "If this works, we <i>really<-i> did it!";
?>
</BODY>
</HTML>
When I used the http://localhost/phptest.php a 404 url not found message
resulted.
was when I unzipped the httpd-2.2.6-win32-src-r2.zip file I do not see the
MSI file mentioned in Appendix I of the book. Can any one help me.
RJD (bob daniels)
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
how can i build sms send/receive application using PHP?.Is there anything I
need than php ?
--- End Message ---