[PHP] Re: PHP eval() fatal error

2007-08-27 Thread Maarten Balliauw
When re-writing this example to a form of create_function, the same problem occurs: ?php $code = ' return 12*A+; '; // Clearly incorrect code :-) $returnValue = 0; // Evaluate formula try { $temporaryCalculationFunction = @create_function('', $code); // E_ERROR here if

Re: [PHP] Adding text before last paragraph

2007-08-27 Thread Dotan Cohen
On 27/08/07, Richard Lynch [EMAIL PROTECTED] wrote: On Sun, August 26, 2007 3:41 pm, Dotan Cohen wrote: I have a string with some HTML paragraphs, like so: $text=pFirst paragraph/p\npMore text/p\npSome more text/p\npEnd of story/p; I'd like to add an image before the last paragraph. I

Re: [PHP] Capturing shell command output.

2007-08-27 Thread shiplu
On 8/27/07, Richard Lynch [EMAIL PROTECTED] wrote: You could look into using named pipes in PHP. I think PHP is already folding stderr into stdout (21) for you. You could also try using http://php.net/exec instead of the backticks to get a separate error code if there is an error. On Sat,

Re: [PHP] PHP and SOAP calls

2007-08-27 Thread Angelo Zanetti
Richard Lynch wrote: On Fri, August 24, 2007 12:55 am, Angelo Zanetti wrote: Dear All I have been using nusoap to development a client that makes SOAP calls to a server. I have however been stuck on a small issue but can't seem to solve it and therefore I need to relook at using another

[PHP] Why not user...?

2007-08-27 Thread Gustav Wiberg
Hi! Why is it so that I get this error. I'm using Windows Integrated authorization-method for actual webb I'm testing on. Notice: Undefined index: PHP_AUTH_USER in C:\www\utveckling\username.php on line 2 ? Best regards /Gustav Wiberg -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Adding text before last paragraph

2007-08-27 Thread Brian Rue
Dotan, try this: $text=pFirst paragraph/p\npMore text/p\npSome more text/p\npEnd of story/p; $story = preg_replace('{(?=p(?:|\s)(?!.*p(?:|\s)))}is', pnew paragraph goes here/p\n, $text); This matches a position that has an opening p tag (with or without parameters), which is NOT followed

Re: [PHP] Database includes

2007-08-27 Thread Stut
Chris wrote: Bruce Cowin wrote: I'm curious as to how everyone organises and includes their classes in PHP5. Let's take a simple example that has 3 classes: customer, order, and database. The database class has a base sql db class (I know there is PDO and other things but this class is

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-27 Thread Nathan Nobbe
Stut wrote: Just wanted to pick you up on this. PHP is the only language you've listed that only has a single implementation. There are implementations of C++ compilers that are writting in other languages. I can't speak for Java since I have little experience but I'd be surprised if all

Re: [PHP] Why not user...?

2007-08-27 Thread Robert Cummings
On Mon, 2007-08-27 at 09:56 +0200, Gustav Wiberg wrote: Hi! Why is it so that I get this error. I'm using Windows Integrated authorization-method for actual webb I'm testing on. Notice: Undefined index: PHP_AUTH_USER in C:\www\utveckling\username.php on line 2 Because on line 2 of

RE: [PHP] Why not user...?

2007-08-27 Thread Jay Blanchard
[snip] Why is it so that I get this error. I'm using Windows Integrated authorization-method for actual webb I'm testing on. Notice: Undefined index: PHP_AUTH_USER in C:\www\utveckling\username.php on line 2 [/snip] Hmm, can only take a guess since we do not see what sets PHP_AUTH_USER, but

Re: [PHP] Why not user...?

2007-08-27 Thread Stut
Gustav Wiberg wrote: Why is it so that I get this error. I'm using Windows Integrated authorization-method for actual webb I'm testing on. Notice: Undefined index: PHP_AUTH_USER in C:\www\utveckling\username.php on line 2 For some reason it's not getting set. This could be because you've

Re: [PHP] Why not user...?

2007-08-27 Thread Gustav Wiberg
Hi! Thanx! I figured it out. The username wasn't in server-variable PHP_AUTH_USER but in AUTH_USER Best regards /Gustav Wiberg - Original Message - From: Stut [EMAIL PROTECTED] To: Gustav Wiberg [EMAIL PROTECTED] Cc: PHP General php-general@lists.php.net Sent: Monday, August

[PHP] [Job] Developer Position [50-100k] (New Hope, PA)

2007-08-27 Thread Gavin M. Roy
Are you tired of working on the same types of web apps? Are you looking for more of a challenge where you can put your code-fu to its test working in a high-traffic, open-source friendly environment? Can you tackle any problem put in front of you, hacking your way through problems you've not

[PHP] A simple PHP script to generate a Pie Chart based on SQL query

2007-08-27 Thread Ali, Saqib
Hello All, I am looking for a simple PHP script that can generate Pie Chart based on SQL query resultset. I don't want a reporting system, as we are already using Crystal Reports for that. Any suggestions? Saqib Ali -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] xml reader/writer

2007-08-27 Thread Sam Baker
So I don't have to reinvent anything, does such a thing exist anywhere that anyone knows of: I'm looking for a php script that will read any xml file, display the contents in html, with the option of adding an entry (in the same scheme, whatever that might be) or deleting existing entries. I

Re: [PHP] A simple PHP script to generate a Pie Chart based on SQL query

2007-08-27 Thread Wolf
http://www.hotscripts.com/PHP/Scripts_and_Programs/Graphs_and_Charts/index.html or http://www.phpclasses.org/browse/package/1063.html or http://www.google.com/search?q=PHP%3A+Pie+Chartie=utf-8oe=utf-8aq=trls=org.mozilla:en-US:officialclient=firefox-a I've used the PHP classes one onces

Re: [PHP] A simple PHP script to generate a Pie Chart based on SQL query

2007-08-27 Thread Ludovic André
I am looking for a simple PHP script that can generate Pie Chart based on SQL query resultset. http://www.aditus.nu/jpgraph/ This lib works great! Ludo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] move_uploaded_file fails randomly with open_basedir and upload_tmp_dir

2007-08-27 Thread Hugues De Keyzer
Hi all, I'm having a weird problem on my web hosting provider's server. I'm using drupal with the image module and the image_pub module to upload a series of pictures using Gallery Remote. This software uploads pictures one after the other using a classic HTTP POST method. The upload always

Re: [PHP] A simple PHP script to generate a Pie Chart based on SQL query

2007-08-27 Thread mike
Hello All, I am looking for a simple PHP script that can generate Pie Chart based on SQL query resultset. I don't want a reporting system, as we are already using Crystal Reports for that. Any suggestions? one word is all you need: jpgraph -- PHP General Mailing List

RE: [PHP] xml reader/writer

2007-08-27 Thread Jay Blanchard
[snip] So I don't have to reinvent anything, does such a thing exist anywhere that anyone knows of: I'm looking for a php script that will read any xml file, display the contents in html, with the option of adding an entry (in the same scheme, whatever that might be) or deleting existing

[PHP] why?

2007-08-27 Thread Gustav Wiberg
Hi! I can't figure the thing with Windows Integrated authentication... I have checked a website for doing this. I still have to enter username and password even if I'm on the local computer (through a VPN though) This would be the same as using computer locally on the network, but I have to

Re: [PHP] why?

2007-08-27 Thread Stut
Gustav Wiberg wrote: I can't figure the thing with Windows Integrated authentication... I have checked a website for doing this. I still have to enter username and password even if I'm on the local computer (through a VPN though) This would be the same as using computer locally on the network,

[PHP] windows auth with php

2007-08-27 Thread Gustav Wiberg
Hi again! I read The HTTP Authentication hooks in PHP are only available when it is running as an Apache module and is hence not available in the CGI version. In an Apache module PHP script, it is possible to use the header() function to send an Authentication Required message to the client

Re: [PHP] why?

2007-08-27 Thread Gustav Wiberg
Hi! No it doesn't seem to work locally either (I haven't tested myself, but a working-friend did) Best regards /Gustav Wiberg - Original Message - From: Stut [EMAIL PROTECTED] To: Gustav Wiberg [EMAIL PROTECTED] Cc: PHP General php-general@lists.php.net Sent: Monday, August 27,

[PHP] Regular expression - URL validator

2007-08-27 Thread Wagner Garcia Campagner
Hello, I found this regular expression on a web site. It is basicaly an URL validator. I'm trying to implement this in my web site, but i receive errors. I think this is a PERL REGEX so what should i do to make it work in php? $valid =

Re: [PHP] why?

2007-08-27 Thread Stut
Gustav Wiberg wrote: No it doesn't seem to work locally either (I haven't tested myself, but a working-friend did) I suggest you find a Windows Server mailing list and ask there. This is almost certainly not an issue with PHP. You might also want to find/write an ASP script that will show

Re: [PHP] why?

2007-08-27 Thread Gustav Wiberg
Hi! Ok. Of course Why didn't I think of that? Thanx! :-) Best regards /Gustav Wiberg - Original Message - From: Stut [EMAIL PROTECTED] To: Gustav Wiberg [EMAIL PROTECTED] Cc: PHP General php-general@lists.php.net Sent: Monday, August 27, 2007 8:59 PM Subject: Re: [PHP] why?

Re: [PHP] windows auth with php

2007-08-27 Thread Stut
Gustav Wiberg wrote: I read The HTTP Authentication hooks in PHP are only available when it is running as an Apache module and is hence not available in the CGI version. In an Apache module PHP script, it is possible to use the header() function to send an Authentication Required message to

RE: [PHP] why?

2007-08-27 Thread Jay Blanchard
[snip] I can't figure the thing with Windows Integrated authentication... I have checked a website for doing this. I still have to enter username and password even if I'm on the local computer (through a VPN though) This would be the same as using computer locally on the network, but I have to

RE: [PHP] why?

2007-08-27 Thread Jay Blanchard
[snip] ... be the same as using computer locally on the network, but I have to enter username and password. I'm sure I have checked the Windows Integreated authenication - checkbox for the website it's about. When I have entered username and password I can go on and do whatever I want on that

Re: [PHP] why?

2007-08-27 Thread mike
On 8/27/07, Jay Blanchard [EMAIL PROTECTED] wrote: Are you trying to do single sign-on? This would be one of the holy grails of the PHP on Linux, Windows clients operations. This is available with .Net and with legacy ASP/Jscript apps but not with PHPeven on windows there's an apache

Re: [PHP] Database includes

2007-08-27 Thread Wouter van Vliet / Interpotential
On 27/08/07, Stut [EMAIL PROTECTED] wrote: I use a slightly different approach to prevent the need to mess about with files when moving to production. At the end on config.php I have this... if (file_exists('config_dev.php')) require 'config_dev.php'; I've got my own variation on

Re: [PHP] Regular expression - URL validator

2007-08-27 Thread Jim Lucas
Wagner Garcia Campagner wrote: Hello, I found this regular expression on a web site. It is basicaly an URL validator. I'm trying to implement this in my web site, but i receive errors. I think this is a PERL REGEX so what should i do to make it work in php? $valid =

Re: [PHP] Adding text before last paragraph

2007-08-27 Thread Dotan Cohen
On 27/08/07, Brian Rue [EMAIL PROTECTED] wrote: Dotan, try this: $text=pFirst paragraph/p\npMore text/p\npSome more text/p\npEnd of story/p; $story = preg_replace('{(?=p(?:|\s)(?!.*p(?:|\s)))}is', pnew paragraph goes here/p\n, $text); This matches a position that has an opening p tag

RE: [PHP] A simple PHP script to generate a Pie Chart based on SQL query

2007-08-27 Thread Bastien Koert
http://www.aditus.nu/jpgraph/ bastien Date: Mon, 27 Aug 2007 10:44:01 -0700 From: [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] A simple PHP script to generate a Pie Chart based on SQL query Hello All, I am looking for a

Re: [PHP] Delete row in a lookup table

2007-08-27 Thread nitrox .
Wow, I actually managed to get this working now. Thanks to Richard and stut I realized I was on the right track but had my code screwed up. Richard your right, a primary key column was silly but was a temporary fix. It allowed me to delete with one column and not have to reference a second. So

RE: [PHP] Adding text before last paragraph

2007-08-27 Thread Brian Rue
Sure, I'll break it apart a little: '{(?=p(?:|\s)(?!.*p(?:|\s)))}is' $regex = '{' . // opening delimeter '(?=' . // positive lookahead: match the beginning of a position // that matches the following pattern: 'p' . // first part of an opening p

Re: [PHP] xml reader/writer

2007-08-27 Thread Richard Lynch
On Mon, August 27, 2007 12:41 pm, Sam Baker wrote: So I don't have to reinvent anything, does such a thing exist anywhere that anyone knows of: I'm looking for a php script that will read any xml file, display the contents in html, with the option of adding an entry (in the same scheme,

Re: [PHP] Why not user...?

2007-08-27 Thread Richard Lynch
On Mon, August 27, 2007 8:51 am, Stut wrote: Gustav Wiberg wrote: Why is it so that I get this error. I'm using Windows Integrated authorization-method for actual webb I'm testing on. Notice: Undefined index: PHP_AUTH_USER in C:\www\utveckling\username.php on line 2 For some reason it's

Re: [PHP] Capturing shell command output.

2007-08-27 Thread Richard Lynch
On Mon, August 27, 2007 2:43 am, shiplu wrote: I have tried same file as cli and as webpage. I don't know why only cli version works nicely. There may be some issue. But my technique has some advantages. It can run command asynchronously. Thats what i need for my application. I can create

Re: [PHP] A simple PHP script to generate a Pie Chart based on SQL query

2007-08-27 Thread Richard Lynch
On Mon, August 27, 2007 12:44 pm, Ali, Saqib wrote: I am looking for a simple PHP script that can generate Pie Chart based on SQL query resultset. JP Graph It requires GD extension. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist.

Re: [PHP] move_uploaded_file fails randomly with open_basedir and upload_tmp_dir

2007-08-27 Thread Richard Lynch
On Mon, August 27, 2007 12:55 pm, Hugues De Keyzer wrote: I'm having a weird problem on my web hosting provider's server. I'm using drupal with the image module and the image_pub module to upload a series of pictures using Gallery Remote. This software uploads pictures one after the other

Re: [PHP] why?

2007-08-27 Thread Gustav Wiberg
Hi! Yes, a single sign-on it is... It doesn't work together with Windows (and PHP) you mean? Best regards /Gustav Wiberg - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: Jay Blanchard [EMAIL PROTECTED]; Gustav Wiberg [EMAIL PROTECTED]; PHP General

Re: [PHP] Re: PHP eval() fatal error

2007-08-27 Thread Richard Lynch
On Mon, August 27, 2007 12:59 am, Maarten Balliauw wrote: Now let's repeat my question: is there any way to gracefully evaluate specific code, eventually catch an error and respond to that, without using parsekit() or launching another process to get this done? I missed that you had an E_ERROR

Re: [PHP] Adding text before last paragraph

2007-08-27 Thread Richard Lynch
On Mon, August 27, 2007 1:46 am, Dotan Cohen wrote: On 27/08/07, Richard Lynch [EMAIL PROTECTED] wrote: On Sun, August 26, 2007 3:41 pm, Dotan Cohen wrote: I have a string with some HTML paragraphs, like so: $text=pFirst paragraph/p\npMore text/p\npSome more text/p\npEnd of story/p;

Re: [PHP] Adding text before last paragraph

2007-08-27 Thread Richard Lynch
On Mon, August 27, 2007 5:45 pm, Dotan Cohen wrote: Thank you Brian. This most certainly works. I'm having a very hard time decyphering your regex, as I'd like to learn from it. I'm going over PCRE again, but I think that I may hit google soon. Thank you very, very much for the working code.

[PHP] Job Opportunity: PHP Developer Opportunity

2007-08-27 Thread Anne Mcdonald
Eric, I am an executive recruiter and am working on a search for a client of mine that is a privately held software company located in Bend, OR. This company is backed by Greystone out of NY. www.greystoneco.com I was wondering if you might know of any PHP Developers that match the job

[PHP] Session generating same Captchas

2007-08-27 Thread Michael Williams
Hi All, I'm having a problem using Captchas. Basically I'm using Joshua Houle's script to generate Captchas. However, I get different behaviors on different systems. On one system I can simply refresh the page and a different Captcha is generated each time. However, on another

Re: [PHP] Database includes

2007-08-27 Thread Bruce Cowin
Thanks to everyone who responded. Some really interesting ideas. I'll try them out. Regards, Bruce Wouter van Vliet / Interpotential [EMAIL PROTECTED] 28/08/2007 8:34 a.m. On 27/08/07, Stut [EMAIL PROTECTED] wrote: I use a slightly different approach to prevent the need to mess about