php-general Digest 9 Dec 2010 11:55:14 -0000 Issue 7077

Topics (messages 309917 through 309927):

Re: how can one run python script in php
        309917 by: David Harkness
        309918 by: admin.buskirkgraphics.com
        309919 by: Richard Quadling
        309920 by: TR Shaw

zip_entry_read buggy? runs endless on file with crc-error - freezes on corrupt 
file
        309921 by: Merlin Morgenstern
        309922 by: TR Shaw

ORM doctrine
        309923 by: Tommy Pham
        309924 by: Alexandru Patranescu
        309925 by: Daevid Vincent
        309926 by: Robert Cummings

Scalable Vector Graphics with PHP
        309927 by: sudarshana sampath

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 ---
On Wed, Dec 8, 2010 at 2:50 PM, Moses <[email protected]> wrote:

> I am trying to run a python script in php using exec or system command, but
> there is no answer.
>

If you post the code you have tried, we can point out any errors you're
making and help you find the solution.

David

--- End Message ---
--- Begin Message ---
Try CURL
http://www.php.net/manual/en/book.curl.php


Richard L. Buskirk

-----Original Message-----
From: Moses [mailto:[email protected]] 
Sent: Wednesday, December 08, 2010 5:51 PM
To: [email protected]
Subject: [PHP] how can one run python script in php

Hi Everyone,

I am trying to run a python script in php using exec or system command, but
there is
no answer.

musa


--- End Message ---
--- Begin Message ---
On 8 December 2010 22:50, Moses <[email protected]> wrote:
> Hi Everyone,
>
> I am trying to run a python script in php using exec or system command, but
> there is
> no answer.
>
> musa
>

I use windows and
http://docs.php.net/manual/en/install.windows.manual.php and
http://docs.php.net/manual/en/install.windows.commandline.php contain
all the details I've ever needed for a manual installation of PHP.

Using the same rules for Python would allow you to simply run the .py
script or the .pyc script just as easily as you can run PHP or a
.BAT/.CMD script.



-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

--- End Message ---
--- Begin Message ---
On Dec 8, 2010, at 5:50 PM, Moses wrote:

> Hi Everyone,
> 
> I am trying to run a python script in php using exec or system command, but
> there is
> no answer.
> 
> musa

I agree we need to see what you have done and on what OS but something like 
this is what you should be looking at:

$data_from_stdout = exec("/usr/bin/python /path/to/your/python_app.py");

Tom


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

I am running a php file via cron where zip files will be extracted with the help of zip_entry_read. This worked great until I had a corrupted zip file to extract. This braught the server down as the php script never ended. The function max_execution_time does not help as it zip is a system function so the php script did run endless until the cron job trigered the next execution a minute later and so on!

It seams that the zip_entry_read function is buggy. I found 2 people with the similar problem, but no solution:
http://www.mombu.com/php/functions-forum/t-zip-freezes-how-to-handle-corrupt-crc-in-zip-file-3565173.html
http://coding.derkeiler.com/Archive/PHP/php.general/2007-08/msg00924.html

When I do a unzip on the console I do get following error from zip:
unzip 25_459.zip
Archive:  25_459.zip
error [25_459.zip]:  missing 2203 bytes in zipfile
  (attempting to process anyway)
retry - request = 0x4294965093
error [25_459.zip]:  attempt to seek before beginning of zipfile
  (please check that you have transferred or created the zipfile in the
  appropriate BINARY mode and that you have compiled UnZip properly)
  (attempting to re-compensate)
inflating: 459-03.jpg bad CRC b29a30c7 (should be 5a63b1bc)
file #2:  bad zipfile offset (local header sig):  94422
  (attempting to re-compensate)
file #2:  bad zipfile offset (local header sig):  94422
file #3:  bad zipfile offset (local header sig):  179720
file #4:  bad zipfile offset (local header sig):  268127
file #5:  bad zipfile offset (local header sig):  358277
file #6:  bad zipfile offset (local header sig):  442834
file #7:  bad zipfile offset (local header sig):  524802
file #8:  bad zipfile offset (local header sig):  615587

How can i make zip_entry_read exit on error to solve the problem?

Thank you for any idea,

Merlin

--- End Message ---
--- Begin Message ---
On Dec 8, 2010, at 6:42 PM, Merlin Morgenstern wrote:

> Hi there,
> 
> I am running a php file via cron where zip files will be extracted with the 
> help of zip_entry_read. This worked great until I had a corrupted zip file to 
> extract. This braught the server down as the php script never ended. The 
> function max_execution_time does not help as it zip is a system function so 
> the php script did run endless until the cron job trigered the next execution 
> a minute later and so on!
> 
> It seams that the zip_entry_read function is buggy. I found 2 people with the 
> similar problem, but no solution:
> http://www.mombu.com/php/functions-forum/t-zip-freezes-how-to-handle-corrupt-crc-in-zip-file-3565173.html
> http://coding.derkeiler.com/Archive/PHP/php.general/2007-08/msg00924.html
> 
> When I do a unzip on the console I do get following error from zip:
> unzip 25_459.zip
> Archive:  25_459.zip
> error [25_459.zip]:  missing 2203 bytes in zipfile
>  (attempting to process anyway)
> retry - request = 0x4294965093
> error [25_459.zip]:  attempt to seek before beginning of zipfile
>  (please check that you have transferred or created the zipfile in the
>  appropriate BINARY mode and that you have compiled UnZip properly)
>  (attempting to re-compensate)
>  inflating: 459-03.jpg               bad CRC b29a30c7  (should be 5a63b1bc)
> file #2:  bad zipfile offset (local header sig):  94422
>  (attempting to re-compensate)
> file #2:  bad zipfile offset (local header sig):  94422
> file #3:  bad zipfile offset (local header sig):  179720
> file #4:  bad zipfile offset (local header sig):  268127
> file #5:  bad zipfile offset (local header sig):  358277
> file #6:  bad zipfile offset (local header sig):  442834
> file #7:  bad zipfile offset (local header sig):  524802
> file #8:  bad zipfile offset (local header sig):  615587
> 
> How can i make zip_entry_read exit on error to solve the problem?

Merlin,

If everything works fine from the command line why not just use the command 
line using exec()?  That's what I do.

Tom


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

Has anyone used doctrine before?  I know Nathan mentioned it in the other
thread but I was wondering how does it handle multi table joins query, about
its performance and whether it uses any type of caching.

Thanks,
Tommy


--- End Message ---
--- Begin Message ---
Doctrine is mature  and well I've seen it plenty of times companies using
it.
Of course it handles multi table joins but I think it's main purpose is not
related to users writing joins... It's an ORM, you just read and write
objects.
Caching is something that must be there and you can read more on wiki:
http://en.wikipedia.org/wiki/Doctrine_%28PHP%29

Alex



On Thu, Dec 9, 2010 at 5:02 AM, Tommy Pham <[email protected]> wrote:

> Hi,
>
> Has anyone used doctrine before?  I know Nathan mentioned it in the other
> thread but I was wondering how does it handle multi table joins query,
> about
> its performance and whether it uses any type of caching.
>
> Thanks,
> Tommy
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Avoid these ORM things like the plague! They seem great in theory, but if
you're doing anything serious, they will quickly get in your way. Not to
mention all that fancy "ORM" doesn't come without a price. It costs in terms
of speed, as well as training. You're much better off to make your custom
tools for your particular application.  

-----Original Message-----
From: Alexandru Patranescu [mailto:[email protected]] 
Sent: Wednesday, December 08, 2010 9:10 PM
To: Tommy Pham
Cc: PHP
Subject: Re: [PHP] ORM doctrine

Doctrine is mature  and well I've seen it plenty of times companies using
it.
Of course it handles multi table joins but I think it's main purpose is not
related to users writing joins... It's an ORM, you just read and write
objects.
Caching is something that must be there and you can read more on wiki:
http://en.wikipedia.org/wiki/Doctrine_%28PHP%29

Alex



On Thu, Dec 9, 2010 at 5:02 AM, Tommy Pham <[email protected]> wrote:

> Hi,
>
> Has anyone used doctrine before?  I know Nathan mentioned it in the other
> thread but I was wondering how does it handle multi table joins query,
> about
> its performance and whether it uses any type of caching.
>
> Thanks,
> Tommy
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--- End Message ---
--- Begin Message ---
On 10-12-09 02:11 AM, Daevid Vincent wrote:
Avoid these ORM things like the plague! They seem great in theory, but if
you're doing anything serious, they will quickly get in your way. Not to
mention all that fancy "ORM" doesn't come without a price. It costs in terms
of speed, as well as training. You're much better off to make your custom
tools for your particular application.

But is your client much better off if you make your own custom tools for your particular application? There's a cost benefit in using existing tools that have been well designed and vetted.

Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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

We are going add a topology view to our Network Management System.
Our Network Management System is based on PHP, CakePHP, jQuery and other web
related tools(middle tier written using C++).

So we are going to work with Scalable Vector Graphics.

We are looking for the best solution for doing that.

Are there any extensions, plugins, frameworks available for SVG related
things ?

Any help is much appreciated.

-- 
Cheers,
Sudarshana Sampath.

--- End Message ---

Reply via email to