SitePoint Sponsor

User Tag List

Page 2 of 3 FirstFirst 123 LastLast
Results 26 to 50 of 56
  1. #26
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by DR_LaRRY_PEpPeR
    other than using stuff like exec(), i can't see many non-system type things being a problem. most scripts should work ok (vBulletin does). for file uploads, you need to use move_uploaded_file() (which should be used anyway) instead of copy(), etc.

    maybe i'm not thinking of stuff at the moment. can you give me some examples? i'm curious about how restrictive safe mode really is.
    Ok, this may not have anything to do with the Safe Mode, but your point of VBullting grabbed my attention. I can give you an example where VBulletin gets 100% scrwed up an not working. VBulletin actually need registering user global variables. Turn Register-GLobals off, and big whoops, nothing will work anymore, i tried that when i had some time to play with and it quite surprised me. I also heard that it's more safer to write a script so that it does not especially requires the register-globals to be enabled in order to work. Just my two cents :-)

  2. #27
    SitePoint Addict exhale81's Avatar
    Join Date
    Aug 2001
    Location
    Switzerland
    Posts
    395
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBulletin doesn't work with register_globals off because it's compatible with PHP3 and the version 3 doesn't have the $HTTP_*_VARS variables... they would have to trick register globals to make it work with version 3.X *AND* 4.2, or release two different scripts (but that would be a hell to maintain). And that applies for all developers who care about being compatible with PHP3

    PS: If I remember well, the only way to simulate functions with assembly language is to use gotos Assembly code isn't known for its readability (sp?) either
    Last edited by exhale81; Mar 27, 2002 at 21:56.
    Sebastien Rosset
    :: Commercial: BlackSonic | ScriptsCenter
    :: Non-Profit: VJCentral | ReclaimYourSoul

  3. #28
    purple monkey dishwasher scoates's Avatar
    Join Date
    Nov 2001
    Location
    Montreal
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    and the only way to simulate arrays is with pointers, but, REALLY, how many PHP developers do you know that even know what a pointer IS?

    ASM and PHP are completely different beasts.

    S

  4. #29
    SitePoint Member
    Join Date
    Mar 2002
    Location
    Portland, Oregon USA
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    my list

    I first want to say that I didn't see any direct mention about the work on the Zend Engine, version 2.0 (http://www.zend.com/engine2/ZendEngine-2.0.pdf). There, you'll find all the new proposals for the future, improved PHP.

    My list:

    + All the cool OOP enhancements so software engineers can use PHP too
    + Exception handling
    + $obj->getObj()->doSomething() pattern
    + Optional type enforcement, variable declarations
    + A local PHP configuration file for shared accounts**
    + More control over configuration during run-time
    + Processes that run independent of the request-response cycle (eg. db connection pools, long batch jobs, etc.)

    My biggest wish is for a local configuration file, as that would clean up so many nasty php problems I have fought with since the beginning. You would no longer need to touch a php file in order to move your application to another environment. You would just change some settings in the config file. Plus, you could cleanly configure PHP to act in a predictable manner (Does everybody know about magic_quotes , and how they're configured differently from host to host?).

    I think it would be cool if everybody tried out some other languages to get some more good ideas. Try Java. Try Python (I don't hear much about that around here).

  5. #30
    SitePoint Enthusiast acostin's Avatar
    Join Date
    Mar 2002
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Improvements that would make PHP a better language

    I think that what PHP leaks right now is a framework for building Entreprise Level web applications.

    Extending the language is a good point (I am a great supporter of the "try/catch" statements which will be present in the 2.0 Zend Engine). But this won't help us create professional web applications better.

    I think that one of the things missing from the current version is the bytecode generation support, that would allow code redistribution without having to distribute the source code. We (InterAKT: http://www.interakt.ro) are great fans of the Open Source mouvement (we have more than 5 Open Source PHP products that are really succesfull), but when it comes to the commercial part, our source code should be distributed "as is". Moreover, if we would choose to create some "PHP runtime libraries", we'll end up forcing everyone to include our text files in their pages, etc. An importing approach (like Java has) would be benefical for code reuse and for intellectual right protection.

    Another big problem in PHP is the "stateless" approach for the objects, that dissalows you to instantiate an object and leave it "in the heap" for the rest of the webserver life. This miss forces PHP developers to re-instantiate lots of objects on *each* page generation, and this is as error prone as time consuming.

    We would also like to have a unified database API (we use ADODB right now, and frankly we are pretty satisfied with it), but I think this request will be present only in the PHP 5.0 version.

    Another weak point of the 4.1 PHP version is the way XML/XSLT are binded together. There are many extensions to do XSL transformations on XML trees, but all requires you to give the input tree (both XML and XSL) in text format. So if you want to transform a XML tree multiple times (as we do in our XML/XSLT architecture, Krysalis : http://www.interakt.ro/products/Krysalis/), you would end up transforming back and forth XML trees into text files and viceversa. A unified approach to XML (DOM, SAX) and XSL (which should receive as input DOM trees and also which should output DOM trees) would be benefical.

    I think that these are almost all our complaints (for now). We are very satisfied with the way PHP works and we hope to have a long life near it

    Alexandru

    --
    -----------------------
    Alexandru COSTIN
    Product Manager
    http://www.interakt.ro/
    +401 411 2610

  6. #31
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    From Tech Times
    SP1 contains fixes for only three relatively innocuous bugs in
    the .NET Framework. The main update in this release is a new
    default security policy, which prevents .NET code downloaded from
    the Internet from running by default.
    Well that will indeed slow down the .NET party a little. There is a whole issue with security though. If .NET apps can access the local filesystem, all hell will break loose. Would seem like at the moment, .NET is really only realistic for company Intranets.

    Going back to this idea of a "plugin" to run PHP-GTK locally on the client. Was thinking something on lines of the Java runtime environment (not browser dependent) - the plugin provides all the requirements for PHP-GTK to run (and of course downloads in under 10 seconds ) plus establishes a connection to the server, to allow some processing to be handled there (e.g. db queries).

    In my opinion, what's killed net based Java Applications (not Applets - applications) is poor performance under Windows and Microsoft throwing in some curveballs such as deliberately poor pre installed runtime environments. Perhaps PHP might succeed where Java has stuggled.

    Of course the security implications would be the same as .NET but...

    I think that what PHP lacks right now is a framework for building Entreprise Level web applications.
    Totally agree with that. Whether this is down to the PHP dev team to solve I dont know though. Personally think ezPublish has most potential to be the ideal application framework for PHP.

    Perhaps PHP needs to endorse some of the other Open Source projects as the official "way to go". Looking at Pear for example, they're reinventing the wheel in some cases and have a lot of work to do to catch up with things like ADODB.

    Anyway - time to do some work

  7. #32
    SitePoint Addict IsaacV's Avatar
    Join Date
    Jan 2002
    Location
    Saint Petersburg
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by scoates
    I'm not sure if that last post was a troll, was serious, or was an attempt at being funny (I laughed).

    -Gotos are EVIL. They lead to spaghetti code, and unreadability. -- it looks like you want subroutines. Look into functions. (http://php.net/functions)
    -Variable scope is a GOOD thing.
    -And GD is a separate library the same way MySQL is a separate library. If you need it, pay for installation.

    S
    What's a troll? I like spaghetti code! It's easier to understand and you don't have to use it though. And you have to compile PHP with GDLib which makes it harder. Who has $150 just lying around? I can't pay that! And variable scope smells..
    Pants.
    Join the NYFlava Fashions Contest

  8. #33
    SitePoint Evangelist =X„®µ§='s Avatar
    Join Date
    Jun 2001
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A local PHP configuration file for shared accounts
    I totally agree with thisone.
    For example, say you have 2 sites on your host, an old one that was made with register globals on, and another one in wich you use register globals off...

    You would have to configure php with rg on, so the old one would work, but this would result in the second one being (more) insecure for no reason...

    A seperate file, like a .htaccess in apache or eg the .profile file for an sh shell that can override the default configuration could solve this and many other problems!
    PHP-Webservices - Profesional Hosting and Programming of sites.

  9. #34
    purple monkey dishwasher scoates's Avatar
    Join Date
    Nov 2001
    Location
    Montreal
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    From the Jargon File: Troll
    http://info.astrian.net/jargon/terms/t/troll.html

    I'll stand behind my Spaghetti Code is Evil, as will any experienced developer.

    You're a Visual Basic programmer, aren't you?

    S

  10. #35
    SitePoint Evangelist =X„®µ§='s Avatar
    Join Date
    Jun 2001
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would even say that's more a Basic habbit...
    Do VB programmers really use goto's???
    PHP-Webservices - Profesional Hosting and Programming of sites.

  11. #36
    Digital Warrior Renegade's Avatar
    Join Date
    Nov 2000
    Location
    Portland, OR
    Posts
    480
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by =X„®µ§=
    Do VB programmers really use goto's???
    Sadly, they used to. Back in the day, there were no loops, so you could simulate one with GOTO's. They should NOT however, continue to use them, and I wish I knew why GOTO's haven't been removed from the languages altogether.

    I think that what PHP lacks right now is a framework for building Entreprise Level web applications.

    I would love to know what you mean by this. I am currently coding an IT inventory database that will be used by 50 or so IT staff, to track the inventory given out to 5000+ end users.

    I work in a mulit-billion dollar international fortune 500 company.

    PHP seems to suit my needs pretty well. Care to clarify that statement a little?

    PS, I'm not being derogitory (sp) or sarcastic, I really DON'T understand

    Regards
    --There's my 1.5 cents, now where is my change!?!?

  12. #37
    Node mutilating coot timnz's Avatar
    Join Date
    Feb 2001
    Location
    New Zealand
    Posts
    516
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oddly enough, I was reading this C# book today, and part of it explained about gotos, however they did explain all the negatives of using them and pretty much no positives. But I still think it as strange that they would even bother including the ability to use them in C#, as it is only tempting some person to use them, and that would be bad!

    And I agree with all the other points mentioned, with specific emphasis on better OO "support".
    Oh no! the coots are eating my nodes!

  13. #38
    Database Jedi MattR's Avatar
    Join Date
    Jan 2001
    Location
    buried in the database shell (Washington, DC)
    Posts
    1,107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Renegade
    I think that what PHP lacks right now is a framework for building Entreprise Level web applications.[/b]

    I would love to know what you mean by this. I am currently coding an IT inventory database that will be used by 50 or so IT staff, to track the inventory given out to 5000+ end users.
    I think by Enterprise he means (my interpretation) Enterprise size and load, not ‘for use in the Enterprise’. Or two things:
    1. Enterprise-level scalability (think massive traffic – thousands of pages viewed per second on many servers)
    2. Enterprise-level application development framework (ever tried writing 100,000 line programs in PHP?)


    Your application, while employed in an Enterprise shows at least that PHP is viable in the Enterprise market as a development language, the 50 users or so using it hardly qualifies it as an ‘Enterprise-class’ load (e.g. 10s or 100s of thousands of users accessing at a time).

    A couple problems with enterprise-scalability/stability:
    • No truly global or ‘session’ variables (like CF and ASP)
    • No centralized administration for clustered web servers


    The problem with PHP’s lack of session or shared in-memory variables is that oftentimes there is a need to make large amounts of data (say a user’s session information which has a large set of user-defined application settings which need carried around) available to more than one PHP file. Currently you have no efficient way of doing this. Sure, you can store it in a database table, but pulling the same data over and over from a DB is hardly the most efficient way; plus if the data-structure is large you have to deal with PHP re-allocating memory, etc. Storing them in a server-wide (or different scopes) variable which would be available in every script would certainly be a more efficient way. Of course, should the variable be undefined (say the first time a user visits) or otherwise missing (reboot of web server) you will have to redefine the variable.

    Having worked with clustered web servers (e.g. multiple web boxen behind load balancers) it’s annoying to have to log in (ssh) to each box to change a PHP-ini (or apache for that manner) setting. Or to dump the Zend Accelerator’s cache (which they thoughtfully included a web-based admin panel for this purpose). Now imagine having to make that change over 10, 20, 30 servers. Quite a bit of a nightmare. Sure, you could write a custom application to propagate the changes, but wouldn’t it be nice if that was included in PHP itself?

    Enterprise-level application development is, I think, dependant a lot upon what tool you use to develop applications. Certainly you’re not going to want to write a 100,000 line application all in a single index.php file, right? So you split them up to a bunch of smaller files. However, if you have to migrate the application somewhere else (or replicate to other clustered web servers) there’s no easy way to do so. You have to gzip everything up, dump it to the other box via SFTP or whatnot, and then unzip. Same thing if you make changes to one file on one box – somehow you have to propagate that to the other n-many web servers running PHP.

    I know the Zend Encoder can ‘compile’ each file into an encrypted form –wonder if such functionality could be employed to compile an entire application into a single, far easier to transport, executable! Not only is it precompiled (a la C) but far easier to distribute.

  14. #39
    SitePoint Addict exhale81's Avatar
    Join Date
    Aug 2001
    Location
    Switzerland
    Posts
    395
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's possible to write custom modules in C/C++ with PHP. It's faster and probably easier to maintain. Of course it only works if you don't plan to share/sell your script.

    I personnaly don't think it's such a problem to develop entreprise-size applications in PHP. Of course you have to organize the data, plan everything ahead, but this had to be done for any serious applications developement anyway.
    Last edited by exhale81; Apr 1, 2002 at 18:27.
    Sebastien Rosset
    :: Commercial: BlackSonic | ScriptsCenter
    :: Non-Profit: VJCentral | ReclaimYourSoul

  15. #40
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Some comments on other comments made in this thread:

    1) The ANSI C++ standard is only a couple of years old (not 20). In fact, C++ was only released around 1985.

    2) Executing scripts under script owner's permissions - I think this issue may be solved with (when???) Apache 2.0 is released, as the virtual servers run as the server owner (rather than "nobody").

    3) Loose typing poses a problem for method overloading -although I am sure there are ways around it, but at the expense of the quick and dirty nature of php loose typeing.

    4) My wish is mainly for improvement of OOP support too. I would consider using OO more in php if it provided what I consider to be necessary. Can't think of the top of my head because I don't use classes in php. But private scoping as suggested. Also, I think most ppl would rather see a more C++ like OOP support rather than a VB type support (with set get properties, etc).

  16. #41
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freakysid
    2) Executing scripts under script owner's permissions - I think this issue may be solved with (when???) Apache 2.0 is released, as the virtual servers run as the server owner (rather than "nobody").
    YES! i cannot wait for Apache 2. gonna rock! that is one of the coolest things.

  17. #42
    Talk to the /dev/null Theiggsta's Avatar
    Join Date
    Mar 2001
    Location
    Tampa, FL
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree with the improved OOP functionality.

    OOP is a great tool to use and if it can be improved mainly for performance issues, I would definately use it more often. Then again some more features wouldnt hurt

    As far as "Enterprise-Level" goes...I think 100,000 lines is a lot of hot air for a PHP application anyway. (ever hear of functions and possibly OOP?)

    C# to put it simply is MS's copy of Java, which is why they got sued as usual. Java is a VERY powerful language, especially JSP. Perl is as powerful, however its not made for running extremely fast web applications.

    PHP definately has a bright future ahead of it in the longrun and not yet have I seen ASP match PHP in any way. JSP would go hands-down, but the open-source, ease of use, and community help (sitepoint of course) just isint there like PHP.

    My most requested feature though has to be forking. I would adore this feature (though its possible to do it now, but its not very flexible and isint independant like perl can be) for applications that need to batch commands or database queries instead of putting the strain on the user.

    My list:
    +Improved OOP (Everyone definately wants this)
    +Improved Database Functionality (Chunky and slow right now)
    +Improved XML functionality (Slight updates for speed and custimization)
    +Forking
    Aaron "Theiggsta" Kalin
    Pixel Martini
    Ruby and Rails Developer

  18. #43
    Database Jedi MattR's Avatar
    Join Date
    Jan 2001
    Location
    buried in the database shell (Washington, DC)
    Posts
    1,107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Theiggsta
    As far as "Enterprise-Level" goes...I think 100,000 lines is a lot of hot air for a PHP application anyway. (ever hear of functions and possibly OOP?)
    Well maybe 100,000 lines was a bit of an exaggeration. But vBulletin 2 for example has something like 20,000 to 30,000 lines of code. I've worked on C++ programs with close to 100,000 lines (80 or 90). Asking for 50,000 lines out of a PHP program is hardly uncalled for nowadays.

    And no I'm not talking about a single PHP file, but an application as a whole. Of course classes and functions are used but hey -- big applications require lots of code! But working with such applications is very hard to do!

  19. #44
    SitePoint Addict exhale81's Avatar
    Join Date
    Aug 2001
    Location
    Switzerland
    Posts
    395
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One of the PHP script I wrote has 320Kb of code, don't know how much that means in lines though
    Sebastien Rosset
    :: Commercial: BlackSonic | ScriptsCenter
    :: Non-Profit: VJCentral | ReclaimYourSoul

  20. #45
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Was any of that HTML?

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  21. #46
    Talk to the /dev/null Theiggsta's Avatar
    Join Date
    Mar 2001
    Location
    Tampa, FL
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in C++ its a given to nail 100,000 lines, however I think vBulletin has around 5 to 7 thousand I think is what tubedogg said, but im probably wrong.

    Yet 50,000 is still a lot of hot air for a php application anyway. So far on my shopping cart im reaching the 3 thousand mark, and its a lean, mean serving machine.

    PHP is actually best complimented by PERL as well. I have made a customer service backend for a hosting company and the server controller daemon was a perl mini-app that PHP directly connected with to issue commands to shutdown/restart the server, add accounts, etc...

    So as I stated before PHP has a great future ahead as the choice language for fast(asp just cant handle a large load), reliable(unix/linux/bsd/os2 rules!), and affordable(Remember that many extensions in ASP have to be separately purchased and dont forget you have the community support here!).

    </rant>
    Aaron "Theiggsta" Kalin
    Pixel Martini
    Ruby and Rails Developer

  22. #47
    Database Jedi MattR's Avatar
    Join Date
    Jan 2001
    Location
    buried in the database shell (Washington, DC)
    Posts
    1,107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure what you mean by "hot air"? Do you think I'm making the numbers up?

    Actually I just did a 'wc -cl *.php' (or whatever) to count the number of lines in all the PHP files in vB2.2.5... That includes blank lines and stuff like closing braces, but that still is not an insignificant amount of code.

    Not to mention a discussion forum is only a part of a website nowadays, same as a simple shopping cart. It all has to work in concert with everything else to form a larger application.

  23. #48
    SitePoint Addict exhale81's Avatar
    Join Date
    Aug 2001
    Location
    Switzerland
    Posts
    395
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One thing you should notice is that the amount of code required to make a small Windows app is a lot more than PHP. If you create a MFC app using one of the templates available on VC++, you already have a few hundreds of Kb of code before you started to type something... on the other hand with PHP in one line you can start outputting something.

    I wonder how many lines of code a site like Amazon or eBay use though.
    Sebastien Rosset
    :: Commercial: BlackSonic | ScriptsCenter
    :: Non-Profit: VJCentral | ReclaimYourSoul

  24. #49
    purple monkey dishwasher scoates's Avatar
    Join Date
    Nov 2001
    Location
    Montreal
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apples and Oranges.

    Using the MFC would be somewhat analogous to using extensions/ files in PHP, which are 5.68MB on my machine.

    Also, the MFC stuff builds an executable.

    Your one-line of PHP is interpreted by the PHP interpreter, which is huge in source form, but can't be compared to a compliler.

    S

  25. #50
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another for the wish list;

    Using exec() or the ` backtick operator, would be great if it was possible to "preserve" your session. For example if you did this;

    PHP Code:
    `cd ~/mydir`;
    $listing `ls -al`;
    echo 
    $listing
    You would get a directory listing from ~/mydir (this a trivial example BTW.

    Also if PHP could interface to command line apps that expect a user response after being envoked.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •