php-general Digest 13 Nov 2009 07:26:03 -0000 Issue 6440

Topics (messages 299785 through 299808):

Re: How to create CA certificate with PHP
        299785 by: Tanveer Chowdhury

Re: Need suggestions on PHP frameworks
        299786 by: Dhanushka Samarakoon
        299789 by: richardh.phpguru.org
        299795 by: Sudheer Satyanarayana

How to read certificate values of HTTPS webserver
        299787 by: Tanveer Chowdhury

What method is best for generating thumbnails in PHP from PDF's?
        299788 by: Chris Payne
        299790 by: O. Lavell
        299791 by: Stephen
        299796 by: Joseph Masoud
        299801 by: clancy_1.cybec.com.au

sessions and email
        299792 by: Dan Shirah
        299793 by: Ashley Sheridan
        299794 by: Andrew Ballard

uniqid() and repetition of numbers generated
        299797 by: Angus Mann
        299798 by: Ashley Sheridan
        299799 by: Angus Mann
        299800 by: Ross McKay
        299805 by: John List
        299807 by: Angus Mann

is Aptana taking a crap on the face of PHP?
        299802 by: Daevid Vincent
        299803 by: Raymond Irving
        299804 by: Robert Cummings
        299806 by: Bastien Koert

Re: shell_exec fails to compile java class?
        299808 by: Mark Cilissen

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 ---
thank you. I will have a look at it and will come up if any question.

On Wed, Nov 11, 2009 at 11:47 PM, Manuel Lemos <[email protected]> wrote:
> Hello,
>
> on 11/10/2009 08:28 PM Tanveer Chowdhury said the following:
>> Hello all,
>>
>> Using openssl, I can create CA certificate by using the linux command line.
>>
>> But this thing I want to do using PHP that is I want to add some information
>> in the openldap regarding a user and also would like to insert his public
>> key certificate along with the other information.
>>
>> Can you please suggest any link or documentation on this topic. For your
>> information I can insert information like user,email,phone,email in openldap
>> but haven't tried to insert the certificate in openldap yet. The issue is, I
>> want to make the whole process automated like all user information user will
>> input in a form and upon clicking submit button all those information along
>> with his certificate which will be generated then and there will be inserted
>> in openldap.
>
> You may want to try this PHP class exactly for that purpose:
>
> http://www.phpclasses.local/crypt_openssl
>
> --
>
> Regards,
> Manuel Lemos
>
> Find and post PHP jobs
> http://www.phpclasses.org/jobs/
>
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>

--- End Message ---
--- Begin Message ---
Thanks :-)
Tried searching the archives, but maybe I was not using the correct search
terms.
Will give it another try.

On Thu, Nov 12, 2009 at 11:01 AM, Nathan Rixham <[email protected]> wrote:

> Dhanushka Samarakoon wrote:
> > Hi,
> >
> > I need to select a PHP framework for a small project about 20-25 pages
> (but
> > expected to grow in the future). I was looking at the comparison chart at
> > http://www.phpframeworks.com/.
> >
> > After browsing through some forums seems like CodeIgniter is the popular
> > option. *** But I really like event driven capabilities in Prado and Yii.
> > *** Please give me your input on what you think the best framework is and
> > why.
>
> can't see anybody helping you here, you just need to try a couple that
> fit your requirements and see which one(s) you prefer.
>
> or use zend.
>
> > Also I would like an IDE (preferably free) which support that framework
> and
> > gives syntax highlighting and auto completion not only to the framework
> but
> > using my own classes as well. Also it need to have debugging, call stack,
> > variable/object quick view analysis.
> >
>
> searching the archives would be good; this question is asked almost
> daily.. but PDT/eclipse, netbeans, aptana
>

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

> ...

I doubt you'll get a reasoned bunch of suggestions, more a religious
war... :-) Still, I like PEAR components.

-- 
Richard Heyes
HTML5 graphing: RGraph - www.rgraph.net (updated 8th November)
Lots of PHP and Javascript code - http://www.phpguru.org

--- End Message ---
--- Begin Message ---

I doubt you'll get a reasoned bunch of suggestions, more a religious
war... :-) Still, I like PEAR components.

Exactly.

You have to visit the websites of frameworks, comparison articles, etc and find out for yourself which one suits you best.

Currently, if I get to decide, I choose ZF for all the new PHP projects. I am also comfortable with
* my own framework
* other frameworks like Symfony
* framework less projects

Recently, I wrote about ZF - http://techchorus.net/reasons-use-zend-framework

--

With warm regards,
Sudheer. S
Tech stuff: http://techchorus.net
Business: http://binaryvibes.co.in


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

I have a SSL enabledd webserver which is CA self signed. So when
client hits the server , the server shows the client his certificate
and as its self signed so the client browser add the exception and
proceed. Now when the client hit the webserver and server showed its
certificate; is there any way I can get the informations from that
certificate because I have no idea how to let php know when the server
sent its certificate so that it can fetch the information and how to
read? Because I am trying of doing the authentication based on the
certificate like take the cn value from certificate and match with a
database and if match found the client can proceed.

Thank you.

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

I have been asked to create thumbnails from the first page of a PDF
document on the fly with PHP, I have looked online but am confused as
there doesn't seem 1 simple solution.

What would you all recommend as an easy way to do this?

Any help would be really appreciated.

Chris

--- End Message ---
--- Begin Message ---
Chris Payne wrote:

> Hi Everyone,
> 
> I have been asked to create thumbnails from the first page of a PDF
> document on the fly with PHP, I have looked online but am confused as
> there doesn't seem 1 simple solution.
> 
> What would you all recommend as an easy way to do this?
> 
> Any help would be really appreciated.

I think I would just call an external program to do it, like "convert" 
from Image Magick:

exec("convert -thumbnail 300x300 document001.pdf[0] thumbnail001.png");


--- End Message ---
--- Begin Message ---
--- On Thu, 11/12/09, Chris Payne <[email protected]> wrote:

> I have been asked to create thumbnails from the first page
> of a PDF
> document on the fly with PHP, I have looked online but am
> confused as
> there doesn't seem 1 simple solution.

Go to sitepoint.com and search for "photo gallery in minutes"

Excellent article.

Stephen 



--- End Message ---
--- Begin Message ---
 On 12/11/09 17:44, O. Lavell wrote:
Chris Payne wrote:

Hi Everyone,

I have been asked to create thumbnails from the first page of a PDF
document on the fly with PHP, I have looked online but am confused as
there doesn't seem 1 simple solution.

What would you all recommend as an easy way to do this?

Any help would be really appreciated.
I think I would just call an external program to do it, like "convert"
from Image Magick:

exec("convert -thumbnail 300x300 document001.pdf[0] thumbnail001.png");


If you're going to use ImageMagick, make sure you have the latest ghostscript library, otherwise not all thumbnails will render properly.

I don't recommend CentOS for this task. If this is your server OS, I recommend considering this rpm:

http://www.clearfield.com/ghostscript.8.64/ghostscript.html

Good luck.

--- End Message ---
--- Begin Message ---
On Thu, 12 Nov 2009 09:45:55 -0800 (PST), [email protected] (Stephen) wrote:

>--- On Thu, 11/12/09, Chris Payne <[email protected]> wrote:
>
>> I have been asked to create thumbnails from the first page
>> of a PDF
>> document on the fly with PHP, I have looked online but am
>> confused as
>> there doesn't seem 1 simple solution.
>
>Go to sitepoint.com and search for "photo gallery in minutes"

Sitepoint: Home » Search for "photo gallery in minutes" 

doesn't find anything for me?


--- End Message ---
--- Begin Message ---
All,

I am using sessions for my application to verify a user has logged in:

// Verify the user is logged in.
if (!isset($_SESSION['basic_is_logged_in'])
    || $_SESSION['basic_is_logged_in'] !== true) {
    // If not logged in, redirect to the login page.
    header('Location: login.php');
    exit;
}

If anyone tries to go to any page in the application via the address bar,
they are correctly redirected to the login page.

However, if someone that is currently logged into the application using I.E.
goes to File -> Send -> Page by Email, the person they email the link to can
open it and use the application without logging in and the address bar uses
a local path like: C:\Documents and Settings\my_name\Local
Settings\Temporary Internet Files\OLK18\My Page (2).htm

How can I prevent the emailed pages from being able to access the
application if it is a local path or the user hasn't logged in?

--- End Message ---
--- Begin Message ---
On Thu, 2009-11-12 at 13:17 -0500, Dan Shirah wrote:

> All,
> 
> I am using sessions for my application to verify a user has logged in:
> 
> // Verify the user is logged in.
> if (!isset($_SESSION['basic_is_logged_in'])
>     || $_SESSION['basic_is_logged_in'] !== true) {
>     // If not logged in, redirect to the login page.
>     header('Location: login.php');
>     exit;
> }
> 
> If anyone tries to go to any page in the application via the address bar,
> they are correctly redirected to the login page.
> 
> However, if someone that is currently logged into the application using I.E.
> goes to File -> Send -> Page by Email, the person they email the link to can
> open it and use the application without logging in and the address bar uses
> a local path like: C:\Documents and Settings\my_name\Local
> Settings\Temporary Internet Files\OLK18\My Page (2).htm
> 
> How can I prevent the emailed pages from being able to access the
> application if it is a local path or the user hasn't logged in?


You can't really. When someone is emailing the page, it's the equivalent
of them saving the page to their local computer, and then sending that
as an attachment. As this is all client-side, it has no contact with
PHP. You could have some sort of Javascript to detect the domain the
page has, and then redirect if it's not your domain, but this fails when
someone turns Javascript off. Apart from that, I don't know of any other
way you could stop someone from emailing a page, aside from making the
site completely Ajax based and pulling in every scrap of content via
Ajax.

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



--- End Message ---
--- Begin Message ---
On Thu, Nov 12, 2009 at 1:21 PM, Ashley Sheridan
<[email protected]> wrote:
> On Thu, 2009-11-12 at 13:17 -0500, Dan Shirah wrote:
>
>> All,
>>
>> I am using sessions for my application to verify a user has logged in:
>>
>> // Verify the user is logged in.
>> if (!isset($_SESSION['basic_is_logged_in'])
>>     || $_SESSION['basic_is_logged_in'] !== true) {
>>     // If not logged in, redirect to the login page.
>>     header('Location: login.php');
>>     exit;
>> }
>>
>> If anyone tries to go to any page in the application via the address bar,
>> they are correctly redirected to the login page.
>>
>> However, if someone that is currently logged into the application using I.E.
>> goes to File -> Send -> Page by Email, the person they email the link to can
>> open it and use the application without logging in and the address bar uses
>> a local path like: C:\Documents and Settings\my_name\Local
>> Settings\Temporary Internet Files\OLK18\My Page (2).htm
>>
>> How can I prevent the emailed pages from being able to access the
>> application if it is a local path or the user hasn't logged in?
>
>
> You can't really. When someone is emailing the page, it's the equivalent
> of them saving the page to their local computer, and then sending that
> as an attachment. As this is all client-side, it has no contact with
> PHP. You could have some sort of Javascript to detect the domain the
> page has, and then redirect if it's not your domain, but this fails when
> someone turns Javascript off. Apart from that, I don't know of any other
> way you could stop someone from emailing a page, aside from making the
> site completely Ajax based and pulling in every scrap of content via
> Ajax.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>

And even then, it has become part of the DOM and will be saved with
the rest of the page. The presence of Javascript in the page *might*
remove it/hide it/obscure it/etc., but it will still be there in the
saved document.

Andrew

--- End Message ---
--- Begin Message ---
Hi all. I'm sure I can't be the first person to ask this question but a search 
of the net leaves me confused.

I need a unique identifier in an SQL table and for complicated reasons I don't 
want to use auto-increment.

So I thought I would use a pseudo-random method instead. I am NOT scared of 
people guessing the unique identifier, it just has to be unique in order for 
the database to work properly.

So I looked at the uniqid() function and see it is based on the "current time 
in microseconds" and when I test it out I see that it increments (very quickly) 
when run repeatedly.

If it is based on JUST the time, then it should repeat every 24 hours, thus 
making "collisions" possible, which I don't want.

If it is based on the time AND day, then that's fine....I can use it.

So here's the problem....
When I calculate the number of microseconds since 1970 I get a 16 digit number.
But uniqid() only gives a 13 digit number.
Calculating the number of microseconds in a day gives 11 digits.

So it seems to me that the numbering sequence will repeat every 100 days, which 
risks collisions also.

Can someone explain how uniqid() is really calculated, so I can make a proper 
judgement about how to use it?

Please don't suggest using a hash of a number generated by uniqid(). Hashing a 
small number into a longer one does not add entropy, it just transforms the 
input number, so it does NOT alter the risk of collisions so there is no net 
advantage.

I had a thought to just append the current date to the uniqid() result but I'm 
interested to know if anyone has a more elegant solution.

Thanks in advance.

Angus





--- End Message ---
--- Begin Message ---
On Fri, 2009-11-13 at 08:22 +1000, Angus Mann wrote:

> Hi all. I'm sure I can't be the first person to ask this question but a 
> search of the net leaves me confused.
> 
> I need a unique identifier in an SQL table and for complicated reasons I 
> don't want to use auto-increment.
> 
> So I thought I would use a pseudo-random method instead. I am NOT scared of 
> people guessing the unique identifier, it just has to be unique in order for 
> the database to work properly.
> 
> So I looked at the uniqid() function and see it is based on the "current time 
> in microseconds" and when I test it out I see that it increments (very 
> quickly) when run repeatedly.
> 
> If it is based on JUST the time, then it should repeat every 24 hours, thus 
> making "collisions" possible, which I don't want.
> 
> If it is based on the time AND day, then that's fine....I can use it.
> 
> So here's the problem....
> When I calculate the number of microseconds since 1970 I get a 16 digit 
> number.
> But uniqid() only gives a 13 digit number.
> Calculating the number of microseconds in a day gives 11 digits.
> 
> So it seems to me that the numbering sequence will repeat every 100 days, 
> which risks collisions also.
> 
> Can someone explain how uniqid() is really calculated, so I can make a proper 
> judgement about how to use it?
> 
> Please don't suggest using a hash of a number generated by uniqid(). Hashing 
> a small number into a longer one does not add entropy, it just transforms the 
> input number, so it does NOT alter the risk of collisions so there is no net 
> advantage.
> 
> I had a thought to just append the current date to the uniqid() result but 
> I'm interested to know if anyone has a more elegant solution.
> 
> Thanks in advance.
> 
> Angus
> 
> 
> 
> 


Auto increment fields are designed to avoid collisions. I can't think of
any sensible reason for not using them. If you're worried that users of
the system will think a number like '65' is a 'silly' value for an id,
why not pad it up with leading zeros, and maybe add in some text from
their name or something. To me, one unique number is the same as
another, whether it has 11 digits or 2. Also, without having numbers
with many leading zeros in your 11-digit unique number, the value range
will be dramatically reduced, thereby increasing the chance of you
running out of unique values.

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



--- End Message ---
--- Begin Message ---
---- Original Message ----- 
  From: Ashley Sheridan 
  To: Angus Mann 
  Cc: [email protected] 
  Sent: Friday, November 13, 2009 8:31 AM
  Subject: Re: [PHP] uniqid() and repetition of numbers generated


  On Fri, 2009-11-13 at 08:22 +1000, Angus Mann wrote: 
Hi all. I'm sure I can't be the first person to ask this question but a search 
of the net leaves me confused.

I need a unique identifier in an SQL table and for complicated reasons I don't 
want to use auto-increment.

So I thought I would use a pseudo-random method instead. I am NOT scared of 
people guessing the unique identifier, it just has to be unique in order for 
the database to work properly.

So I looked at the uniqid() function and see it is based on the "current time 
in microseconds" and when I test it out I see that it increments (very quickly) 
when run repeatedly.

If it is based on JUST the time, then it should repeat every 24 hours, thus 
making "collisions" possible, which I don't want.

If it is based on the time AND day, then that's fine....I can use it.

So here's the problem....
When I calculate the number of microseconds since 1970 I get a 16 digit number.
But uniqid() only gives a 13 digit number.
Calculating the number of microseconds in a day gives 11 digits.

So it seems to me that the numbering sequence will repeat every 100 days, which 
risks collisions also.

Can someone explain how uniqid() is really calculated, so I can make a proper 
judgement about how to use it?

Please don't suggest using a hash of a number generated by uniqid(). Hashing a 
small number into a longer one does not add entropy, it just transforms the 
input number, so it does NOT alter the risk of collisions so there is no net 
advantage.

I had a thought to just append the current date to the uniqid() result but I'm 
interested to know if anyone has a more elegant solution.

Thanks in advance.

Angus





  Auto increment fields are designed to avoid collisions. I can't think of any 
sensible reason for not using them. If you're worried that users of the system 
will think a number like '65' is a 'silly' value for an id, why not pad it up 
with leading zeros, and maybe add in some text from their name or something. To 
me, one unique number is the same as another, whether it has 11 digits or 2. 
Also, without having numbers with many leading zeros in your 11-digit unique 
number, the value range will be dramatically reduced, thereby increasing the 
chance of you running out of unique values.

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


       

Thanks Ashley. To clarify, the reason I don't want to use auto-increment : 
different users with their own populated databases may wish to merge some or 
all of their data. The unique identifier needs to be carried along with the 
rest of the data, hence be unique not only on the database it currently resides 
in ... it still needs to be unique if it gets copied into another person's 
database, and auto-increment will not meet that requirement. I thought that 
using microtime (hence uniqid()) will solve the problem, and the only chance of 
a collision is the unlikely event that by chance, records are added to 2 
different people's databases at EXACTLY the same time, to within an accuracy of 
a millionth of a second. Possible I realize, but very unlikely, given that each 
user will probably add less than 100 entries per day.

On balance I think I will generate an identifier consisting of a few 
things...uniqid() plus a a few letters from the person's name plus a 
(pseudo)random 3 digit number. Probably there's enough entropy in that for my 
purpose.  

But the question still remains....what exactly is being returned by uniqid() ? 
It is obviously not random, and not a hash function because it increments 
predictably. It's too short to be the number of microseconds since 1970 and too 
long to be the number of microseconds since midnight. Since it has a fixed 
length, and it increments, it will eventually get to the last possible number - 
when will that be, and what will happen - will an extra digit appear or will it 
go back to zero, or will the generating algorithm crash? 

If it's anything similar to the unix timestamp then we're all in trouble on 
January 19, 2038 !










--- End Message ---
--- Begin Message ---
On Fri, 13 Nov 2009 08:22:47 +1000, Angus Mann wrote:

>I need a unique identifier in an SQL table and for complicated reasons 
>I don't want to use auto-increment. [...]

So why not use a UUID/GUID as created by the DB? You don't specify which
DB server technology you're using, but:

* Microsoft SQL Server has uniqueidentifier and newid()
* Oracle has sys_guid()
* MySQL has uuid() and uuid_short()
* PostgreSQL has uuid and contributor function contrib/uuid-ossp

Or are you using something else which doesn't support UUIDs?

(Ash, maybe he's doing replication and can't rely on auto-increment
integers aligning across peers)
-- 
Ross McKay, Toronto, NSW Australia
"Let the laddie play wi the knife - he'll learn"
- The Wee Book of Calvin

--- End Message ---
--- Begin Message ---
Angus Mann wrote:
---- Original Message ----- From: Ashley Sheridan To: Angus Mann Cc: [email protected] Sent: Friday, November 13, 2009 8:31 AM
  Subject: Re: [PHP] uniqid() and repetition of numbers generated


On Fri, 2009-11-13 at 08:22 +1000, Angus Mann wrote: Hi all. I'm sure I can't be the first person to ask this question but a search of the net leaves me confused.

I need a unique identifier in an SQL table and for complicated reasons I don't 
want to use auto-increment.

So I thought I would use a pseudo-random method instead. I am NOT scared of 
people guessing the unique identifier, it just has to be unique in order for 
the database to work properly.

So I looked at the uniqid() function and see it is based on the "current time in 
microseconds" and when I test it out I see that it increments (very quickly) when 
run repeatedly.

If it is based on JUST the time, then it should repeat every 24 hours, thus making 
"collisions" possible, which I don't want.

If it is based on the time AND day, then that's fine....I can use it.

So here's the problem....
When I calculate the number of microseconds since 1970 I get a 16 digit number.
But uniqid() only gives a 13 digit number.
Calculating the number of microseconds in a day gives 11 digits.

So it seems to me that the numbering sequence will repeat every 100 days, which 
risks collisions also.

Can someone explain how uniqid() is really calculated, so I can make a proper 
judgement about how to use it?

Please don't suggest using a hash of a number generated by uniqid(). Hashing a 
small number into a longer one does not add entropy, it just transforms the 
input number, so it does NOT alter the risk of collisions so there is no net 
advantage.

I had a thought to just append the current date to the uniqid() result but I'm 
interested to know if anyone has a more elegant solution.

Thanks in advance.

Angus





  Auto increment fields are designed to avoid collisions. I can't think of any 
sensible reason for not using them. If you're worried that users of the system 
will think a number like '65' is a 'silly' value for an id, why not pad it up 
with leading zeros, and maybe add in some text from their name or something. To 
me, one unique number is the same as another, whether it has 11 digits or 2. 
Also, without having numbers with many leading zeros in your 11-digit unique 
number, the value range will be dramatically reduced, thereby increasing the 
chance of you running out of unique values.

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


Thanks Ashley. To clarify, the reason I don't want to use auto-increment : 
different users with their own populated databases may wish to merge some or 
all of their data. The unique identifier needs to be carried along with the 
rest of the data, hence be unique not only on the database it currently resides 
in ... it still needs to be unique if it gets copied into another person's 
database, and auto-increment will not meet that requirement. I thought that 
using microtime (hence uniqid()) will solve the problem, and the only chance of 
a collision is the unlikely event that by chance, records are added to 2 
different people's databases at EXACTLY the same time, to within an accuracy of 
a millionth of a second. Possible I realize, but very unlikely, given that each 
user will probably add less than 100 entries per day.

On balance I think I will generate an identifier consisting of a few things...uniqid() plus a a few letters from the person's name plus a (pseudo)random 3 digit number. Probably there's enough entropy in that for my purpose. But the question still remains....what exactly is being returned by uniqid() ? It is obviously not random, and not a hash function because it increments predictably. It's too short to be the number of microseconds since 1970 and too long to be the number of microseconds since midnight. Since it has a fixed length, and it increments, it will eventually get to the last possible number - when will that be, and what will happen - will an extra digit appear or will it go back to zero, or will the generating algorithm crash?
If it's anything similar to the unix timestamp then we're all in trouble on 
January 19, 2038 !

Here's part of the confusion:

If you were to express the number of microseconds since 1970 in a decimal number, it would indeed take 16 digits.

But uniqid() returns a /13 character string/, not a 13 digit number. The string is actually a hexadecimal number (and thus can express a greater range of values than a decimal number within those 13 characters).

-John



--- End Message ---
--- Begin Message ---
Here's part of the confusion:

If you were to express the number of microseconds since 1970 in a
decimal number, it would indeed take 16 digits.

But uniqid() returns a /13 character string/, not a 13 digit number. The
string is actually a hexadecimal number (and thus can express a greater
range of values than a decimal number within those 13 characters).

-John

Ahh! The moment when the penny drops. I was looking at the result as a number, not a string.
Solution to problem = use uniqid()



--- End Message ---
--- Begin Message ---
Whoa, am I reading this right that Aptana is basically moving away from
PHP??
 
https://aptanastudio.tenderapp.com/discussions/suggestions/58-aptana-20
https://aptanastudio.tenderapp.com/discussions/questions/75-aptana-no-longer
-has-php
http://www.aptana.org/php
 
It sounds like they put in the old PHP 1.1 plug-in just to shut the angry
mob up, but I don't get the feeling they plan to do any further PHP
development. That is a real shame as Zend Studio NEEDS competition.
 
I guess PDT (http://www.eclipse.org/pdt/) may end up benefiting from this,
but I suspect it will be some time to come before the two projects are
merged properly. Well, I'll keep my fingers crossed that this *IS* the best
solution for the long term. In the mean time, I can't help but feel a piece
of the PHP community just "died"... well, maybe "moved away" is more
accurate.
 
I do find it a little ironic as I just started a new project on Monday and
was fully expecting to develop it all using Aptana. Guess I'll stick with
1.5 for now (warts and all).
 
How is PDT? I tried to install it with Aptana 1.5 and it failed:
 
Cannot complete the install because one or more required items could not be
found.
  Software being installed: PDT Runtime Feature 2.0.0.v20090315-1850
(org.eclipse.php.feature.group 2.0.0.v20090315-1850)
  Missing requirement: PDT Runtime Feature 2.0.0.v20090315-1850
(org.eclipse.php.feature.group 2.0.0.v20090315-1850) requires
'org.eclipse.dltk.core.feature.group [1.0.0,2.0.0)' but it could not be
found
 
ooops, found my own solution to that one:
https://aptanastudio.tenderapp.com/discussions/problems/328-aptana-php-platf
orm-and-pdt-not-available
https://aptanastudio.tenderapp.com/faqs/third-party-plugins/aptana-studio-an
d-php-development-tools
 
First impressions:

*       The amazing color coding that Aptana had for PHP (down to individual
left and right braces even!) is gone!!!
*       The PHP code formatter is also gone!!
*       Code assist and completion is gone too for any functions NOT on the
current page. It doesn't even know the name of variables WITHIN a function!
THIS F'ING BLOWS.

Am I not doing something right? I mean, what the hell does PDT do actually
then? It can't be a v2.1 and this much pure failure can it?

--- End Message ---
--- Begin Message ---

You might want to check out NetBeans for PHP - It's very nice open source IDE

Best regards,
__
Raymond Irving




________________________________
From: Daevid Vincent <[email protected]>
To: PHP General <[email protected]>
Sent: Thu, November 12, 2009 7:55:56 PM
Subject: [PHP] is Aptana taking a crap on the face of PHP?

Whoa, am I reading this right that Aptana is basically moving away from
PHP??

https://aptanastudio.tenderapp.com/discussions/suggestions/58-aptana-20
https://aptanastudio.tenderapp.com/discussions/questions/75-aptana-no-longer
-has-php
http://www.aptana.org/php

It sounds like they put in the old PHP 1.1 plug-in just to shut the angry
mob up, but I don't get the feeling they plan to do any further PHP
development. That is a real shame as Zend Studio NEEDS competition.

I guess PDT (http://www.eclipse.org/pdt/) may end up benefiting from this,
but I suspect it will be some time to come before the two projects are
merged properly. Well, I'll keep my fingers crossed that this *IS* the best
solution for the long term. In the mean time, I can't help but feel a piece
of the PHP community just "died"... well, maybe "moved away" is more
accurate.

I do find it a little ironic as I just started a new project on Monday and
was fully expecting to develop it all using Aptana. Guess I'll stick with
1.5 for now (warts and all).

How is PDT? I tried to install it with Aptana 1.5 and it failed:

Cannot complete the install because one or more required items could not be
found.
  Software being installed: PDT Runtime Feature 2.0.0.v20090315-1850
(org.eclipse.php.feature.group 2.0.0.v20090315-1850)
  Missing requirement: PDT Runtime Feature 2.0.0.v20090315-1850
(org.eclipse.php.feature.group 2.0.0.v20090315-1850) requires
'org.eclipse.dltk.core.feature.group [1.0.0,2.0.0)' but it could not be
found

ooops, found my own solution to that one:
https://aptanastudio.tenderapp.com/discussions/problems/328-aptana-php-platf
orm-and-pdt-not-available
https://aptanastudio.tenderapp.com/faqs/third-party-plugins/aptana-studio-an
d-php-development-tools

First impressions:

*    The amazing color coding that Aptana had for PHP (down to individual
left and right braces even!) is gone!!!
*    The PHP code formatter is also gone!!
*    Code assist and completion is gone too for any functions NOT on the
current page. It doesn't even know the name of variables WITHIN a function!
THIS F'ING BLOWS.

Am I not doing something right? I mean, what the hell does PDT do actually
then? It can't be a v2.1 and this much pure failure can it?

--- End Message ---
--- Begin Message --- I've never even heard of Aptana... I use Joe...it's a terminal based editor. Works anywhere you have a terminal... just like other popular editors such as vi :)

Cheers,
Rob.


Daevid Vincent wrote:
Whoa, am I reading this right that Aptana is basically moving away from
PHP??
https://aptanastudio.tenderapp.com/discussions/suggestions/58-aptana-20
https://aptanastudio.tenderapp.com/discussions/questions/75-aptana-no-longer
-has-php
http://www.aptana.org/php
It sounds like they put in the old PHP 1.1 plug-in just to shut the angry
mob up, but I don't get the feeling they plan to do any further PHP
development. That is a real shame as Zend Studio NEEDS competition.
I guess PDT (http://www.eclipse.org/pdt/) may end up benefiting from this,
but I suspect it will be some time to come before the two projects are
merged properly. Well, I'll keep my fingers crossed that this *IS* the best
solution for the long term. In the mean time, I can't help but feel a piece
of the PHP community just "died"... well, maybe "moved away" is more
accurate.
I do find it a little ironic as I just started a new project on Monday and
was fully expecting to develop it all using Aptana. Guess I'll stick with
1.5 for now (warts and all).
How is PDT? I tried to install it with Aptana 1.5 and it failed: Cannot complete the install because one or more required items could not be
found.
  Software being installed: PDT Runtime Feature 2.0.0.v20090315-1850
(org.eclipse.php.feature.group 2.0.0.v20090315-1850)
  Missing requirement: PDT Runtime Feature 2.0.0.v20090315-1850
(org.eclipse.php.feature.group 2.0.0.v20090315-1850) requires
'org.eclipse.dltk.core.feature.group [1.0.0,2.0.0)' but it could not be
found
ooops, found my own solution to that one:
https://aptanastudio.tenderapp.com/discussions/problems/328-aptana-php-platf
orm-and-pdt-not-available
https://aptanastudio.tenderapp.com/faqs/third-party-plugins/aptana-studio-an
d-php-development-tools
First impressions:

*       The amazing color coding that Aptana had for PHP (down to individual
left and right braces even!) is gone!!!
*       The PHP code formatter is also gone!!
*       Code assist and completion is gone too for any functions NOT on the
current page. It doesn't even know the name of variables WITHIN a function!
THIS F'ING BLOWS.

Am I not doing something right? I mean, what the hell does PDT do actually
then? It can't be a v2.1 and this much pure failure can it?


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

--- End Message ---
--- Begin Message ---
On Thu, Nov 12, 2009 at 8:40 PM, Robert Cummings <[email protected]> wrote:
> I've never even heard of Aptana... I use Joe...it's a terminal based editor.
> Works anywhere you have a terminal... just like other popular editors such
> as vi :)
>
> Cheers,
> Rob.
>
>
> Daevid Vincent wrote:
>>
>> Whoa, am I reading this right that Aptana is basically moving away from
>> PHP??
>>  https://aptanastudio.tenderapp.com/discussions/suggestions/58-aptana-20
>>
>> https://aptanastudio.tenderapp.com/discussions/questions/75-aptana-no-longer
>> -has-php
>> http://www.aptana.org/php
>>  It sounds like they put in the old PHP 1.1 plug-in just to shut the angry
>> mob up, but I don't get the feeling they plan to do any further PHP
>> development. That is a real shame as Zend Studio NEEDS competition.
>>  I guess PDT (http://www.eclipse.org/pdt/) may end up benefiting from
>> this,
>> but I suspect it will be some time to come before the two projects are
>> merged properly. Well, I'll keep my fingers crossed that this *IS* the
>> best
>> solution for the long term. In the mean time, I can't help but feel a
>> piece
>> of the PHP community just "died"... well, maybe "moved away" is more
>> accurate.
>>  I do find it a little ironic as I just started a new project on Monday
>> and
>> was fully expecting to develop it all using Aptana. Guess I'll stick with
>> 1.5 for now (warts and all).
>>  How is PDT? I tried to install it with Aptana 1.5 and it failed:
>>  Cannot complete the install because one or more required items could not
>> be
>> found.
>>  Software being installed: PDT Runtime Feature 2.0.0.v20090315-1850
>> (org.eclipse.php.feature.group 2.0.0.v20090315-1850)
>>  Missing requirement: PDT Runtime Feature 2.0.0.v20090315-1850
>> (org.eclipse.php.feature.group 2.0.0.v20090315-1850) requires
>> 'org.eclipse.dltk.core.feature.group [1.0.0,2.0.0)' but it could not be
>> found
>>  ooops, found my own solution to that one:
>>
>> https://aptanastudio.tenderapp.com/discussions/problems/328-aptana-php-platf
>> orm-and-pdt-not-available
>>
>> https://aptanastudio.tenderapp.com/faqs/third-party-plugins/aptana-studio-an
>> d-php-development-tools
>>  First impressions:
>>
>> *       The amazing color coding that Aptana had for PHP (down to
>> individual
>> left and right braces even!) is gone!!!
>> *       The PHP code formatter is also gone!!
>> *       Code assist and completion is gone too for any functions NOT on
>> the
>> current page. It doesn't even know the name of variables WITHIN a
>> function!
>> THIS F'ING BLOWS.
>>
>> Am I not doing something right? I mean, what the hell does PDT do actually
>> then? It can't be a v2.1 and this much pure failure can it?
>>
>
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Damn, meant to send to all

The issue here is that there are a lot of choices in the PHP space.
Eclipse, Aptana, Komodo, Zend, a host of various simpler text editors.
Aptana has chosen not to compete in this space and its their choice.
Personally, I use NetBeans or Komodo when I require something with a
bit of power. The biggest issue with IDEs that I have, is they are so
damn slow to start. Some of the smaller text editors are much quicker
to start and have most of what I need to do what we all have so much
fun doing.
-- 

Bastien

Cat, the other other white meat

--- End Message ---
--- Begin Message ---
דניאל דנון schreef:
Where are you trying to write text.txt? Are you setting a current working
directory in your batch file? Do you have write permission in this
directory?
(copied it to make it easier to understand my answer)
In the same folder.
Yes, there is a "cd javafiles"
Yes.

I know its not a permission / directory sort of things, since when there are
no errors - the .class compiled java files are created properly.

On Fri, Nov 6, 2009 at 9:11 PM, John List <[email protected]> wrote:

????? ???? wrote:

Hello, Thank you - I've managed to do that using a bat file like you
suggested.

Only problem is that:

When I try to call:
C:\\Java\bin\javac.exe  Tester.java > test.txt
(Which should run Tester.java and log any results into test.txt),

When there are compilation errors and this command returns results -
test.txt stays empty.

Any suggestions?


Where are you trying to write text.txt? Are you setting a current working
directory in your batch file? Do you have write permission in this
directory?

john

 On Wed, Nov 4, 2009 at 4:34 PM, Nathan Rixham <[email protected]> wrote:


????? ???? wrote:



Hello!

I need to use shell_exec (or any other similar function) in order to
compile
a java class-file.

I have all the needed components installed on my computer (Windows XP
with
Java SDK) - I can use "java c:\path...." in order to compile using
Start->Run.

When I try to do the same with shell_exec or `` it returns null and it
doesn't compiles. Even when there are errors - it doesn't show them at
all.

I've tried to use instead of "java c:\path..." the full java command
line
compiler path but it didn't work either.


When I try functions such as "echo test" it works.


Clearly I'm missing here something - problem is... what?




create an ant builder or .bat and call that instead; most likely because
the environment isn't set up correctly when executing via php; thus when
using ant or bat you can set everything up correctly as needed.

always use PHP on linux but permissions and the scope / permissions of
the
account php runs under may come in to play?

nathan











Hello,

You should execute:
C:\\Java\bin\javac.exe  Tester.java 1>test.txt 2>&1
This will redirect normal messages as well as errors to your text file.

--
Kind regards,
Mark Cilissen / Pixlism

--- End Message ---

Reply via email to