php-general Digest 25 Oct 2007 13:55:26 -0000 Issue 5091

Topics (messages 263628 through 263656):

Re: output-buffer and memory-issue
        263628 by: Robert Cummings
        263632 by: Werner Schneider
        263633 by: Werner Schneider

Re: Question about time...
        263629 by: Instruct ICC
        263651 by: Jason Pruim
        263652 by: Jason Pruim
        263653 by: Zoltán Németh

Re: system command
        263630 by: Instruct ICC

Re: file_exists, is_readable & effective UID/GID
        263631 by: Manuel Vacelet

Limitations of preg_replace?
        263634 by: Werner Schneider
        263636 by: Robin Vickery

Ant in php
        263635 by: DCVer
        263638 by: Paul Scott

Slashes, include, AJAX?
        263637 by: Rodrigo Poblanno Balp

mail from
        263639 by: Diana
        263641 by: Richard Heyes
        263643 by: Richard Heyes

Re: register globals not working
        263640 by: Richard Heyes

cant send mail
        263642 by: Diana

SMTP unable to relay
        263644 by: Diana

how to restart php
        263645 by: Diana
        263646 by: Richard Heyes
        263649 by: C.R.Vegelin

MySQL and SVN
        263647 by: Emil Edeholt
        263648 by: Jens Kleikamp

SMTP
        263650 by: Diana
        263656 by: Jens Kleikamp

strange error
        263654 by: Jeff Mckeon
        263655 by: Zoltán Németh

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 ---
On Wed, 2007-10-24 at 21:07 +0000, Werner Schneider wrote:
> Hi, I got a strange problem: Using php 4.4.x, I capture the whole output for 
> a webpage into the output-buffer by using ob_start and ob_get_clean, because 
> I got to make some replacements in the html-code before sending the page to 
> the browser.
> 
> This worked fine with a small page, but now I got a page for which the 
> html-code is about 280 KB  (not too big I think). But I get an server-error 
> 500 for this script on my linux-based webhoster.
> 
> I tried to run it on an local WAMP-installation - it worked without error.
> I temporarly deleted some of the output - it worked without error.
> I turned of the output-buffering - it worked without error.
> 
> I printed memory_get_usage, but it never exceeded 2 MB (I load about 200 
> records from a database and create objects from it and then print the data of 
> these 200 records).
> On phpinfo(), memory_limit of my webhoster is 40M - so 2MB SHOULD be no 
> problem.
> I increased the memory-limit to 64M - it doesn't help.
> 
> Any idea what I could do next? I got no access to the apache error-log, but 
> the error is definitely connected to the output buffer and how much I try to 
> store in it.
> 
> Any help is welcome.

Use some random URL parameter and detect it in your script. When
detected enabled display errors:

<?php

if( isset( $_GET['knjdcrksjhfcsjkhfndkf'] ) )
{
   ini_set( 'display_errors', 1 );
}

?>

Then see if you get any errors. Although, if you're seg faulting, you
still won't see an error since the program just dies.

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
--- Robert Cummings <[EMAIL PROTECTED]> schrieb:
> On Wed, 2007-10-24 at 21:07 +0000, Werner Schneider
> wrote:
> > Hi, I got a strange problem: Using php 4.4.x, I
> capture the whole output for a webpage into the
> output-buffer by using ob_start and ob_get_clean,
> because I got to make some replacements in the
> html-code before sending the page to the browser.
> > 
> > This worked fine with a small page, but now I got
> a page for which the html-code is about 280 KB  (not
> too big I think). But I get an server-error 500 for
> this script on my linux-based webhoster.
> > 
> > I tried to run it on an local WAMP-installation -
> it worked without error.
> > I temporarly deleted some of the output - it
> worked without error.
> > I turned of the output-buffering - it worked
> without error.
...
> > Any idea what I could do next? I got no access to
> the apache error-log, but the error is definitely
> connected to the output buffer and how much I try to
> store in it.
> > 
> > Any help is welcome.
> 
> Use some random URL parameter and detect it in your
> script. When
> detected enabled display errors:
> 
> <?php
> 
> if( isset( $_GET['knjdcrksjhfcsjkhfndkf'] ) )
> {
>    ini_set( 'display_errors', 1 );
> }
> 
> ?>
> 
> Then see if you get any errors. Although, if you're
> seg faulting, you
> still won't see an error since the program just
> dies.
Thanks for your reply. It seems that this is
happening, becaus even with your code I get no errors.
It could be as well that the script dies before the
printing of the output buffer starts, because it could
be that the error is printed to the output buffer as
well.




      Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s 
mit dem neuen Yahoo! Mail. www.yahoo.de/mail

--- End Message ---
--- Begin Message ---
> > Then see if you get any errors. Although, if
> you're
> > seg faulting, you
> > still won't see an error since the program just
> > dies.
> Thanks for your reply. It seems that this is
> happening, becaus even with your code I get no
> errors.
> It could be as well that the script dies before the
> printing of the output buffer starts, because it
> could
> be that the error is printed to the output buffer as
> well.
It seems that the error is not connected to the
output-buffer, but to the preg_replace I do
afterwards. I will start a new topic for that.



      Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s 
mit dem neuen Yahoo! Mail. www.yahoo.de/mail

--- End Message ---
--- Begin Message ---
> >  > I want to be able to display something like an image of a turkey 
> >>  during the month of november from now until I'm dead.
> >
> >And how will the application know when you are dead?
> 
> When you stop paying for hosting, the application get's the idea when 
> it's bits go poof!
Yep, that will do it.

I wonder if they can legally bill your "estate"?  Or if the estate is liable.


> If anyone ever noticed, my web site (http://sperling.com) has a tree 
> on it that changes with the seasons. I use:
Nice.

_________________________________________________________________
Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare!
http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews

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

On Oct 24, 2007, at 6:10 PM, Instruct ICC wrote:


I want to be able to display something like an image of a turkey
during the month of november from now until I'm dead.

And how will the application know when you are dead?

Well, I code all of my applications to receive RFID signals, and I had a RFID transmitter embedded into me that gets powered by the electricity that my body generates, so when it can no longer get that signal, the application is designed to shut down and put up a message that says "Due to the death of my creator I quit, have a nice day!" :)


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

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

On Oct 24, 2007, at 9:01 PM, tedd wrote:

At 3:10 PM -0700 10/24/07, Instruct ICC wrote:
 > I want to be able to display something like an image of a turkey
 during the month of november from now until I'm dead.

And how will the application know when you are dead?

When you stop paying for hosting, the application get's the idea when it's bits go poof!

If anyone ever noticed, my web site (http://sperling.com) has a tree on it that changes with the seasons. I use:

$dates = getdate();
$month = $dates['mon'];
$w = "http://www.sperling.com/css/seasons/";;
switch( $month )
        {
        case "03": case "04": case "05":
                $var = $w . "spring.jpg";
                break;
        case "06": case "07": case "08" :
                $var = $w . "summer.jpg";
                break;
        case "09": case "10": case "11":
                $var = $w . "fall.jpg";
                break;
        case "12": case "01": case "02":
                $var = $w . "winter.jpg";
                $break;
        }
echo($var);

And this code is called from within my css file for a background image. Yes, I use variables in css.

Cheers,

tedd


Hi tedd,

That's actually where I got the idea, just couldn't remember who on what list said they did it :) using variables in css is it as easy as just putting in a quick <?PHP echo "background: $date"; ?> in the css? or is it more complicated?

--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]



--- End Message ---
--- Begin Message ---
2007. 10. 25, csütörtök keltezéssel 09.01-kor Jason Pruim ezt írta:
> On Oct 24, 2007, at 9:01 PM, tedd wrote:
> 
> > At 3:10 PM -0700 10/24/07, Instruct ICC wrote:
> >>  > I want to be able to display something like an image of a turkey
> >>>  during the month of november from now until I'm dead.
> >>
> >> And how will the application know when you are dead?
> >
> > When you stop paying for hosting, the application get's the idea  
> > when it's bits go poof!
> >
> > If anyone ever noticed, my web site (http://sperling.com) has a  
> > tree on it that changes with the seasons. I use:
> >
> > $dates = getdate();
> > $month = $dates['mon'];
> > $w = "http://www.sperling.com/css/seasons/";;
> > switch( $month )
> >     {
> >     case "03": case "04": case "05":
> >             $var = $w . "spring.jpg";
> >             break;
> >     case "06": case "07": case "08" :
> >             $var = $w . "summer.jpg";
> >             break;
> >     case "09": case "10": case "11":
> >             $var = $w . "fall.jpg";
> >             break;
> >     case "12": case "01": case "02":
> >             $var = $w . "winter.jpg";
> >             $break;
> >     }
> > echo($var);
> >
> > And this code is called from within my css file for a background  
> > image. Yes, I use variables in css.
> >
> > Cheers,
> >
> > tedd
> 
> 
> Hi tedd,
> 
> That's actually where I got the idea, just couldn't remember who on  
> what list said they did it :) using variables in css is it as easy as  
> just putting in a quick <?PHP echo "background: $date"; ?> in the  
> css? or is it more complicated?

you have to configure apache to handle css files as php files.
also you have to send headers including content-type set to text/css

and then you can script your css

greets
Zoltán Németh

> 
> --
> 
> Jason Pruim
> Raoset Inc.
> Technology Manager
> MQC Specialist
> 3251 132nd ave
> Holland, MI, 49424
> www.raoset.com
> [EMAIL PROTECTED]
> 
> 
> 

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


> Date: Thu, 25 Oct 2007 09:43:14 +0800
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: [PHP] system command
> 
> I tried:
> 
> $a=$_SERVER["REMOTE_ADDR"];
> echo "<p>REMOTE_ADDR=$a<br>";
> if($a="192.168.250.108") {
>     $a="61.64.101.101";
> }
> 
> 
> $aa=system('lynx -dump http://api.hostip.info/country.php?ip=$a',$location);
> echo "<p>a=$a<br>aa=$aa<br>location=$location<br>";
> 
> $aa=system('lynx -dump 
> http://api.hostip.info/country.php?ip=61.64.101.101',$location);
> echo "<p>a=$a<br>aa=$aa<br>location=$location<br>";
> 
> 
> I get:
> 
> REMOTE_ADDR=192.168.250.108
> XX
> 
> a=61.64.101.101
> aa=XX
> location=0
> TW
> 
> a=61.64.101.101
> aa=TW
> location=0
> 
> 
> as you can see, if I put the IP address in, I get the right answer (TW).
> 
> What am I doing wrong?
> 
> bye
> 
> Ronald
Use double quotes to get the value of $a or else you get the literal string 
"$a".

$aa=system("lynx -dump http://api.hostip.info/country.php?ip=$a",$location);
or
$aa=system('lynx -dump http://api.hostip.info/country.php?ip='.$a,$location);


_________________________________________________________________
Peek-a-boo FREE Tricks & Treats for You!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us

--- End Message ---
--- Begin Message ---
On 10/24/07, Jim Lucas <[EMAIL PROTECTED]> wrote:
> Daniel Brown wrote:
> > On 10/24/07, Manuel Vacelet <[EMAIL PROTECTED]> wrote:
> >> Hi all,
> >>
> >> file_exists and is_readable perfom there test with real UID/GID.
> >> Is there any functions that tests file existance with effective UID/GID ?
> >>
> >> Note: stat is not an option because it raises an E_WARNING if the file
> >> is not readable.
> >>
> >> Thanks,
> >> Manuel
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
> >     That's what you have things like <? ini_set("display_errors", "off"); ?>
> >
>
> what about doing it like this?
>
> <?php
>
> $filename = __FILE__;
>
> $stat_info = @stat($filename);
>
> if ( $stat_info ) {
>         // do something...
> }
>
> The '@' will suppress the E_WARNING notice
> if stat fails the condition will fail.

I much prefer the second solution  (Jim's one) even if I find that php
limitation amazing !

Thank you for your help.
Cheers,
Manuel

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

Are there any limitations of preg_replace and is there
a way to change them (for example with ini_set)?

I got a php 4.4.7 on a linux-webhoster which crashes
without error-message on this script:
<?php
        $txt = "";
        for ($i = 0; $i < 2000; $i++)
        {       $txt .= "<a href=\"helloworld.htm\" title=\"my
title\"><img src=\"/mypic.jpg\"></a><br />\n";
        }
        $txt =
preg_replace("/<a(.*)href=\"\\index.htm\">/isU",
"<a$1href=\"\\\">", $txt);
        print $txt;
?>
If I loop only 1000 times or don't use (.*)->$1 on the
regular expression, it works. It works as well on a
local WAMP-Installation.

Any ideas about that?



       __________________________________  Ihre erste Baustelle? Wissenswertes 
für Bastler und Hobby Handwerker. www.yahoo.de/clever

--- End Message ---
--- Begin Message ---
On 25/10/2007, Werner Schneider <[EMAIL PROTECTED]> wrote:
> Hi.
>
> Are there any limitations of preg_replace and is there
> a way to change them (for example with ini_set)?
>
> I got a php 4.4.7 on a linux-webhoster which crashes
> without error-message on this script:
> <?php
>         $txt = "";
>         for ($i = 0; $i < 2000; $i++)
>         {       $txt .= "<a href=\"helloworld.htm\" title=\"my
> title\"><img src=\"/mypic.jpg\"></a><br />\n";
>         }
>         $txt =
> preg_replace("/<a(.*)href=\"\\index.htm\">/isU",
> "<a$1href=\"\\\">", $txt);
>         print $txt;
> ?>
> If I loop only 1000 times or don't use (.*)->$1 on the
> regular expression, it works. It works as well on a
> local WAMP-Installation.
>
> Any ideas about that?

Yeah, the backtrack limit.

But
   1. it's not configurable in PHP 4
   2. You'd be better off writing your regexp so it doesn't have to
backtrack all the way
       through a 150KB string.

Try replacing .* with [^>]*

-robin

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

I have such a problem - I would like to launch SQL script using Ant. The
problem is, that I don't use JDBC and Java and I wonder if it is possible to
run such a script from Ant. I use MySQL database (and Prado framework). BTW:
is this a good idea to use Ant with PHP or is there some similar tool to
Ant, that works fine with PHP? Thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/Ant-in-php-tf4689539.html#a13403009
Sent from the PHP - General mailing list archive at Nabble.com.

--- End Message ---
--- Begin Message ---
On Thu, 2007-10-25 at 02:25 -0700, DCVer wrote:
> is this a good idea to use Ant with PHP or is there some similar tool to
> Ant, that works fine with PHP? Thanks in advance.

What you really want to look at is Phing, not Ant. It is very similar
and I use it extensively for my project(s).

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm 

--- End Message ---
--- Begin Message ---
Hi everybody!

I'm building a small ajax app which consists of only 3 php files.

index.php which contains all the app and has a couple of links. When a link is clicked an Ajax request is sent to the server (using prototype) to the url central.php with only one parameter 'id'. Depending on that parameter, central.php should look for the appropiate content, in this case link1.php. Then I return a JSON object with the "things" that should be updated on index.php

So this is the pseudo-code:

index.php
<html>...
<body>
<a href="" onclick="[send the Ajax request using prototype with the id = 1]>Link #1</a>
<div id="theUpdatableDIV"></div>
</body>


central.php
<html>...
<body>
<?php
[read the id parameter]
switch(id){
   case 1: //which is the only case for now!!
      //build the JSON object
$output = array("title" => "Link #1 Title!", "content"=>file_get_contents("link1.php"));//here I read the last file which has the content to be updated asynchronously
       return [the JSON object based on $output];
       break;
}
?>
</body>

link1.php
<div>Welcome to the content of link #1 which was updated using <a href="ajax.org">ajax</a></div>

the JSON object is formed ok, now, my problem is that link1.php outputs like this:

<div>Welcome to the content of link #1 which was updated using <a href="ajax.org">ajax<\/a><\/div>

So at the moment I update the <div id="theUpdatableDIV"> element on index.php, I get no "real" content, but a string with the
strange slashes.

I've tried:
stripslashes, ereg_replace, str_replace and strtr to eliminate the wierd slashes.

Can anybody tell how to do it right?

Thank you!

Balpo

--- End Message ---
--- Begin Message ---
in my php.ini, I have this set
sendmail_from = [EMAIL PROTECTED]

yet when I do this command :("[EMAIL PROTECTED]","TEST 
MAIL","TESTING MAIL");
I get this message Warning: mail() [function.mail]: "sendmail_from" not set 
in php.ini or custom "From:" header missing in 
C:\Inetpub\wwwroot\intranet\test.php on line 4
-- 
Diana Castillo
Tsanalytics S.A.
Tel: 34 913 595 436
Fax: 34 913 595 439
Mov: 34 609 954 536
[EMAIL PROTECTED]
www.tsanalytics.com 

--- End Message ---
--- Begin Message ---
in my php.ini, I have this set
sendmail_from = [EMAIL PROTECTED]

yet when I do this command :("[EMAIL PROTECTED]","TEST MAIL","TESTING MAIL"); I get this message Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\Inetpub\wwwroot\intranet\test.php on line 4

And if instead of using the php.ini directive you use the fourth argument to mail()?

Eg:

<?php
    mail("[EMAIL PROTECTED]",
         "TEST MAIL",
         "TESTING MAIL",
         '[EMAIL PROTECTED]');
?>

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--- End Message ---
--- Begin Message ---
Richard Heyes wrote:
in my php.ini, I have this set
sendmail_from = [EMAIL PROTECTED]

yet when I do this command :("[EMAIL PROTECTED]","TEST MAIL","TESTING MAIL"); I get this message Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\Inetpub\wwwroot\intranet\test.php on line 4

And if instead of using the php.ini directive you use the fourth argument to mail()?

Eg:

<?php
    mail("[EMAIL PROTECTED]",
         "TEST MAIL",
         "TESTING MAIL",
         '[EMAIL PROTECTED]');
?>


Oops. That should be:

<?php
    mail("[EMAIL PROTECTED]",
         "TEST MAIL",
         "TESTING MAIL",
         'From: [EMAIL PROTECTED]');
?>

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--- End Message ---
--- Begin Message ---
I have installed php v5 on a windowsXP PC. Server is Apache 2.2.
Even though I have turned register globals on in the ini file,
> the php is still not allowing the use of $HTTP_GET_VARS (and probably
other similier variables), and I am having to change my existing script
> to $_GET before they will run.

Any idea why the directive is being ignored?
Rodney Courtis

On? Register globals is widely considered to be a security hazard. Ideally you should be using the $_GET etc variables instead. Anyhoo the $HTTP_*_VARS are (IIRC) controlled by the track_vars directive. So turn that on, restart Apache, and then try.

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--- End Message ---
--- Begin Message ---
Using windows XP, when I try to send mail using 4 parameters, I get this :

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to
relay for [EMAIL PROTECTED] in C:\Inetpub\wwwroot\intranet\test.php
on line 9



-- 
Diana Castillo
Tsanalytics S.A.
Tel: 34 913 595 436
Fax: 34 913 595 439
Mov: 34 609 954 536
[EMAIL PROTECTED]
www.tsanalytics.com 

--- End Message ---
--- Begin Message ---
I have tried settiing my php.ini to
SMTP = localhost
as well as using the SMTP of my regular mail, and I keep on getting this.
Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to 
relay for [EMAIL PROTECTED] in C:\Inetpub\wwwroot\intranet\test.php 
on line 11

-- 
Diana Castillo
Tsanalytics S.A.
Tel: 34 913 595 436
Fax: 34 913 595 439
Mov: 34 609 954 536
[EMAIL PROTECTED]
www.tsanalytics.com 

--- End Message ---
--- Begin Message ---
How can I restart php so it takes changes in my php.ini without having to 
reboot my machine?
I have windows XP

-- 
Diana Castillo
Tsanalytics S.A.
Tel: 34 913 595 436
Fax: 34 913 595 439
Mov: 34 609 954 536
[EMAIL PROTECTED]
www.tsanalytics.com 

--- End Message ---
--- Begin Message ---
Diana wrote:
How can I restart php so it takes changes in my php.ini without having to reboot my machine?
I have windows XP


You don't restart PHP, rather the web server whatever that may be. Usually it involves restarting the web server service. If you can, just restart the computer.

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--- End Message ---
--- Begin Message ---
Hi Diana,
To restart the IIS webserver with Windows XP:
press Start, select Run, type IISreset
HTH, Cor

----- Original Message ----- From: "Richard Heyes" <[EMAIL PROTECTED]>
To: "Diana" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 25, 2007 1:02 PM
Subject: Re: [PHP] how to restart php


Diana wrote:
How can I restart php so it takes changes in my php.ini without having to reboot my machine?
I have windows XP


You don't restart PHP, rather the web server whatever that may be. Usually it involves restarting the web server service. If you can, just restart the computer.

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

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



--- End Message ---
--- Begin Message ---
Hi all!

Maybe slightly off topic, but I would like to know how you guys handle mysql structures between different computers (and for that matter from the developer desktop to the stable server).

I work on my home and my office computer with the same php projects. I keep all my php files on svn, so I just update and commit the first and last thing I do when I switch computer. The problem is when I've made a change in the structure of my mysql tables. I usually try to save a dump and ssh it to my server and download and import it on the other computer. But that feels clumsy, and if I've made changes on both computers I have no simple way to merge the structures like I can in svn.

How do you handle this in your projects?

Best Regards Emil Edeholt

--- End Message ---
--- Begin Message ---
Emil Edeholt schrieb:
Hi all!

Maybe slightly off topic, but I would like to know how you guys handle mysql structures between different computers (and for that matter from the developer desktop to the stable server).

I work on my home and my office computer with the same php projects. I keep all my php files on svn, so I just update and commit the first and last thing I do when I switch computer. The problem is when I've made a change in the structure of my mysql tables. I usually try to save a dump and ssh it to my server and download and import it on the other computer. But that feels clumsy, and if I've made changes on both computers I have no simple way to merge the structures like I can in svn.

How do you handle this in your projects?

Best Regards Emil Edeholt

Hi Emil,

I use pear MDB2_Schema package to handle and manage my database structures.

Another option would be http://dbdeploy.com/. There is also a pear proposal: http://pear.php.net/pepr/pepr-proposal-show.php?id=507.

Both, very interesting components in the area of database deployment.

Cheers,
Jens

--- End Message ---
--- Begin Message ---
I dont know what I did but now I get this message Failed to connect to 
mailserver at "localhost" port 25, verify your "SMTP"

-- 
Diana Castillo
Tsanalytics S.A.
Tel: 34 913 595 436
Fax: 34 913 595 439
Mov: 34 609 954 536
[EMAIL PROTECTED]
www.tsanalytics.com 

--- End Message ---
--- Begin Message ---
Diana schrieb:
I dont know what I did but now I get this message Failed to connect to mailserver at "localhost" port 25, verify your "SMTP"

Do you have a smtp server running on localhost?

--- End Message ---
--- Begin Message ---
I'm getting this error on a php based ticket system we have.  I don't see
this on the old server running php4.  This new server is running php5.

PHP_Fatal_error:__Cannot_use_object_of_type_PEAR_Error_as_array_in_/srv/www/
virtual/support/mailparser.php_on_line_300/

The code in that section looks like this...

  function firstemail($addrs)
  {
    $name="";
    $structure = Mail_RFC822::parseAddressList($addrs);
    $ret= $structure[0]->mailbox."@".$structure[0]->host;  ### line 300 is
here...
    if ($ret=="@localhost") $ret="";
    else $name=$structure[0]->personal;
    return array($ret,$name);
  }

Any idea what may be the issue here?

--- End Message ---
--- Begin Message ---
2007. 10. 25, csütörtök keltezéssel 09.15-kor Jeff Mckeon ezt írta:
> I'm getting this error on a php based ticket system we have.  I don't see
> this on the old server running php4.  This new server is running php5.
> 
> PHP_Fatal_error:__Cannot_use_object_of_type_PEAR_Error_as_array_in_/srv/www/
> virtual/support/mailparser.php_on_line_300/
> 
> The code in that section looks like this...
> 
>   function firstemail($addrs)
>   {
>     $name="";
>     $structure = Mail_RFC822::parseAddressList($addrs);
>     $ret= $structure[0]->mailbox."@".$structure[0]->host;  ### line 300 is
> here...
>     if ($ret=="@localhost") $ret="";
>     else $name=$structure[0]->personal;
>     return array($ret,$name);
>   }
> 
> Any idea what may be the issue here?

the class Mail_RFC822 encountered some error, and thus returned a
PEAR_Error object. on the next line you try to access it as an array,
which of course throws a fatal error.

try to dump out the error object to see what is the pear error
encountered.

greets
Zoltán Németh

> 

--- End Message ---

Reply via email to