Discussion:
[nycphp-talk] Warning: Unknown(): Your script possibly
(too old to reply)
shaiju davis
2007-05-28 18:08:22 UTC
Permalink
Hi,

I'm Shaiju Davis a PHP Programmer. When I submit a page I get the following
warning.
Warning: Unknown(): Your script possibly relies on a session side-effect
which existed until PHP 4.2.3. Please be advised that the session extension
does not consider global variables as a source of data, unless register*globals
is enabled. You can disable this functionality and this warning by setting
session.bug*compat*42 or session.bug*compat_warn to off, respectively. in
Unknown on line 0
I'm using PHP Version 4.4.6. If you have any solution to this please update
me.


Thanks & Regards
Shaiju Davis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070528/f0009133/attachment.html>
Chris Shiflett
2007-05-28 18:11:30 UTC
Permalink
Post by shaiju davis
Warning: Unknown(): Your script possibly relies on a session
side-effect which existed until PHP 4.2.3. Please be advised
that the session extension does not consider global variables
as a source of data, unless register/globals is enabled. You
can disable this functionality and this warning by setting
session.bug/compat/42 or session.bug/compat_warn to off,
respectively.
Just use session_start() and the $_SESSION superglobal, then you won't
see this warning.

Chris
--
Chris Shiflett
http://shiflett.org/
shaiju davis
2007-05-28 18:25:58 UTC
Permalink
Hi Chris,

I'm using session_start() and $_SESSION an the register globals off. Then
also I get this warning

Thanks & Regards
Shaiju Davis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070528/76d70f1e/attachment.html>
Chris Shiflett
2007-05-28 18:30:49 UTC
Permalink
Post by shaiju davis
I'm using session_start() and $_SESSION an the register
globals off. Then also I get this warning.
Can you show us a small example that demonstrates this problem?

Based on the information you've given us, my only guess is that you've
got a naming collision that would have behaved differently in an earlier
version of PHP, and the warning is meant to inform you of this.

Chris
--
Chris Shiflett
http://shiflett.org/
shaiju davis
2007-05-28 19:10:38 UTC
Permalink
Hi Chris,

It happens while I edit a page with the server information. It contains
almost 20 fields to submit.
sample code
session_start(); // Starts the session

if(isset($_SESSION['authen']) &&
$_SESSION['authen']=="Ddlj2N3Ko0J32kHm3Gyi") // Check if the user logged in
{
if($_SESSION['Pending Servers_status']==1) //Check whether the page is
enabled
{
if($_SESSION['pending_access']==1) // Check user access rights
{
form-data
}}

Thanks & Regards
Shaiju Davis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070529/2d4796c0/attachment.html>
Marc Antony Vose
2007-06-27 08:43:15 UTC
Permalink
Hi there:

I have an old site that has been online for ~7 years, and it is
established, if a bit old and crusty. It's a database-driven
directory of products for the Mac, and it performs reasonably well in
google's search results, and gets a fair amount of traffic.

This site was built before I even had a framework, so it's all
cobbled together, and I'm just now finally building it out to what I
always wanted it to be, while simultaneously moving it to my clean
(er) framework. So, the question is this...

My URLs are all something like www.xyz.com/trigger/0/1/4. I think at
the time I just wanted them to be short.

Now that I'm rebuilding it, I have different needs, because the site
will be structured a bit differently in order to list products for
more platforms. I would like to have www.xyz.com/product/1234/
platform/567. Still short, but makes more sense.

Thing is, the site does receive a great deal of its traffic from
google, and who knows how many bazillion links there are pointing to
various pieces of the site, so I need to implement an intelligent way
to parse the old URLs into the new ones.

But that's not the hard part; the part I am worried about is losing
the search weighting I've built up over the years. I've read that
google ignores 302 redirection codes and doesn't update its index, so
I'm a bit at a loss as how to proceed.

Anyway, wondering if someone could give me advice or share a real-
world example of what they have done in the past.

Cheers,

Marc Vose
http://www.suzerain.com
Brent Baisley
2007-06-27 14:13:10 UTC
Permalink
You probably want to look into Apache mod_rewrite, if you are running
Apache. It will do exactly what you are looking for.

The alternative is to put a php file in all of the "old" locations
that is really just a single include line that loads the file from
the new location you want to move to.
Post by Marc Antony Vose
I have an old site that has been online for ~7 years, and it is
established, if a bit old and crusty. It's a database-driven
directory of products for the Mac, and it performs reasonably well
in google's search results, and gets a fair amount of traffic.
This site was built before I even had a framework, so it's all
cobbled together, and I'm just now finally building it out to what
I always wanted it to be, while simultaneously moving it to my clean
(er) framework. So, the question is this...
My URLs are all something like www.xyz.com/trigger/0/1/4. I think
at the time I just wanted them to be short.
Now that I'm rebuilding it, I have different needs, because the
site will be structured a bit differently in order to list products
for more platforms. I would like to have www.xyz.com/product/1234/
platform/567. Still short, but makes more sense.
Thing is, the site does receive a great deal of its traffic from
google, and who knows how many bazillion links there are pointing
to various pieces of the site, so I need to implement an
intelligent way to parse the old URLs into the new ones.
But that's not the hard part; the part I am worried about is losing
the search weighting I've built up over the years. I've read that
google ignores 302 redirection codes and doesn't update its index,
so I'm a bit at a loss as how to proceed.
Anyway, wondering if someone could give me advice or share a real-
world example of what they have done in the past.
Cheers,
Marc Vose
http://www.suzerain.com
_______________________________________________
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
Jon Baer
2007-06-27 15:32:52 UTC
Permalink
There is a script out there which will run through your 404 apache
log + put it into mod_rewrite recipes automatically, if I can dig up
will post but Im sure it might also be trivial to write. I used this
to clean up a switch over a few years back.

- Jon
Post by Brent Baisley
You probably want to look into Apache mod_rewrite, if you are
running Apache. It will do exactly what you are looking for.
The alternative is to put a php file in all of the "old" locations
that is really just a single include line that loads the file from
the new location you want to move to.
Post by Marc Antony Vose
I have an old site that has been online for ~7 years, and it is
established, if a bit old and crusty. It's a database-driven
directory of products for the Mac, and it performs reasonably well
in google's search results, and gets a fair amount of traffic.
This site was built before I even had a framework, so it's all
cobbled together, and I'm just now finally building it out to what
I always wanted it to be, while simultaneously moving it to my
clean(er) framework. So, the question is this...
My URLs are all something like www.xyz.com/trigger/0/1/4. I think
at the time I just wanted them to be short.
Now that I'm rebuilding it, I have different needs, because the
site will be structured a bit differently in order to list
products for more platforms. I would like to have www.xyz.com/
product/1234/platform/567. Still short, but makes more sense.
Thing is, the site does receive a great deal of its traffic from
google, and who knows how many bazillion links there are pointing
to various pieces of the site, so I need to implement an
intelligent way to parse the old URLs into the new ones.
But that's not the hard part; the part I am worried about is
losing the search weighting I've built up over the years. I've
read that google ignores 302 redirection codes and doesn't update
its index, so I'm a bit at a loss as how to proceed.
Anyway, wondering if someone could give me advice or share a real-
world example of what they have done in the past.
Cheers,
Marc Vose
http://www.suzerain.com
_______________________________________________
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
_______________________________________________
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
Steve Francia
2007-06-27 18:55:45 UTC
Permalink
If you are using mod rewrite make sure you set the R=301, and don't forget
to pass along the query string if you need to.
RewriteRule ^oldurl$ /newurl [R=301,L]

-Steve Francia
Post by Jon Baer
There is a script out there which will run through your 404 apache
log + put it into mod_rewrite recipes automatically, if I can dig up
will post but Im sure it might also be trivial to write. I used this
to clean up a switch over a few years back.
- Jon
Post by Brent Baisley
You probably want to look into Apache mod_rewrite, if you are
running Apache. It will do exactly what you are looking for.
The alternative is to put a php file in all of the "old" locations
that is really just a single include line that loads the file from
the new location you want to move to.
Post by Marc Antony Vose
I have an old site that has been online for ~7 years, and it is
established, if a bit old and crusty. It's a database-driven
directory of products for the Mac, and it performs reasonably well
in google's search results, and gets a fair amount of traffic.
This site was built before I even had a framework, so it's all
cobbled together, and I'm just now finally building it out to what
I always wanted it to be, while simultaneously moving it to my
clean(er) framework. So, the question is this...
My URLs are all something like www.xyz.com/trigger/0/1/4. I think
at the time I just wanted them to be short.
Now that I'm rebuilding it, I have different needs, because the
site will be structured a bit differently in order to list
products for more platforms. I would like to have www.xyz.com/
product/1234/platform/567. Still short, but makes more sense.
Thing is, the site does receive a great deal of its traffic from
google, and who knows how many bazillion links there are pointing
to various pieces of the site, so I need to implement an
intelligent way to parse the old URLs into the new ones.
But that's not the hard part; the part I am worried about is
losing the search weighting I've built up over the years. I've
read that google ignores 302 redirection codes and doesn't update
its index, so I'm a bit at a loss as how to proceed.
Anyway, wondering if someone could give me advice or share a real-
world example of what they have done in the past.
Cheers,
Marc Vose
http://www.suzerain.com
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070627/c62bae9d/attachment.html>
Chris Shiflett
2007-06-27 14:15:51 UTC
Permalink
I've read that google ignores 302 redirection codes and doesn't
update its index, so I'm a bit at a loss as how to proceed.
Use a 301:

http://shiflett.org/blog/2007/jan/url-vanity

Chris
--
Chris Shiflett
http://shiflett.org/
selyah
2007-05-28 20:56:57 UTC
Permalink
is there a simple way of selecting random images to be displayed from a library of images.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070528/d242e327/attachment.html>
CED
2007-05-28 21:16:41 UTC
Permalink
$i = rand( 0, count(imagesArray));
$imagesArray[$i];
----- Original Message -----
From: selyah
To: NYPHP Talk
Sent: Monday, May 28, 2007 4:56 PM
Subject: [nycphp-talk] random image selection




is there a simple way of selecting random images to be displayed from a library of images.
Thanks



------------------------------------------------------------------------------


_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070528/10b6d307/attachment.html>
CED
2007-05-28 21:18:59 UTC
Permalink
OR

foreach(glob("imageDirectory/*.gif") as $item){
$sort[] = end(explode('/',$item));

}
$i = rand(0, count($sort);
echo $sort[$i];

HTH,
Ed
Edward JS Prevost II
Me at EdwardPrevost.info
www.EdwardPrevost.info
----- Original Message -----
From: selyah
To: NYPHP Talk
Sent: Monday, May 28, 2007 4:56 PM
Subject: [nycphp-talk] random image selection




is there a simple way of selecting random images to be displayed from a library of images.
Thanks



------------------------------------------------------------------------------


_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070528/a229c148/attachment.html>
m rutko
2007-06-27 15:37:32 UTC
Permalink
Hi
I'm looking for mid level to senior level developers with LAMP experience for a long term project in Manhattan.
Sorry no telecommuting, onsite only.
Hourly rate is open.
This is a great opportunity to be part of a very talented team in a company which is dedicated in using cutting edge technologies.

If you're interested or would like to learn more contact me at
mrutkowski at infotechnologiesinc.com or call 212-710-5534.



Qualified candidates should have a deep background in web software development and have architected and coded complex software systems for large-scale Internet sites.
Specific responsibilities include:
- Building and enhancing high-availability database systems based on open-source solutions including MySQL
- Architecting software solutions that are robust, scalable, and maintainable
- Supporting production by helping to troubleshoot software issues on the site
- Working in tandem with fellow engineers to define software architectures and technologies to be used
- Evaluate new technologies and implement development best practices.
- 5-7 years of software development experience, including at least 5 years of web development experience
- Significant development experience in the LAMP environment
- Strong background in MySQL, including an understanding of replication, caching, hot backups, load balancing, redundancy, and partitioning
- Experience benchmarking, profiling, and identifying slow SQL queries
- Excellent communication skills with both technical and non-technical audiences Experience developing in C++ or Java (for patches, performance extensions, and plug-ins), and Unix shell scripts
In addition, the candidate will ideally have:
- Knowledge of the Sun Solaris operating system
- Familiarity with Oracle
- Programming experience with more esoteric and powerful languages for data manipulation (Ruby, Python, Haskell, Lisp, Erlang)
- Experience with profiling using tools like DTrace for Solaris or SystemTap/Valgrind for Linux
- Knowledge of one or more of the following: content management systems, search engines, e-commerce applications, analytics applications, ad-serving technology, and email systems

Thanks,

Mike


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




---------------------------------
Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070627/6e70d490/attachment.html>
Hans Zaunere
2007-06-27 16:12:06 UTC
Permalink
Hi Mike,

Thanks for the post. However, we do have a NYPHP-Jobs list for job related
posts and conversation.

http://lists.nyphp.org/mailman/listinfo/jobs

Thanks,

H
Post by m rutko
Hi
I'm looking for mid level to senior level developers with LAMP
experience for a long term project in Manhattan.
Sorry no telecommuting, onsite only.
Hourly rate is open.
This is a great opportunity to be part of a very talented team in a
company which is dedicated in using cutting edge technologies.
If you're interested or would like to learn more contact me at
mrutkowski at infotechnologiesinc.com or call 212-710-5534.
Qualified candidates should have a deep background in web software
development and have architected and coded complex software systems
for large-scale Internet sites.
- Building and enhancing high-availability database systems based on
open-source solutions including MySQL
- Architecting software solutions that are robust, scalable, and maintainable
- Supporting production by helping to troubleshoot software issues on the site
- Working in tandem with fellow engineers to define software
architectures and technologies to be used
- Evaluate new technologies and implement development best practices.
- 5-7 years of software development experience, including at least 5
years of web development experience
- Significant development experience in the LAMP environment
- Strong background in MySQL, including an understanding of
replication, caching, hot backups, load balancing, redundancy, and
partitioning
- Experience benchmarking, profiling, and identifying slow SQL queries
- Excellent communication skills with both technical and
non-technical audiences Experience developing in C++ or Java (for
patches, performance extensions, and plug-ins), and Unix shell
scripts
- Knowledge of the Sun Solaris operating system
- Familiarity with Oracle
- Programming experience with more esoteric and powerful languages
for data manipulation (Ruby, Python, Haskell, Lisp, Erlang)
- Experience with profiling using tools like DTrace for Solaris or
SystemTap/Valgrind for Linux
- Knowledge of one or more of the following: content management
systems, search engines, e-commerce applications, analytics
applications, ad-serving technology, and email systems
Thanks,
Mike
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
________________________________
Choose the right car based on your needs. Check out Yahoo! Autos new
Car Finder tool.
<http://us.rd.yahoo.com/evt=48518/*http://autos.yahoo.com/carfinder/;_ylc=X3
oDMTE3NWsyMDd2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDY2FyLWZpbmRlcg-->
Nicholas Hart
2007-07-19 15:20:24 UTC
Permalink
Hi,

I am looking for the easiest way to put an existing form (PDF) on the
web for very non-tech users to fill out.? Currently we have a form
that is downloaded as a PDF and mailed back to us.? I need to make the
online version as similar as possible to filling out the existing form
so our users don't get confused.? For the final submit, the data will
be saved to our DB and the full form will be printed as a PDF for the
users records.

The way I see it there are two parts to this process:
1. Filling in the form:
I have taken a Word.doc version of this PDF form and saved it as
HTML.? I don't know if I can trust this layout for all browser and OS
versions.? Are there better ways to convert word to html?? How do
other sites handle this?

2. Saving data and printing filled out PDF for user records:
Is there a php library that allows me to place fields in an existing
PDF which does not have any embedded field names?? This would allow
users to save the completed PDF to their hard drives which would be
helpful.

If anyone has any thoughts, suggestions or references to existing
sites, it would be much appreciated.? I'm looking to get started on
the right foot with this.? Thanks.

Regards,
Nicholas Hart

link to PDF: https://www.mptf.org:75/docs/TF2.pdf

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070719/b370f53b/attachment.html>
Aaron Fischer
2007-07-19 15:46:26 UTC
Permalink
I've had great results with FPDF.
http://www.fpdf.org/

1) Create the HTML web form.
2) Use PHP to store the data in your DB and then use FPDF to output a
PDF to the web browser for the user to print.

-Aaron
Post by Nicholas Hart
I am looking for the easiest way to put an existing form (PDF) on
the web for very non-tech users to fill out. Currently we have a
form that is downloaded as a PDF and mailed back to us. I need to
make the online version as similar as possible to filling out the
existing form so our users don't get confused. For the final
submit, the data will be saved to our DB and the full form will be
printed as a PDF for the users records.
Brian Dailey
2007-07-19 16:12:35 UTC
Permalink
For Pete's sake, please do not use Word's "Save as HTML" feature. :P It
makes a god-awful mess that won't render properly in most browsers.

My suggestion is thusly: instead of making them fill out a "PDF" form
(which means the fields are afterwards difficult for you to get to), let
them fill out a web form which stores the information in a database.
When you want to print the information out to a PDF file, use FPDF
(http://www.fpdf.org) to inject the information into a PDF file (via X,Y
coordinates) and then output it to the user.

It's much easier and far more flexible this way, and you won't have to
muddle about with Word documents.



- Brian Dailey
Software Developer
New York, NY
www.dailytechnology.net
Post by Nicholas Hart
Hi,
I am looking for the easiest way to put an existing form (PDF) on the
web for very non-tech users to fill out. Currently we have a form that
is downloaded as a PDF and mailed back to us. I need to make the online
version as similar as possible to filling out the existing form so our
users don't get confused. For the final submit, the data will be saved
to our DB and the full form will be printed as a PDF for the users records.
I have taken a Word.doc version of this PDF form and saved it as HTML.
I don't know if I can trust this layout for all browser and OS
versions. Are there better ways to convert word to html? How do other
sites handle this?
Is there a php library that allows me to place fields in an existing PDF
which does not have any embedded field names? This would allow users to
save the completed PDF to their hard drives which would be helpful.
If anyone has any thoughts, suggestions or references to existing sites,
it would be much appreciated. I'm looking to get started on the right
foot with this. Thanks.
Regards,
Nicholas Hart
link to PDF: https://www.mptf.org:75/docs/TF2.pdf
------------------------------------------------------------------------
_______________________________________________
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
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: support.vcf
Type: text/x-vcard
Size: 264 bytes
Desc: not available
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070719/ab68ec89/attachment.vcf>
Brian Dailey
2007-07-19 16:18:34 UTC
Permalink
For Pete's sake, please do not use Word's "Save as HTML" feature. :P It
makes a god-awful mess that won't render properly in most browsers.

My suggestion is thusly: instead of making them fill out a "PDF" form
(which means the fields are afterwards difficult for you to get to), let
them fill out a web form which stores the information in a database.
When you want to print the information out to a PDF file, use FPDF
(http://www.fpdf.org) to inject the information into a PDF file (via X,Y
coordinates) and then output it to the user.

It's much easier and far more flexible this way, and you won't have to
muddle about with Word documents.



- Brian Dailey
Software Developer
New York, NY
www.dailytechnology.net
Post by Nicholas Hart
Hi,
I am looking for the easiest way to put an existing form (PDF) on the
web for very non-tech users to fill out. Currently we have a form that
is downloaded as a PDF and mailed back to us. I need to make the online
version as similar as possible to filling out the existing form so our
users don't get confused. For the final submit, the data will be saved
to our DB and the full form will be printed as a PDF for the users records.
I have taken a Word.doc version of this PDF form and saved it as HTML.
I don't know if I can trust this layout for all browser and OS
versions. Are there better ways to convert word to html? How do other
sites handle this?
Is there a php library that allows me to place fields in an existing PDF
which does not have any embedded field names? This would allow users to
save the completed PDF to their hard drives which would be helpful.
If anyone has any thoughts, suggestions or references to existing sites,
it would be much appreciated. I'm looking to get started on the right
foot with this. Thanks.
Regards,
Nicholas Hart
link to PDF: https://www.mptf.org:75/docs/TF2.pdf
------------------------------------------------------------------------
_______________________________________________
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
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: support.vcf
Type: text/x-vcard
Size: 264 bytes
Desc: not available
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070719/72c9e5c0/attachment.vcf>
Nicholas Hart
2007-07-19 19:54:36 UTC
Permalink
Thanks! I have FPDF and FPDI working and they're just what I needed.
Thanks again.
--
Regards,
Nick
Post by Brian Dailey
For Pete's sake, please do not use Word's "Save as HTML" feature. :P It
makes a god-awful mess that won't render properly in most browsers.
My suggestion is thusly: instead of making them fill out a "PDF" form
(which means the fields are afterwards difficult for you to get to),
let them fill out a web form which stores the information in a
database. When you want to print the information out to a PDF file, use
FPDF (http://www.fpdf.org) to inject the information into a PDF file
(via X,Y coordinates) and then output it to the user.
It's much easier and far more flexible this way, and you won't have to
muddle about with Word documents.
- Brian Dailey
Software Developer
New York, NY
www.dailytechnology.net
Post by Nicholas Hart
Hi,
I am looking for the easiest way to put an existing form (PDF) on
the web for very non-tech users to fill out. Currently we have a
form that is downloaded as a PDF and mailed back to us. I need to
make the online version as similar as possible to filling out the
existing form so our users don't get confused. For the final
submit, the data will be saved to our DB and the full form will be
printed as a PDF for the users records.
I have taken a Word.doc version of this PDF form and saved it as
HTML. I don't know if I can trust this layout for all browser and
OS versions. Are there better ways to convert word to html? How
do other sites handle this?
Is there a php library that allows me to place fields in an
existing PDF which does not have any embedded field names? This
would allow users to save the completed PDF to their hard drives
which would be helpful.
If anyone has any thoughts, suggestions or references to existing
sites, it would be much appreciated. I'm looking to get started on
the right foot with this. Thanks.
Regards,
Nicholas Hart
link to PDF: https://www.mptf.org:75/docs/TF2.pdf
------------------------------------------------------------------------
_______________________________________________
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
--
Nicholas Hart
2007-07-19 21:17:00 UTC
Permalink
Hi,

Anyone know a simple way to read-protect a file/library via a php
login? I have a login page which starts a session but there are
certain dynamically created result files which I need to protect from
potential prying eyes.

For example, you can connect to https://www.mptf.org:75/docs/TF2.pdf
but I want to find a way to test your login status before permitting
you to view this file. Let me know what you think. Thanks!

Regards,
Nicholas Hart
Brian Dailey
2007-07-19 22:50:02 UTC
Permalink
Feed it through a PHP page.

Something like:

<?php
if ($_SESSION['Auth'] === true) {
// set headers?
fread('/not/web/accessible/dir/file.pdf');
} else {
echo 'Denied, foo.';
}
?>
Post by Nicholas Hart
Hi,
Anyone know a simple way to read-protect a file/library via a php
login? I have a login page which starts a session but there are certain
dynamically created result files which I need to protect from potential
prying eyes.
For example, you can connect to https://www.mptf.org:75/docs/TF2.pdf but
I want to find a way to test your login status before permitting you to
view this file. Let me know what you think. Thanks!
Regards,
Nicholas Hart
_______________________________________________
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
--
Thanks!
- Brian Dailey
Software Developer
New York, NY
www.dailytechnology.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: support.vcf
Type: text/x-vcard
Size: 264 bytes
Desc: not available
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070719/1f685610/attachment.vcf>
Brian Dailey
2007-07-19 22:56:59 UTC
Permalink
I shouldn't be in such a hurry. On review, use file_get_contents($file).

The point is to put the actual file in a directory that is not web
accessible directly. This prevents people from guessing at the filename
and pulling in your unprotected private information.

I'm not positive, but you'll probably have to set the headers to set it
as an attachment and the mime-type pdf.

- Brian
Post by Brian Dailey
Feed it through a PHP page.
<?php
if ($_SESSION['Auth'] === true) {
// set headers?
fread('/not/web/accessible/dir/file.pdf');
} else {
echo 'Denied, foo.';
}
?>
Post by Nicholas Hart
Hi,
Anyone know a simple way to read-protect a file/library via a php
login? I have a login page which starts a session but there are
certain dynamically created result files which I need to protect from
potential prying eyes.
For example, you can connect to https://www.mptf.org:75/docs/TF2.pdf
but I want to find a way to test your login status before permitting
you to view this file. Let me know what you think. Thanks!
Regards,
Nicholas Hart
_______________________________________________
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
_______________________________________________
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
--
Thanks!
- Brian Dailey
Software Developer
New York, NY
www.dailytechnology.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: support.vcf
Type: text/x-vcard
Size: 264 bytes
Desc: not available
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070719/9cf5528c/attachment.vcf>
Dan Cech
2007-07-19 23:05:47 UTC
Permalink
Post by Brian Dailey
Hi,
Anyone know a simple way to read-protect a file/library via a php login? I have a login page which starts a session but there are certain dynamically created result files which I need to protect from potential prying eyes.
For example, you can connect to https://www.mptf.org:75/docs/TF2.pdf but I want to find a way to test your login status before permitting you to view this file. Let me know what you think. Thanks!
Feed it through a PHP page.
<?php
if ($_SESSION['Auth'] === true) {
// set headers?
fread('/not/web/accessible/dir/file.pdf');
} else {
echo 'Denied, foo.';
}
?>
Yes, you'll definitely want to set the headers, you can do this based on
the extension or use something like the mime_content_type function or
Fileinfo extension.

Also, you can use an apache RewriteRule to force requests for any
documents you want to protect to go to your php script, something like:

RewriteRule ^(.*\.php)$ - [L]
RewriteRule ^(.+)$ protect.php [E=ORIG_FILE:$1,L]

Will force all requests for non-php files to go to your protect.php
script, where you can grab the requested file using the
$_SERVER['REDIRECT_ORIG_FILE'] variable, send the appropriate
Content-Type header and send the file contents.

If anyone has a more elegant way to achieve this or potential security
gotchas I'd love to hear them!

Dan
Greg Rundlett
2007-07-20 02:41:02 UTC
Permalink
Just a note on creating PDF *forms* and not just PDF documents
(although the OP seems to have found success with FPDF
http://www.fpdf.org/ as suggested earlier)

I've seen recently that Scribus is a good PDF form editing tool, as
described in this article
http://business.newsforge.com/article.pl?sid=05/04/06/1545203&tid=152&tid=39&tid=33&tid=111

There are a couple of scribus wikis describing this, and I'm not sure
if there is a canonical version (the wiki or the docs site)?
http://wiki.scribus.net/index.php/Your_first_PDF_form_with_Scribus
http://docs.scribus.net/index.php?lang=en&sm=exportingtopdf&page=examples/cgiform/pdf_form
tedd
2007-07-19 20:46:53 UTC
Permalink
Content-Type: text/html
Content-Description: HTML Version of Message
Content-Disposition: inline
Hi,
I am looking for the easiest way to put an existing form (PDF) on
the web for very non-tech users to fill out. Currently we have a
form that is downloaded as a PDF and mailed back to us. I need to
make the online version as similar as possible to filling out the
existing form so our users don't get confused. For the final
submit, the data will be saved to our DB and the full form will be
printed as a PDF for the users records.
I have taken a Word.doc version of this PDF form and saved it as
HTML. I don't know if I can trust this layout for all browser and
OS versions. Are there better ways to convert word to html? How do
other sites handle this?
Is there a php library that allows me to place fields in an existing
PDF which does not have any embedded field names? This would allow
users to save the completed PDF to their hard drives which would be
helpful.
If anyone has any thoughts, suggestions or references to existing
sites, it would be much appreciated. I'm looking to get started on
the right foot with this. Thanks.
Regards,
Nicholas Hart
Nicholas:

You might try something like this:

http://www.sperling.com/a/pdf/

That's all done with free pdf stuff( i.e., FPDF).

Cheers,

tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
m rutko
2007-06-27 16:25:28 UTC
Permalink
Hi Hans,
For some reason the job list is not allowing me to post on it ,I'm not sure why? And since this is a great opportunity that I'm sure a lot of members would want to know about ,I tried "conversations"

Thanks,

Mike



Hans Zaunere <lists at zaunere.com> wrote:

Hi Mike,

Thanks for the post. However, we do have a NYPHP-Jobs list for job related
posts and conversation.

http://lists.nyphp.org/mailman/listinfo/jobs

Thanks,

H
Post by m rutko
Hi
I'm looking for mid level to senior level developers with LAMP
experience for a long term project in Manhattan.
Sorry no telecommuting, onsite only.
Hourly rate is open.
This is a great opportunity to be part of a very talented team in a
company which is dedicated in using cutting edge technologies.
If you're interested or would like to learn more contact me at
mrutkowski at infotechnologiesinc.com or call 212-710-5534.
Qualified candidates should have a deep background in web software
development and have architected and coded complex software systems
for large-scale Internet sites.
- Building and enhancing high-availability database systems based on
open-source solutions including MySQL
- Architecting software solutions that are robust, scalable, and
maintainable
- Supporting production by helping to troubleshoot software issues on
the site
- Working in tandem with fellow engineers to define software
architectures and technologies to be used
- Evaluate new technologies and implement development best practices.
- 5-7 years of software development experience, including at least 5
years of web development experience
- Significant development experience in the LAMP environment
- Strong background in MySQL, including an understanding of
replication, caching, hot backups, load balancing, redundancy, and
partitioning
- Experience benchmarking, profiling, and identifying slow SQL queries
- Excellent communication skills with both technical and
non-technical audiences Experience developing in C++ or Java (for
patches, performance extensions, and plug-ins), and Unix shell
scripts
- Knowledge of the Sun Solaris operating system
- Familiarity with Oracle
- Programming experience with more esoteric and powerful languages
for data manipulation (Ruby, Python, Haskell, Lisp, Erlang)
- Experience with profiling using tools like DTrace for Solaris or
SystemTap/Valgrind for Linux
- Knowledge of one or more of the following: content management
systems, search engines, e-commerce applications, analytics
applications, ad-serving technology, and email systems
Thanks,
Mike
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
________________________________
Choose the right car based on your needs. Check out Yahoo! Autos new
Car Finder tool.
oDMTE3NWsyMDd2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDY2FyLWZpbmRlcg-->

_______________________________________________
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



---------------------------------
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070627/740ee9e3/attachment.html>
Continue reading on narkive:
Loading...