php-general Digest 12 Dec 2008 15:17:04 -0000 Issue 5841

Topics (messages 284520 through 284541):

Re: Foreign Keys Question
        284520 by: Waynn Lue
        284521 by: Chris
        284524 by: clive
        284525 by: Robert Cummings
        284526 by: clive
        284527 by: Waynn Lue
        284533 by: Boyd, Todd M.
        284537 by: tedd
        284538 by: tedd
        284539 by: Colin Guthrie
        284541 by: tedd

Re: Need a brain to bounce some Mysql/DB thoughts off of!!
        284522 by: German Geek
        284530 by: Jay Blanchard
        284531 by: Jay Blanchard
        284540 by: tedd

How serialize DOMDocument object?
        284523 by: íÉÈÁÉÌ çÁ×ÒÉÌÏ×
        284528 by: Colin Guthrie

Chrome 1.0 released
        284529 by: Richard Heyes

Re: Poll of Sorts: Application Frameworks--Zend, Cake etc
        284532 by: Terion Miller
        284534 by: Peter Ford
        284535 by: Boyd, Todd M.
        284536 by: Colin Guthrie

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
As a side note, FKs do enforce other table specific properties like
indexes on the fields being constrained, so they do add value there as
well. But there's of course an extra cost on updates and inserts to
see if the FK is violated.

Waynn

On 12/11/08, Colin Guthrie <[email protected]> wrote:
> 'Twas brillig, and Chris at 12/12/08 01:20 did gyre and gimble:
>> Micah Gersten wrote:
>>> Colin Guthrie wrote:
>>>> The ON DELETE CASCADE option is key here... "DELETE FROM students
>>>> where student_id=1" will remove all traces of that student from the
>>>> db... all the course they've attended, all the instructors who have
>>>> taught them etc. keeps things nice and tidy without having to put the
>>>> structure in your code all over the place.
>>>>
>>>> Col
>>>>
>>> Why would you want to delete the instructors when deleting the student?
>>
>> I think he meant the link between the student & instructor (in the
>> student_instructor table), not the instructor itself.
>
> lol, indeed, that's what I meant... Sorry I thought it was implied in
> the context!
>
> Say you have the following layouts
>
> instructors: instructor_id, name
> students: student_id, name
> instructor_students: instructor_id, student_id
>
>
> This structure would hold a list of instructors and a list of studends
> and also a one to many mapping of instructors to students.
>
> If you delete a student the FK can cascade to the instructor_students
> table and thus delete the records that indicate a given instructor (or
> instructors) taught them.
>
> Col
>
>
> --
>
> Colin Guthrie
> gmane(at)colin.guthr.ie
> http://colin.guthr.ie/
>
> Day Job:
>    Tribalogic Limited [http://www.tribalogic.net/]
> Open Source:
>    Mandriva Linux Contributor [http://www.mandriva.com/]
>    PulseAudio Hacker [http://www.pulseaudio.org/]
>    Trac Hacker [http://trac.edgewall.org/]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Waynn Lue wrote:
As a side note, FKs do enforce other table specific properties like
indexes on the fields being constrained, so they do add value there as
well. But there's of course an extra cost on updates and inserts to
see if the FK is violated.

On the external table? No they don't.

mysql> create table t1(id int primary key, name varchar(255)) engine=innodb;
Query OK, 0 rows affected (0.00 sec)

mysql> create table t2(t2id int, t1id int references t1(id)) engine=innodb;
Query OK, 0 rows affected (0.00 sec)

mysql> show create table t2\G
*************************** 1. row ***************************
       Table: t2
Create Table: CREATE TABLE `t2` (
  `t2id` int(11) default NULL,
  `t1id` int(11) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)


No auto-index on t2(t1id) at all. You have to define that yourself - you might want it part of a multi-column index for example.

You definitely should index it, but it won't happen automatically.

--
Postgresql & php tutorials
http://www.designmagick.com/


--- End Message ---
--- Begin Message ---
Colin Guthrie wrote:
'Twas brillig, and tedd at 11/12/08 18:46 did gyre and gimble:
As for my "Foreign Keys Question", I think the answer is that it enforces rules upon the configuration (i.e., deleting, altering, and such), but does not provide any significant service beyond that.

Well that's a fairly significant service in itself. The whole "deleting data" case is where FK's have saved me significant amount of coding.

The ON DELETE CASCADE option is key here... "DELETE FROM students where student_id=1" will remove all traces of that student from the db... all the course they've attended, all the instructors who have taught them etc. keeps things nice and tidy without having to put the structure in your code all over the place.

Col

Is it just me or does anyone else here not like deleting from a database, I normally have a status field to indicated if a row has been deleted.

What about historical data, would you not want to know that studentX was enrolled at some point in the past, if you just delete that student and all related data how would you know this?

You could also have a 2nd database with the same table structure and move old/delete data into there.

Clive


--- End Message ---
--- Begin Message ---
On Fri, 2008-12-12 at 09:06 +0200, clive wrote:
> Colin Guthrie wrote:
> > 'Twas brillig, and tedd at 11/12/08 18:46 did gyre and gimble:
> >> As for my "Foreign Keys Question", I think the answer is that it 
> >> enforces rules upon the configuration (i.e., deleting, altering, and 
> >> such), but does not provide any significant service beyond that.
> >
> > Well that's a fairly significant service in itself. The whole 
> > "deleting data" case is where FK's have saved me significant amount of 
> > coding.
> >
> > The ON DELETE CASCADE option is key here... "DELETE FROM students 
> > where student_id=1" will remove all traces of that student from the 
> > db... all the course they've attended, all the instructors who have 
> > taught them etc. keeps things nice and tidy without having to put the 
> > structure in your code all over the place.
> >
> > Col
> >
> Is it just me or does anyone else here not like deleting from a 
> database, I normally have a status field to indicated if a row has been 
> deleted.
> 
> What about historical data, would you not want to know that studentX was 
> enrolled at some point in the past, if you just delete that student and 
> all related data how would you know this?
> 
> You could also have a 2nd database with the same table structure and 
> move old/delete data into there.

It depends on the data. Certainly for student enrolments I would want a
paper trail (so to speak) and would just set a status field. But if it
was say, an online shopping cart or cached data... I'd just purge it.

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


--- End Message ---
--- Begin Message ---
Robert Cummings wrote:
It depends on the data. Certainly for student enrolments I would want a
paper trail (so to speak) and would just set a status field. But if it
was say, an online shopping cart or cached data... I'd just purge it.

Cheers,
Rob.
yes - you are right, I was just thinking about the student enrolment scenario :-)


--- End Message ---
--- Begin Message ---
>
> Waynn Lue wrote:
>
>> As a side note, FKs do enforce other table specific properties like
>> indexes on the fields being constrained, so they do add value there as
>> well. But there's of course an extra cost on updates and inserts to
>> see if the FK is violated.
>>
>
> On the external table? No they don't.
>
> mysql> create table t1(id int primary key, name varchar(255))
> engine=innodb;
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> create table t2(t2id int, t1id int references t1(id)) engine=innodb;
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> show create table t2\G
> *************************** 1. row ***************************
>       Table: t2
> Create Table: CREATE TABLE `t2` (
>  `t2id` int(11) default NULL,
>  `t1id` int(11) default NULL
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1
> 1 row in set (0.00 sec)
>
>
> No auto-index on t2(t1id) at all. You have to define that yourself - you
> might want it part of a multi-column index for example.
>
> You definitely should index it, but it won't happen automatically.
>
Hm, that's weird.  Which version of mysql are you using?  According to
http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html:

InnoDB requires indexes on foreign keys and referenced keys so that foreign
key checks can be fast and not require a table scan. In the referencing
table, there must be an index where the foreign key columns are listed as
the *first* columns in the same order. Such an index is created on the
referencing table automatically if it does not exist. (This is in contrast
to some older versions, in which indexes had to be created explicitly or the
creation of foreign key constraints would fail.) *index_name*, if given, is
used as described previously.

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: clive [mailto:[email protected]]
> Sent: Friday, December 12, 2008 1:07 AM
> To: PHP LIST
> Subject: Re: [PHP] Re: Foreign Keys Question
> 
> Colin Guthrie wrote:
> > 'Twas brillig, and tedd at 11/12/08 18:46 did gyre and gimble:
> >> As for my "Foreign Keys Question", I think the answer is that it
> >> enforces rules upon the configuration (i.e., deleting, altering, and
> >> such), but does not provide any significant service beyond that.
> >
> > Well that's a fairly significant service in itself. The whole
> > "deleting data" case is where FK's have saved me significant amount
> of
> > coding.
> >
> > The ON DELETE CASCADE option is key here... "DELETE FROM students
> > where student_id=1" will remove all traces of that student from the
> > db... all the course they've attended, all the instructors who have
> > taught them etc. keeps things nice and tidy without having to put the
> > structure in your code all over the place.
> >
> > Col
> >
> Is it just me or does anyone else here not like deleting from a
> database, I normally have a status field to indicated if a row has been
> deleted.
> 
> What about historical data, would you not want to know that studentX
> was
> enrolled at some point in the past, if you just delete that student and
> all related data how would you know this?
> 
> You could also have a 2nd database with the same table structure and
> move old/delete data into there.

You are describing a data warehouse, or a data mart. That is not what 
transactional databases are there for. Make a historical database, and make a 
transactional database... but don't make one that tries to be both, or you're 
just shooting yourself in the foot.


// Todd

--- End Message ---
--- Begin Message ---
At 4:25 PM -0500 12/11/08, Robert Cummings wrote:
On Thu, 2008-12-11 at 16:24 -0500, Robert Cummings wrote:

 >     lock table
     check enrolment count
     no room
         unlock table
         generate error
     have room
         insert row
         unlock table

 Ba da boom.

I should have read your message better... you were talking about
skipping transactions and not locking :)

Cheers,
Rob.


Rob:

I was talking about both -- you answer was fine.

Thanks,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
At 10:24 PM +0000 12/11/08, Colin Guthrie wrote:
'Twas brillig, and tedd at 11/12/08 18:46 did gyre and gimble:
As for my "Foreign Keys Question", I think the answer is that it enforces rules upon the configuration (i.e., deleting, altering, and such), but does not provide any significant service beyond that.

Well that's a fairly significant service in itself. The whole "deleting data" case is where FK's have saved me significant amount of coding.

The ON DELETE CASCADE option is key here... "DELETE FROM students where student_id=1" will remove all traces of that student from the db... all the course they've attended, all the instructors who have taught them etc. keeps things nice and tidy without having to put the structure in your code all over the place.

Col

Col:

That's neat and a lot more powerful than I thought. It's like following a linked list to it's end while removing all traces of the thread.

And I understand the "instructor delete" was not intended.

Thanks,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
'Twas brillig, and tedd at 12/12/08 14:36 did gyre and gimble:
That's neat and a lot more powerful than I thought. It's like following a linked list to it's end while removing all traces of the thread.

Exactly

And I understand the "instructor delete" was not intended.

Yeah indeed. I had a db structure in my head and the statement made vague sense with that in mind, but it totally failed to leak through my hands on to the keyboard :P

There are three main options here:
* ON DELETE CASCADE (if the FK's referenced table has it's record deleted, delete the record here too).

* ON DELETE RESTRICT (if the FK's referenced table has it's record deleted stop that whole transaction - e.g. *prevent* the delete).

* ON DELETE SET NULL (if the FK's referenced table has it's record deleted, set this tables reference to NULL).

All three are useful in different contexts. I use them extensively to ensure good data integrity. The trade off on extra load on insert/update is IMO well worth it.

Col

--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


--- End Message ---
--- Begin Message ---
At 2:50 PM +0000 12/12/08, Colin Guthrie wrote:
'Twas brillig, and tedd at 12/12/08 14:36 did gyre and gimble:
That's neat and a lot more powerful than I thought. It's like following a linked list to it's end while removing all traces of the thread.

Exactly

And I understand the "instructor delete" was not intended.

Yeah indeed. I had a db structure in my head and the statement made vague sense with that in mind, but it totally failed to leak through my hands on to the keyboard :P

There are three main options here:
* ON DELETE CASCADE (if the FK's referenced table has it's record deleted, delete the record here too).

* ON DELETE RESTRICT (if the FK's referenced table has it's record deleted stop that whole transaction - e.g. *prevent* the delete).

* ON DELETE SET NULL (if the FK's referenced table has it's record deleted, set this tables reference to NULL).

All three are useful in different contexts. I use them extensively to ensure good data integrity. The trade off on extra load on insert/update is IMO well worth it.

Col


Col:

That's all good to know.

My first tendency is to keep everything. After all, memory is cheap and access times are always reducing.

While it's true that having a bunch of worthless data doesn't accomplish anything and slows the process of dealing with it. But, technology in access times and storage capabilities are getting to the point of making the decision to keep/delete worthless data moot.

As such, I think the need for FK deletions will become less and perhaps disappear from the language. For some reason, I look upon deletions in similar light as renumbering a table's index after deletion of a record -- like "what's the point?"

I'm just rambling -- thanks again for your insight.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
OK, i give u that, Rob. :-) I might just ask MySQL questions here, if i have
some.

I guess, if people get more responses here, it shows that this mailing list
is superior (no offence to the MySQL list :-P ).

Tim

On Fri, Dec 12, 2008 at 4:04 PM, Robert Cummings <[email protected]>wrote:

> It's Christmas... the season of giving and tolerance :|
>
>
> On Fri, 2008-12-12 at 13:56 +1300, German Geek wrote:
> > This list seems to be turning into a MySQL list with a few PHP
> questions...
> > Tim-Hinnerk Heuer
> >
> > http://www.ihostnz.com
> >
> >
> > On Fri, Dec 12, 2008 at 1:53 PM, bruce <[email protected]> wrote:
> >
> > > Hi guys.
> > >
> > > Architecting an app that's going to have users interacting with
> different
> > > levels of the db/tbls, and trying to figure out a few things.
> > >
> > > The highlevel layout looks like:
> > >  collegeTBL
> > >  deptTBL
> > >
> > >  with ->collegeTBL.id = deptTBL.colID
> > >
> > > I also have a status tbl for each collegeTBL/deptTBL
> > >
> > >  college_statusTBL
> > >   userID
> > >   collegeID
> > >
> > >  dept_statusTBL
> > >   userID
> > >   deptID
> > >
> > >  with:
> > >  collegeTBL.id=college_statusTBL.collegeID
> > >  deptTBL.id=dept_statusTBL.deptID
> > >
> > > So I limk the statusTBLs to the college/dept TBLs...
> > >
> > > This is due to the fact that a user can elect to work on either a
> college,
> > > or a given dept of the college.
> > >
> > > I'm struggling with a good/best way to figure out how to develop a
> query to
> > > determine what level of a college, (if any) a user has elected to work
> > > with.
> > >
> > > I can do a multiple join across the collegeTBL/deptTBL, and the
> statusTBLs,
> > > but this simply gets a large tbl, and I'd have to then parse the
> results...
> > > I'm trying to figure out if there's a better way, with a single query.
> The
> > > query would look at the college(status), and then at the dept(status)
> to
> > > determine what level (if any ) the user has selected.
> > >
> > > I've got a mysql layout of the various tbls, and inserts if anyone's
> > > interested in helping me shake my mind out on this...
> > >
> > > thanks
> > >
> > > -bruce
> > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>

--- End Message ---
--- Begin Message ---
[snip]
It's Christmas... the season of giving and tolerance :|
[/snip]

We will return you to your regularly scheduled Robert Cummings Jan 2nd,
2009

--- End Message ---
--- Begin Message ---
[snip]
I guess, if people get more responses here, it shows that this mailing
list
is superior (no offence to the MySQL list :-P ).
[/snip]

Duh. Was there ever any question?

--- End Message ---
--- Begin Message ---
At 6:34 AM -0600 12/12/08, Jay Blanchard wrote:
[snip]
It's Christmas... the season of giving and tolerance :|
[/snip]

We will return you to your regularly scheduled Robert Cummings Jan 2nd,
2009

In either event, the answers are still good.

As for MySQL questions on this list, as I said previously, this list provides more answers than the MySQL list.

Again no offense meant to that list -- for there are some very bright people there. However, this list is more responsive; more specific re MySQL queries; and entertains a holistic view of how to design and apply solutions considering more than a single language.

This is absolutely the best list for web programming problems.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
How serialize DOMDocument object?

--- End Message ---
--- Begin Message ---
'Twas brillig, and Михаил Гаврилов at 12/12/08 06:23 did gyre and gimble:
How serialize DOMDocument object?

Easiest way is to save it to an XML string and then load it again.

If you want a conveneinet way to store domdocuments in the session, then just extend the class and define __sleep and __wakup functions that essentially do the save/load for you.

Col


--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


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

Well it's not really related to PHP, but certainly web development in
general. Personally, I was surprised by the jump from 0.4 to 1.0.
Judging by other Google betas (eg Gmail) I was expecting it to be in
beta for the next decade or so.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated December 5th)

--- End Message ---
--- Begin Message ---
On Thu, Dec 11, 2008 at 4:25 PM, Colin Guthrie <[email protected]> wrote:

> 'Twas brillig, and Terion Miller at 11/12/08 14:56 did gyre and gimble:
>
>> Hey Everyone, I am wondering if using a framework such as one of these may
>> make my life easier, which do any of you use and what has been your
>> experience with the learning curve of them?
>> I just put Cake on my local server, basically I want to know which is
>> easiest? LOL...
>>
>
> Personally I'm a ZF fan, but each to their own.
>
> Col
>
> --
>
> Colin Guthrie
> gmane(at)colin.guthr.ie
> http://colin.guthr.ie/
>
> Day Job:
>  Tribalogic Limited [http://www.tribalogic.net/]
> Open Source:
>  Mandriva Linux Contributor [http://www.mandriva.com/]
>  PulseAudio Hacker [http://www.pulseaudio.org/]
>  Trac Hacker [http://trac.edgewall.org/]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> Thanks for the responses, CakePhp was seemingly very easy for me to catch
on to and get started in (which means its super super easy folks)
unfortunately when I got to the viewing of my files (pretty important) I
couldn't get the IIS (yep I know sucks) to work with it, and I installed a
mod_rewrite.dll for IIS and everything along with setting it to Cakes
"pretty urls" and removing the htdocs, but then it just kept resolving all
urls to the root ... no matter what I changed the path to, and no matter if
I set it only to that directory...so by end of day yesterday I downloaded
the zend and will attempt to see what I can do with it, I want off this
windows box but that isn't going to happen anytime soon ...sigh...
Terion

--- End Message ---
--- Begin Message ---
Terion Miller wrote:
> On Thu, Dec 11, 2008 at 4:25 PM, Colin Guthrie <[email protected]> wrote:
> 
>> 'Twas brillig, and Terion Miller at 11/12/08 14:56 did gyre and gimble:
>>
>>> Hey Everyone, I am wondering if using a framework such as one of these may
>>> make my life easier, which do any of you use and what has been your
>>> experience with the learning curve of them?
>>> I just put Cake on my local server, basically I want to know which is
>>> easiest? LOL...
>>>
>> Personally I'm a ZF fan, but each to their own.
>>
>> Col
>>
>> --
>>
>> Colin Guthrie
>> gmane(at)colin.guthr.ie
>> http://colin.guthr.ie/
>>
>> Day Job:
>>  Tribalogic Limited [http://www.tribalogic.net/]
>> Open Source:
>>  Mandriva Linux Contributor [http://www.mandriva.com/]
>>  PulseAudio Hacker [http://www.pulseaudio.org/]
>>  Trac Hacker [http://trac.edgewall.org/]
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>> Thanks for the responses, CakePhp was seemingly very easy for me to catch
> on to and get started in (which means its super super easy folks)
> unfortunately when I got to the viewing of my files (pretty important) I
> couldn't get the IIS (yep I know sucks) to work with it, and I installed a
> mod_rewrite.dll for IIS and everything along with setting it to Cakes
> "pretty urls" and removing the htdocs, but then it just kept resolving all
> urls to the root ... no matter what I changed the path to, and no matter if
> I set it only to that directory...so by end of day yesterday I downloaded
> the zend and will attempt to see what I can do with it, I want off this
> windows box but that isn't going to happen anytime soon ...sigh...
> Terion
> 


If you're up for a bit of playing, look at www.virtualbox.org and set up a
virtual linux box inside your windows server.

I got a nice new laptop to play with for setting up a demo of one of our
web-apps, and since it had Vista (and was high enough spec to handle it) I just
put VirtualBox on board and installed OpenSuSE in there to run the server side
of the app. A bit of fiddling with network bridges (all documented by the
VirtualBox people) and the server is visible just like it was a real machine...

So I can take this machine around, and (without needing any network connection)
show off the app in IE, Firefox, Opera or Chrome without having to run IIS.

Well, I thought it was cool, anyway :(


-- 
Peter Ford                              phone: 01580 893333
Developer                               fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Terion Miller [mailto:[email protected]]
> Sent: Friday, December 12, 2008 7:55 AM
> To: Colin Guthrie
> Cc: [email protected]
> Subject: Re: [PHP] Re: Poll of Sorts: Application Frameworks--Zend,
> Cake etc
> 
> On Thu, Dec 11, 2008 at 4:25 PM, Colin Guthrie <[email protected]>
> wrote:
> 
> > 'Twas brillig, and Terion Miller at 11/12/08 14:56 did gyre and
> gimble:
> >
> >> Hey Everyone, I am wondering if using a framework such as one of
> these may
> >> make my life easier, which do any of you use and what has been your
> >> experience with the learning curve of them?
> >> I just put Cake on my local server, basically I want to know which
> is
> >> easiest? LOL...
> >>
> >
> > Personally I'm a ZF fan, but each to their own.
> >
> > Col
> >
> > --
> >
> > Colin Guthrie
> > gmane(at)colin.guthr.ie
> > http://colin.guthr.ie/
> >
> > Day Job:
> >  Tribalogic Limited [http://www.tribalogic.net/]
> > Open Source:
> >  Mandriva Linux Contributor [http://www.mandriva.com/]
> >  PulseAudio Hacker [http://www.pulseaudio.org/]
> >  Trac Hacker [http://trac.edgewall.org/]
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > Thanks for the responses, CakePhp was seemingly very easy for me to
> catch
> on to and get started in (which means its super super easy folks)
> unfortunately when I got to the viewing of my files (pretty important)
> I
> couldn't get the IIS (yep I know sucks) to work with it, and I
> installed a
> mod_rewrite.dll for IIS and everything along with setting it to Cakes
> "pretty urls" and removing the htdocs, but then it just kept resolving
> all
> urls to the root ... no matter what I changed the path to, and no
> matter if
> I set it only to that directory...so by end of day yesterday I
> downloaded
> the zend and will attempt to see what I can do with it, I want off
this
> windows box but that isn't going to happen anytime soon ...sigh...

I recommend the Ionic ISAPI Rewrite Filter [1]. Also, this [2] webpage
can probably help you with your Cake/IIS configuration, although they
use a different rewrite filter [3].

        1. http://www.codeplex.com/IIRF 
        2. http://bakery.cakephp.org/articles/view/cakephp-on-iis 
        3. http://www.creativepark.it/downloads/iismod_rewrite.zip 

HTH,


// Todd

--- End Message ---
--- Begin Message ---
'Twas brillig, and Terion Miller at 12/12/08 13:55 did gyre and gimble:
Thanks for the responses, CakePhp was seemingly very easy for me to catch
on to and get started in (which means its super super easy folks)
unfortunately when I got to the viewing of my files (pretty important) I
couldn't get the IIS (yep I know sucks) to work with it, and I installed a
mod_rewrite.dll for IIS and everything along with setting it to Cakes
"pretty urls" and removing the htdocs, but then it just kept resolving all
urls to the root ... no matter what I changed the path to, and no matter if
I set it only to that directory...so by end of day yesterday I downloaded
the zend and will attempt to see what I can do with it, I want off this
windows box but that isn't going to happen anytime soon ...sigh...

I hate to say but I suspect you'll be in a similar boat with Zend... perhaps not, but I certainly make fairly extensive use of rewrite rules to direct all my URLs to my main Zend bootstrap.

Just out of curiosity, are you stuck to that specific windows box (e.g. is that what you have to host on in a live env?) or is it just that you need to use the machine for devel?

Reason I ask is that it's pretty trivial to install Apache, PHP and MySQL on windows.... there are even some packages that make it ultra easy to install e.g.:
http://www.apachefriends.org/en/xampp-windows.html

I don't use it personally (thankfully don't use windows unless I'm poked with a pointy stick!) but I hear good things.

Col



--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


--- End Message ---

Reply via email to