Re: [PHP] PHP causing seg fault

2006-10-15 Thread Glenn Richmond
Hi guys,

I'm running Fedora Core 5 - so yes, a red hat system. I'm told it
doesn't happen on FC4 and PHP5.04 though.

I'm definitely not causing an infinite loop directly in the PHP code,
though I agree that it sounds like that. I think that maybe PHP is
getting into a loop internally though as a result of the return call. 
Any ideas?

Glenn.

Richard Lynch wrote:
 On Thu, October 12, 2006 3:44 am, Glenn Richmond wrote:
   
 I'm attempting to run a SugarCRM variant that uses SOAP to access
 information from the database. The code is causing a seg fault when
 executing a particular line of code. The code executes properly until
 it
 calls a generic function in the parent class that causes a seg fault
 on
 the return command. The line of code is:

 return $this;

 I've found this to be a problem in PHP version 5.1.4 and 5.2.0rc4.  Is
 this statement illegal in PHP5? When I set a memory limit for the
 script, the error changes to indicating that it has exceeded its
 memory
 allocation, so it seems to be allocating memory over and over.

 Note that this code runs fine on most other combinations of functions
 calling this same parent method. Any suggestions are appreciated.
 

 Are you sure you are not causing an infinite loop or a circular data
 reference that PHP is attempting to iterate through?

 It sure *sounds* like that might be the case, from the symptoms
 presented.

   

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



[PHP] PHP causing seg fault

2006-10-12 Thread Glenn Richmond
Hi guys,

I'm attempting to run a SugarCRM variant that uses SOAP to access
information from the database. The code is causing a seg fault when
executing a particular line of code. The code executes properly until it
calls a generic function in the parent class that causes a seg fault on
the return command. The line of code is:

return $this;

I've found this to be a problem in PHP version 5.1.4 and 5.2.0rc4.  Is
this statement illegal in PHP5? When I set a memory limit for the
script, the error changes to indicating that it has exceeded its memory
allocation, so it seems to be allocating memory over and over.

Note that this code runs fine on most other combinations of functions
calling this same parent method. Any suggestions are appreciated.

Thanks,

Glenn.

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



Re: [PHP] Seperate HTML from PHP

2006-10-11 Thread Glenn Richmond
Yes - separation of HTML and PHP code is not really a question of speed
or efficiency.

It's about coding style. Combining the two together might be fine for
small projects, but when that project grows and grows, the readability
of your code deteriorates if you don't separate the languages, not to
mention code in a well defined style.

Glenn.

Chris wrote:
 Sancar Saran wrote:
 Hi there, following words are my ideas about that HTML PHP parting. I
 hope you can understand my broken english and do not take personally.

 SEPERATING html FROM php ARE USELESS

 Try customising a CMS (any open source) with html embedded in the php...

 Good luck and get back to us (in a few years) when you have it completed.


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



Re: [PHP] WebMail client

2006-10-04 Thread Glenn Richmond
http://www.roundcube.net/

I can't say enough good things about the roundcube project. Ajax-based,
like a desktop email client in a browser. Still got some minor bugs, but
works pretty well. Note that it's still a Beta at this point.

Cheers,

Glenn.

Christopher Weldon wrote:
 Peter Lauri wrote:
   
 Hi,

  

 Do you have any suggestion on WebMail clients written in PHP that is good
 and easy to install?

 

 http://hastymail.sourceforge.net/

 --
 Christopher Weldon

   

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



Re: [PHP] web based browser...

2006-10-03 Thread Glenn Richmond
Hi guys.

http://sourceforge.net/projects/filebrowser

This looked like quite a good one. We've been looking at using an
ajax-based file browser ourselves, and this one seemed to be at the top
of the list.

Cheers,

Glenn.

Richard Lynch wrote:
 I've used an okay one in the webmasters.com control panel, but am
 always flummoxed that they didn't give me an ln -s action...

 So consider this a Feature Request to let me make symlinks in yours.

 Not that I'll every actually use it, mind you, but *somebody* will
 thank you for it some day.

 On Tue, October 3, 2006 12:01 am, bruce wrote:
   
 hi...

 i'm trying to find a good web based (php) browsing app for handling
 remote
 file management functions... i've seen a number of open source apps,
 but
 haven't come across any that meet my needs.

 i'm looking for the ability to:
  -edit/view/rename/copy/move/delete files
  -copy/rename/move/delete folders
  -display number of files in a folder
  -search for file/folder by name/regex

 if you know of an app that does the above, or if you've used a browser
 based
 file manager kind of app that's really good, let me know.

 thanks..

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



Re: [PHP] Coding Style Question...

2006-10-02 Thread Glenn Richmond
Hi Tony,

Sounds like a good start. I have to admit that one that I prefer is that
HTML code should be completely separated from PHP via the use of a
templating engine of some sort (I'm a fan of XTemplate). I'll probably
get strong opposition for these comments, but in my opinion, there's
nothing worse than mixing two different lanuages in a single file, not
to mention mixing functional code with layout code.

Glenn.

Tony Di Croce wrote:
 I am relatively new to PHP... I have about 1.5 years of light PHP work
 under
 my belt... Over the past year or so my PHP coding style has evolved
 significantly and I'm curious as to how experienced programmers write
 PHP...

 Basically, here is what I have evolved to:

 1) ALL php code is at the top of the file.
 2) ALL html code is in a here document at the bottom.
 3) php code is run before 1 character is outputed (and hence, no
 headers are
 sent, leaving redirects open for possibilities)
 4) I almost always following my require_once directives with a
 session_start() at the top of the file.
 5) Often, my forms submit to the PHP page that generated them but do
 so with
 a hidden posted variable. If that variable is set, then I process the
 form
 submission.

 I think the most important part of all this is #1  #2... I think I am
 using
 PHP a little like template engine this way...

 It seems to me that I most often see code snippets that try to intertwine
 HTML and PHP, but in my experience, except for trivial examples, this
 doesn't work so good...

 What do you think?


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



[PHP] Custom Session Handler

2006-09-28 Thread Glenn Richmond
Hi guys,

I couldn't find a developers list, so I hope this is the right list to
post to. I need to create a custom session handler for our PHP server.
We have a memcache server and so want to use that to handle our session
information. I was able to get basic session code working via the custom
PHP user handler, but it has an inherent bug that means that the
following code doesn't work:

session_start();
session_write_close();
session_start();
session_write_close();

The problem is that when write_close is called, it wipes all knowledge
of the custom session handler. It's a documented bug, but hasn't been
fixed as of yet.  So here's what I want to do to resolve this:

I want to write a custom PHP module similar to mod_user that handles the
memcache interface (mod_memcache) because this would avoid the issues of
the handlers being wiped etc...  I've effectively replicated the
mod_user code (but changed it to a blank canvas) and incorporated the
appropriate makefile  configure changes to get it built  I get the
mod_memcache.lo file as an intermediate file. However, when I install
the PHP5 module in apache and set the save handler in the php.ini to
memcache, it tells me that it can't find the memcache handler?

What's the process for setting up a new (custom) session handler in the
php build?

Thanks in advance,

Glenn.

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



Re: [PHP] Custom Session Handler

2006-09-28 Thread Glenn Richmond
Hi Richard,

No suggestions yet, but hopefully something will come through. Wouldn't
you know it, I had a brainstorm while writing this response.  amazing
what a night's sleep will do. The key to getting a module registered is
in session.c in the function PHPAPI int
php_session_register_module(ps_module *ptr). Obvious now, isn't it :)

As for open sourcing it, that call's up to my employer, but it may
actually be a requirement (not that familiar with the license on php
source). Anyway, they're fairly pro-open souce, so it's likely that
it'll get released back into the source tree. I'd say the biggest
benefit from my point of view is not having to re-merge the changes in
for every release of PHP :)

Who do I talk to about becoming a developer on the php source?

Cheers,

Glenn.

Richard Lynch wrote:
 On Thu, September 28, 2006 1:46 am, Glenn Richmond wrote:
   
 I couldn't find a developers list, so I hope this is the right list to
 

 If you get no answer here, php-internals is a potential source, for a
 quick reference to the right part of the source where that bit of code
 lives.

 Also try finding it for yourself in the source, or http://lxr.php.net

 Good Luck -- It would certainly be very cool to have this extension
 OpenSourced and added to PECL.  Hint, hint.

 Note that OpenSourcing it and adding it to PECL might get another
 developer interested in fixing your current problem, too, so it's a
 win for you.

   

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