Re: [PHP] Creating new site
I have investigated some frameworks.. Zend and Codeiginiter but I haven't done any testing/exercises. They seem to make things much more simple/faster yes...but I'm not sure how much time it will take to get know one of them(or CakePHP). And I haven't got into reading licences...I'm sure they have got licences that restricts something(or not ?) To be honest, I kinda hate all kind of licences. There are many pages info what I can and what I can't do...but I mostly like to do what I have and want to do. Also, inventing the wheel once, might give good experience or am I going slippery way ? Shawn McKenzie wrote: Micah Gersten wrote: Depending on the size of the site, you might want to consider a PHP framework to start with. There's usually no point in reinventing the wheel. Someone mentioned CakePHP which utilizes MVC. I'm looking into porting my stuff to the Zend Framework which makes MVC optional, but has a lot of functionality make available. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com I too like CakePHP. I have coded in PHP for quite a while and understand OOP and OOP in PHP, however I don't really have any experience building sites or apps from scratch using OOP/MVC. Cake or a framework makes it much quicker and easier. For those that need total freedom to do things the way they want but need some pre-built functionality to make it quicker, Zend seems to be the choice. I consider Zend to be more of a class library like PEAR only more consistant. For me, I had no habits/best practices or preferred way when I started with OOP/MVC so Cake was great. It has a certain structure and uses certain conventions and code generation which makes it very quick and easy. The main drawback is the docs. -Shawn Raido wrote: Hi, There are many sites explaining how to build new site etc but I'd like to hear what You suggest. (about how to plan whole thing and how to write separate parts which can be put together later) I have build many small sites for myself(site to organise class assembly which is like yearly convention..it has user administration etc) but they all are anything else than OOP. But now, I need to help with creating one bigger site which should be OOP. That site should include user management(each user has it's own profile), each user can post job and other adds in different categories. (there will be many categories for example 'work,cars,training,apartments'.) And users profile should show ads posted by himself. Logic itself is simple: 1) unregistered user: a) I go to site, I see categories (work offers, apartment offers, training offers, etc) b) I click on category I'm interested in c) I see ad that I'm interested in d) I click on it c) I see detailed information about it(which company posted it etc) d) at bottom page I see form where I can contact with ad author 2) registered user a) I go to site b) I log in, my profile page opens c) there I can see ads posted by me..also I can see how many times ad is viewed etc d) i click on link 'Post new ad' e) there i choose category and probably Ajax helps to load specific fields(for example if I choose 'Cars' as category, then fields like 'year,transmission,color, etc' will appear. That is short summary what that site should do. It seems quite big for me so I'd be happy to hear any guidelines from people who have built big sites. Creating forms, posting data, user login etc, these things are not problem... problem is: how to build the whole thing aimed to OOP and use with Smarty to keep things organized. I'm not sure but I have idea about what things I should do first: 1) think and write down any function that needs to be done(for example different validations, functions for showing/posting form etc) 2) plan and create database? 3) create database class which handles database connection But what next? Or am I starting all wrong? Big thanks in advance, Raido -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web2.0 style tags - where to start?
On Thu, 2008-07-31 at 06:28 +0200, Nitsan Bin-Nun wrote: > From my experience with Codeigniter, thats one of the best php frameworks I > have ever seen. > It functionality is awesome, you can integrate your own modifications to the > IC core without any problems at all, for more confortable you even don't > have to use a template system (but I'm pretty sure that you can integrate > Smarty to IC) and write your template with a pseudo code, CI supports ?> code inside your template! What I love about CodeIgniter is that, while some frameworks obfuscate my thinking, CodeIgniter clarifies my thoughts, structure and overall architecture. MVC programming is no longer some mysterious theoretical entity - it just makes sense with CodeIgniter. Plus it doesn't tell you how to do something - it just gives you the structure for you to decide and do whatever you want. And it's so light I'd barely call it a framework - more like a kick-start. I could wax lyrical about this all day. Maybe I should write an ode... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using $_GET for POST
On Thu, 2008-07-31 at 06:41 +0200, Nitsan Bin-Nun wrote: > Umm I suggest you try this code: > > index.php: > > $formContainer = << Those ampersands should be appropriately marked up. :B Cheers, Rob. -- 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
Re: [PHP] Using $_GET for POST
Umm I suggest you try this code: index.php: EOF; if (!isset($_POST['submitted'])) echo $formContainer; else { echo ""; var_dump($_GET); echo "\n\n\n"; var_dump($_POST); echo ''; echo $formContainer; } ?> HTH, Nitsan 2008/7/31 Robert Cummings <[EMAIL PROTECTED]> > On Wed, 2008-07-30 at 22:18 -0400, Edward Diener wrote: > > In handling an HTTP POST request I came across some PHP code, which I > > need to modify for my own purposes, which has code like this: > > > > if ( ! (isset($_GET['x']) && $_GET['x'] == 20) ) > > { > > // Do something by returning an error > > } > > > > Can this ever be correct when the form looks like: > > > > > > > > > > > > ? > > > > Is the $_GET possibly being used to check for an 'x' parameter being > > passed in the query part of the URL ? > > > > I am fairly new to PHP so I am trying to understand how $_GET differs > > from $_POST. Thanks ! > > Yes this can be correct. Since the above action is set to blank, the > form will submit to the same page as that on which is is presented. As > such, if any GET parameters were set in the URL, they will be > re-presented upon submission along with any POSTed data. > > Cheers, > Rob. > -- > 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 > >
Re: [PHP] Web2.0 style tags - where to start?
>From my experience with Codeigniter, thats one of the best php frameworks I have ever seen. It functionality is awesome, you can integrate your own modifications to the IC core without any problems at all, for more confortable you even don't have to use a template system (but I'm pretty sure that you can integrate Smarty to IC) and write your template with a pseudo code, CI supports code inside your template! Nitsan 2008/7/29 Jason Norwood-Young <[EMAIL PROTECTED]> > > On Mon, 2008-07-28 at 23:57 +0100, Paul Jinks wrote: > > Jason Norwood-Young wrote: > > > On Mon, 2008-07-28 at 14:48 +0100, Paul Jinks wrote: > > > > > >> I think my first post was ambiguous. What we're thinking of is to > build a > > >> site on which people can view videos with the option to add metadata > to a > > >> video after viewing it. > > >> > > >> We think that the content we have will be of wide interest to a lot of > > >> people and the best way to index it is for users to 'tag' it > themselves, > > >> since it's hard for us to anticipate the uses that people may have for > the > > >> content. > > >> > > > > > > How do you plan to have users enter the info? Through the Flash player, > > > through some kinda Ajax form, through a form in a frame or just a > static > > > form? > > > > > > Also, would the tags be predefined by you (eg. genres like the ID3 tag > > > genres) or would people be able to add their own tags? > > > > > > The way I'd do it would be to let the users enter the info through an > > > Ajax form below the video, with suggestions popping up as they type. > > > Then save it in a separate table (I assume all your vids are in their > > > own table) with a link table between the vids table and the tags table > > > (M2M relationship). This means that if the tag is already in there and > > > linked to one vid, you don't replicate it for a second vid. It's also > > > very easy to do lookups of similar items. I'd also add a weighting to > > > the tags in the links table, maybe with the more people that add a > > > specific tag, the more weight that tag gets. > > > > > > Also check out http://www.music-map.com/ as an example of showing > > > similar music - you might even be able to plug into this data. > > > > > > > > Hi Jason > > > > Hmm, food for thought. music-map is brilliant, though not what I'm > > looking for graphically at the moment (was surprised to find Cesaria > > Evora in close proximity to The Cardigans but I digress). > > > > What you describe is pretty much what I'm chasing, thanks and helps me > > down the road, particularly with thinking about the database set up. > > They 'only' problem is, my php/mysql skills are some way behind my > > javascript/actionscript knowhow (I'm pretty much a noob here); what I > > could use now is a how-to tutorial to give me some code to work off, > > either online or in a book. If it ain't there, I can build from scratch > > but it's going to mean a lot of calls for help! =) > > > > Many thanks > > > > Paul > > In that case, I suggest the following solution: > 1. Download the unternet into your puter > 2. Open the file called mysql.com > 3. Read and learn > 4. Open the file called php.net > 5. Read and learn > 6. Rinse and repeat > > In all seriousness, this is a nice, simple project to learn on. You want > to look at different types of relationships in Sql (one-to-one, > one-to-many and many-to-many) and learn a bit about basic DB > architecture; make some tables and play with getting data in and out > (get PHPMyAdmin to help you out); maybe use a nice simple framework like > CodeIgniter to get you kick-started on the PHP. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] Get Remote-Image
On Wed, Jul 30, 2008 at 9:50 PM, Konrad Priemer <[EMAIL PROTECTED]> wrote: > > kann mir mal wer auf die Sprünge helfen, ich bekomme es gerade nicht > geregelt ein Image "on-the-fly" von einem Remote-Host per fsockopen auf > meinen Server zu ziehen. > > Irgendwo hab ich da voll die Blockade ;) Die copy() Funktion kann mit URL arbeiten. http://php.net/copy -- Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using $_GET for POST
On Wed, 2008-07-30 at 22:18 -0400, Edward Diener wrote: > In handling an HTTP POST request I came across some PHP code, which I > need to modify for my own purposes, which has code like this: > > if ( ! (isset($_GET['x']) && $_GET['x'] == 20) ) > { > // Do something by returning an error > } > > Can this ever be correct when the form looks like: > > > > > > ? > > Is the $_GET possibly being used to check for an 'x' parameter being > passed in the query part of the URL ? > > I am fairly new to PHP so I am trying to understand how $_GET differs > from $_POST. Thanks ! Yes this can be correct. Since the above action is set to blank, the form will submit to the same page as that on which is is presented. As such, if any GET parameters were set in the URL, they will be re-presented upon submission along with any POSTed data. Cheers, Rob. -- 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
Re: [PHP] Using $_GET for POST
This page can help you understand them better: http://us2.php.net/manual/en/language.variables.superglobals.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Edward Diener wrote: > In handling an HTTP POST request I came across some PHP code, which I > need to modify for my own purposes, which has code like this: > > if ( ! (isset($_GET['x']) && $_GET['x'] == 20) ) >{ >// Do something by returning an error >} > > Can this ever be correct when the form looks like: > > > > > > ? > > Is the $_GET possibly being used to check for an 'x' parameter > being passed in the query part of the URL ? > > I am fairly new to PHP so I am trying to understand how $_GET differs > from $_POST. Thanks ! > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using $_GET for POST
In handling an HTTP POST request I came across some PHP code, which I need to modify for my own purposes, which has code like this: if ( ! (isset($_GET['x']) && $_GET['x'] == 20) ) { // Do something by returning an error } Can this ever be correct when the form looks like: ? Is the $_GET possibly being used to check for an 'x' parameter being passed in the query part of the URL ? I am fairly new to PHP so I am trying to understand how $_GET differs from $_POST. Thanks ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Best store for mans
Dont leave your nights dissatisfied http://uimeds.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Get Remote-Image
Moin, kann mir mal wer auf die Sprünge helfen, ich bekomme es gerade nicht geregelt ein Image "on-the-fly" von einem Remote-Host per fsockopen auf meinen Server zu ziehen. Irgendwo hab ich da voll die Blockade ;) Mein "nichtfunktionierender" Versuch: ... ... $out = "GET ".." HTTP/1.0\r\nHost: ".$this->host."\r\nUser-Agent: GetWiki for WordPress\r\n\r\n"; $fp = fsockopen($this->host, $this->port, $errno, $errstr, 30); $File = fopen(,"wb"); fwrite( $File, $out ); fclose($File); fclose($fp); ... ... THX und Grüße Conny
Re: [PHP] Not able to load the extensions
John Meyer wrote: Apache 2.2 PHP 5.2.6 (as a module) Windows Relevant parts of php.ini ; Directory in which the loadable extensions (modules) reside. extension_dir = I:\php\ext extension=I:\php\ext\php_mssql.dll extension=I:\php\ext\php_mysql.dll Note: I did try it with just the name ("php_mysql.dll") but it doesn't seem to work either way And httpd.conf: LoadModule php5_module I:\php\php5apache2_2.dll AddType application/x-httpd-php .php PHPIniDir C:\WINDOWS What type of errors, if any, do you get when you try and start Apache w/php? Check your Apache and PHP error_log files. Let us know what you find. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Per Jessen wrote: > Lester Caine wrote: > >> Some ISP's are still only supporting rather ancient versions of PHP4. >> They should simply be warned of the security risks. Some ISP's have a >> PHP5 offering, but again an older version simply because it causes >> less problems when converting from PHP4. > > The problem for an ISP is - with thousands of customers, he has no way > of knowing who has used what PHP extension or feature. Without > virtually guaranteed backwards compatibility, a mass upgrade of 4 to 5 > could be a major headache. > Besides, are the security risks sufficiently severe for the ISP to > warrant the upgrade effort+headache? Definitely. I've been the server-admin behind this sort of stuff (actually php3 -> php4 :P) and it's very hard to do even on your own servers. Clients get other developers to write their software so you have no idea what it does etc, you can't support it, you certainly don't want to break it - so as much as possible you leave the server alone (of course you upgrade for security issues, that's a given). In time you get a new server and slowly migrate people to that, kill off the old server and rinse-repeat. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Back to Basics - Why Use Single Quotes?
On Wed, Jul 30, 2008 at 6:51 PM, Stephen <[EMAIL PROTECTED]> wrote: > I have traditionally used double quotes going back to my PASCAL days. > > I see many PHP examples using single quotes, and I began to adopt that > convention. > > Even updating existing code. > > And I broke some stuff that was doing variable expansion. So I am back to > using double quotes. > > But I wonder, is there any reason to use single quotes? Single quotes means literal, whereas double quotes means translated. For example: Basically, double quotes evaluate certain things and return the evaluation, while single quotes return EXACTLY what's typed between them. -- Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Back to Basics - Why Use Single Quotes?
On 7/30/08, Stephen <[EMAIL PROTECTED]> wrote: > But I wonder, is there any reason to use single quotes? extremely minor performance gains, afaik. probably moreso when doing $foo["bar"] and $foo['bar'] but i believe it's negligible $foo = 'bar' and $foo = "bar" sara golemon did some performance tests with actual opcode results here: http://blog.libssh2.org/index.php?/archives/28-How-long-is-a-piece-of-string.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Back to Basics - Why Use Single Quotes?
I have traditionally used double quotes going back to my PASCAL days. I see many PHP examples using single quotes, and I began to adopt that convention. Even updating existing code. And I broke some stuff that was doing variable expansion. So I am back to using double quotes. But I wonder, is there any reason to use single quotes? Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Not able to load the extensions
Apache 2.2 PHP 5.2.6 (as a module) Windows Relevant parts of php.ini ; Directory in which the loadable extensions (modules) reside. extension_dir = I:\php\ext extension=I:\php\ext\php_mssql.dll extension=I:\php\ext\php_mysql.dll Note: I did try it with just the name ("php_mysql.dll") but it doesn't seem to work either way And httpd.conf: LoadModule php5_module I:\php\php5apache2_2.dll AddType application/x-httpd-php .php PHPIniDir C:\WINDOWS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web2.0 style tags - where to start?
This one time, at band camp, "Paul Jinks" <[EMAIL PROTECTED]> wrote: > Does anyone know of any good resources on building a tagging system? The > video for now will be held on a normal LAMP machine as will everything > else. Tagging... http://phpro.org/tutorials/Tagging-With-PHP-And-MySQL.html Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
This one time, at band camp, "Richard Heyes" <[EMAIL PROTECTED]> wrote: > I'm interested - why are people still using PHP4? It's been over 4 > years (I think) - plenty of time to upgrade to five. I asked that question and was called a troll... Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php CLI Parser not working
On Wed, Jul 30, 2008 at 4:53 PM, JJB <[EMAIL PROTECTED]> wrote: > > Hi Daniel, > > We are running like: > php mailscript.php > > The version: > > php-v > > PHP 5.2.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Dec 12 2007 03:51:56) Did you check what Jim suggested, as well, about short_open_tags? If your scripts use PHP tags like this: Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php CLI Parser not working
Daniel Brown wrote: On Tue, Jul 29, 2008 at 2:19 PM, JJB <[EMAIL PROTECTED]> wrote: We recently rebuilt a webserver and upgraded it to opensuse 10.3. Now, when our webdev people run command line php scripts all of the included files are being output to the terminal instead of parsed. How are the scripts being run from the CLI? As shell scripts with this as the following line: #!/path/to/php -or- #!/bin/env php or by using the command 'php script.php' from the command line? What do you see when, from the command line, you issue the command 'php -v' ? Hi Daniel, We are running like: php mailscript.php The version: php-v PHP 5.2.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Dec 12 2007 03:51:56) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] accessing variables within objects
You might want to check the scope of the properties. If you want to access them outside of the class, make sure they are declared public. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Marten Lehmann wrote: > Hello, > > I'm using some php-classes which worked fine with php-5.0.4. Now I > tried to upgrade to php-5.2.6, but the classes give a lot of errors. > If I set > > error_reporting(E_ALL); > > I see messages like > > Notice: Undefined property: FastTemplate::$main in > /whereever/inc.template.php on line 293 > > Notice: Undefined property: current_session::$cust_id in > /whereever/inc.init.php on line 117 > > In inc.template.php there are a lot of calls like $this->$key. In > inc.init.php there are calls like $session->cust_id. > > What has changed in php-5.2.x so that these calls don't work any more? > What is the new, required form to use objects in a similar manner > (unfortunately I have no ressources to code these classes from > scratch)? Thanks. > > Kind regards > Marten > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] accessing variables within objects
Marten Lehmann wrote: Hello, I'm using some php-classes which worked fine with php-5.0.4. Now I tried to upgrade to php-5.2.6, but the classes give a lot of errors. If I set error_reporting(E_ALL); I see messages like Notice: Undefined property: FastTemplate::$main in /whereever/inc.template.php on line 293 Notice: Undefined property: current_session::$cust_id in /whereever/inc.init.php on line 117 In inc.template.php there are a lot of calls like $this->$key. In inc.init.php there are calls like $session->cust_id. to fix these errors, you would need to modify the code so it does something like this. where it calls $this->$key you need to check and make sure that $key exists before you trying call for it. So something like this would work. if ( isset( $this->$key ) ) { $this->$key; } else { $this->$key = null; } You didn't show any context in which you are using the above code. So I don't know what will actually work in your situation. Show a little more code that includes the method in which $this->$key is called. You will want to look at using the Overloading feature of PHP5. Check out this page for overloading examples http://us2.php.net/manual/en/language.oop5.overloading.php Take note of the __get() and __set() methods. The __get method checks to see if the key exists before it tries working with it. What has changed in php-5.2.x so that these calls don't work any more? What is the new, required form to use objects in a similar manner (unfortunately I have no ressources to code these classes from scratch)? Thanks. Kind regards Marten -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] accessing variables within objects
Hello, I'm using some php-classes which worked fine with php-5.0.4. Now I tried to upgrade to php-5.2.6, but the classes give a lot of errors. If I set error_reporting(E_ALL); I see messages like Notice: Undefined property: FastTemplate::$main in /whereever/inc.template.php on line 293 Notice: Undefined property: current_session::$cust_id in /whereever/inc.init.php on line 117 In inc.template.php there are a lot of calls like $this->$key. In inc.init.php there are calls like $session->cust_id. What has changed in php-5.2.x so that these calls don't work any more? What is the new, required form to use objects in a similar manner (unfortunately I have no ressources to code these classes from scratch)? Thanks. Kind regards Marten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Php Help
[EMAIL PROTECTED] wrote: I cannot get Php to run on Solaris 10... Here is the error I am getting Trying to run php outside of apache ld.so.1: php: fatal: libldap-2.3.so.0: open failed: No such file or directory With ApacheApache will not load when trying to load the php modules Syntax error on line 110 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: ld.so.1: httpd: fatal: libldap-2.3.so.0: open failed: No such file or directory Environmental Setting DISPLAY= HOME=/ HZ=100 LOGNAME=wayne MAIL=/var/mail/wayne PATH=/usr/sbin:/usr/bin PS1=# SHELL=/bin/sh TERM=xterm TZ=US/Eastern ___ I have gone to the lib directory and can find libldap-2.4.so.2 .. Can you point me in the right direction??? Well, it's not looking for libldap-2.4.so.2, it wants libldap-2.3.so.0. So first try creating a link of libldap-2.3.so.0 to libldap-2.4.so.2. Been a while for me on Solaris. -Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php Help
I cannot get Php to run on Solaris 10... Here is the error I am getting Trying to run php outside of apache ld.so.1: php: fatal: libldap-2.3.so.0: open failed: No such file or directory With ApacheApache will not load when trying to load the php modules Syntax error on line 110 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: ld.so.1: httpd: fatal: libldap-2.3.so.0: open failed: No such file or directory Environmental Setting DISPLAY= HOME=/ HZ=100 LOGNAME=wayne MAIL=/var/mail/wayne PATH=/usr/sbin:/usr/bin PS1=# SHELL=/bin/sh TERM=xterm TZ=US/Eastern ___ I have gone to the lib directory and can find libldap-2.4.so.2 .. Can you point me in the right direction??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating new site
Hélio Rocha wrote: U may want to see Ruby On Rails www.rubyonrails.org . It's also a framework but for Ruby. In my opinion it's stronger than cake and there are some IDE's that do support and debug it. Cumps, Hélio Rocha There's also .NET http://www.microsoft.com. It's also a framework but for VB/C# I think. In my opinion it's stronger than cake and there are some IDE's that do support and debug it, as well as a lot of documentation. -Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Still "zend_mm_heap corrupted" error in PHP 5.2.6
Dear Srs, We are having some "zend_mm_heap corrupted" errors followed by a "Segmentation fault (11)" in our Apache2 + PHP 5.2.6 servers. There are few information about this "bug" in internet: * #40479 -> http://bugs.php.net/bug.php?id=40479 * #43295 -> http://bugs.php.net/bug.php?id=43295 I have applied all proposed patches, tested with PHP 5.2.5 and 5.2.6.. and I still have the error :-/ Anyone has more info about this, or how to solve/prevent? I'm also looking for a method to get more info about this crash: what virtualhost + PHP scripts generate it and the timestamp, for example. What can I do to get more info? Searching in the source code, I see that this message only is printed by the zend_mm_panic() function in "Zend/zend_alloc.c" file, anyideas to hack this function to get more info? static void zend_mm_panic(const char *message) { fprintf(stderr, "%s\n", message); #if ZEND_DEBUG && defined(HAVE_KILL) && defined(HAVE_GETPID) kill(getpid(), SIGSEGV); #endif exit(1); } Is there any macro o similar to get the URL, virtualhost or PHP script/path? Thanks!! Regards, --Santi Saez -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Windows date("Y/m/d H:i:s") performance
On Wed, Jul 30, 2008 at 12:19 PM, Richard Lynch <[EMAIL PROTECTED]> wrote: > I suppose to be complete, I should point out that in Linux a call to > date finishes in 1.2271404266357E-5 seconds on average. > > For those unfamiliar with scientific notation, that would be: > 0.12271404266357 seconds, or rougly 1/10,000th of the time Doze > takes. > Interesting. Just for comparison, I ran it directly with the binaries (disabling the debugger) for PHP 4.4.4 and 5.2.0 on my machine. 4.4.4 - in the order of 4.5E-6 - 5.0E-6 5.2.0 - right around 1.0E-4 Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Jason Pruim wrote: > > On Jul 30, 2008, at 10:50 AM, Micah Gersten wrote: > >> Sometimes speed improvements require removing things. If you end up >> backwards supporting everything you end up with a big monster engine >> that is incredibly slow. > > > Just ask Microsoft about that ;) Better ask IBM instead - they've done it for much longer and with much better results. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Windows date("Y/m/d H:i:s") performance
On Wed, Jul 30, 2008 at 12:11 PM, Richard Lynch <[EMAIL PROTECTED]> wrote: > I was profiling some code on my local dev box, and in Windows, the > biggest time sink for the home page is... > > a call to date("Y/m/d H:i:s")?! > 917 ms??? > > Here is what I get in a cygwin shell: > php -r '$c = 100; $s = microtime(true); for($i = 0; $i < $c; $i++){ $d > = date("Y/m/d H:i:s"); } echo (microtime(true) - $s)/$c, "\n"; ' > 1.0072922205925 > > Same results from a DOS prompt, though I have to actually create a > file as -r didn't seem to work... > > Feel free to change $c to 10 to get a faster answer... > > Can 'date' really take almost a full second to execute in Doze?... > > That seems pretty whack... > I just ran your test code inside Zend Studio under Windows XP and it printed 0.00044636011123657 Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Windows date("Y/m/d H:i:s") performance
I suppose to be complete, I should point out that in Linux a call to date finishes in 1.2271404266357E-5 seconds on average. For those unfamiliar with scientific notation, that would be: 0.12271404266357 seconds, or rougly 1/10,000th of the time Doze takes. -- Some people ask for gifts here. I just want you to buy an Indie CD for yourself: http://cdbaby.com/search/from/lynch -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
On Jul 30, 2008, at 10:50 AM, Micah Gersten wrote: Sometimes speed improvements require removing things. If you end up backwards supporting everything you end up with a big monster engine that is incredibly slow. Just ask Microsoft about that ;) -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 11287 James St Holland, MI 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Windows date("Y/m/d H:i:s") performance
I was profiling some code on my local dev box, and in Windows, the biggest time sink for the home page is... a call to date("Y/m/d H:i:s")?! 917 ms??? Here is what I get in a cygwin shell: php -r '$c = 100; $s = microtime(true); for($i = 0; $i < $c; $i++){ $d = date("Y/m/d H:i:s"); } echo (microtime(true) - $s)/$c, "\n"; ' 1.0072922205925 Same results from a DOS prompt, though I have to actually create a file as -r didn't seem to work... Feel free to change $c to 10 to get a faster answer... Can 'date' really take almost a full second to execute in Doze?... That seems pretty whack... -- Some people ask for gifts here. I just want you to buy an Indie CD for yourself: http://cdbaby.com/search/from/lynch -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating new site
Sorry Robert and all other users. On Wed, Jul 30, 2008 at 5:07 PM, Robert Cummings <[EMAIL PROTECTED]>wrote: > On Wed, 2008-07-30 at 17:03 +0100, Hélio Rocha wrote: > > U may want to see Ruby On Rails www.rubyonrails.org . It's also a > framework > > but for Ruby. In my opinion it's stronger than cake and there are some > IDE's > > that do support and debug it. > > Dear Hélio, > > This is a PHP list. People usually come here for PHP related answers. > > Cheers, > Rob. > -- > http://www.interjinn.com > Application and Templating Framework for PHP > >
Re: [PHP] Creating new site
On Wed, 2008-07-30 at 17:03 +0100, Hélio Rocha wrote: > U may want to see Ruby On Rails www.rubyonrails.org . It's also a framework > but for Ruby. In my opinion it's stronger than cake and there are some IDE's > that do support and debug it. Dear Hélio, This is a PHP list. People usually come here for PHP related answers. Cheers, Rob. -- 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
Re: [PHP] Creating new site
U may want to see Ruby On Rails www.rubyonrails.org . It's also a framework but for Ruby. In my opinion it's stronger than cake and there are some IDE's that do support and debug it. Cumps, Hélio Rocha On Wed, Jul 30, 2008 at 4:54 PM, Shawn McKenzie <[EMAIL PROTECTED]>wrote: > Micah Gersten wrote: > >> Depending on the size of the site, you might want to consider a PHP >> framework to start with. There's usually no point in reinventing the >> wheel. Someone mentioned CakePHP which utilizes MVC. I'm looking into >> porting my stuff to the Zend Framework which makes MVC optional, but has >> a lot of functionality make available. >> >> Thank you, >> Micah Gersten >> onShore Networks >> Internal Developer >> http://www.onshore.com >> >> > I too like CakePHP. I have coded in PHP for quite a while and understand > OOP and OOP in PHP, however I don't really have any experience building > sites or apps from scratch using OOP/MVC. > > Cake or a framework makes it much quicker and easier. For those that need > total freedom to do things the way they want but need some pre-built > functionality to make it quicker, Zend seems to be the choice. I consider > Zend to be more of a class library like PEAR only more consistant. For me, > I had no habits/best practices or preferred way when I started with OOP/MVC > so Cake was great. It has a certain structure and uses certain conventions > and code generation which makes it very quick and easy. The main drawback > is the docs. > > -Shawn > > > >> >> Raido wrote: >> >>> Hi, >>> >>> There are many sites explaining how to build new site etc but I'd like >>> to hear what You suggest. (about how to plan whole thing and how to >>> write separate parts which can be put together later) >>> >>> I have build many small sites for myself(site to organise class >>> assembly which is like yearly convention..it has user administration >>> etc) but they all are anything else than OOP. But now, I need to help >>> with creating one bigger site which should be OOP. That site should >>> include user management(each user has it's own profile), each user can >>> post job and other adds in different categories. (there will be many >>> categories for example 'work,cars,training,apartments'.) >>> And users profile should show ads posted by himself. >>> Logic itself is simple: >>> 1) unregistered user: >>>a) I go to site, I see categories (work offers, apartment offers, >>> training offers, etc) >>>b) I click on category I'm interested in >>>c) I see ad that I'm interested in >>>d) I click on it >>>c) I see detailed information about it(which company posted it etc) >>>d) at bottom page I see form where I can contact with ad author >>> 2) registered user >>>a) I go to site >>>b) I log in, my profile page opens >>>c) there I can see ads posted by me..also I can see how many times >>> ad is viewed etc >>>d) i click on link 'Post new ad' >>>e) there i choose category and probably Ajax helps to load >>> specific fields(for example if I choose 'Cars' as category, then >>> fields like 'year,transmission,color, etc' will appear. >>> >>> That is short summary what that site should do. It seems quite big for >>> me so I'd be happy to hear any guidelines from people who have built >>> big sites. >>> >>> Creating forms, posting data, user login etc, these things are not >>> problem... problem is: how to build the whole thing aimed to OOP and >>> use with Smarty to keep things organized. >>> >>> I'm not sure but I have idea about what things I should do first: >>> >>> 1) think and write down any function that needs to be done(for example >>> different validations, functions for showing/posting form etc) >>> 2) plan and create database? >>> 3) create database class which handles database connection >>> But what next? Or am I starting all wrong? >>> >>> Big thanks in advance, >>> >>> >>> Raido >>> >>> >>> >>> > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] Creating new site
Micah Gersten wrote: Depending on the size of the site, you might want to consider a PHP framework to start with. There's usually no point in reinventing the wheel. Someone mentioned CakePHP which utilizes MVC. I'm looking into porting my stuff to the Zend Framework which makes MVC optional, but has a lot of functionality make available. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com I too like CakePHP. I have coded in PHP for quite a while and understand OOP and OOP in PHP, however I don't really have any experience building sites or apps from scratch using OOP/MVC. Cake or a framework makes it much quicker and easier. For those that need total freedom to do things the way they want but need some pre-built functionality to make it quicker, Zend seems to be the choice. I consider Zend to be more of a class library like PEAR only more consistant. For me, I had no habits/best practices or preferred way when I started with OOP/MVC so Cake was great. It has a certain structure and uses certain conventions and code generation which makes it very quick and easy. The main drawback is the docs. -Shawn Raido wrote: Hi, There are many sites explaining how to build new site etc but I'd like to hear what You suggest. (about how to plan whole thing and how to write separate parts which can be put together later) I have build many small sites for myself(site to organise class assembly which is like yearly convention..it has user administration etc) but they all are anything else than OOP. But now, I need to help with creating one bigger site which should be OOP. That site should include user management(each user has it's own profile), each user can post job and other adds in different categories. (there will be many categories for example 'work,cars,training,apartments'.) And users profile should show ads posted by himself. Logic itself is simple: 1) unregistered user: a) I go to site, I see categories (work offers, apartment offers, training offers, etc) b) I click on category I'm interested in c) I see ad that I'm interested in d) I click on it c) I see detailed information about it(which company posted it etc) d) at bottom page I see form where I can contact with ad author 2) registered user a) I go to site b) I log in, my profile page opens c) there I can see ads posted by me..also I can see how many times ad is viewed etc d) i click on link 'Post new ad' e) there i choose category and probably Ajax helps to load specific fields(for example if I choose 'Cars' as category, then fields like 'year,transmission,color, etc' will appear. That is short summary what that site should do. It seems quite big for me so I'd be happy to hear any guidelines from people who have built big sites. Creating forms, posting data, user login etc, these things are not problem... problem is: how to build the whole thing aimed to OOP and use with Smarty to keep things organized. I'm not sure but I have idea about what things I should do first: 1) think and write down any function that needs to be done(for example different validations, functions for showing/posting form etc) 2) plan and create database? 3) create database class which handles database connection But what next? Or am I starting all wrong? Big thanks in advance, Raido -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Per Jessen wrote: Richard Heyes wrote: I agree but not everyone think in the sameway. I have seen several big websites that got hit because they haven't used super globals in the code and their hosting provided would just change the PHP.ini setting and nothing would work. Well if it's a "big" website then why use a hoster that changes the php.ini without much, if any, thought? The technical abilities and awareness is often inversely proportional to the size of the hoster. /Per Jessen, Zürich I am the tech support department, not only web hosting but Phones, DSL, T1, Email, Toll Free, etc... The key thing in tech support, is to get to the problem and fix it. Don't let the conversation get away from the reason they called. As long as you can fix the problem, assuming their is a problem, the customer will be happy. But all the while not sounding harsh or impatient to the customer. But, on the flip side, you don't want to be just a knowledge base that people could login to on your website. Isn't that they reason you have live support? Anyways... -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Because, People believes Do not fix until broke Motto. Testing new online application may painfull. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating new site
Depending on the size of the site, you might want to consider a PHP framework to start with. There's usually no point in reinventing the wheel. Someone mentioned CakePHP which utilizes MVC. I'm looking into porting my stuff to the Zend Framework which makes MVC optional, but has a lot of functionality make available. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Raido wrote: > Hi, > > There are many sites explaining how to build new site etc but I'd like > to hear what You suggest. (about how to plan whole thing and how to > write separate parts which can be put together later) > > I have build many small sites for myself(site to organise class > assembly which is like yearly convention..it has user administration > etc) but they all are anything else than OOP. But now, I need to help > with creating one bigger site which should be OOP. That site should > include user management(each user has it's own profile), each user can > post job and other adds in different categories. (there will be many > categories for example 'work,cars,training,apartments'.) > And users profile should show ads posted by himself. > Logic itself is simple: > 1) unregistered user: > a) I go to site, I see categories (work offers, apartment offers, > training offers, etc) > b) I click on category I'm interested in > c) I see ad that I'm interested in > d) I click on it > c) I see detailed information about it(which company posted it etc) > d) at bottom page I see form where I can contact with ad author > 2) registered user > a) I go to site > b) I log in, my profile page opens > c) there I can see ads posted by me..also I can see how many times > ad is viewed etc > d) i click on link 'Post new ad' > e) there i choose category and probably Ajax helps to load > specific fields(for example if I choose 'Cars' as category, then > fields like 'year,transmission,color, etc' will appear. > > That is short summary what that site should do. It seems quite big for > me so I'd be happy to hear any guidelines from people who have built > big sites. > > Creating forms, posting data, user login etc, these things are not > problem... problem is: how to build the whole thing aimed to OOP and > use with Smarty to keep things organized. > > I'm not sure but I have idea about what things I should do first: > > 1) think and write down any function that needs to be done(for example > different validations, functions for showing/posting form etc) > 2) plan and create database? > 3) create database class which handles database connection > But what next? Or am I starting all wrong? > > Big thanks in advance, > > > Raido > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Sometimes speed improvements require removing things. If you end up backwards supporting everything you end up with a big monster engine that is incredibly slow. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Hélio Rocha wrote: > Brainfuck rox! LOL :) > > Sure you must see the changelog and other things but take a look: > I can do more and better things with the next generation of the language in > which i wrote my app, but i don't think that it's fair that my app doens't > compile (if it was a compiled language) or stops executing just because i > get an upgrade. > > On Wed, Jul 30, 2008 at 10:56 AM, Richard Heyes <[EMAIL PROTECTED]>wrote: > > >>> Sorry to disagree, >>> >> That's nothing to apologise for. >> >> >>> But I think that with PHP4 a lot of people start thinking that they could >>> >> be >> >>> programmers (maybe they can, developers it's another story). When php5 >>> >> came >> >>> they didn't know how do deal with the deprecated methods and worst, some >>> hosters didn't know how to virtualize a f1ck1n' server with Apache+PHP5. >>> >> A >> >>> lot of mistakes were made when php5 came out but how can a language grow >>> >> up >> >>> when they DEPRECATE the syntax? we're not talking about removing the last >>> >> That's not the problem of the PHP developers. Learning is not a case >> of spend a few years doing it and you're set - it's a life long thing. >> >> >>> Maybe I'm in a "GET LOST PHP" phase but I think that someone is killing >>> >> it, >> >>> and the ones who are stuck in 4 are not helping. >>> >> There are alternatives - have you heard of Brainfuck? >> >> >>> When U write code, U must not be worried 'bout the next upgrade of your >>> server! >>> >> Of course you should. Writing code with every eventuality in mind is >> simply ludicrous. And you really should expect things to change when >> major versions are changed - that's why release notes exist. >> >> -- >> Richard Heyes >> http://www.phpguru.org >> >> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Sometimes deprecation is necessary is a language feature is created out of necessity but is superseded by a superior language form. A great example is the HTML FONT tag. Font tags slow down downloads and renderings, and were deprecated in favor of CSS style sheets which offer much more control and a smaller footprint. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Hélio Rocha wrote: > Sorry to disagree, > > But I think that with PHP4 a lot of people start thinking that they could be > programmers (maybe they can, developers it's another story). When php5 came > they didn't know how do deal with the deprecated methods and worst, some > hosters didn't know how to virtualize a f1ck1n' server with Apache+PHP5. A > lot of mistakes were made when php5 came out but how can a language grow up > when they DEPRECATE the syntax? we're not talking about removing the last > ';'... > Maybe I'm in a "GET LOST PHP" phase but I think that someone is killing it, > and the ones who are stuck in 4 are not helping. > > When U write code, U must not be worried 'bout the next upgrade of your > server! > > > Best regards! > > On Wed, Jul 30, 2008 at 3:31 AM, VamVan <[EMAIL PROTECTED]> wrote: > > >> Its because PHP got really famous with version 4.0 and many people actually >> converted their CGI or other websites in to PHP 4 websites because it was >> easy and cheap. But 5.0 brought too many changes like serious OOPS and >> register global concepts for security, which is useful but made transition >> difficult. I feel thats why PHP 4 is still supported. >> >> Its not only the language that has changed, but also people had to upgrade >> their skill set and there was some learning curve involved. >> >> Unfortunately everyone fell in the trap of register globals which was not >> dealt until php 4.3.1 as a security concept. Pear and Pecl were there but >> everyone was pretty much writing all the code (reinventing the wheel) from >> scratch. This brings in huge code base to change. >> >> I liked PHP because intitially it was a procedural langauge and it >> resembled >> C. But now with OOPS you can build powerful websites which is good. >> >> There are many other cases but I feel strongly this is what makes them >> still support PHP 4. >> >> Thanks >> >> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Per Jessen wrote: Lester Caine wrote: Some ISP's are still only supporting rather ancient versions of PHP4. They should simply be warned of the security risks. Some ISP's have a PHP5 offering, but again an older version simply because it causes less problems when converting from PHP4. The problem for an ISP is - with thousands of customers, he has no way of knowing who has used what PHP extension or feature. Without virtually guaranteed backwards compatibility, a mass upgrade of 4 to 5 could be a major headache. Besides, are the security risks sufficiently severe for the ISP to warrant the upgrade effort+headache? Having seen the problems some of the 'upgrades' have caused I can only agree. But getting a stable version of PHP5 out on to which existing PHP4 users can be migrated is probably essential. And feature freezing that base is a must, so that at least there is a fixed target. I've managed to sort of jump through single versions of 5.0.x - 5.1.6 and now 5.2.6 although the latter was more due to regressive bugs in most of the versions from 5.1.6 to 5.2.6. At present I can't see any logic reason to even bother with 5.3 until all of my customer sites have been moved to 5.2.6 which will probably take another year. so anything that helps people at least start migrating TO PHP5 should be encouraged? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/lsces/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating new site
Hi, Even if it's just a site don't thing u don't need a structure to it. Why not a MVC structure? U can dig about cakephp on google to see some of it working. If U don't want to use a framework, start with the business rules u'll need, after that do the CRUD and for the piece of resistance assemble the html for it. :) On Wed, Jul 30, 2008 at 3:34 PM, Raido <[EMAIL PROTECTED]> wrote: > Hi, > > There are many sites explaining how to build new site etc but I'd like to > hear what You suggest. (about how to plan whole thing and how to write > separate parts which can be put together later) > > I have build many small sites for myself(site to organise class assembly > which is like yearly convention..it has user administration etc) but they > all are anything else than OOP. But now, I need to help with creating one > bigger site which should be OOP. That site should include user > management(each user has it's own profile), each user can post job and other > adds in different categories. (there will be many categories for example > 'work,cars,training,apartments'.) > And users profile should show ads posted by himself. > Logic itself is simple: > 1) unregistered user: >a) I go to site, I see categories (work offers, apartment offers, > training offers, etc) >b) I click on category I'm interested in >c) I see ad that I'm interested in >d) I click on it >c) I see detailed information about it(which company posted it etc) >d) at bottom page I see form where I can contact with ad author > 2) registered user >a) I go to site >b) I log in, my profile page opens >c) there I can see ads posted by me..also I can see how many times > ad is viewed etc >d) i click on link 'Post new ad' >e) there i choose category and probably Ajax helps to load specific > fields(for example if I choose 'Cars' as category, then fields like > 'year,transmission,color, etc' will appear. > > That is short summary what that site should do. It seems quite big for me > so I'd be happy to hear any guidelines from people who have built big sites. > > Creating forms, posting data, user login etc, these things are not > problem... problem is: how to build the whole thing aimed to OOP and use > with Smarty to keep things organized. > > I'm not sure but I have idea about what things I should do first: > > 1) think and write down any function that needs to be done(for example > different validations, functions for showing/posting form etc) > 2) plan and create database? > 3) create database class which handles database connection > But what next? Or am I starting all wrong? > > Big thanks in advance, > > > Raido > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] Creating new site
2008/7/30 Raido <[EMAIL PROTECTED]>: > Hi, > > There are many sites explaining how to build new site etc but I'd like to > hear what You suggest. (about how to plan whole thing and how to write > separate parts which can be put together later) This may be of some help: http://www.phpguru.org/static/ApplicationStructure.html On the other hand, it may not. -- Richard Heyes http://www.phpguru.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating new site
On Jul 30, 2008, at 10:34 AM, Raido wrote: [snip lots of info] I'm not sure but I have idea about what things I should do first: 1) think and write down any function that needs to be done(for example different validations, functions for showing/posting form etc) 2) plan and create database? 3) create database class which handles database connection But what next? Or am I starting all wrong? Big thanks in advance, Hi Raido, To me it looks like you have a great start. I usually jsut jump in and start coding without too much planning. It may seem a little disorganized, but I don't believe I can come up with all the functions and all the variables for those functions before I start writing it and I see how things are heading. Some stuff yes, like if you're going to connect to a database, that can be done ahead. But if you are searching, how will you search when you don't know what all the possible fields are that you want to search by? As far as the list you have, use it as a road map but don't be afraid to take detours on it. Nothing on the internet is set in stone :) Add, Remove, Modify... And always push your understanding into new heights because that is what will make you an excellent Web Developer instead of a decent web programmer... (That coffee this morning really made me positive! I may need to do that every morning... :P -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 11287 James St Holland, MI 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Lester Caine wrote: > Some ISP's are still only supporting rather ancient versions of PHP4. > They should simply be warned of the security risks. Some ISP's have a > PHP5 offering, but again an older version simply because it causes > less problems when converting from PHP4. The problem for an ISP is - with thousands of customers, he has no way of knowing who has used what PHP extension or feature. Without virtually guaranteed backwards compatibility, a mass upgrade of 4 to 5 could be a major headache. Besides, are the security risks sufficiently severe for the ISP to warrant the upgrade effort+headache? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Richard Heyes wrote: >> Umm, I beg to differ. A developer should not need to worry about a >> possible/future upgrade of the runtime platform. I certainly don't >> worry about the next release of gcc or glibc when I write C. > > Minor point releases certainly, but not major ones. They're major > upgrades for a reason - things change. Yes, but a change in the language or a library should not force anyone to make source code changes. IMHO, that is to be avoided at all costs. A recompile is acceptable, of course. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Per Jessen wrote: Richard Heyes wrote: When U write code, U must not be worried 'bout the next upgrade of your server! Of course you should. Writing code with every eventuality in mind is simply ludicrous. Umm, I beg to differ. A developer should not need to worry about a possible/future upgrade of the runtime platform. I certainly don't worry about the next release of gcc or glibc when I write C. I can live with both sides of the argument. All the SQL scripts I write SHOULD still work with a later version of the database engine, but changes to make things compatible with standards can cause problems with that. So I need to test scripts following a major release. PHP upgrades have certainly broken backwards compatibility, but then I've had similar problems with the Borland C compilers as well. But at least Borland attempt to update things to at least compile in later versions and warn of the 'errors' gcc has had problems and I see various posts about 'not using version xxx' for building yyy because it's broken. So we all have to live with the possibility that a later version may not ACTUALLY work for us - and wait for the problem to be fixed either in gcc or the application. ( Wasn't there a problem with PHP5 and some version of gcc? ) I don't agree with a lot of the 'changes' that are being forced into PHP5 and certainly feel that they should have been kept to PHP6, but the real problem to date has been BACKPORTING some of these changes TO PHP4 rather than having frozen any 'development' of PHP4 a lot earlier. I never used PHP4 and I would prefer not to have to worry about it now, but projects I am using still maintain backwards compatibility rather than also freezing a version that works with PHP4.X and then moving developments forward. Currently I'm looking at a lot of 'deprecated' messages from PHP5.3.x and wondering "Do I fix them and risk problems with PHP4 compatibility or do I just switch off the error?" Some ISP's are still only supporting rather ancient versions of PHP4. They should simply be warned of the security risks. Some ISP's have a PHP5 offering, but again an older version simply because it causes less problems when converting from PHP4. PHP5.3 is going to throw up another round of problems which makes a move from PHP4 even more time consuming so there should be a serious discussion as to *IF* that should be allowed? Keeping moving the goal posts even further from an environment into which PHP4 applications can be ported easily is the problem, rather than the switch from PHP4 to PHP5 pre say :( Lets request that PHP5.3 is not released at this time, but instead an effort is put in to get all the major web applications at least running in PHP5.2 before even more changes are introduced. And a beta release of PHP6 with a clean unicode base would be nice ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/lsces/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
> Umm, I beg to differ. A developer should not need to worry about a > possible/future upgrade of the runtime platform. I certainly don't > worry about the next release of gcc or glibc when I write C. Minor point releases certainly, but not major ones. They're major upgrades for a reason - things change. -- Richard Heyes http://www.phpguru.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Creating new site
Hi, There are many sites explaining how to build new site etc but I'd like to hear what You suggest. (about how to plan whole thing and how to write separate parts which can be put together later) I have build many small sites for myself(site to organise class assembly which is like yearly convention..it has user administration etc) but they all are anything else than OOP. But now, I need to help with creating one bigger site which should be OOP. That site should include user management(each user has it's own profile), each user can post job and other adds in different categories. (there will be many categories for example 'work,cars,training,apartments'.) And users profile should show ads posted by himself. Logic itself is simple: 1) unregistered user: a) I go to site, I see categories (work offers, apartment offers, training offers, etc) b) I click on category I'm interested in c) I see ad that I'm interested in d) I click on it c) I see detailed information about it(which company posted it etc) d) at bottom page I see form where I can contact with ad author 2) registered user a) I go to site b) I log in, my profile page opens c) there I can see ads posted by me..also I can see how many times ad is viewed etc d) i click on link 'Post new ad' e) there i choose category and probably Ajax helps to load specific fields(for example if I choose 'Cars' as category, then fields like 'year,transmission,color, etc' will appear. That is short summary what that site should do. It seems quite big for me so I'd be happy to hear any guidelines from people who have built big sites. Creating forms, posting data, user login etc, these things are not problem... problem is: how to build the whole thing aimed to OOP and use with Smarty to keep things organized. I'm not sure but I have idea about what things I should do first: 1) think and write down any function that needs to be done(for example different validations, functions for showing/posting form etc) 2) plan and create database? 3) create database class which handles database connection But what next? Or am I starting all wrong? Big thanks in advance, Raido -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Richard Heyes wrote: > >> When U write code, U must not be worried 'bout the next upgrade of >> your server! > > Of course you should. Writing code with every eventuality in mind is > simply ludicrous. Umm, I beg to differ. A developer should not need to worry about a possible/future upgrade of the runtime platform. I certainly don't worry about the next release of gcc or glibc when I write C. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Hélio Rocha wrote: > methods and worst, some hosters didn't know how to virtualize a > f1ck1n' server with Apache+PHP5. Despite their many inabilities, I doubt if any hosting service would have a problem with that. If you're trying to figure out why so many haven't changed, there's one question you need to ask - why should they? What's the business-case? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Brainfuck rox! LOL :) Sure you must see the changelog and other things but take a look: I can do more and better things with the next generation of the language in which i wrote my app, but i don't think that it's fair that my app doens't compile (if it was a compiled language) or stops executing just because i get an upgrade. On Wed, Jul 30, 2008 at 10:56 AM, Richard Heyes <[EMAIL PROTECTED]>wrote: > > Sorry to disagree, > > That's nothing to apologise for. > > > But I think that with PHP4 a lot of people start thinking that they could > be > > programmers (maybe they can, developers it's another story). When php5 > came > > they didn't know how do deal with the deprecated methods and worst, some > > hosters didn't know how to virtualize a f1ck1n' server with Apache+PHP5. > A > > lot of mistakes were made when php5 came out but how can a language grow > up > > when they DEPRECATE the syntax? we're not talking about removing the last > > That's not the problem of the PHP developers. Learning is not a case > of spend a few years doing it and you're set - it's a life long thing. > > > Maybe I'm in a "GET LOST PHP" phase but I think that someone is killing > it, > > and the ones who are stuck in 4 are not helping. > > There are alternatives - have you heard of Brainfuck? > > > When U write code, U must not be worried 'bout the next upgrade of your > > server! > > Of course you should. Writing code with every eventuality in mind is > simply ludicrous. And you really should expect things to change when > major versions are changed - that's why release notes exist. > > -- > Richard Heyes > http://www.phpguru.org >
Re: [PHP] Why PHP4?
> Sorry to disagree, That's nothing to apologise for. > But I think that with PHP4 a lot of people start thinking that they could be > programmers (maybe they can, developers it's another story). When php5 came > they didn't know how do deal with the deprecated methods and worst, some > hosters didn't know how to virtualize a f1ck1n' server with Apache+PHP5. A > lot of mistakes were made when php5 came out but how can a language grow up > when they DEPRECATE the syntax? we're not talking about removing the last That's not the problem of the PHP developers. Learning is not a case of spend a few years doing it and you're set - it's a life long thing. > Maybe I'm in a "GET LOST PHP" phase but I think that someone is killing it, > and the ones who are stuck in 4 are not helping. There are alternatives - have you heard of Brainfuck? > When U write code, U must not be worried 'bout the next upgrade of your > server! Of course you should. Writing code with every eventuality in mind is simply ludicrous. And you really should expect things to change when major versions are changed - that's why release notes exist. -- Richard Heyes http://www.phpguru.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Quoting Hélio Rocha <[EMAIL PROTECTED]>: Sorry to disagree, But I think that with PHP4 a lot of people start thinking that they could be programmers (maybe they can, developers it's another story). When php5 came they didn't know how do deal with the deprecated methods and worst, some hosters didn't know how to virtualize a f1ck1n' server with Apache+PHP5. A lot of mistakes were made when php5 came out but how can a language grow up when they DEPRECATE the syntax? we're not talking about removing the last ';'... O come on. All people have had enough time to get used to it. Between the time PHP5 first came out and when it started to gain attention mainstream wise. Is a gap of 5 years. I think 5 years is enough to get used to new / deprecated features. I still think PHP is moving the right way. When i do an upgrade i first check change logs. You can always expect things to change. It's a dynamic world we live in :) Maybe I'm in a "GET LOST PHP" phase but I think that someone is killing it, and the ones who are stuck in 4 are not helping. When U write code, U must not be worried 'bout the next upgrade of your server! Best regards! On Wed, Jul 30, 2008 at 3:31 AM, VamVan <[EMAIL PROTECTED]> wrote: Its because PHP got really famous with version 4.0 and many people actually converted their CGI or other websites in to PHP 4 websites because it was easy and cheap. But 5.0 brought too many changes like serious OOPS and register global concepts for security, which is useful but made transition difficult. I feel thats why PHP 4 is still supported. Its not only the language that has changed, but also people had to upgrade their skill set and there was some learning curve involved. Unfortunately everyone fell in the trap of register globals which was not dealt until php 4.3.1 as a security concept. Pear and Pecl were there but everyone was pretty much writing all the code (reinventing the wheel) from scratch. This brings in huge code base to change. I liked PHP because intitially it was a procedural langauge and it resembled C. But now with OOPS you can build powerful websites which is good. There are many other cases but I feel strongly this is what makes them still support PHP 4. Thanks Personally i use PHP5 when ever i can. But at work we are stuck with some small legacy applications . And some major applications written on top of PHP4. For which is no time to do the research let alone the time to rebuild them. I think there are a few reasons why people still use PHP4. 1. People learned PHP4 as a hobby. So upgrading knowledge goes much slower. Then when you have to stay on top work wise. (which will create a chicken egg situation with point 2) 2. Hosting providers have no clue how to configure their environment. Or are stuck with customers running PHP4 applications. 3. No time to research and rebuild existing applications. (which will create a chicken egg situation with point 2) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Sorry to disagree, But I think that with PHP4 a lot of people start thinking that they could be programmers (maybe they can, developers it's another story). When php5 came they didn't know how do deal with the deprecated methods and worst, some hosters didn't know how to virtualize a f1ck1n' server with Apache+PHP5. A lot of mistakes were made when php5 came out but how can a language grow up when they DEPRECATE the syntax? we're not talking about removing the last ';'... Maybe I'm in a "GET LOST PHP" phase but I think that someone is killing it, and the ones who are stuck in 4 are not helping. When U write code, U must not be worried 'bout the next upgrade of your server! Best regards! On Wed, Jul 30, 2008 at 3:31 AM, VamVan <[EMAIL PROTECTED]> wrote: > Its because PHP got really famous with version 4.0 and many people actually > converted their CGI or other websites in to PHP 4 websites because it was > easy and cheap. But 5.0 brought too many changes like serious OOPS and > register global concepts for security, which is useful but made transition > difficult. I feel thats why PHP 4 is still supported. > > Its not only the language that has changed, but also people had to upgrade > their skill set and there was some learning curve involved. > > Unfortunately everyone fell in the trap of register globals which was not > dealt until php 4.3.1 as a security concept. Pear and Pecl were there but > everyone was pretty much writing all the code (reinventing the wheel) from > scratch. This brings in huge code base to change. > > I liked PHP because intitially it was a procedural langauge and it > resembled > C. But now with OOPS you can build powerful websites which is good. > > There are many other cases but I feel strongly this is what makes them > still support PHP 4. > > Thanks >
Re: [PHP] Why PHP4?
> The technical abilities and awareness is often inversely proportional to > the size of the hoster. Lol. -- Richard Heyes http://www.phpguru.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
Richard Heyes wrote: >> I agree but not everyone think in the sameway. I have seen several >> big websites that got hit because they haven't used super globals in >> the code and their hosting provided would just change the PHP.ini >> setting and nothing would work. > > Well if it's a "big" website then why use a hoster that changes the > php.ini without much, if any, thought? > The technical abilities and awareness is often inversely proportional to the size of the hoster. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why PHP4?
> I agree but not everyone think in the sameway. I have seen several big > websites that got hit because they haven't used super globals in the code > and their hosting provided would just change the PHP.ini setting and nothing > would work. Well if it's a "big" website then why use a hoster that changes the php.ini without much, if any, thought? -- Richard Heyes http://www.phpguru.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php