Re: php problems

2013-08-07 Thread Panagiotis Christias
On Tue, Aug 6, 2013 at 5:56 PM, mikel king  wrote:

>
> On Aug 5, 2013, at 11:33 PM, Mark Moellering  wrote:
>
> > A few years ago (2011) I set up an email system for a small internet
> based company.  I used postfix with a mysql backend for virtual accounts.
>  I also set up apache to test a php based webmail front-end.
> > I set up several php scripts that would run from cron that would query a
> database and look for new email account requests and then do a variety of
> tasks to get everything set up properly.
> > After I left, someone else made modifications to the system and things
> stopped working properly.  A few months ago I was asked to try and get
> things working again.
> >
> > I discovered that all php scripts now generate a seg fault.
> >
> > I tried a simple "hello world" type program
> > the actual code is :
> >  > echo "test"
> > ?>
> > and the output was;
> >
> > testsegmentation fault
> >
> > The system is FreeBSD 8.2 and php 5.3
> >
> > If anyone has any idea of what changes might have been made that could
> cause this, please let me know.  My other thought was to try reinstalling /
> upgrading php.
> >
> > Thanks in advance
> >
> > Mark Moellering
> > ___
> > freebsd-questions@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "
> freebsd-questions-unsubscr...@freebsd.org"
>
>
> Hey Mark,
>
> Do you have a backup/alternative system you can test the code on? In lieu
> of that I would seriously consider rebuilding php. After you get it working
> it would be worth also considering upgrading to 55.
>
> Also make a complete revision backup of the code and config files once you
> get it working, this will save a lot of hair if the company in question
> hires someone else to tweak things in the future…
>
> Cheers,
> Mikel
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscr...@freebsd.org"
>

Hello,

If a simple command like "php -v" (no script) results a seg fault then you
should follow Patrick's advice. Or try editing by hand
/usr/local/etc/php/extensions.ini and comment out one by one the extensions
mentioned in there.

If you are lucky you will find one or more offending extensions that you
don't need and leave them commented out on uninstall them. If not, you
would have to recompile/reinstall the offending extensions or portupgrade
php and all extensions. Latest php versions in ports tree (all branches:
5.4.x, 5.3.x, even 5.2.x) seem to have resolve this issue.

Regards,
Panagiotis

-- 
Panagiotis Christias
christ...@gmail.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: php problems

2013-08-06 Thread mikel king

On Aug 5, 2013, at 11:33 PM, Mark Moellering  wrote:

> A few years ago (2011) I set up an email system for a small internet based 
> company.  I used postfix with a mysql backend for virtual accounts.  I also 
> set up apache to test a php based webmail front-end.
> I set up several php scripts that would run from cron that would query a 
> database and look for new email account requests and then do a variety of 
> tasks to get everything set up properly.
> After I left, someone else made modifications to the system and things 
> stopped working properly.  A few months ago I was asked to try and get things 
> working again.
> 
> I discovered that all php scripts now generate a seg fault.
> 
> I tried a simple "hello world" type program
> the actual code is :
>  echo "test"
> ?>
> and the output was;
> 
> testsegmentation fault
> 
> The system is FreeBSD 8.2 and php 5.3
> 
> If anyone has any idea of what changes might have been made that could cause 
> this, please let me know.  My other thought was to try reinstalling / 
> upgrading php.
> 
> Thanks in advance
> 
> Mark Moellering
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Hey Mark,

Do you have a backup/alternative system you can test the code on? In lieu of 
that I would seriously consider rebuilding php. After you get it working it 
would be worth also considering upgrading to 55.

Also make a complete revision backup of the code and config files once you get 
it working, this will save a lot of hair if the company in question hires 
someone else to tweak things in the future… 

Cheers,
Mikel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: php problems

2013-08-06 Thread Patrick Lamaiziere
Le Mon, 05 Aug 2013 23:33:08 -0400,
Mark Moellering  a écrit :

> I discovered that all php scripts now generate a seg fault.
> 
> I tried a simple "hello world" type program
> the actual code is :
>  echo "test"
> ?>
> and the output was;
> 
> testsegmentation fault
> 
> The system is FreeBSD 8.2 and php 5.3
> 
> If anyone has any idea of what changes might have been made that
> could cause this, please let me know.  My other thought was to try 
> reinstalling / upgrading php.

That could be a problem with the extensions order in php.ini 
(search google "php + crash + freebsd)

There is a script to fix the order, I have not tried it. 
http://people.freebsd.org/~ohauer/scripts/fixphpextorder.sh

Regards.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: php problems

2013-08-06 Thread Frank Leonhardt

On 06/08/2013 15:21, Lars Eighner wrote:

On Mon, 5 Aug 2013, Mark Moellering wrote:


I tried a simple "hello world" type program
the actual code is :

and the output was;

testsegmentation fault


First, try it with clean code: put the ; after the command and stop 
closing

the 

Actually that should work and does work. I'm in the happy position of 
being able to recreate (but without the fault):


%php test.php
test
%php --version
PHP 5.3.6 with Suhosin-Patch (cli) (built: Jul 27 2011 20:41:21)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
%uname -v
FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 
r...@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC

%cat test.php


%php test.php
test
%

So what you're should doing should work. I should try recompiling and 
reinstalling PHP as a first step, unless you have reasons you don't want 
to do that. Email me directly if you want to cross-check config files 
and so on on what may be a very similar environment.


Regards, Frank.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: php problems

2013-08-06 Thread Frank Leonhardt

On 06/08/2013 15:21, Lars Eighner wrote:

On Mon, 5 Aug 2013, Mark Moellering wrote:


I tried a simple "hello world" type program
the actual code is :

and the output was;

testsegmentation fault


First, try it with clean code: put the ; after the command and stop 
closing

the 

Actually that should work and does work. I'm in the happy position of 
being able to recreate (but without the fault):


%php test.php
test
%php --version
PHP 5.3.6 with Suhosin-Patch (cli) (built: Jul 27 2011 20:41:21)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
%uname -v
FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 
r...@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC

%cat test.php


%php test.php
test
%

So what you're should doing should work. I should try recompiling and 
reinstalling PHP as a first step, unless you have reasons you don't want 
to do that. Email me directly if you want to cross-check config files 
and so on on what may be a very similar environment.


Regards, Frank.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: php problems

2013-08-06 Thread Lars Eighner

On Mon, 5 Aug 2013, Mark Moellering wrote:


I tried a simple "hello world" type program
the actual code is :

and the output was;

testsegmentation fault


First, try it with clean code: put the ; after the command and stop closing
the 

The system is FreeBSD 8.2 and php 5.3

If anyone has any idea of what changes might have been made that could cause 
this, please let me know.  My other thought was to try reinstalling / 
upgrading php.


Thanks in advance

Mark Moellering
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"




--
Lars Eighner
http://www.larseighner.com/index.html
8800 N IH35 APT 1191 AUSTIN TX 78753-5266

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


php problems

2013-08-05 Thread Mark Moellering
A few years ago (2011) I set up an email system for a small internet 
based company.  I used postfix with a mysql backend for virtual 
accounts.  I also set up apache to test a php based webmail front-end.
I set up several php scripts that would run from cron that would query a 
database and look for new email account requests and then do a variety 
of tasks to get everything set up properly.
After I left, someone else made modifications to the system and things 
stopped working properly.  A few months ago I was asked to try and get 
things working again.


I discovered that all php scripts now generate a seg fault.

I tried a simple "hello world" type program
the actual code is :

and the output was;

testsegmentation fault

The system is FreeBSD 8.2 and php 5.3

If anyone has any idea of what changes might have been made that could 
cause this, please let me know.  My other thought was to try 
reinstalling / upgrading php.


Thanks in advance

Mark Moellering
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"