php-general Digest 28 Nov 2009 06:03:35 -0000 Issue 6464

Topics (messages 300137 through 300142):

Re: Return object to client
        300137 by: Tony Marston
        300138 by: Robert Cummings

Re: PHP APACHE SAVE AS
        300139 by: Julian Muscat Doublesin
        300140 by: Ashley Sheridan
        300141 by: Bastien Koert

PHP internal memory
        300142 by: Daniel Kolbo

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 ---
It is not possible to return an object via a web service, only data. You can 
create an object in the client process, then populate it with data obtained 
from a web service.

-- 
Tony Marston
http://www.tonymarston.net
http://www.radicore.org


"Manoj Singh" <[email protected]> wrote in message 
news:[email protected]...
> Hi All,
>
> I am implementing the web service through PHP SOAP library.
>
> Actually I want to return the object to the client through web service so
> that client can call all the methods of that object.
>
> Please help me out.
>
> Regards,
> Manoj
> 



--- End Message ---
--- Begin Message ---
Tony Marston wrote:
It is not possible to return an object via a web service, only data. You can create an object in the client process, then populate it with data obtained from a web service.

You can serialize the object and return that via the web service. On the receiving end it can then be unserialized.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--- End Message ---
--- Begin Message ---
Hi,

Just to update every one. This solution below worked perfectly. Thank you
very much Jonathan. I have one other question though. Can anyone help me on
the folowing. Database Error: Unable to connect to the database:The MySQL
adapter "mysql" is not available.

Thank you

Julian

On Fri, Nov 27, 2009 at 1:34 PM, Jonathan Tapicer <[email protected]> wrote:

> You are probably missing something like this in the apache httpd.conf:
>
> LoadModule php5_module "c:/PHP/php5apache2_2.dll"
> PHPIniDir "c:/PHP/php.ini"
> AddType application/x-httpd-php .php
> DirectoryIndex index.php index.html index.html.var
>
> Regards,
>
> Jonathan
>
> On Fri, Nov 27, 2009 at 6:24 AM, Julian Muscat Doublesin
> <[email protected]> wrote:
> > Hello Everyone,
> >
> > I have installed PHP, Apache and MySQL on a Windows 7 machine :(.........
> I
> > would prefer linux or unix :)
> >
> > These have been setup and working correctly. However when I access a php
> > page. I get the save as dialog. Has anyone ever experinced such a
> situation.
> > Can anyone please advise.
> >
> > Thank you very much in advance.
> >
> > Julian
> >
>

--- End Message ---
--- Begin Message ---
On Fri, 2009-11-27 at 17:10 +0100, Julian Muscat Doublesin wrote:

> Hi,
> 
> Just to update every one. This solution below worked perfectly. Thank you
> very much Jonathan. I have one other question though. Can anyone help me on
> the folowing. Database Error: Unable to connect to the database:The MySQL
> adapter "mysql" is not available.
> 
> Thank you
> 
> Julian
> 
> On Fri, Nov 27, 2009 at 1:34 PM, Jonathan Tapicer <[email protected]> wrote:
> 
> > You are probably missing something like this in the apache httpd.conf:
> >
> > LoadModule php5_module "c:/PHP/php5apache2_2.dll"
> > PHPIniDir "c:/PHP/php.ini"
> > AddType application/x-httpd-php .php
> > DirectoryIndex index.php index.html index.html.var
> >
> > Regards,
> >
> > Jonathan
> >
> > On Fri, Nov 27, 2009 at 6:24 AM, Julian Muscat Doublesin
> > <[email protected]> wrote:
> > > Hello Everyone,
> > >
> > > I have installed PHP, Apache and MySQL on a Windows 7 machine :(.........
> > I
> > > would prefer linux or unix :)
> > >
> > > These have been setup and working correctly. However when I access a php
> > > page. I get the save as dialog. Has anyone ever experinced such a
> > situation.
> > > Can anyone please advise.
> > >
> > > Thank you very much in advance.
> > >
> > > Julian
> > >
> >


It sounds like you've installed both PHP and MySQL, but not the
php-mysql module, which allows PHP to talk to the database. Depending on
how you installed PHP, there could be a variety of ways to fix this.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
On Fri, Nov 27, 2009 at 11:20 AM, Ashley Sheridan
<[email protected]> wrote:
> On Fri, 2009-11-27 at 17:10 +0100, Julian Muscat Doublesin wrote:
>
>> Hi,
>>
>> Just to update every one. This solution below worked perfectly. Thank you
>> very much Jonathan. I have one other question though. Can anyone help me on
>> the folowing. Database Error: Unable to connect to the database:The MySQL
>> adapter "mysql" is not available.
>>
>> Thank you
>>
>> Julian
>>
>> On Fri, Nov 27, 2009 at 1:34 PM, Jonathan Tapicer <[email protected]> wrote:
>>
>> > You are probably missing something like this in the apache httpd.conf:
>> >
>> > LoadModule php5_module "c:/PHP/php5apache2_2.dll"
>> > PHPIniDir "c:/PHP/php.ini"
>> > AddType application/x-httpd-php .php
>> > DirectoryIndex index.php index.html index.html.var
>> >
>> > Regards,
>> >
>> > Jonathan
>> >
>> > On Fri, Nov 27, 2009 at 6:24 AM, Julian Muscat Doublesin
>> > <[email protected]> wrote:
>> > > Hello Everyone,
>> > >
>> > > I have installed PHP, Apache and MySQL on a Windows 7 machine :(.........
>> > I
>> > > would prefer linux or unix :)
>> > >
>> > > These have been setup and working correctly. However when I access a php
>> > > page. I get the save as dialog. Has anyone ever experinced such a
>> > situation.
>> > > Can anyone please advise.
>> > >
>> > > Thank you very much in advance.
>> > >
>> > > Julian
>> > >
>> >
>
>
> It sounds like you've installed both PHP and MySQL, but not the
> php-mysql module, which allows PHP to talk to the database. Depending on
> how you installed PHP, there could be a variety of ways to fix this.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>

Try opening the php.ini file and uncommenting the line

;extension = php_mysql.dll;

(by uncommenting i mean remove the first semi-colon). save the file
and restart the apache service

-- 

Bastien

Cat, the other other white meat

--- End Message ---
--- Begin Message ---
Hello PHP-hipsters,

I am not sure how to phrase these questions so please bare with me.

I am thinking about performance of a single web server running Apache
(non-cluster) with php as a module.

I have a web app that requires the same php objects(classes) for each
http request.

First, I would like to have the web server keep these object/class
definition files (code) permanently in the memory so the php engine does
not have to keep loading and destroying these objects.  Is this
possible?  Maybe the php engine is already smart enough to handle this.
 I imagine the engine is smart enough to not load the same class
definition into memory for the same http request, but I'm not sure if
the engine is smart enough to recognize that a class definition is
already in the memory from a different http request.

Second, furthermore, say two different http requests actually
instantiate identical objects.  Will both of these identical objects
require their own space in the memory, or is the php engine smart enough
to point both objects to the same memory (until something happens to one
of the objects making it different than the other)? If not, i guess this
is where the idea of caching comes in, and i have to be that smart one
to define the unique keys...

Third, when one caches php code using something like memcache, what is
actually being cached: the human readable php, the parsed php, the
serialized php (not really sure what this is), the raw cpu/assembly
instructions, etc...?

Fourth, where does this cached data live - on the server's hard drive or
in the server's memory (assuming we have enough memory)?

I assume one of the ideas behind the cache is to by-pass the php parser
and instead just regurgitate the pre-chewed food and spit it out to
apache.  Thus, the memcache would only be storing the php output.  Is
this line of reasoning correct?  And ideally it would be best to have
this prechewed code sitting in the memory, but can I control this?

Just to be clear, I am familiar with the idea behind setting a unique
key for the cache and all that.  Also, i am not referring to client side
caching.

Well thanks for sticking with me, as I'm trying to learn these concepts.

Any comments, answers, explanations would be most welcomed.

Thanks,
DanK
`

--- End Message ---

Reply via email to