NYCPHP Meetup

NYPHP.org

[nycphp-talk] Re: talk Digest, Vol 12, Issue 4

Franciuos K S X sfranciuos at gmail.com
Wed Oct 3 11:21:10 EDT 2007


Hi  All,
Hey am very green about programming but i wanted to start on PHP?is that
possible ? if so then i call upon anyone to help me get started otherwise am
badly off yet i need the knowledge please if anyone knows or has any ideas,
links, tutorials etc help me.
Tks,
Franciuos.


On 10/3/07, talk-request at lists.nyphp.org <talk-request at lists.nyphp.org>
wrote:
>
> Send talk mailing list submissions to
>        talk at lists.nyphp.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.nyphp.org/mailman/listinfo/talk
> or, via email, send a message with subject or body 'help' to
>        talk-request at lists.nyphp.org
>
> You can reach the person managing the list at
>        talk-owner at lists.nyphp.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of talk digest..."
>
>
> Today's Topics:
>
>   1. Apache Directives to Disable All Scripts in       Sub-Directory?
>      (Michael B Allen)
>   2. Re: Apache Directives to Disable All Scripts in
>      Sub-Directory? (Matteo Rinaudo)
>   3. Re: Apache Directives to Disable All Scripts in
>      Sub-Directory? (Cliff Hirsch)
>   4. Re: Apache Directives to Disable All Scripts in
>      Sub-Directory? (Michael B Allen)
>   5. Re: [OT]   Re: [nycphp-talk] neeed help (Rob Marscher)
>   6. Premature submit (Urb LeJeune)
>   7. Re: Premature submit (Anirudh Zala)
>   8. Re: Premature submit (Mark Armendariz)
>   9. Re: Premature submit (tedd)
> 10. Scripting to get a backup of your current MySQL   database.
>      (Anthony Wlodarski)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 2 Oct 2007 12:04:13 -0400
> From: "Michael B Allen" <ioplex at gmail.com>
> Subject: [nycphp-talk] Apache Directives to Disable All Scripts in
>        Sub-Directory?
> To: nyphp <talk at lists.nyphp.org>
> Message-ID:
>        <78c6bd860710020904m16ec8a8bt35c18d77ff9a8169 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hey,
>
> I would like to have a directory under ~/public_html that completely
> disables all mime time interpretations. Specifically, if I put a php
> or cgi file in there I want people to see the PHP.
>
> I tried the following just to see if I could disable .php but it had no
> effect.
>
>    <Directory /home/me/public_html/code>
>       RemoveType .php
>       Order allow,deny
>       Allow from all
>       Options Indexes
>    </Directory>
>
> Any ideas?
>
> Mike
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 2 Oct 2007 14:10:11 -0400
> From: "Matteo Rinaudo" <matteo.rinaudo at gmail.com>
> Subject: Re: [nycphp-talk] Apache Directives to Disable All Scripts in
>        Sub-Directory?
> To: "NYPHP Talk" <talk at lists.nyphp.org>
> Message-ID:
>        <e2bdf8970710021110g535cdc21q4587e08891ce8f0a at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> > I tried the following just to see if I could disable .php but it had no
> effect.
> >
> >     <Directory /home/me/public_html/code>
> >        RemoveType .php
> >        Order allow,deny
> >        Allow from all
> >        Options Indexes
> >     </Directory>
>
> Hi,
> I am not sure if this helps, but, from the httpd manual:
>
> RemoveType directives are processed after any AddType directives, so
> it is possible they may undo the effects of the latter if both occur
> within the same directory configuration.
>
> You may want to check your global server configuration, give it a try.
>
> Matteo
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 02 Oct 2007 14:35:12 -0400
> From: Cliff Hirsch <cliff at pinestream.com>
> Subject: Re: [nycphp-talk] Apache Directives to Disable All Scripts in
>        Sub-Directory?
> To: NYPHP Talk <talk at lists.nyphp.org>
> Message-ID: <C32807A0.87B3%cliff at pinestream.com>
> Content-Type: text/plain;       charset="US-ASCII"
>
> >> I tried the following just to see if I could disable .php but it had no
> >> effect.
> >>
> >>     <Directory /home/me/public_html/code>
> >>        RemoveType .php
> >>        Order allow,deny
> >>        Allow from all
> >>        Options Indexes
> >>     </Directory>
> >
> > Hi,
> > I am not sure if this helps, but, from the httpd manual:
> >
> > RemoveType directives are processed after any AddType directives, so
> > it is possible they may undo the effects of the latter if both occur
> > within the same directory configuration.
> >
> > You may want to check your global server configuration, give it a try.
>
> Make sure you have Override FileInfo in a highly layer directive as well.
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 2 Oct 2007 14:36:03 -0400
> From: "Michael B Allen" <ioplex at gmail.com>
> Subject: Re: [nycphp-talk] Apache Directives to Disable All Scripts in
>        Sub-Directory?
> To: "NYPHP Talk" <talk at lists.nyphp.org>
> Message-ID:
>        <78c6bd860710021136h152cae60w766e7e22bd23abc0 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On 10/2/07, Matteo Rinaudo <matteo.rinaudo at gmail.com> wrote:
> > > I tried the following just to see if I could disable .php but it had
> no effect.
> > >
> > >     <Directory /home/me/public_html/code>
> > >        RemoveType .php
> > >        Order allow,deny
> > >        Allow from all
> > >        Options Indexes
> > >     </Directory>
> >
> > Hi,
> > I am not sure if this helps, but, from the httpd manual:
> >
> > RemoveType directives are processed after any AddType directives, so
> > it is possible they may undo the effects of the latter if both occur
> > within the same directory configuration.
>
> As it turns out, this is actually really hard to do.
>
> It does not seem possible to redefine a subdirectory of public_html.
> Many directives in .htaccess are just ignored or generate errors when
> you know they're supposed to work. I managed to create a separate
> directory not under public_html without a .htaccess that worked
> (mostly - index.php was still preventing directory indexing).
>
> If would be nice if there was an Apache directive that meant "clear
> everything and treat all content as static text/plain,
> unconditionally, everwhere".
>
> Mike
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 2 Oct 2007 17:15:42 -0400
> From: Rob Marscher <rmarscher at beaffinitive.com>
> Subject: Re: [OT]   Re: [nycphp-talk] neeed help
> To: NYPHP Talk <talk at lists.nyphp.org>
> Message-ID: <68DED278-8AA6-4B3F-9AB6-5BBC3A70C49A at beaffinitive.com>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
> On Oct 2, 2007, at 4:06 AM, inforequest wrote:
> > David Krings ramons-at-gmx.net |nyphp dev/internal group use| wrote:
> >> inforequest wrote:
> >>> Not to be contrary :-) but there is *always* a way.
> >> OK, then craft a web page that has something in it that disables
> >> using Print Screen. Show me that and I'll be a believer. Until
> >> then I stand to what I wrote earlier. OK, and not posting it on a
> >> page is cheating. ;)
> >> David
> > David you have to think outside the box. It's not about
> > technology... it's about causing the user to not *want* to print
> > that screen, or save and share/email/etc. That's all I'll say ;-)
> OK... now I have to know... make it include personal information
> about the user (social security/credit card info/nude pictures)?  I
> guess photoshop could get rid of that though.  Hmm....
>
> On a more serious note, a friend recently told me what some labels
> are doing with their album pre-releases to the press.  Each album is
> stamped with some inaudible frequency over the whole thing.  Then if
> the album got leaked, the label could take the leaked version, check
> out which frequency is on it, and then look up who leaked it and call
> in the lawyers.  Of course... how long until people figure out how to
> get rid of those frequencies?
>
> Let's just make everything free.  :)
>
>
> ------------------------------
>
> Message: 6
> Date: Tue, 02 Oct 2007 21:00:04 -0400
> From: Urb LeJeune <urb at e-government.com>
> Subject: [nycphp-talk] Premature submit
> To: NYPHP Talk <talk at lists.nyphp.org>
> Message-ID: <7.0.1.0.2.20071002205640.029e8640 at e-government.com>
> Content-Type: text/plain; charset="us-ascii"; format=flowed
>
>        Had a client who twice lost existing content while making a change
> using a CMS. Turns out the problem was they he was using a DSL line
> and he made a change and hit the "Submit Changes" button before the
> page had fully downloaded. Needless to say the undownloaded textarea
> fields were empty and were written to the DB.
>
>        Is there a way to disallow a form submit before the entire form
> has downloaded?
>
>        Thanks
>
> Urb
>
> Dr. Urban A. LeJeune, President
> E-Government.com
> 800-204-9545
>
>
>
>
> ------------------------------
>
> Message: 7
> Date: Wed, 3 Oct 2007 09:40:29 +0530
> From: Anirudh Zala <arzala at gmail.com>
> Subject: Re: [nycphp-talk] Premature submit
> To: NYPHP Talk <talk at lists.nyphp.org>
> Message-ID: <200710030940.29375.arzala at gmail.com>
> Content-Type: text/plain;  charset="iso-8859-1"
>
> On Wednesday 03 Oct 2007 06:30:04 Urb LeJeune wrote:
> >       Had a client who twice lost existing content while making a change
> > using a CMS. Turns out the problem was they he was using a DSL line
> > and he made a change and hit the "Submit Changes" button before the
> > page had fully downloaded. Needless to say the undownloaded textarea
> > fields were empty and were written to the DB.
> >
> >       Is there a way to disallow a form submit before the entire form
> > has downloaded?
>
> Simplest solution is to keep submit button disabled by default, and then
> enabling it by javascript when page is loaded.
>
> Technically it can be done like this.
>
> # While writing submit tag, keep it disabled by default.
> # In the form where this button exists, put javascript code at the end of
> page
> to make it enabled.
>
> By this way until page will get reloaded, Submit button would not be
> available
> in press/click mode.
>
> Thanks
>
> Anirudh Zala
>
> >
> >       Thanks
> >
> > Urb
> >
> > Dr. Urban A. LeJeune, President
> > E-Government.com
> > 800-204-9545
> >
> >
> > _______________________________________________
> > New York PHP Community Talk Mailing List
> > http://lists.nyphp.org/mailman/listinfo/talk
> >
> > NYPHPCon 2006 Presentations Online
> > http://www.nyphpcon.com
> >
> > Show Your Participation in New York PHP
> > http://www.nyphp.org/show_participation.php
>
>
>
>
> ------------------------------
>
> Message: 8
> Date: Wed, 03 Oct 2007 00:24:47 -0400
> From: Mark Armendariz <lists at enobrev.com>
> Subject: Re: [nycphp-talk] Premature submit
> To: NYPHP Talk <talk at lists.nyphp.org>
> Message-ID: <4703198F.5060305 at enobrev.com>
> Content-Type: text/plain; charset="utf-8"
>
> Anirudh Zala wrote:
> > On Wednesday 03 Oct 2007 06:30:04 Urb LeJeune wrote:
> >
> >>      Had a client who twice lost existing content while making a change
> >> using a CMS. Turns out the problem was they he was using a DSL line
> >> and he made a change and hit the "Submit Changes" button before the
> >> page had fully downloaded. Needless to say the undownloaded textarea
> >> fields were empty and were written to the DB.
> >>
> >>      Is there a way to disallow a form submit before the entire form
> >> has downloaded?
> >>
> >
> > Simplest solution is to keep submit button disabled by default, and then
> > enabling it by javascript when page is loaded.
> >
> > Technically it can be done like this.
> >
> > # While writing submit tag, keep it disabled by default.
> > # In the form where this button exists, put javascript code at the end
> of page
> > to make it enabled.
> >
> > By this way until page will get reloaded, Submit button would not be
> available
> > in press/click mode.
> >
> > Thanks
> >
> > Anirudh Zala
> Agreed.  Also, in case the user hits enter to submit, you should force
> the form's onsubmit to do nothing while form is loading.
>
> You can also check that the form was fully loaded on the server side (in
> case javascript was off or otherwise futzed with), by checking for the
> existence of the last field in the form.  As long as it's not a checkbox
> / radio button, even if it's blank it'll still send the data.
>
> if (array_key_exists('last_field', $_POST) === false) {
>    // show form with warning or change sql to exclude field
> }
>
> Mark Armendariz
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.nyphp.org/pipermail/talk/attachments/20071003/5a3f580b/attachment-0001.html
>
> ------------------------------
>
> Message: 9
> Date: Wed, 3 Oct 2007 08:42:24 -0400
> From: tedd <tedd at sperling.com>
> Subject: Re: [nycphp-talk] Premature submit
> To: NYPHP Talk <talk at lists.nyphp.org>
> Message-ID: <p0624080bc3293d240bd4@[192.168.1.101]>
> Content-Type: text/plain; charset="us-ascii" ; format="flowed"
>
> At 9:00 PM -0400 10/2/07, Urb LeJeune wrote:
> >       Had a client who twice lost existing content while making a change
> >using a CMS. Turns out the problem was they he was using a DSL line
> >and he made a change and hit the "Submit Changes" button before the
> >page had fully downloaded. Needless to say the undownloaded textarea
> >fields were empty and were written to the DB.
> >
> >       Is there a way to disallow a form submit before the entire form
> >has downloaded?
> >
> >       Thanks
> >
> >Urb
>
> Urb:
>
> I don't understand the download problem, but the rest can be done via
> javascript. Please review this:
>
> http://webbytedd.com/c/form-submit/
>
> If you use js to check client-side before submitting server-side,
> then by definition it would require the entire form (required fields)
> to be downloaded and filled out before sending.
>
> Cheers,
>
> tedd
> --
> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com
>
>
> ------------------------------
>
> Message: 10
> Date: Wed, 3 Oct 2007 09:57:06 -0400
> From: "Anthony Wlodarski" <aw at sap8.com>
> Subject: [nycphp-talk] Scripting to get a backup of your current MySQL
>        database.
> To: "'NYPHP Talk'" <talk at lists.nyphp.org>
> Message-ID: <004201c805c5$48d146b0$da73d410$@com>
> Content-Type: text/plain; charset="us-ascii"
>
> I was confused on the relevance of this topic but since PHP and MySQL go
> together like PB&J I thought it would be relevant.
>
>
>
> It has gotten to the point that the application that I built for candidate
> tracking is growing astronomically so now I was given the task of backing
> up
> our data.  So far our Apache/Drupal installation is backed up and SCP'ed
> to
> a secure server.  My one big problem is backing up our MySQL
> database.  Does
> the script "mysqlhotcopy" have the same drawback as just copy the files
> manually (frm, MYD, MYI) in the sense that the server can't be updating
> anything.  To be honest I can't guarantee that no one in the office will
> not
> be using the system at certain times so it might present a problem.  Would
> it be easier to just to script something that follows this logic:
>
>
>
> Pre: rename index.php, copy in temp file with downtime message
>
>
>
> 1.)    Stop daemon.
>
> 2.)    Copy all the table files *.frm, *.MYD, *.MYI files, tar/gzip them
>
> 3.)    SCP archive offsite
>
> 4.)    Delete temp folder
>
> 5.)    Restart daemon.
>
>
>
> Post: delete temp file, rename file back to index.php
>
>
>
> Is it unrealistic for my office to expect 100% uptime, even at 3:30 am in
> the morning (those whacky recruiters).
>
>
>
> Anthony Wlodarski
>
> aw at sap8.com
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.nyphp.org/pipermail/talk/attachments/20071003/ec52219e/attachment.html
>
> ------------------------------
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
>
> End of talk Digest, Vol 12, Issue 4
> ***********************************
>



-- 
sfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20071003/600e9ac4/attachment.html>


More information about the talk mailing list