php-general Digest 1 Aug 2004 00:12:46 -0000 Issue 2910

Topics (messages 192392 through 192422):

Re: db transactions across multiple pages...
        192392 by: bruce
        192395 by: Tularis
        192400 by: Curt Zirzow
        192404 by: bruce
        192405 by: bruce
        192412 by: Curt Zirzow

Re: php4.3.7 + phpBB 2.0.10 + Apache - zero sized replies with no hits/errors logged 
by apache
        192393 by: Jason Wong
        192401 by: ADFH
        192403 by: Curt Zirzow
        192409 by: ADFH

Re: Page load based on logic
        192394 by: Michael Harding
        192417 by: Justin Patrin

mail() function not working
        192396 by: Robin Wilson
        192397 by: raditha dissanayake
        192406 by: Matthew Sims
        192418 by: Justin Patrin

Re: Means of collecting HTTP response headers
        192398 by: Burhan Khalid
        192399 by: Curt Zirzow

Re: PHP5 Manual in PDF and for Pocket PCs
        192402 by: Chris Martin

Re: Sending E-mail From Mail
        192407 by: Matthew Sims

Variables not passed to next page
        192408 by: Andre Dubuc
        192410 by: Jason Wong
        192411 by: Andre Dubuc

Re: Mail() not working
        192413 by: Robin Wilson
        192414 by: Jason Wong
        192415 by: Tularis

ImageColorAllocate Problem
        192416 by: Kevin

SPAMCEASE ???
        192419 by: Monty

function similar to to sizeof
        192420 by: bruce

Invisible watermarking / GD2
        192421 by: Joseph Hill

Still need help with regex function
        192422 by: C.F. Scheidecker Antunes

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 ---
yeah...

i saw that write up. i've also inquired with bugs.mysql as to if/whether
this might be reinserted.. we'll see.

that said, it appears that there would need to be an approach similar to the
apache::dbi mod for perl, where you have an app that essentially does
connection pooling. in this model, an intermediate app becomes the app that
has the connection with the mysql server, and never shuts down. the web app
would 'talk' to the intermediate app to get the connection id/handle,
ensuring that the web app could get the same handle for all subsequent mysql
interaction on the pages of the web app....

ie....
      +<----------->app1>>>>+
      |                     v
    mysql    <----------- pool app
      |                     ^
      +<----------->app2>>>>+

in this case app1/app2 are both web apps running on apache
app1/app2 would talk to the 'pool app' to get the initial mysql db 'handle'.
the handle is stored/maintained for the life of the client web app.
once the pool app gets the handle, the web app fetches the handle at the
start of every page that has to perform db functions with mysql. subsequent
db functions for the page are then performed between the web app and mysql,
using the handle provided by the pool app....

that's the theory, not sure how it would work, or what other issues would
be. but if it did work, it could be extended to support any given web
app/server that needed to be able to maintain the connection with the db
over multiple pages...

-bruce


-----Original Message-----
From: Jim Grill [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 10:48 PM
To: [EMAIL PROTECTED]; 'John Nichel'; [EMAIL PROTECTED]
Subject: Re: [PHP] db transactions across multiple pages...


It's my understanding that persistent connections via the old ext/mysql was
a  flawed misfeature to begin with. This was one of several misfeatrures
corrected by the new mysqli extension. There is some information on the
subject here: http://www.zend.com/php5/articles/php5-mysqli.php

It would be my guess that pconnect will be a thing of the past. It's sort of
a drag, but running out of connections - as pconnect can cause - is a real
drag too. ;)

Jim Grill
Web-1 Hosting
http://www.web-1hosting.net

----- Original Message -----
From: "bruce" <[EMAIL PROTECTED]>
To: "'John Nichel'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, July 31, 2004 12:10 AM
Subject: RE: [PHP] db transactions across multiple pages...


> you also won't see the mysqli pconnect function... which tells me that at
> least for now, it's not there...
>
> -bruce
>
>
> -----Original Message-----
> From: John Nichel [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 30, 2004 8:44 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] db transactions across multiple pages...
>
>
> bruce wrote:
> > not sure if it's php/mysqli... but if you check the php.net for the
> "mysqli"
> > not "mysql" functions... you won't see the persistent attribute listed
for
> > the php.ini attributes...
>
> I wouldn't worry too much about that though.  I mean if persistant
> connections are required for transactions, I'm sure it will be there.
> The only reason we may not be seeing it now is because the PHP5
> documentation is full of holes (with it not being a production release
> yet).  I know of a few items that are available in PHP5 that aren't
> documented on php.net yet.
>
> --
> By-Tor.com
> It's all about the Rush
> http://www.by-tor.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message --- you could write such a thing, in php, yourself aswell... wouldn't be that hard :)

- Tul
Bruce wrote:
yeah...

i saw that write up. i've also inquired with bugs.mysql as to if/whether
this might be reinserted.. we'll see.

that said, it appears that there would need to be an approach similar to the
apache::dbi mod for perl, where you have an app that essentially does
connection pooling. in this model, an intermediate app becomes the app that
has the connection with the mysql server, and never shuts down. the web app
would 'talk' to the intermediate app to get the connection id/handle,
ensuring that the web app could get the same handle for all subsequent mysql
interaction on the pages of the web app....

ie....
      +<----------->app1>>>>+
      |                     v
    mysql    <----------- pool app
      |                     ^
      +<----------->app2>>>>+

in this case app1/app2 are both web apps running on apache
app1/app2 would talk to the 'pool app' to get the initial mysql db 'handle'.
the handle is stored/maintained for the life of the client web app.
once the pool app gets the handle, the web app fetches the handle at the
start of every page that has to perform db functions with mysql. subsequent
db functions for the page are then performed between the web app and mysql,
using the handle provided by the pool app....

that's the theory, not sure how it would work, or what other issues would
be. but if it did work, it could be extended to support any given web
app/server that needed to be able to maintain the connection with the db
over multiple pages...

-bruce


-----Original Message----- From: Jim Grill [mailto:[EMAIL PROTECTED] Sent: Friday, July 30, 2004 10:48 PM To: [EMAIL PROTECTED]; 'John Nichel'; [EMAIL PROTECTED] Subject: Re: [PHP] db transactions across multiple pages...


It's my understanding that persistent connections via the old ext/mysql was a flawed misfeature to begin with. This was one of several misfeatrures corrected by the new mysqli extension. There is some information on the subject here: http://www.zend.com/php5/articles/php5-mysqli.php

It would be my guess that pconnect will be a thing of the past. It's sort of
a drag, but running out of connections - as pconnect can cause - is a real
drag too. ;)

Jim Grill
Web-1 Hosting
http://www.web-1hosting.net

----- Original Message -----
From: "bruce" <[EMAIL PROTECTED]>
To: "'John Nichel'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, July 31, 2004 12:10 AM
Subject: RE: [PHP] db transactions across multiple pages...



you also won't see the mysqli pconnect function... which tells me that at
least for now, it's not there...

-bruce


-----Original Message----- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Friday, July 30, 2004 8:44 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] db transactions across multiple pages...


bruce wrote:

not sure if it's php/mysqli... but if you check the php.net for the

"mysqli"

not "mysql" functions... you won't see the persistent attribute listed

for

the php.ini attributes...

I wouldn't worry too much about that though. I mean if persistant connections are required for transactions, I'm sure it will be there. The only reason we may not be seeing it now is because the PHP5 documentation is full of holes (with it not being a production release yet). I know of a few items that are available in PHP5 that aren't documented on php.net yet.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com

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

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



--- End Message ---
--- Begin Message ---
* Thus wrote bruce:
> yeah...
> 
> i saw that write up. i've also inquired with bugs.mysql as to if/whether
> this might be reinserted.. we'll see.

You don't need persistant connections with the method you describe.
The pool app simply manages multiple connections.




Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

--- End Message ---
--- Begin Message ---
curt...

the method i described allows one to essentially have/maintain persistent
connections...

-----Original Message-----
From: Curt Zirzow [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 31, 2004 8:59 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] db transactions across multiple pages...


* Thus wrote bruce:
> yeah...
>
> i saw that write up. i've also inquired with bugs.mysql as to if/whether
> this might be reinserted.. we'll see.

You don't need persistant connections with the method you describe.
The pool app simply manages multiple connections.




Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

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

--- End Message ---
--- Begin Message ---
the method i described gives the user/app a potential way of
establsihing/maintaining/using the same connection thoughout the life of the
web app/session...

with this approach, one could possible have the 'persistent' conection
handle to the db that i've been talking about... which would then allow for
transactional processing across multiple pages within a web app....



-----Original Message-----
From: Curt Zirzow [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 31, 2004 8:59 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] db transactions across multiple pages...


* Thus wrote bruce:
> yeah...
>
> i saw that write up. i've also inquired with bugs.mysql as to if/whether
> this might be reinserted.. we'll see.

You don't need persistant connections with the method you describe.
The pool app simply manages multiple connections.




Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

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

--- End Message ---
--- Begin Message ---
* Thus wrote bruce:
> the method i described gives the user/app a potential way of
> establsihing/maintaining/using the same connection thoughout the life of the
> web app/session...
> 
> with this approach, one could possible have the 'persistent' conection
> handle to the db that i've been talking about... which would then allow for
> transactional processing across multiple pages within a web app....

There are several issues that would have need to be handled to name
a few:

- what happens when you have 1000 visitors in an hours time span?
  you would need to be able to support that many connections to
  the database at one time.

- Since http is stateless, you have no guarantee that a specific
  transaction will ever get committed. And possibly you're connection 
  pool can grow to an endless number, without some sort of other
  layer that handles this.


Unless this is a web application that is in a controlled
environment, the above issues cannot be resolve very easily. 

Although I've probably been able to use something like this in the
past, the implentation is more complicted than the benefits that
are provided; and in paticular with a web application.  I tend to
usually change the logic so as to adhere to the limitations of a
stateless environment.


btw, pconnect isn't a mysql feature, it is a feature of php.


Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

--- End Message ---
--- Begin Message ---
On Saturday 31 July 2004 17:41, ADFH wrote:
> My IHP, Netset, currently went into what I think is Chapter 7.
> I was stuck without a host for my messageboard..
> Someone steps in and offers me a host.. cool.. I have a SQL dump..
>
> I install phpBB, I import the data, I go to log in...
> I get a zero sized response from apache!
> Check the error logs.. nothing..
> Check the hit logs.. nothing..

So everything else works fine except phpBB?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
"I'd love to go out with you, but the man on television told me to say tuned."
*/

--- End Message ---
--- Begin Message ---
> So everything else works fine except phpBB?

Would seem so - but even if it is phpBB, it shouldn't be able to cause a
fault that would cause apache to completely ignore the hit, no?

Ie. some barf report should be generated somewhere..

... I'm trying to figure out:

A. Why the same data with same php code works fine on one system
   ... and doesn't on another.

B. Where I'd find out what exactly is barfing.

--- End Message ---
--- Begin Message ---
* Thus wrote ADFH:
> > So everything else works fine except phpBB?
> 
> Would seem so - but even if it is phpBB, it shouldn't be able to cause a
> fault that would cause apache to completely ignore the hit, no?

Be sure to check common error logs, ie: apache/error_log,
/var/log/messages ..

> 
> Ie. some barf report should be generated somewhere..
> 
> ... I'm trying to figure out:
> 
> A. Why the same data with same php code works fine on one system
>    ... and doesn't on another.
> 
> B. Where I'd find out what exactly is barfing.

The most common issue with this is the differences between php.ini
settings.  Do a comparison on the ini files that work vs. the one
that doesnt.  Be sure also that there aren't any special apache
directives that override php.ini, like php_admin_flag <php_option>
off



Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

--- End Message ---
--- Begin Message ---
> Be sure to check common error logs, ie: apache/error_log,
> /var/log/messages ..

I'll forward this onto the person who admin's the server - I don't have
root access, so don't have rights to the log files in question.

Other than usual boot messages, dmesg says:

sending pkt_too_big (len[1500] pmtu[1460]) to self
...
sending pkt_too_big (len[1500] pmtu[1460]) to self
hda: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
hda: drive_cmd: error=0x04 { DriveStatusError }
sending pkt_too_big (len[1492] pmtu[1460]) to self
...
sending pkt_too_big (len[1500] pmtu[1492]) to self

System is a RH9 (Shrike) box, apache appears custom compiled, as does php.
I get access to my VWS config through cPanel X.

> The most common issue with this is the differences between php.ini
> settings.  Do a comparison on the ini files that work vs. the one
> that doesnt.  Be sure also that there aren't any special apache
> directives that override php.ini, like php_admin_flag <php_option>
> off

Taking the two php.ini files, stripping the white space, stripping all
comments and sorting them alphabetically (destroys sections but shows
differences in directives), I get the following... any suggestions?:
( < In working only
  > In non-working only )


< allow_url_fopen = On

< [com]
< [Crack]
< [dbx]
< dbx.colnames_case = "unchanged"

> [Debugger]
> debugger.enabled = False
> debugger.host = localhost
> debugger.port = 7869

< default_socket_timeout = 60

< disable_classes =

> error_log = error_log
> error_log = error_log

< [exif]

< extension=mysql.so

> extension_dir = ./

< [FrontBase]

> highlight.bg = #FFFFFF
> highlight.comment = #FF8000
> highlight.default = #0000BB
> highlight.html = #000000
> highlight.keyword = #007700
> highlight.string = #DD0000

< ignore_repeated_errors = Off
< ignore_repeated_source = Off

> include_path = ".:/usr/lib/php:/usr/local/lib/php"

< log_errors_max_len = 1024
< log_errors = Off

> log_errors = On
> [Logging]

< max_input_time = 60
< [mbstring]

< mssql.secure_connection = Off

< mysql.connect_timeout = 60

< mysql.trace_mode = Off

< odbc.allow_persistent = On
< odbc.check_persistent = On
< odbc.defaultbinmode = 1 
< odbc.defaultlrl = 4096 
< odbc.max_links = -1 
< odbc.max_persistent = -1

< pfpro.defaulthost = "test-payflow.verisign.com"

> pfpro.defaulthost = "test.signio.com"

< pgsql.auto_reset_persistent = Off 
< pgsql.ignore_notice = 0
< pgsql.log_notice = 0

< post_max_size = 8M
< precision = 12
< [Printer]

> post_max_size = 55M
> precision = 14

< register_globals = Off
< report_memleaks = On

> register_globals = On

< safe_mode_gid = Off
< safe_mode_include_dir = 

< serialize_precision = 100

> sendmail_path = /usr/sbin/sendmail -t -i

< session.bug_compat_42 = 1
< session.bug_compat_warn = 1

< session.gc_divisor = 100

< session.save_path = /var/lib/php4

> session.save_path = /tmp

< session.use_trans_sid = 0

> session.use_trans_sid = 1

< SMTP = localhost
< smtp_port = 25
< [Sockets]
< sockets.use_system_read = On

< unserialize_callback_func=

> uodbc.allow_persistent = On
> uodbc.check_persistent = On
> uodbc.defaultbinmode = 1
> uodbc.defaultlrl = 4096
> uodbc.max_links = -1
> uodbc.max_persistent = -1

< url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

< y2k_compliance = On
< zlib.output_compression = Off

> warn_plus_overloading = Off
> y2k_compliance = Off
> [Zend]
> zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-2.5.0
> zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-2.5.0
> zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
> zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
> zend_optimizer.optimization_level=15

--- End Message ---
--- Begin Message ---
Huh?  I don't understand.

Sorry...

--- End Message ---
--- Begin Message ---
On Sat, 31 Jul 2004 01:58:48 -0400, Michael Harding
<[EMAIL PROTECTED]> wrote:
> Thank you.
> 
> You suggestion will work for some cases.  However it doesn't actually load a
> different page.  Sometime I will need to load a completely new URL instead
> of just a local PHP page...ie: www.somepage.com.
> 

If you want the user to actually see a different URL, then you *must*
redirect them using a Location header or a meta refresh or javascript.

If all you want is to display the content from another page within
your script (but why you'd want to do this I don't know....all of its
internal links would probably be broken), you should be able to do:
readfile('http://example.com');

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

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

I am not a php programmer but have installed a php based blog. When the php
script tries to use the mail() function it fails. Does the mail function
rely on the sendmail server? Is there a way to make the mail() function just
send via an external smtp server?

Thanks in advance

Robin


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.732 / Virus Database: 486 - Release Date: 29/07/04

--- End Message ---
--- Begin Message ---
Robin Wilson wrote:

Hi

I am not a php programmer but have installed a php based blog. When the php
script tries to use the mail() function it fails.


what error message does it produce?

Does the mail function
rely on the sendmail server?

no works with any mta.

Is there a way to make the mail() function just
send via an external smtp server?


yes edit your php.ini

Thanks in advance

Robin




-- Raditha Dissanayake. ------------------------------------------------------------------------ http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar.

--- End Message ---
--- Begin Message ---
> Hi
>
> I am not a php programmer but have installed a php based blog. When the
> php
> script tries to use the mail() function it fails. Does the mail function
> rely on the sendmail server? Is there a way to make the mail() function
> just
> send via an external smtp server?
>
> Thanks in advance
>
> Robin

First things first...can you send mail from this server? The server needs
to have some sort of MTA installed (sendmail,Qmail,Exim,etc) before you
can use the mail() function.

-- 
--Matthew Sims
--<http://killermookie.org>

--- End Message ---
--- Begin Message ---
On Sat, 31 Jul 2004 16:15:41 +0100, Robin Wilson <[EMAIL PROTECTED]> wrote:
> Hi
> 
> I am not a php programmer but have installed a php based blog. When the php
> script tries to use the mail() function it fails. Does the mail function
> rely on the sendmail server? Is there a way to make the mail() function just
> send via an external smtp server?
> 

Are you running this on Linux or Windows? On Linux, you must have a
local MTA installed to use mail(). On Windows, you must setup an
external SMTP server in your php.ini.

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

--- End Message ---
--- Begin Message --- Curt Zirzow wrote:
* Thus wrote Gerard Samuel:

On Friday 30 July 2004 01:32 pm, Gerard Samuel wrote:

A means that is not specifically tied to Apache functions.
Just looking for a way so that it works no matter the webserver.


Seems like the function stream_get_meta_data() will fill the job..


hmm.. are you able to get the headers from that? could you provide a
sample?

<?php
echo "<pre>"; print_r(stream_get_meta_data(fopen("http://www.google.com","r";))); echo "</pre>";
?>


That prints :

Array
(
[wrapper_data] => Array
(
[0] => HTTP/1.0 200 OK
[1] => Date: Sat, 31 Jul 2004 15:25:13 GMT
[2] => Content-Length: 2017
[3] => Content-Type: text/html
[4] => Cache-Control: private
[5] => Set-Cookie: PREF=ID=3aef968834cf9173:TM=1091287513:LM=1091287513:S=UpAZlwk4TMm5Nydd; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com
[6] => Server: GWS/2.1
[7] => Via: 1.1 supercache (NetCache NetApp/5.5R3)
)


    [wrapper_type] => HTTP
    [stream_type] => socket
    [unread_bytes] => 0
    [timed_out] =>
    [blocked] => 1
    [eof] =>
)

--- End Message ---
--- Begin Message ---
* Thus wrote Burhan Khalid:
> Curt Zirzow wrote:
> >* Thus wrote Gerard Samuel:
> >
> >>On Friday 30 July 2004 01:32 pm, Gerard Samuel wrote:
> >>
> >>>A means that is not specifically tied to Apache functions.
> >>>Just looking for a way so that it works no matter the webserver.
> >>>
> >>
> >>Seems like the function stream_get_meta_data() will fill the job.. 
> >
> >
> >hmm.. are you able to get the headers from that? could you provide a
> >sample?
> 
> <?php
>   echo "<pre>"; 
> print_r(stream_get_meta_data(fopen("http://www.google.com","r";))); echo 
> "</pre>";
> ?>

Ah ok, i had thought you meant the current scripts request headers. 

Thanks.


Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

--- End Message ---
--- Begin Message --- Jason Barnett wrote:
As far as I know, no one has done that yet. Although all of the PHP manual pages are written in XML so if you were so inclined you could do it yourself. And I'm sure others would appreciate it if you shared it :)


You could use HTMLDoc to convert the html pages to pdf. http://www.easysw.com/htmldoc/

--
Chris Martin
Web Developer
Open Source & Web Standards Advocate
http://www.chriscodes.com/

--- End Message ---
--- Begin Message ---
> Here are the last few lines of my error log:
>
<snipped for sanity>

Egads, dude...nearly went crossed-eyes with all that text.

This is completely offtopic and you might want to consult with the
sendmail mail list. Setting up mail server is fairly painless but it
requires some planning. Mail follows domain names. If you do an nslookup
on your IP address and it doesn't return a domain name (NOT the ISP's
domain, one that is registered to that server) then your problem lies with
DNS. You'll need to buy a domain and have it configured through that
providers DNS. Don't forget reverse DNS as well.

If nslookup does return a valid domain name, then your problem is with
Sendmail's configuration. You'll need to look through Sendmail's docs on
how to setup Sendmail. You can't just throw Sendmail onto a server and
expect it to work, though sending mail is a lot easier to setup than
receiveing mail.

-- 
--Matthew Sims
--<http://killermookie.org>

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

I have attempted to post variables from a simple page: edit-news.php to 
edit-news-x.php, then load them into a session for re-use -- I use output 
buffering. They do not pass. The code:


[edit-news]
....
<?php session_start(); ob_start(); ?>
$news = "A few paragraphs";

print "<input type='text' name='news'>";
print "<input type='submit' name='submit' value='Submit Changes'>";
....
?>


[edit-news-x]
<?php session_start(); ob_start(); ?>
...
$_SESSION['news'] = $_POST['news']
session_write_close();
...
?>

[submit-news]
<?php session_start(); ob_start(); ?>
...
print "{$_SESSION['news']}";  //outputs blank
...
?>

Now, I have used similar code on the same development machine for a very 
functional postgresql db website with no problems. The only diff is the mysql 
db. PHP version: 4.3.0.

This particular development website is exhibiting weird behaviour: sometimes 
the code works, no probs, reload, and previously functional code falls apart.

Any clues what I might be overlooking here -- why these variables do not pass? 
I'm stumped. (Could it be that both mysql/psql servers are competing against 
each other?) Help?

Tia,
Andre

--- End Message ---
--- Begin Message ---
On Sunday 01 August 2004 01:40, Andre Dubuc wrote:

> I have attempted to post variables from a simple page: edit-news.php to
> edit-news-x.php, then load them into a session for re-use -- I use output
> buffering. They do not pass. The code:
>
>
> [edit-news]
> ....
> <?php session_start(); ob_start(); ?>
> $news = "A few paragraphs";
>
> print "<input type='text' name='news'>";
> print "<input type='submit' name='submit' value='Submit Changes'>";
> ....
> ?>

Do you actually have <form> tags? And with the appropriate method?

> $_SESSION['news'] = $_POST['news']

What does print_r($_POST) show?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
I don't deserve this award, but I have arthritis and I don't deserve that
either.
                -- Jack Benny
*/

--- End Message ---
--- Begin Message ---
On Saturday 31 July 2004 02:12 pm, Jason Wong wrote:
> On Sunday 01 August 2004 01:40, Andre Dubuc wrote:
> > I have attempted to post variables from a simple page: edit-news.php to
> > edit-news-x.php, then load them into a session for re-use -- I use output
> > buffering. They do not pass. The code:
> >
> >
> > [edit-news]
> > ....
> > <?php session_start(); ob_start(); ?>
> > $news = "A few paragraphs";
> >
> > print "<input type='text' name='news'>";
> > print "<input type='submit' name='submit' value='Submit Changes'>";
> > ....
> > ?>
>
> Do you actually have <form> tags? And with the appropriate method?
>
> > $_SESSION['news'] = $_POST['news']
>
> What does print_r($_POST) show?
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> I don't deserve this award, but I have arthritis and I don't deserve that
> either.
>               -- Jack Benny
> */



Hi Jason,

Yes the first page has the appropriate <form> tags:

{edit-news.php]
<form action="edit-news-x.php" method="post"> . . . </form>

The second and third pages [edit-news-x.php/ edit-submit.php] are pure php (a 
pass-through page) -- I wasn't aware they needed these tags as well. Hmm . . 
. that might explain why they weren't passed -- I must be getting old :> . . 
.

Thanks -- I've stared at these pages way too long. Also, it's not my code, but 
I'm patching new stuff into working code - oh ugh!

Thanks,
I'll try adding the tags.
Andre

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

I get the following error message:

Fatal error: Call to undefined function: mail() in
/srv/www/htdocs/blog/serendipity_functions.inc.php on line 1394

I have changed my php.ini file to find the correct path to sendmail and to
put an option on the end (-f [EMAIL PROTECTED]) to make the
mail come from me, not from my linux system (otherwise my ISPs smtp server
doesn't accept it).

Sending mail works fine with the command line mail command.

What should I do to make this work?

Thanks

Robin


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.732 / Virus Database: 486 - Release Date: 29/07/04

--- End Message ---
--- Begin Message ---
On Sunday 01 August 2004 02:58, Robin Wilson wrote:

> I get the following error message:
>
> Fatal error: Call to undefined function: mail() in

google the error message.

> What should I do to make this work?

Short answer: recompile PHP
Long answer: see the results from google and the past discussions in archives

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
We have nowhere else to go... this is all we have.
                -- Margaret Mead
*/

--- End Message ---
--- Begin Message ---
Robin Wilson wrote:

Hi

I get the following error message:

Fatal error: Call to undefined function: mail() in
/srv/www/htdocs/blog/serendipity_functions.inc.php on line 1394

I have changed my php.ini file to find the correct path to sendmail and to
put an option on the end (-f [EMAIL PROTECTED]) to make the
mail come from me, not from my linux system (otherwise my ISPs smtp server
doesn't accept it).

Sending mail works fine with the command line mail command.

What should I do to make this work?

Thanks

Robin


--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.732 / Virus Database: 486 - Release Date: 29/07/04
enable the function in php.ini :)
There's this small setting somewhere around there that prevents the use of certain functions, and you probably configured it to prevent the use of mail().

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

I am having a problem in ImageColorAllocate function. I am using this
function in a loop. After some number of looping the function starts
returning -1 value. I am attaching my code below. Can any one help me with
this?

<?php

header("Content-type: image/png");

// create a 100*30 image
$im = imagecreate(300, 300);

// white background and blue text
$bg = imagecolorallocate($im, 255, 255, 255);

$j=0;
 for($i=1;$i<=30;$i++)
 {
     $textcolor = imagecolorallocatealpha($im, $i*2, $i*3, $j, 0);

     // write the string at the top left
     imagestring($im, 5, 0, $j, "Hello world!", $textcolor);
     //imagecolordeallocate($im,$textcolor);
     $j=$j+10;
}

// output the image
imagepng($im,"try.png");

?>

Thanks for reading this far.

Kevin.

--- End Message ---
--- Begin Message ---
I got the following e-mail from this list. Is this legit? I'm skeptical
because the URL it tells me to click on leads to what looks like a SPAM site
to me. Here's the full e-mail I received with headers:

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

MIME-Version: 1.0 
Received: from tgpnexus.com ([66.17.150.83]) by mc3-f36.hotmail.com with
Microsoft SMTPSVC(5.0.2195.6824); Thu, 22 Jul 2004 04:21:34 -0700
Received: (from [EMAIL PROTECTED])by tgpnexus.com (8.11.6/8.11.6) id
i6MB4jg26425; Thu, 22 Jul 2004 07:04:45 -0400
X-Message-Info: 6sSXyD95QpVwOJjbL57piwLK1Gwc7nJ6
Message-Id: <[EMAIL PROTECTED]>
X-verify: request 
Return-Path: [EMAIL PROTECTED]

Hello [EMAIL PROTECTED] ,

[EMAIL PROTECTED] is currently protecting themselves from receiving
junk mail using Spamcease Just this once, click the link below so I can
receive your emails. You won't have to do this again.

http://www.tgpwizards.com/spamcease2/verify.php?id=1089935

--- End Message ---
--- Begin Message ---
does php have a function similar to the 'C' sizeof function...

i'm looking to copy an object, and i'd like to be able to copy it at the
binary level....

but i need to be able to determine the size of the object...

any thoughts/comments..???

thanks

-bruce

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

I use GD for stamping images with a visible watermark - in this case, a text
string and a tracking number appended to the bottom of each image.

However, I'd like to embed tracking information (I sometimes see my pics
crop up on mailing lists... And they're the ones I see copied!) into the
picture.

Digimarc have a nifty looking copyrighting setup, but with a price-tag of
over three grand for an automated system, it's not affordable.

Does anyone know how to have PHP /GD invisibly watermark images? The info on
the PHP site's GD info pages suggests this can't be done.

I'd be interested to hear otherwise though.

--- End Message ---
--- Begin Message ---
Hello,

In order to get the filenames from the output below I have tried the following:

preg_match_all('/inflating:"(.*?)"/', $stdout, $matches);
print_r($matches);
return $matches[1];

But I only get empty arrays with it.

I need to fix that so I can have the filenames stored on arrays and also evaluate the type of output according to
the situations ilustrated bellow.


Contents of $stdout:

unzip test.zip
Archive:  test.zip
inflating: arch1.txt
inflating: arch2.txt
inflating: arch3.txt
inflating: arch4.txt
inflating: arch5.txt
inflating: arch6.txt

The same I have from a pkware execution :

pkunzip teste.zip
PKZIP(R)  Version 6.0  FAST!  Compression Utility for Linux X86
Copyright 1989-2002 PKWARE Inc.  All Rights Reserved. Evaluation Version
PKZIP Reg. U.S. Pat. and Tm. Off.  Patent No. 5,051,745


Extracting files from .ZIP: teste.zip Inflating: arch1.txt Inflating: arch2.txt Inflating: arch3.txt Inflating: arch4.txt Inflating: arch5.txt

So, I need some help on how to write a regexp to get the values after inflating, that is the filenames, and put them in an array. Both outputs above are stored on a $stdout php variable.

Also, I need to be able to indentify errors with the unzip utility that does not support some types of zip file, the output is like this:

unzip test1.zip
Archive:  test1.zip
 skipping: test1.txt              `shrink' method not supported

There's a skipping instead of a inflating or Inflating in pkware.

The third situation is an error on the zip file itself :

unzip test2.zip
Archive:  test2.zip
End-of-central-directory signature not found.  Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive.  In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of test2.zip or
      test2.zip.zip, and cannot find test2.zip.ZIP, period.

or

pkunzip test2.zip
PKZIP(R)  Version 6.0  FAST!  Compression Utility for Linux X86
Copyright 1989-2002 PKWARE Inc.  All Rights Reserved. Evaluation Version
PKZIP Reg. U.S. Pat. and Tm. Off.  Patent No. 5,051,745

Extracting files from .ZIP: test2.zip
Errors were found in .ZIP file, attempt to fix (<Y>es/<N>o)? N

PKZIP: (Z152) No CE signature found

Help is much appreacited.

Thanks in advance to all.
--- End Message ---

Reply via email to