php-general Digest 27 Dec 2009 16:40:57 -0000 Issue 6509

2009-12-27 Thread php-general-digest-help

php-general Digest 27 Dec 2009 16:40:57 - Issue 6509

Topics (messages 300705 through 300706):

Re: Tracking file download progress
300705 by: STEEL

Re: Noob stuff - Zend/Opcode/Cache/Optimizer
300706 by: Shawn McKenzie

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---
 Thanks all, I've found the solution! PHP Backend + JQuery works great!
 Just out of curiosity. Can you please tell me how you initiated the download?
Via  JSHttpRequest( JQuery started to lie %) )  to PHP backend then , in 
file downloading cycle there
are  $GLOBALS['_FULL']  tells  frontend complete size of the file, and
$GLOBALS['_GOT']  tells  clientside  how bytes are downloaded..all you
need from php is to disable output buffering,or it will not work!
And then, showing progress bar is just easy HTML  JS trick!



-- 
 STEEL  mailto:vla...@mail.kna.ru

---End Message---
---BeginMessage---
Daniel Kolbo wrote:
 Hello,
 
 I'm missing some unifying piece of the zend/php puzzle...
 
 I understand the basics of zend engine opcode, caching the opcode,
 optimizing the opcode, and caching the optimized opcode, etc...   The
 part I'm struggling with is somewhere in the zend world.
 
 Under a typical php install where does the zend engine live (like what
 file)?

I don't think it is separate from PHP itself.  The Zend engine was a
rewrite of the PHP execution engine with resource/mem management and the
API for loadable extensions, etc...  Later adding the PHP 5 OOP stuff.

 I am under the impression that I need to install the Zend Server
 Community Edition (ZSCE) to get the zend optimizer+.  I thought PHP came
 with the zend engine...why do i now have to download this ZSCE just to
 add a component to the engine i already have?
 
 1)  Is there a way to turn on zend optimizer+ component (like in php.ini
 zend extension) without having to install ZSCE?

It is an extension available on the Zend download page.

 1.2) If i have to install the ZSCE stack, wouldn't this effectively be
 adding another engine on my machine?

Yes, it is a install of PHP with alot of other stuff bundled in.  So it
depends upon what you need and if you want to install/configure PHP
yourself with all of these additions, or if you just want to install the
Zend server.


-- 
Thanks!
-Shawn
http://www.spidean.com
---End Message---


php-general Digest 28 Dec 2009 05:44:05 -0000 Issue 6510

2009-12-27 Thread php-general-digest-help

php-general Digest 28 Dec 2009 05:44:05 - Issue 6510

Topics (messages 300707 through 300711):

Re: Noob stuff - Zend/Opcode/Cache/Optimizer
300707 by: Daniel Kolbo
300708 by: Shawn McKenzie

Unable to get output from exec ssh remote-server 'ping -c4 ip'
300709 by: robert mena
300710 by: Michael Kjeldsen

404 page
300711 by: Sudhakar

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---
Shawn McKenzie wrote:
 Daniel Kolbo wrote:
 Hello,

 I'm missing some unifying piece of the zend/php puzzle...

 I understand the basics of zend engine opcode, caching the opcode,
 optimizing the opcode, and caching the optimized opcode, etc...   The
 part I'm struggling with is somewhere in the zend world.

 Under a typical php install where does the zend engine live (like what
 file)?
 
 I don't think it is separate from PHP itself.  The Zend engine was a
 rewrite of the PHP execution engine with resource/mem management and the
 API for loadable extensions, etc...  Later adding the PHP 5 OOP stuff.
 
 I am under the impression that I need to install the Zend Server
 Community Edition (ZSCE) to get the zend optimizer+.  I thought PHP came
 with the zend engine...why do i now have to download this ZSCE just to
 add a component to the engine i already have?

 1)  Is there a way to turn on zend optimizer+ component (like in php.ini
 zend extension) without having to install ZSCE?
 
 It is an extension available on the Zend download page.
 
 1.2) If i have to install the ZSCE stack, wouldn't this effectively be
 adding another engine on my machine?
 
 Yes, it is a install of PHP with alot of other stuff bundled in.  So it
 depends upon what you need and if you want to install/configure PHP
 yourself with all of these additions, or if you just want to install the
 Zend server.
 
 
Hello Mr. McKenzie,

Thanks for the response.  I do not see zend optimizer+ on:
http://www.zend.com/en/downloads/

There is a zend optimizer download link, but this is different than zend
optimizer+.  My understanding is the former facilitates with the use of
zend gaurd while the latter optimizes the opcode.  I want the latter
component.

Where does one obtain the zend optimizer+ component?  (I spent the
better part of my saturday trying to find it).  I ended up installing
the zend server community edition to see how it configured its own
apache and php installs in the httpd.conf and php.ini as a way to shed
some light on to my understanding.

The zend server is using different libraries then the standard php
install.  I could try to mimic the behaviour of the zend server
configuration with my original php configuration; however, I'm a bit
concerned about only grabbing partial components...maybe i don't need to
be so worried.  Maybe this plan isn't even possible.

I guess i was expecting to google, 'install zend optimizer+ component'
and find gogles of howtos.  Because i don't see this, it makes me
wonder if i'm trying to do something i oughta not...

My question boils down to:
How do I extend my current php install to add a component (zend
optimizer+) to my current php install?

Thanks,
dK
`

---End Message---
---BeginMessage---
 Hello Mr. McKenzie,
 
 Thanks for the response.  I do not see zend optimizer+ on:
 http://www.zend.com/en/downloads/
 
 There is a zend optimizer download link, but this is different than zend
 optimizer+.  My understanding is the former facilitates with the use of
 zend gaurd while the latter optimizes the opcode.  I want the latter
 component.
 
 Where does one obtain the zend optimizer+ component?  (I spent the
 better part of my saturday trying to find it).  I ended up installing
 the zend server community edition to see how it configured its own
 apache and php installs in the httpd.conf and php.ini as a way to shed
 some light on to my understanding.
 
 The zend server is using different libraries then the standard php
 install.  I could try to mimic the behaviour of the zend server
 configuration with my original php configuration; however, I'm a bit
 concerned about only grabbing partial components...maybe i don't need to
 be so worried.  Maybe this plan isn't even possible.
 
 I guess i was expecting to google, 'install zend optimizer+ component'
 and find gogles of howtos.  Because i don't see this, it makes me
 wonder if i'm trying to do something i oughta not...
 
 My question boils down to:
 How do I extend my current php install to add a component (zend
 optimizer+) to my current php install?
 
 Thanks,
 dK
 `

I'm really not sure what the + designation is for, they may have changed
the way things work since I last used the optimizer. The Zend Optimizer
used to be 

[PHP] Re: Noob stuff - Zend/Opcode/Cache/Optimizer

2009-12-27 Thread Shawn McKenzie
Daniel Kolbo wrote:
 Hello,
 
 I'm missing some unifying piece of the zend/php puzzle...
 
 I understand the basics of zend engine opcode, caching the opcode,
 optimizing the opcode, and caching the optimized opcode, etc...   The
 part I'm struggling with is somewhere in the zend world.
 
 Under a typical php install where does the zend engine live (like what
 file)?

I don't think it is separate from PHP itself.  The Zend engine was a
rewrite of the PHP execution engine with resource/mem management and the
API for loadable extensions, etc...  Later adding the PHP 5 OOP stuff.

 I am under the impression that I need to install the Zend Server
 Community Edition (ZSCE) to get the zend optimizer+.  I thought PHP came
 with the zend engine...why do i now have to download this ZSCE just to
 add a component to the engine i already have?
 
 1)  Is there a way to turn on zend optimizer+ component (like in php.ini
 zend extension) without having to install ZSCE?

It is an extension available on the Zend download page.

 1.2) If i have to install the ZSCE stack, wouldn't this effectively be
 adding another engine on my machine?

Yes, it is a install of PHP with alot of other stuff bundled in.  So it
depends upon what you need and if you want to install/configure PHP
yourself with all of these additions, or if you just want to install the
Zend server.


-- 
Thanks!
-Shawn
http://www.spidean.com

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



[PHP] Re: Noob stuff - Zend/Opcode/Cache/Optimizer

2009-12-27 Thread Daniel Kolbo
Shawn McKenzie wrote:
 Daniel Kolbo wrote:
 Hello,

 I'm missing some unifying piece of the zend/php puzzle...

 I understand the basics of zend engine opcode, caching the opcode,
 optimizing the opcode, and caching the optimized opcode, etc...   The
 part I'm struggling with is somewhere in the zend world.

 Under a typical php install where does the zend engine live (like what
 file)?
 
 I don't think it is separate from PHP itself.  The Zend engine was a
 rewrite of the PHP execution engine with resource/mem management and the
 API for loadable extensions, etc...  Later adding the PHP 5 OOP stuff.
 
 I am under the impression that I need to install the Zend Server
 Community Edition (ZSCE) to get the zend optimizer+.  I thought PHP came
 with the zend engine...why do i now have to download this ZSCE just to
 add a component to the engine i already have?

 1)  Is there a way to turn on zend optimizer+ component (like in php.ini
 zend extension) without having to install ZSCE?
 
 It is an extension available on the Zend download page.
 
 1.2) If i have to install the ZSCE stack, wouldn't this effectively be
 adding another engine on my machine?
 
 Yes, it is a install of PHP with alot of other stuff bundled in.  So it
 depends upon what you need and if you want to install/configure PHP
 yourself with all of these additions, or if you just want to install the
 Zend server.
 
 
Hello Mr. McKenzie,

Thanks for the response.  I do not see zend optimizer+ on:
http://www.zend.com/en/downloads/

There is a zend optimizer download link, but this is different than zend
optimizer+.  My understanding is the former facilitates with the use of
zend gaurd while the latter optimizes the opcode.  I want the latter
component.

Where does one obtain the zend optimizer+ component?  (I spent the
better part of my saturday trying to find it).  I ended up installing
the zend server community edition to see how it configured its own
apache and php installs in the httpd.conf and php.ini as a way to shed
some light on to my understanding.

The zend server is using different libraries then the standard php
install.  I could try to mimic the behaviour of the zend server
configuration with my original php configuration; however, I'm a bit
concerned about only grabbing partial components...maybe i don't need to
be so worried.  Maybe this plan isn't even possible.

I guess i was expecting to google, 'install zend optimizer+ component'
and find gogles of howtos.  Because i don't see this, it makes me
wonder if i'm trying to do something i oughta not...

My question boils down to:
How do I extend my current php install to add a component (zend
optimizer+) to my current php install?

Thanks,
dK
`


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



[PHP] Re: Noob stuff - Zend/Opcode/Cache/Optimizer

2009-12-27 Thread Shawn McKenzie
 Hello Mr. McKenzie,
 
 Thanks for the response.  I do not see zend optimizer+ on:
 http://www.zend.com/en/downloads/
 
 There is a zend optimizer download link, but this is different than zend
 optimizer+.  My understanding is the former facilitates with the use of
 zend gaurd while the latter optimizes the opcode.  I want the latter
 component.
 
 Where does one obtain the zend optimizer+ component?  (I spent the
 better part of my saturday trying to find it).  I ended up installing
 the zend server community edition to see how it configured its own
 apache and php installs in the httpd.conf and php.ini as a way to shed
 some light on to my understanding.
 
 The zend server is using different libraries then the standard php
 install.  I could try to mimic the behaviour of the zend server
 configuration with my original php configuration; however, I'm a bit
 concerned about only grabbing partial components...maybe i don't need to
 be so worried.  Maybe this plan isn't even possible.
 
 I guess i was expecting to google, 'install zend optimizer+ component'
 and find gogles of howtos.  Because i don't see this, it makes me
 wonder if i'm trying to do something i oughta not...
 
 My question boils down to:
 How do I extend my current php install to add a component (zend
 optimizer+) to my current php install?
 
 Thanks,
 dK
 `

I'm really not sure what the + designation is for, they may have changed
the way things work since I last used the optimizer. The Zend Optimizer
used to be a byte code optimizer/cacher that also allowed you to run
Zend Guard encrypted apps that you were authorized to use.  Zend Guard
you need to buy and it allows you to encrypt your apps.


-- 
Thanks!
-Shawn
http://www.spidean.com

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



[PHP] Unable to get output from exec ssh remote-server 'ping -c4 ip'

2009-12-27 Thread robert mena
Hi,

I need to develop an interface that will, for example, ping IPs from a
remote server. So the php script will be hosted in a server with ssh access
(key) to the remote server.

I can make it work from the console but when I try

$cmd = ssh remote-server 'ping -c 4 ip'
exec($cmd, $ouput);

the output is empty.

the same command (with the remote-server and IP changed to the real ones)
works fine from command line.

I've added the key/config in the webserver's user .ssh directory so I am
assuming that that there is something wrong with my setup.

any ideas?


Re: [PHP] Unable to get output from exec ssh remote-server 'ping -c4 ip'

2009-12-27 Thread Michael Kjeldsen

On 12/27/2009 10:53 PM, robert mena wrote:

Hi,

I need to develop an interface that will, for example, ping IPs from a
remote server. So the php script will be hosted in a server with ssh access
(key) to the remote server.

I can make it work from the console but when I try

$cmd = ssh remote-server 'ping -c 4 ip'
exec($cmd, $ouput);

the output is empty.

the same command (with the remote-server and IP changed to the real ones)
works fine from command line.

I've added the key/config in the webserver's user .ssh directory so I am
assuming that that there is something wrong with my setup.

any ideas?



Probably other ways to do it, but this seems to work:

[mich...@archie ~]$ php a.php
259

PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.518 ms

--- 192.168.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.518/0.518/0.518/0.000 ms

[mich...@archie ~]$ cat a.php
?php
$stuff = `ssh management 'ping -c 1 192.168.1.1'`;
echo strlen($stuff) . \n\n$stuff;

- m

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



[PHP] 404 page

2009-12-27 Thread Sudhakar
hi

1.
i have a .htaccess file in my root directory on unix hosting

following is the code in .htaccess file

ErrorDocument 404 /filenotfound.html

the file filenotfound.html is also in the root directory as the htaccess
file

when i intentionally type a wrong url either if a misspell a file ex=
http://domainname.com/filenam.html or a folder ex =
http://domainname.com/100
to test if this is working filenotfound.html is not being called

any reason why this is happening



also the same thing with wamp on my local computer, i have a htaccess and
also the filenotfound
in d:/wamp/www however when i misspell the ulr of my localhost, i have
noticed in the status bar that the page is being redirected to
http://linkhelp.clients.google.com and i get a 404 from this website, how
can i change this redirection



2.
how do i access the php.ini and httpd.conf file from my cpanel, do i need to
ask my hosting provider to make any changes or can i make these changes
myself

3.
after downloading putty and if i have wamp in d:/wamp/www how do i access
mysql from the command prompt
using putty on my local machine

please advice


thanks.


Re: [PHP] 404 page

2009-12-27 Thread navneet sharma
Hi,

- About 404 error document... Make sure  filenotfound.html is in public_html
or www directory as your are using shared hosting...

- Generally in share hosting environment you are not allowed to modify
php.ini (GoDaddy allows), you can modify some property of httpd.config and
php.ini using .htaccess but again depands on server administrator's
permission.

Navneet.

On Mon, Dec 28, 2009 at 11:13 AM, Sudhakar sudhakarar...@gmail.com wrote:

 hi

 1.
 i have a .htaccess file in my root directory on unix hosting

 following is the code in .htaccess file

 ErrorDocument 404 /filenotfound.html

 the file filenotfound.html is also in the root directory as the htaccess
 file

 when i intentionally type a wrong url either if a misspell a file ex=
 http://domainname.com/filenam.html or a folder ex =
 http://domainname.com/100
 to test if this is working filenotfound.html is not being called

 any reason why this is happening



 also the same thing with wamp on my local computer, i have a htaccess and
 also the filenotfound
 in d:/wamp/www however when i misspell the ulr of my localhost, i have
 noticed in the status bar that the page is being redirected to
 http://linkhelp.clients.google.com and i get a 404 from this website, how
 can i change this redirection



 2.
 how do i access the php.ini and httpd.conf file from my cpanel, do i need
 to
 ask my hosting provider to make any changes or can i make these changes
 myself

 3.
 after downloading putty and if i have wamp in d:/wamp/www how do i access
 mysql from the command prompt
 using putty on my local machine

 please advice


 thanks.



Re: [PHP] Question Answer based report.

2009-12-27 Thread navneet sharma
Hi Aditya,

You can store question and answer in database.

if user provides correct answer increase veritable ($score)

you can use switch case to generate character (like in facebook apps)

Navneet.

On Fri, Dec 25, 2009 at 9:41 PM, aditya shukla
adityashukla1...@gmail.comwrote:

 Merry Christmas Guys,

 I am trying to make a small web application which has some question and
 some
 answers for that questions.My aim is to create a report based on the
 questions and answers
 related to questions.Please suggest a way to go about the
 application.Should
 I go for a if-else or switch case format for the answers or is there a
 better way.? The app is something similar to the apps on facebook where
 questions-answers give us a report.

 Thanks

 Aditya



Re: [PHP] 404 page

2009-12-27 Thread Thijs Lensselink

navneet sharma wrote:

Hi,

- About 404 error document... Make sure  filenotfound.html is in public_html
or www directory as your are using shared hosting...

- Generally in share hosting environment you are not allowed to modify
php.ini (GoDaddy allows), you can modify some property of httpd.config and
php.ini using .htaccess but again depands on server administrator's
permission.

Navneet.

On Mon, Dec 28, 2009 at 11:13 AM, Sudhakar sudhakarar...@gmail.com wrote:


hi

1.
i have a .htaccess file in my root directory on unix hosting

following is the code in .htaccess file

ErrorDocument 404 /filenotfound.html


try removing the '/' in front of the file. I don't think the 404 file 
resides in the root of your filesystem.




the file filenotfound.html is also in the root directory as the htaccess
file

when i intentionally type a wrong url either if a misspell a file ex=
http://domainname.com/filenam.html or a folder ex =
http://domainname.com/100
to test if this is working filenotfound.html is not being called

any reason why this is happening



also the same thing with wamp on my local computer, i have a htaccess and
also the filenotfound
in d:/wamp/www however when i misspell the ulr of my localhost, i have
noticed in the status bar that the page is being redirected to
http://linkhelp.clients.google.com and i get a 404 from this website, how
can i change this redirection



2.
how do i access the php.ini and httpd.conf file from my cpanel, do i need
to
ask my hosting provider to make any changes or can i make these changes
myself

3.
after downloading putty and if i have wamp in d:/wamp/www how do i access
mysql from the command prompt
using putty on my local machine

please advice


thanks.






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