php-general Digest 14 Aug 2006 07:20:57 -0000 Issue 4292

Topics (messages 240601 through 240618):

Re: Internet Explorer doesn't display UTF-8 page using UTF-8 encoding
        240601 by: Rasmus Lerdorf

Re: How to run one php app from another?
        240602 by: Gerry D

Re: New Large Scale Project.
        240603 by: Jay Blanchard

Re: Chicago PHP Conference
        240604 by: Jay Blanchard

I am receiving multiple same emails!!!
        240605 by: Karl James
        240609 by: Chris
        240611 by: Chris

Re: How to run one php app from another? RECAP
        240606 by: Gerry D

Re: page redirecting
        240607 by: Gerry D

Re: Preventing double-clicks
        240608 by: Gerry D

Re: Unicode
        240610 by: Ligaya Turmelle

Re: Functions
        240612 by: Gerry D

Re: Problem Creating a New SSL Cert in Apache2
        240613 by: Chris

Re: Compiling and iconv
        240614 by: Chris

Re: non-text data
        240615 by: John Meyer
        240616 by: Chris
        240617 by: John Meyer
        240618 by: Dave Shariff Yadallee -  System Administrator a.k.a. The 
Root of the Problem

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 ---
tedd wrote:
At 6:48 PM -0700 8/12/06, Rasmus Lerdorf wrote:
By the way, everyone should be setting a charset. If you don't set it, IE will look at the first 4k of the body of the page and take a wild guess.

-Rasmus

-Rasmus:

Ok, but why doesn't w3c use it?

http://validator.w3.org   (check source)

I'm not sure what to do re charset. I've been told by credible sources to "always use it" and "never use it" -- which is correct? Or, is this one of those "it depends" things?

W3C is all about standards. IE is all about not following standards. If you want your site to work in the real world you should always set a charset. If you set it in your response header there is no need to set it in each page, and if you look closely, you will see that this is what w3.org is doing:

9:55am shiny:~> telnet validator.w3.org 80
Trying 133.27.228.132...
Connected to validator.w3.org.
Escape character is '^]'.
HEAD / HTTP/1.0

HTTP/1.1 200 OK
Date: Sun, 13 Aug 2006 18:42:15 GMT
Server: Apache/2.0.54 (Debian GNU/Linux) mod_perl/1.999.21 Perl/v5.8.4
Accept-Ranges: bytes
Connection: close
Content-Type: text/html; charset=utf-8

-Rasmus

--- End Message ---
--- Begin Message ---
I don't know if you solved this already, but I use it to redirect to
different pages depending on whther the user is logged in or not.

Something like header("location:/page/?p=login"); works fine. You were
on the right track.

Gerry

On 6/15/06, tedd <[EMAIL PROTECTED]> wrote:
Hi gang:

This seems like so obvious a question, I am reluctant to ask.

In any event, I simply want my php application to run another, like so:

switch (option)
   {
   case a:
   run a.php;
   exit;
   break;

   case b:
   run b.php;
   exit;
   break;

   case c:
   run c.php;
   exit;
   break;
  }

I know that from within an application I can run another php application via a user click 
(.e., button), or from javascript event (onclick), or even from cron. But, what if you 
want to run another application from the results of a calculation inside your main 
application without a "user trigger". How do you do that?

I have tried header("Location: http://www.example.com/";); ob_start(), 
ob_flush() and such, but I can't get anything to work.

Is there a way?

Thanks.

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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
[snip]
My other problem is even though I'm confident coding I find design
very difficult I've a good idea of how the website would work but only
in general terms.
[/snip]

Have you ever sat down wit paper and pencil (or Excel or any number of
other tools) and attempted to flowchart a project? It will provide
truckloads of insight, you'd be amazed at how you can break down a
project into discrete modules that will make things easier to swallow. 

--- End Message ---
--- Begin Message ---
[snip]
I'm in the pre-planning phase of organizing a PHP Conference in Chicago.
[/snip]

Capital idea Richard, thanks for making this more formal.

--- End Message ---
--- Begin Message ---
Team,

I unsubscribe and subscribe later on.

I am still receiving multiple emails from the same user.

How do I stop this madness. I do not want to unsubscribe from

This mailing list. 

 

Karl James ("TheSaint")
 <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
 <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]

www.theufl.com

 

 


--- End Message ---
--- Begin Message ---
Karl James wrote:
Team,

I unsubscribe and subscribe later on.

I am still receiving multiple emails from the same user.

From this mailing list or from a particular subscriber?

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

--- End Message ---
--- Begin Message ---
Karl James wrote:
Chris,
I am not sure.
How do I find out?
I am looking in the header and I see this.

-----------------------------------------------------
From: [EMAIL PROTECTED]
To Karl James
CC [EMAIL PROTECTED]
Subject Re:[PHP] I am receiving multiple same emails.
-----------------------------------------------------

Firstly always cc the list.

You're receiving the email once from me and once from the mailing list by the sounds of it.

Email list-help: <mailto:[EMAIL PROTECTED]>

and there should be an option to turn that off.

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

--- End Message ---
--- Begin Message ---
On 6/16/06, tedd <[EMAIL PROTECTED]> wrote:
At 2:35 PM +0200 6/16/06, Barry wrote:
>But once output is made. You can't remove it.
>
>That isn't possible with PHP.

I think I get it now.

PHP does everything before the user see's anything. Any links (direct or via a 
form) are objects that the browser can act upon per the user through html or 
js, but not php. Interesting.

Perfectly doable in PHP. Just have the form action go to a new php
script and do your logic, then use header("location:...") to redirect.

Gerry

--- End Message ---
--- Begin Message ---
On 6/28/06, Richard Lynch <[EMAIL PROTECTED]> wrote:
On Wed, June 28, 2006 5:17 am, kristianto adi widiatmoko wrote:
> i need to redirecting page, it could be done by using header function
> like this
>
> header("Location : page2.php?var1=foo");

Then, the URL should be a full, complete URL, and not just a local
reference.

Sure you can use a local page, I do it all the time.

You could just use session_start() at the top of both pages, and slam
the data into $_SESSION, and then your Location: redirect would "work"

Yep.

Gerry

--- End Message ---
--- Begin Message ---
Jay,

I use a technique to prevent hitting the "back" button and
resubmitting data. I use a 2-script process, one with the form and
"submit" button (I set a session var here), and a second form (the
"action" script). The action script makes sure the session variable is
set, processes the info, then clears the session var. If the session
var is not set, an error is displayed.

Gerry

On 6/26/06, Jay Blanchard <[EMAIL PROTECTED]> wrote:
I am going to do some thinking (typing) out loud here because I need to
come up with a solution to double-clicking on a form button issue.

The steps are;

1. Fill out form
2. Click 'Submit'
3. Data gets stored (including unique data and time stamp data in this
case....which should work out well)
If the process sees the unique data and a timestamp sometime within the
last minute it should ignore the subsequent attempt.
4. A reply is returned to the user based on the first click. The data
returned to the user would be different for each click, that is why this
is so important. The first data returned is the correct data.

My confusion is in this (as I have mentioned in the past couple of
weeks, most of the confusion is as a result of a lack of rest, which
leads to not thinking clearly, which leads to me feeling ignorant); upon
the second click, where I check to see if the data has been entered and
find that it has how do I get it to return the data back to the user. I
think I see it now......let's see.....if I;

Select * from foo where data is what it is and time is within last
interval that I decide upon;

if(1 == mysql_num_rows(that query up there)){
   get that data for return to the user;
} else {
   Insert data, do calcs, return data back to user;
}

Does that look reasonable, or am I missing something?

Thanks for any insight!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
tedd wrote:
At 7:08 PM -0700 6/4/06, Rasmus Lerdorf wrote:

Larry Garfield wrote:

In C or C++, yes.  In PHP, do not assume the same string->number mapping.  
Numeric definition is irrelevant.

Right, and now bring Unicode into the picture and this becomes even more true.


-Rasmus

I know there's always RTFM, but if you would care to discuss it, I would like 
to know why. How does php handle Unicode code-points and char-sets?

Thanks.

tedd
From what little I understand (and I could be wrong - been a while)- it doesn't. PHP < 6 works in bytes unless you have the mb extension going and then it fakes it. it doesn't look for code points or charsets.

--

life is a game... so have fun.

--- End Message ---
--- Begin Message ---
On 6/30/06, Richard Lynch <[EMAIL PROTECTED]> wrote:

#2. Don't alter the case of the input data, if at all possible.
Accept what the user has given, and take it as it is.  You can make
your application not care about case, and you can format the case on
ouput (maybe even with fancy CSS stuff) but don't mess with their
input.

Why not clean up crappy input right at the source, Richard?

Gerry

--- End Message ---
--- Begin Message ---
Mike wrote:
Windows Server
Apache2
OpenSSL

I am new to working with SSL Certs so I am sure I did something wrong
somewhere. Where???? I have no idea!

We needed an SSL Cert for our website. I created the CSR using

openssl req -new -out uwm.csr

answered all of the questions, went to GoDaddy and did a copy and paste into
their text area, and created a certificate. I took the output of the
certificate key, created a notepad file, copied the text into the file, and
named it uwm.crt.

I restarted apache and it would not start. Using the expired cert, apache
worked.

Check the apache error logs, it should contain information about what's wrong. It could be as simple as different permissions on the different certificate files.

TBH though you're better off jumping on an apache list and asking there, they will be able to help you a lot more.

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

--- End Message ---
--- Begin Message ---
Ray Hauge wrote:
I use Slackware linux, and XMLRPC is not compiled in by default with my distro, so I'm compiling PHP myself. It's always been a simple enough task. First I get and install the required xmlrpc-epi libraries, and then I compile PHP telling it where I just installed them. Now I get this error message:

undefined reference to `libiconv'

when compiling PHP. I did some searching, and the only thing I've found in reference to this error was a bug in version 4.3.10. Has anyone run into this issue, or have some suggestions?

I have checked that /usr/include/iconv.h is there, and it defines all the iconv_* and iconv compiler flags etc. I can also vouch that using iconv on the command line works just fine.

Try explicitly telling php where iconv is by adding this option to your configure command:

--with-iconv-dir=/usr

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

--- End Message ---
--- Begin Message ---
Gd,
BTW, came into this late, have we gotten the old "store your images in the
filesystem and save the file name in the database" argument yet?

-----Original Message-----
From: Dave Shariff Yadallee - System Administrator a.k.a. The Root of the
Problem [mailto:[EMAIL PROTECTED] 
Sent: Sunday, August 13, 2006 10:21 PM
To: Chris
Cc: [email protected]
Subject: Re: non-text data

On Mon, Aug 14, 2006 at 10:42:50AM +1000, Chris wrote:
> Dave Shariff Yadallee - System Administrator a.k.a. The Root of the 
> Problem wrote:
> >I use SELECT all from * ... and one row is a gif.
> >
> >How do I get that gif to appear as a gif and not text?
> 
> In your connecting programming language.
> 
> Mysql doesn't know or care whether it's a gif, pdf, word doc or 
> anything else.
> 
> Whatever programming language you are using to connect to mysql and 
> fetch the data will be able to convert that binary data and display an 
> image.
>

PHP?
 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 
> --
> This message has been scanned for viruses and dangerous content by 
> MailScanner, and is believed to be clean.
> 

--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
John Meyer wrote:
Gd,
BTW, came into this late, have we gotten the old "store your images in the
filesystem and save the file name in the database" argument yet?

Nope, haven't done that one yet, do you want to start it off or shall I? ;)

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

--- End Message ---
--- Begin Message ---
Depends on how pugnacious I'm feeling, awscrewit, you go for it.

-----Original Message-----
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Sunday, August 13, 2006 10:41 PM
To: John Meyer
Cc: 'Dave Shariff Yadallee - System Administrator a.k.a. The Root of the
Problem'; '[php] PHP General List'
Subject: Re: [PHP] RE: non-text data

John Meyer wrote:
> Gd,
> BTW, came into this late, have we gotten the old "store your images in 
> the filesystem and save the file name in the database" argument yet?

Nope, haven't done that one yet, do you want to start it off or shall I? ;)

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

--- End Message ---
--- Begin Message ---
On Mon, Aug 14, 2006 at 02:40:53PM +1000, Chris wrote:
> John Meyer wrote:
> >Gd,
> >BTW, came into this late, have we gotten the old "store your images in the
> >filesystem and save the file name in the database" argument yet?
> 
> Nope, haven't done that one yet, do you want to start it off or shall I? ;)
> 
> -- 
> Postgresql & php tutorials
> http://www.designmagick.com/
>

Careful where you light your match.

You may blow up if you are not careful.
 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--- End Message ---

Reply via email to