php-general Digest 28 Sep 2008 17:01:40 -0000 Issue 5707

Topics (messages 281065 through 281075):

Concatenating PDF using FPDI
        281065 by: giga501

Re: How to submit form via PHP
        281066 by: Ashley Sheridan
        281069 by: Per Jessen
        281070 by: Dotan Cohen

error warning while connecting to posgreSQL
        281067 by: Alain Roger
        281068 by: Ashley Sheridan
        281071 by: Alain Roger
        281075 by: Nathan Rixham

Re: PHP + Cron jobs
        281072 by: Waynn Lue

Re: The Data Literacy Test: Interpretation Added
        281073 by: tedd

Re: Sepating MySQL result set into html tables
        281074 by: tedd

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 ---
Hi -

I am trying to attach a pre-defined PDF to a file generated at runtime
(invoice.pdf). 
I have attached the test.php that I used to concatenate 2 pdfs. 
http://www.nabble.com/file/p19709464/test.php test.php 

I have also verified that I have the latest version of FPDF and FPDI.
However, here is the error I get on executing the file on my server (shared
host using CPanel) :
FPDF error: Unable to find xref table - Maybe a Problem with
'auto_detect_line_endings'

The functionality works fine on my localhost (WAMPServer, WinXP), so I am
wondering if there are any other server parameters to look at ?

Any ideas on what is wrong here? Thanks in advance. 
-- 
View this message in context: 
http://www.nabble.com/Concatenating-PDF-using-FPDI-tp19709464p19709464.html
Sent from the PHP - General mailing list archive at Nabble.com.


--- End Message ---
--- Begin Message ---
On Sat, 2008-09-27 at 21:37 -0700, Waynn Lue wrote:
> >No it doesn't... without an action statement...
> 
> Sorry to drag up an old thread, but I just saw this. Is that true of
> all browsers? I'm wondering because I just coded a site to use this
> behavior, then I saw that the html specification says the action
> attribute is required.
> 
> Thanks,
> Waynn
> 
> On 8/15/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Fri, 2008-08-15 at 13:30 -0500, Jay Blanchard wrote:
> >> [snip]
> >> Hello. I'm pretty noob in PHP and would like to know how can I submit
> >> some HTML form got via file_get_contents(URL). For example:
> >>
> >> <form name="someform" method="post">
> >> <input type="submit">
> >> </form>
> >>
> >> so how can I submit 'someform' form.
> >>
> >> Thanks in advance for any suggestions.
> >> [/snip]
> >>
> >> Click 'Submit'
> >>
> >>
> >>
> >> Your form tag needs an action statement
> >
> > No it doesn't... without an action statement it will submit to the same
> > URL in which it was presented.
> >
> > Cheers,
> > Rob.
> > --
> > http://www.interjinn.com
> > Application and Templating Framework for PHP
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
Without the action attribute, the form submits to itself, i.e. a form on
contact.php submits to contact.php without an action attribute being
specified.


Ash
www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
Ashley Sheridan wrote:

> Without the action attribute, the form submits to itself, i.e. a form
> on contact.php submits to contact.php without an action attribute
> being specified.

Yes, not specifying the action attribute is the same as having an empty
action attribute.  I don't know if all browsers interpret it that way,
but it does seem a reasonable assumption.


/Per Jessen, Zürich


--- End Message ---
--- Begin Message ---
2008/9/28 Ashley Sheridan <[EMAIL PROTECTED]>:
>> Sorry to drag up an old thread, but I just saw this. Is that true of
>> all browsers? I'm wondering because I just coded a site to use this
>> behavior, then I saw that the html specification says the action
>> attribute is required.
>>
> Without the action attribute, the form submits to itself, i.e. a form on
> contact.php submits to contact.php without an action attribute being
> specified.
>

If it's undocumented then I would not rely upon it. How much trouble
did we have in the early 00's because of sites that were coded for the
undocumented 'features' of specific browsers five years prior?
Additionally, if you cannot test all the varied platforms (PC,
cellphones, iPhone, PS3, browsers for the disabled) then you should
not rely on undocumented behaviour.

Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

ä-ö-ü-ß-Ä-Ö-Ü

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

i try to understand the error_reporting statement and to avoid all warning
or error messages.
for example i stop the postgresql service and i try to connect to it.
when error_reporting is set to E_ALL, i get the following warning :
*Warning*: pg_connect()
[function.pg-connect<https://192.168.1.2/se_admin/en/logon/function.pg-connect>]:
Unable to connect to PostgreSQL server: could not connect to server:
Connection refused (0x0000274D/10061) Is the server running on host
"localhost" and accepting TCP/IP connections on port 5432? in *
L:\Webserver\se\log\checklogin.php* on line *48*
Couldn't Connect:

but if i have the error_reporting set to 0, i only get my die message
"Couldn't connect".

i would like to know if i let the setting "E_ALL" do i have a way how to not
display the warning message to end users but to display only "Couldn't
connect" ?
in fact to have the same behavior as error_reporting set to 0.
thx.

-- 
Alain
------------------------------------
Windows XP SP3
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008

--- End Message ---
--- Begin Message ---
On Sun, 2008-09-28 at 11:00 +0200, Alain Roger wrote:
> Hi,
> 
> i try to understand the error_reporting statement and to avoid all warning
> or error messages.
> for example i stop the postgresql service and i try to connect to it.
> when error_reporting is set to E_ALL, i get the following warning :
> *Warning*: pg_connect()
> [function.pg-connect<https://192.168.1.2/se_admin/en/logon/function.pg-connect>]:
> Unable to connect to PostgreSQL server: could not connect to server:
> Connection refused (0x0000274D/10061) Is the server running on host
> "localhost" and accepting TCP/IP connections on port 5432? in *
> L:\Webserver\se\log\checklogin.php* on line *48*
> Couldn't Connect:
> 
> but if i have the error_reporting set to 0, i only get my die message
> "Couldn't connect".
> 
> i would like to know if i let the setting "E_ALL" do i have a way how to not
> display the warning message to end users but to display only "Couldn't
> connect" ?
> in fact to have the same behavior as error_reporting set to 0.
> thx.
> 
I don't think you set error reporting to an actual number in the
php.ini. It should read something like

error_reporting = E_ALL & ~E_WARNING

if you want all errors but not the warnings.


Ash
www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
i only set it via php code like error_reporting(0);


On Sun, Sep 28, 2008 at 11:11 AM, Ashley Sheridan
<[EMAIL PROTECTED]>wrote:

> On Sun, 2008-09-28 at 11:00 +0200, Alain Roger wrote:
> > Hi,
> >
> > i try to understand the error_reporting statement and to avoid all
> warning
> > or error messages.
> > for example i stop the postgresql service and i try to connect to it.
> > when error_reporting is set to E_ALL, i get the following warning :
> > *Warning*: pg_connect()
> > [function.pg-connect<
> https://192.168.1.2/se_admin/en/logon/function.pg-connect>]:
> > Unable to connect to PostgreSQL server: could not connect to server:
> > Connection refused (0x0000274D/10061) Is the server running on host
> > "localhost" and accepting TCP/IP connections on port 5432? in *
> > L:\Webserver\se\log\checklogin.php* on line *48*
> > Couldn't Connect:
> >
> > but if i have the error_reporting set to 0, i only get my die message
> > "Couldn't connect".
> >
> > i would like to know if i let the setting "E_ALL" do i have a way how to
> not
> > display the warning message to end users but to display only "Couldn't
> > connect" ?
> > in fact to have the same behavior as error_reporting set to 0.
> > thx.
> >
> I don't think you set error reporting to an actual number in the
> php.ini. It should read something like
>
> error_reporting = E_ALL & ~E_WARNING
>
> if you want all errors but not the warnings.
>
>
> Ash
> www.ashleysheridan.co.uk
>
>


-- 
Alain
------------------------------------
Windows XP SP3
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008

--- End Message ---
--- Begin Message ---
Alain Roger wrote:
Hi,

i try to understand the error_reporting statement and to avoid all warning
or error messages.
for example i stop the postgresql service and i try to connect to it.
when error_reporting is set to E_ALL, i get the following warning :
*Warning*: pg_connect()
[function.pg-connect<https://192.168.1.2/se_admin/en/logon/function.pg-connect>]:
Unable to connect to PostgreSQL server: could not connect to server:
Connection refused (0x0000274D/10061) Is the server running on host
"localhost" and accepting TCP/IP connections on port 5432? in *
L:\Webserver\se\log\checklogin.php* on line *48*
Couldn't Connect:

but if i have the error_reporting set to 0, i only get my die message
"Couldn't connect".

i would like to know if i let the setting "E_ALL" do i have a way how to not
display the warning message to end users but to display only "Couldn't
connect" ?
in fact to have the same behavior as error_reporting set to 0.
thx.


you could always just turn display_errors off; thus you die messages will be shown to users and the real error's saved in the error log files..
--- End Message ---
--- Begin Message ---
Yup, you're completely right.  I checked the cronjob and got this:

PHP 5.2.6 (cgi) (built: Aug 11 2008 13:39:32)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
   with Advanced PHP Debugger (APD) v0.9, , by George Schlossnagle

Turns out there's /usr/bin/php, which is the cgi version, and
/usr/local/bin/php, which is the cli version.  So I see three possiblities.
1. Change the shebang on the php script itself, 2. change the crontab to
reflect to path I care about, or 3. replace /usr/bin/php.  I'd prefer the
3rd, but does that cause problems for me in my actual web pages?

Thanks,
Waynn

--- End Message ---
--- Begin Message ---
At 9:29 AM +0800 9/28/08, Shelley wrote:
2008/9/28 tedd <<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]>

At 1:06 PM +0800 9/27/08, Shelley wrote:

2008/9/26 tedd <<mailto:<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]><mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]>

there are three that you apparently don't know.

??? What is "three", excuse me?


You say in your link:

"20-24 Your are an expert blah blah..."

So you know 24 of them.

I say there are 27 -- so, the three are 25, 26 and 27.

Everybody may have his own three, obviously.  :)

No, what is obvious is that there are three. While the three may vary from layman to layman, they should not vary from programer to programmer. There simply are three terms that "your" expert programers don't know.

I was trying to help, but on second thought forget it.

Cheers,

tedd

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

--- End Message ---
--- Begin Message ---
At 8:32 PM +0300 9/26/08, Thodoris wrote:

Yes it will but I will make this better along with other things as long as I find the needed algorithm.

--
Thodoris

http://webbytedd.com/bbb/paging/

The code is there.

Cheers,

tedd

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

--- End Message ---

Reply via email to