[PHP] PHP ISSUE!!!

2012-04-01 Thread Karl James
Is anyone online at the moment.

I need help with a phpmyadmin table issue.

I get a critical error when I try to upload images

From the web portal admin page.

I can send you a screen shot and allow you access to

The database to help out. Some have told me this is 

A Auto_increment issue, but this table I think has it turned

On if I am reading the website correctly on the options section/tab.

 

MYSQL: duplicate entry '0' for key 1.

MYSQL: Insert Error - Duplicate entry '0' 

 

Can anyone help me walk me through step by step.

I know it's a simple setting I am missing. 

Can anyone please help me at the moment.

OF course you can email instantly then maybe chant via

FB or Aim...Need help really fast.

If I can do this I can get job doing web design and possibly

Reach my goal and be a web designer.

I just really do not know phpmyadmin that well to fix issues like this yet.

 

 

 

 

 

 mailto:karlja...@tampabay.rr.com Karl James

 



Re: [PHP] PHP ISSUE!!!

2012-04-01 Thread tamouse mailing lists
On Sun, Apr 1, 2012 at 11:03 PM, Karl James karlja...@tampabay.rr.com wrote:
 Is anyone online at the moment.

 I need help with a phpmyadmin table issue.

 I get a critical error when I try to upload images

 From the web portal admin page.

 I can send you a screen shot and allow you access to

 The database to help out. Some have told me this is

 A Auto_increment issue, but this table I think has it turned

 On if I am reading the website correctly on the options section/tab.



 MYSQL: duplicate entry '0' for key 1.

 MYSQL: Insert Error - Duplicate entry '0'



 Can anyone help me walk me through step by step.

 I know it's a simple setting I am missing.

 Can anyone please help me at the moment.

 OF course you can email instantly then maybe chant via

 FB or Aim...Need help really fast.

 If I can do this I can get job doing web design and possibly

 Reach my goal and be a web designer.

 I just really do not know phpmyadmin that well to fix issues like this yet.











  mailto:karlja...@tampabay.rr.com Karl James




I'm on now. This doesn't sound much like a php issue, per se. You
might be able to find someone on #mysql on irc.freenode.net to walk
you through what's going wrong in real time.

if you don't have an irc client handy, you can use the web chat client
at http://webchat.freenode.net or http://chat.mibbit.com

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



[PHP] Issue with Quick Email validation

2011-03-10 Thread robert
Hi,
I'm newbie to PHP and this list, possible not a new question so forgive me if 
it's a repeat 
I have a form where I want the submitter Email ID to only be from one domain

Here's the part I'm having issues with 

$domain = explode( @, $who);
if ( $domain[1] == company.com) {
echo $domain[1];
echo(h3Email invalid./h3);
exit;
}

First Echo is just for me to check 
I type in a correct Email ID, say m...@company.com 

The return of this is:

company.com
Email invalid.


As far as I can see this if statement should not fall in, what am I missing?




Re: [PHP] Issue with Quick Email validation

2011-03-10 Thread Louis Huppenbauer
try != instead of ==, that should do the trick.

2011/3/10  rob...@myself.com:
 Hi,
 I'm newbie to PHP and this list, possible not a new question so forgive me if 
 it's a repeat
 I have a form where I want the submitter Email ID to only be from one domain

 Here's the part I'm having issues with

                                        $domain = explode( @, $who);
                        if ( $domain[1] == company.com) {
                                        echo $domain[1];
                                        echo(h3Email invalid./h3);
                                        exit;
                                        }

 First Echo is just for me to check
 I type in a correct Email ID, say m...@company.com

 The return of this is:

 company.com
 Email invalid.


 As far as I can see this if statement should not fall in, what am I missing?





Re: [PHP] Issue with Quick Email validation

2011-03-10 Thread robert
Thank you, that did get me past that part!

Had also to put in else statement to call Email function, without doing so the 
mail was sent even though giving error 

Robert



 

 

-Original Message-
From: Louis Huppenbauer louis.huppenba...@gmail.com
To: rob...@myself.com
Cc: php-general@lists.php.net
Sent: Thu, Mar 10, 2011 11:38 am
Subject: Re: [PHP] Issue with Quick Email validation


try != instead of ==, that should do the trick.



2011/3/10  rob...@myself.com:

 Hi,

 I'm newbie to PHP and this list, possible not a new question so forgive me if 

it's a repeat

 I have a form where I want the submitter Email ID to only be from one domain



 Here's the part I'm having issues with



$domain = explode( @, $who);

if ( $domain[1] == company.com) {

echo $domain[1];

echo(h3Email invalid./h3);

exit;

}



 First Echo is just for me to check

 I type in a correct Email ID, say m...@company.com



 The return of this is:



 company.com

 Email invalid.





 As far as I can see this if statement should not fall in, what am I missing?








 


Re: [PHP] Issue with Quick Email validation

2011-03-10 Thread Richard Quadling
On 10 March 2011 11:07,  rob...@myself.com wrote:
 Thank you, that did get me past that part!

 Had also to put in else statement to call Email function, without doing so 
 the mail was sent even though giving error

 Robert







 -Original Message-
 From: Louis Huppenbauer louis.huppenba...@gmail.com
 To: rob...@myself.com
 Cc: php-general@lists.php.net
 Sent: Thu, Mar 10, 2011 11:38 am
 Subject: Re: [PHP] Issue with Quick Email validation


 try != instead of ==, that should do the trick.



 2011/3/10  rob...@myself.com:

 Hi,

 I'm newbie to PHP and this list, possible not a new question so forgive me if

 it's a repeat

 I have a form where I want the submitter Email ID to only be from one domain



 Here's the part I'm having issues with



                                        $domain = explode( @, $who);

                        if ( $domain[1] == company.com) {

                                        echo $domain[1];

                                        echo(h3Email invalid./h3);

                                        exit;

                                        }



 First Echo is just for me to check

 I type in a correct Email ID, say m...@company.com



 The return of this is:



 company.com

 Email invalid.
 As far as I can see this if statement should not fall in, what am I missing?

Why bother asking for the entire address? Just ask for the name part
and display the domain name on the form?

label for=emailEnter your email address: input type=text
name=email id=email /@company.com/label

sort of thing.


-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

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



RE: [PHP] Issue with Quick Email validation

2011-03-10 Thread Ford, Mike
Apart form the obvious error already solved, in this situation I would not be 
forcing my users to type in an element that only has one option -- I would 
display the form box with the text @company.com immediately after it, and 
only expect the unique part to be entered.

Cheers!

Mike

 -- 
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,  
Leeds Metropolitan University, C507 City Campus, 
Woodhouse Lane, LEEDS,  LS1 3HE,  United Kingdom 
Email: m.f...@leedsmet.ac.uk 
Tel: +44 113 812 4730



 -Original Message-
 From: rob...@myself.com [mailto:rob...@myself.com]
 Sent: 10 March 2011 09:45
 To: php-general@lists.php.net
 Subject: [PHP] Issue with Quick Email validation
 
 Hi,
 I'm newbie to PHP and this list, possible not a new question so
 forgive me if it's a repeat
 I have a form where I want the submitter Email ID to only be from
 one domain
 
 Here's the part I'm having issues with
 
 $domain = explode( @,
 $who);
 if ( $domain[1] == company.com) {
 echo $domain[1];
 echo(h3Email
 invalid./h3);
 exit;
 }
 
 First Echo is just for me to check
 I type in a correct Email ID, say m...@company.com
 
 The return of this is:
 
 company.com
 Email invalid.
 
 
 As far as I can see this if statement should not fall in, what am I
 missing?
 



To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

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



[PHP] Issue with $HTTP_POST_VARS Not getting Variables

2009-12-11 Thread Eric Lommatsch
Hello,
 
I am working with a login page to use with an application that we are
planning to make available as a web service. The login.php page itself works
correctly, however when I try and pass parameters to the login page the are
not being recognized by the login.php page. 
 
Here is the basic code that I am dealing with to attempt to the the
variables:
 
?php

$username = $HTTP_POST_VARS['username'];

$password = $HTTP_POST_VARS['password'];

$username = $_POST['username'];

$password = $_POST['password'];

echo $username;

?

When I enter the url
http://localost/index.php?username=jasperadminpassword=**

Where localhost is the ip address of my server and ** is the password of
the user that is logging in, I am not having the username questioned and the
login.php isacting as if I have not entered any parameters. 

Why are the parameters not being accepted?

I am using php version 5.2.6 on a ubuntu linux box

 
Thank you
 
Eric H. Lommatsch
Programmer
360 Business 
 


Re: [PHP] Issue with $HTTP_POST_VARS Not getting Variables

2009-12-11 Thread Ashley Sheridan
On Fri, 2009-12-11 at 13:37 -0700, Eric Lommatsch wrote:

 Hello,
  
 I am working with a login page to use with an application that we are
 planning to make available as a web service. The login.php page itself works
 correctly, however when I try and pass parameters to the login page the are
 not being recognized by the login.php page. 
  
 Here is the basic code that I am dealing with to attempt to the the
 variables:
  
 ?php
 
 $username = $HTTP_POST_VARS['username'];
 
 $password = $HTTP_POST_VARS['password'];
 
 $username = $_POST['username'];
 
 $password = $_POST['password'];
 
 echo $username;
 
 ?
 
 When I enter the url
 http://localost/index.php?username=jasperadminpassword=**
 
 Where localhost is the ip address of my server and ** is the password of
 the user that is logging in, I am not having the username questioned and the
 login.php isacting as if I have not entered any parameters. 
 
 Why are the parameters not being accepted?
 
 I am using php version 5.2.6 on a ubuntu linux box
 
  
 Thank you
  
 Eric H. Lommatsch
 Programmer
 360 Business 
  


First off, take out those HTTP_POST_VARS lines. That's an outdated way
of accessing post variables, and is made useless by the next two lines
that follow it.

Second, the two lines you are using at the end there are for post data,
but you clearly use get data in the URL! If you have to accept the
username and password from both get and post, change the lines to use
$_REQUEST instead of $_POST.

Thanks,
Ash
http://www.ashleysheridan.co.uk




RE: [PHP] Issue with $HTTP_POST_VARS Not getting Variables

2009-12-11 Thread Eric Lommatsch
Doh, I should have thought of that!
 
Thanks, that is what happens when you use code that someone else has writen
and included with a software package. At least I assumed that the code was
already written correctly to accept parameters. I guess it wasn't.
 
Thank you
 
Eric H. Lommatsch
Programmer
360 Business 
 
 


From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
Sent: Friday, December 11, 2009 1:39 PM
To: Eric Lommatsch
Cc: php-general@lists.php.net
Subject: Re: [PHP] Issue with $HTTP_POST_VARS Not getting Variables


On Fri, 2009-12-11 at 13:37 -0700, Eric Lommatsch wrote: 

Hello,
 
I am working with a login page to use with an application that we are
planning to make available as a web service. The login.php page
itself works
correctly, however when I try and pass parameters to the login page
the are
not being recognized by the login.php page. 
 
Here is the basic code that I am dealing with to attempt to the the
variables:
 
?php

$username = $HTTP_POST_VARS['username'];

$password = $HTTP_POST_VARS['password'];

$username = $_POST['username'];

$password = $_POST['password'];

echo $username;

?

When I enter the url
http://localost/index.php?username=jasperadminpassword=**

Where localhost is the ip address of my server and ** is the
password of
the user that is logging in, I am not having the username questioned
and the
login.php isacting as if I have not entered any parameters. 

Why are the parameters not being accepted?

I am using php version 5.2.6 on a ubuntu linux box

 
Thank you
 
Eric H. Lommatsch
Programmer
360 Business 
 


First off, take out those HTTP_POST_VARS lines. That's an outdated way of
accessing post variables, and is made useless by the next two lines that
follow it.

Second, the two lines you are using at the end there are for post data, but
you clearly use get data in the URL! If you have to accept the username and
password from both get and post, change the lines to use $_REQUEST instead of
$_POST.


Thanks,
Ash
http://www.ashleysheridan.co.uk





Re: [PHP] Issue with $HTTP_POST_VARS Not getting Variables

2009-12-11 Thread Roberto Aloi
Because you're passing the args through the Url (GET), not through a  
POST request.


Roberto Aloi

On 11 Dec 2009, at 20:37, Eric Lommatsch er...@micronix.com wrote:


Hello,

I am working with a login page to use with an application that we are
planning to make available as a web service. The login.php page  
itself works
correctly, however when I try and pass parameters to the login page  
the are

not being recognized by the login.php page.

Here is the basic code that I am dealing with to attempt to the the
variables:

?php

$username = $HTTP_POST_VARS['username'];

$password = $HTTP_POST_VARS['password'];

$username = $_POST['username'];

$password = $_POST['password'];

echo $username;

?

When I enter the url
http://localost/index.php?username=jasperadminpassword=**

Where localhost is the ip address of my server and ** is the  
password of
the user that is logging in, I am not having the username questioned  
and the

login.php isacting as if I have not entered any parameters.

Why are the parameters not being accepted?

I am using php version 5.2.6 on a ubuntu linux box


Thank you

Eric H. Lommatsch
Programmer
360 Business



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



[PHP] Issue of upgrading from to 5.x

2009-09-27 Thread Chris Streatfield
Here's a little problem I'm just discovering.

The issue has been brought to my attention by a couple of my clients when 
their mail() replies were suddenly turning up with zero variable content. 

I have several html/php contact/subscribe forms which return a mail reply to 
the web site owner. These have recently been turning up with none of the 
variables being picked up from the html form. The mail() library is still 
sending the reply correctly. All the material is hosted on commercial ISP web 
servers. A couple of them have clearly upgraded to PHP 5.x recently.

When a user fills out the form and presses the submit button the process page 
picks up the variables from the input and mails the output back to the site 
owner. Recently some of these replies have started to show up with the 
variables not being picked up. On looking through the official PHP 
documentation it would seem to be an issue of the change in the use of 
globals being turned off by default in 5.x onwards. I found an example of a 
function in the documentation to include that simulates globals being turned 
on but this does not seem to be working as expected.

While this is a very simple (and possibly only a bit irritating) problem the 
nightmare scenario for me is that I have a great many files (read several Ks) 
that rely on the same functionality, as the access to several MySql 
databases. I have very quickly tested a couple of these database constructs 
on one of the hosting sites where the mail() forms have failed and the 
database constructs do not work either. I really would prefer not to have to 
spend the whole of the next year re-writing all these files especially as 
this work is all voluntary.

Now if these very simple html form / php processing structures are now going 
to fail by not retrieving the variables what are we supposed to do to create 
web site contact forms or data entry pages for database access. I have tried 
constructing the forms as hybrid php/html and included the function noted 
above and this did not work either. In fact on one of the servers running the 
upgrade even logging on to the database construct froze at the first 
processing page. I think that either this quote
header(Location: adminhome.php);
exit(); /quote failed to trigger or the session_register(); failed.raised

Any suggestions advice would be most welcome.

I have included an example snippet of code from one of the mailback forms that 
has been working correctly for several years.

A snippet of example code
The Form:
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 
Transitional//ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
link rel=stylesheet href=css/formpage.css type=text/css /
titleOn-line Membership form/title
/head
body
form method=post action=psubscription1.php
h3Join the Campaign/h3
pbON-LINE ANNUAL SUBSCRIPTION FORM/b/p
fieldset
legendContact Details/legend
ul
lilabel for=firstnameName/label
input name=firstname id=firstname class=text type=text 
size=35 //li
lilabel for=addressAddress/label
input name=address id=address class=text type=text size=35 //li
lilabel for=suburbSuburb/label
input name=suburb id=suburb class=text type=text size=35 //li
lilabel for=cityCity/Postcode/label
input name=city id=city class=text type=text size=35 //li
lilabel for=telPhone/label
..
/form
/body
/html
-ENDS---
The processing done in psubscription1.php-
?php
$toaddress=ow...@example.com;

$subject = On-line Membership subscription;

$mailcontent=This is the reply from the on-line membership subscription form 
on the web-site.
Contact Details-\n
Name:- $firstname
Address:--
$address
$suburb
$city\n
Phone:--- $tel
...
--;
$additionalheaders=From: webs...@example.com\n;
mail($toaddress, $subject, $mailcontent, $additionalheaders);
?
---ENDS

All the best
Chris


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



Re: [PHP] Issue with the huge import script

2009-08-16 Thread Phpster


On Aug 15, 2009, at 9:15 PM, Devendra Jadhav devendra...@gmail.com  
wrote:



Hi,

I have to import data from one database to another, I have to import  
around

10(1Lac) records.
First I need to check if the record is already imported or not and  
import

only those records which are not imported.

Here is my logic

$already_imported = get_already_imported_records();
format of the $already_imported is $already_imported[someid] =  
'imported';


Now i take all records from another db and iterating through it.

if (!key_exists($already_imported[$new_id])){
   import_function($new_id)
}else{
   echo 'allready imported'.$already_imported[$new_id];
}

Now my script is importing same records for more than one time. I am  
not

able to get through this issue

Is it because of the size of the records or something else...?

Please suggest me some solution which is faster, safe and easy to  
code :D


Thanks in advance

--
Devendra Jadhav


What are the databases? Both mysql? Or different systems? How do you  
define whether the record exists?


Are you running into timeout issues? If so, one trick is to write the  
page to process 100 or so records at a time and then use JavaScript to  
reload the page to avoid the timeout issues.


Bastien

Sent from my iPod


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



[PHP] Issue with the huge import script

2009-08-15 Thread Devendra Jadhav
Hi,

I have to import data from one database to another, I have to import around
10(1Lac) records.
First I need to check if the record is already imported or not and import
only those records which are not imported.

Here is my logic

$already_imported = get_already_imported_records();
format of the $already_imported is $already_imported[someid] = 'imported';

Now i take all records from another db and iterating through it.

if (!key_exists($already_imported[$new_id])){
import_function($new_id)
}else{
echo 'allready imported'.$already_imported[$new_id];
}

Now my script is importing same records for more than one time. I am not
able to get through this issue

Is it because of the size of the records or something else...?

Please suggest me some solution which is faster, safe and easy to code :D

Thanks in advance

-- 
Devendra Jadhav


[PHP] issue with mail function

2009-08-04 Thread Allen McCabe
I have recently been working a lot lately with arrays and printing them into
html tables for email (like a user survey for example). I have been seeing
odd things with the table lately, each unique to it's sending php file. I
will get a space in a random spot. In one, I used an array to rename the
Name values of input fields to more readable ones, whatadd becomes What
to Add, only the word 'Add' is spelled 'Ad d'. With my recent mail script
(submitting a customer profile change), I get it in a similar area, a Name
value renamed and I get Emp loyee in the table cell. The adjacent cell is
fine though, reading Needs Handicap Accommodations. I will post some of my
code to show that I haven't misplaced a space:

[code]


   1. ?php
   2.
   3. //CHECKS TO SEE IF FIELDS WERE PROPERLY COMPLETED AND ASSIGNS
   VARIABLES TO INPUTS - OTHERWISE AN ERROR MESSAGE IS PRINTED
   4.
   5. $Employee = $_POST['Employee'];
   6.
   7. $fields2 = array();
   8.
   9. $fields2{Employee} = Employee;
   10. $fields2{IsHandicappedAccommodations} = Needs Handicap
   Accommodations;
   11.
   12. $body = We have received the following
   information:\n\nhtmlbodytable cellspacing='2' cellpadding='2'border=
   '1'tr valign='top';
   13.
   14.
   15. //FOREACH LOOP
   16.
   17. $headerlabel = '0';
   18.
   19. foreach ($fields as $x = $y) {
   20. $headerlabel = $headerlabel +1;
   21. $body .= td{$headerlabel}brimg src='
   http://lpacmarketing.hostzi.com/images/spacer.gif' width='120' height='1'
   /td;
   22. }
   23.
   24.
   25. $body .= /trtr valign='top';
   26.
   27. foreach ($fields2 as $x = $y)
   28. $body .= td{$y}/td;
   29.
   30. $body .= /trtr valign='top';
   31.
   32. foreach ($fields2 as $x = $y)
   33. $body .= td{$_REQUEST[$x]}/td;
   34.
   35. $body .= /trtr valign='top'td colspan='9';
   36.
   37. foreach ($fields as $a = $b) {
   38. $body .= sprintf(%s\n,$b);
   39. }
   40.
   41. $body .= brbr;
   42.
   43. foreach ($fields as $a = $b) {
   44. $body .= sprintf(%s\n,$_POST[$a]);
   45. }
   46.
   47. $body .= /td/tr/table/body/html;
   48.
   49. //END FOREACH LOOPS

[/code]

This is all the code I think is really relevant, but if you think I left
something out I'll be happy to share with you all the code.

This is not a major issue for me, it is just so strange, and if someone
could provide some insight, it would be great.


RE: [PHP] issue with mail function

2009-08-04 Thread Bob McConnell
From: Allen McCabe

 I have recently been working a lot lately with arrays and printing
them into
 html tables for email (like a user survey for example). I have been
seeing
 odd things with the table lately, each unique to it's sending php
file. I
 will get a space in a random spot. In one, I used an array to rename
the
 Name values of input fields to more readable ones, whatadd becomes
What
 to Add, only the word 'Add' is spelled 'Ad d'. With my recent mail
script
 (submitting a customer profile change), I get it in a similar area, a
Name
 value renamed and I get Emp loyee in the table cell. The adjacent
cell is
 fine though, reading Needs Handicap Accommodations. I will post some
of my
 code to show that I haven't misplaced a space:

How far apart are these spaces? Is something on your server injecting
new lines on lines of text it thinks are too long? This would be
displayed by the browser as a space. View source at the browser to see
what was actually added. If this is the case, I suspect you are running
on a Microsoft platform and forgot to set binary mode somewhere.

Bob McConnell

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



Re: [PHP] Issue with filter_var and FILTER_VALIDATE_EMAIL

2009-06-19 Thread Jonathan Tapicer
Works for me:

 var_dump(filter_var('bastien_k(a)hotmail.com',
FILTER_VALIDATE_EMAIL) !== false); //replace (a) with @

Gives:

 bool(true)

You are sending an @ instead of  at , right?

Jonathan


On Fri, Jun 19, 2009 at 11:49 AM, Bastien Koertphps...@gmail.com wrote:
 Hey guys,

 Running the new version of PHPMailer and my hotmail address fails the
 validation.

 Email address is bastien_k at hotmail dot com

 Any ideas?

 --

 Bastien

 Cat, the other other white meat

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



[PHP] Trying to prevent large file attachments in Squirrelmail, on U8.10S, is this a PHP issue?

2008-12-24 Thread Xn Nooby
I am using PHP5 on Ubuntu 8.10 Server, it is being used by Apache and
Squirrelmail. I have tried setting the upload_max_filesize in the
/etc/php5/apache2/php.ini file, but it only seems to apply after I
upload the file. My goal is to prevent remote Squirrelmail users from
attaching large files to the emails they are drafting. They have slow
connections, and uploading a large file would effectively hang them.


Here is my question originally posted to the Ubuntu Forum (before I
began understand it was possibly a PHP issue):


Is it possible to prevent Squirrelmail users from uploading large
files to a server running Squirrelmail?  My testing seems to indicate
that the attachment size limits enforced by Squirrelmail take place
*after* the file has been uploaded - at which time Squirrelmail aborts
the entire message. I will have some remote users, and I do not want
them to be able to upload files that are over a limit (say 10MB).

If a remote user tries to attach a 500MB attachment to their email, I
don't want them to upload the entire 500MB file, only to then have SM
abort the message.  I want it to fail immediately, or after the 10MB
limit has been reached.

I though there was a way to do this in Apache or PHP, but have been
unable to find it.  I am running Ubuntu Server 8.10 with Apache,
Postfix, Dovecot, and Squirrelmail.

Any suggestions on how to get the file attaching process to abort
before it uploads the entire 500MB file?

thanks!

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



Re: [PHP] Trying to prevent large file attachments in Squirrelmail, on U8.10S, is this a PHP issue?

2008-12-24 Thread Ashley Sheridan
On Wed, 2008-12-24 at 11:23 -0500, Xn Nooby wrote:
 I am using PHP5 on Ubuntu 8.10 Server, it is being used by Apache and
 Squirrelmail. I have tried setting the upload_max_filesize in the
 /etc/php5/apache2/php.ini file, but it only seems to apply after I
 upload the file. My goal is to prevent remote Squirrelmail users from
 attaching large files to the emails they are drafting. They have slow
 connections, and uploading a large file would effectively hang them.
 
 
 Here is my question originally posted to the Ubuntu Forum (before I
 began understand it was possibly a PHP issue):
 
 
 Is it possible to prevent Squirrelmail users from uploading large
 files to a server running Squirrelmail?  My testing seems to indicate
 that the attachment size limits enforced by Squirrelmail take place
 *after* the file has been uploaded - at which time Squirrelmail aborts
 the entire message. I will have some remote users, and I do not want
 them to be able to upload files that are over a limit (say 10MB).
 
 If a remote user tries to attach a 500MB attachment to their email, I
 don't want them to upload the entire 500MB file, only to then have SM
 abort the message.  I want it to fail immediately, or after the 10MB
 limit has been reached.
 
 I though there was a way to do this in Apache or PHP, but have been
 unable to find it.  I am running Ubuntu Server 8.10 with Apache,
 Postfix, Dovecot, and Squirrelmail.
 
 Any suggestions on how to get the file attaching process to abort
 before it uploads the entire 500MB file?
 
 thanks!
 
You could look at amending the form that is shown on the client machines
browser, and set a size there, although the browser may only use it as a
suggestion rather than enforce it. Maybe Squirrelmail already has such a
feature?


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] Trying to prevent large file attachments in Squirrelmail, on U8.10S, is this a PHP issue?

2008-12-24 Thread Xn Nooby
On Wed, Dec 24, 2008 at 3:03 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
 On Wed, 2008-12-24 at 11:23 -0500, Xn Nooby wrote:
 I am using PHP5 on Ubuntu 8.10 Server, it is being used by Apache and
 Squirrelmail. I have tried setting the upload_max_filesize in the
 /etc/php5/apache2/php.ini file, but it only seems to apply after I
 upload the file. My goal is to prevent remote Squirrelmail users from
 attaching large files to the emails they are drafting. They have slow
 connections, and uploading a large file would effectively hang them.


 Here is my question originally posted to the Ubuntu Forum (before I
 began understand it was possibly a PHP issue):


 Is it possible to prevent Squirrelmail users from uploading large
 files to a server running Squirrelmail?  My testing seems to indicate
 that the attachment size limits enforced by Squirrelmail take place
 *after* the file has been uploaded - at which time Squirrelmail aborts
 the entire message. I will have some remote users, and I do not want
 them to be able to upload files that are over a limit (say 10MB).

 If a remote user tries to attach a 500MB attachment to their email, I
 don't want them to upload the entire 500MB file, only to then have SM
 abort the message.  I want it to fail immediately, or after the 10MB
 limit has been reached.

 I though there was a way to do this in Apache or PHP, but have been
 unable to find it.  I am running Ubuntu Server 8.10 with Apache,
 Postfix, Dovecot, and Squirrelmail.

 Any suggestions on how to get the file attaching process to abort
 before it uploads the entire 500MB file?

 thanks!

 You could look at amending the form that is shown on the client machines
 browser, and set a size there, although the browser may only use it as a
 suggestion rather than enforce it. Maybe Squirrelmail already has such a
 feature?


 Ash
 www.ashleysheridan.co.uk



I was able to solve this by adding the value LimitRequestBody to an
Apache/PHP config file. Now it immediately aborts the upload after the
limit has been set. I set the limit to about 11MB with these commands:

sudo vi /etc/apache2/mods-enabled/php5.conf
LimitRequestBody 11222333


thanks!

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



[PHP] issue with php.ini

2008-11-23 Thread Alain Roger
Hi,

i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i uncomment the
following lines:
extension=php_mysql.dll
extension=php_pdo.dll
extension=php_pdo_mysql.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
extension=php_sqlite.dll
extension=php_dbg.dll-5.2.x

after restaring the whole server apache+postgresql + php, i run a simple
phpinfo() and i see nowhere anything about postgresql module or PDO.
phpinfo show that it runs based on the php.ini from D:\webserver\php folder
and not from c:\windows.
which is correct as my php.ini is the the D:\webserver\php folder.

so where could be the problem ?
thx.

-- 
Alain

Windows XP x64 SP2
PostgreSQL 8.3.5 / MS SQL server 2005
Apache 2.2.10
PHP 5.2.6
C# 2005-2008


Re: [PHP] issue with php.ini

2008-11-23 Thread Ashley Sheridan
On Sun, 2008-11-23 at 17:33 +0100, Alain Roger wrote:
 Hi,
 
 i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i uncomment the
 following lines:
 extension=php_mysql.dll
 extension=php_pdo.dll
 extension=php_pdo_mysql.dll
 extension=php_pdo_pgsql.dll
 extension=php_pdo_sqlite.dll
 extension=php_pgsql.dll
 extension=php_sqlite.dll
 extension=php_dbg.dll-5.2.x
 
 after restaring the whole server apache+postgresql + php, i run a simple
 phpinfo() and i see nowhere anything about postgresql module or PDO.
 phpinfo show that it runs based on the php.ini from D:\webserver\php folder
 and not from c:\windows.
 which is correct as my php.ini is the the D:\webserver\php folder.
 
 so where could be the problem ?
 thx.
 
You didn't mention if you were editing the php.ini file that phpinfo()
tells you it is using. Make your changes to that one, and it should be
OK. I have this problem a lot with Windows installations for some
reason.


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] issue with php.ini

2008-11-23 Thread Alain Roger
Yes, i do it in that way but nothing changed

On Sun, Nov 23, 2008 at 6:34 PM, Ashley Sheridan
[EMAIL PROTECTED]wrote:

 On Sun, 2008-11-23 at 17:33 +0100, Alain Roger wrote:
  Hi,
 
  i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i uncomment
 the
  following lines:
  extension=php_mysql.dll
  extension=php_pdo.dll
  extension=php_pdo_mysql.dll
  extension=php_pdo_pgsql.dll
  extension=php_pdo_sqlite.dll
  extension=php_pgsql.dll
  extension=php_sqlite.dll
  extension=php_dbg.dll-5.2.x
 
  after restaring the whole server apache+postgresql + php, i run a simple
  phpinfo() and i see nowhere anything about postgresql module or PDO.
  phpinfo show that it runs based on the php.ini from D:\webserver\php
 folder
  and not from c:\windows.
  which is correct as my php.ini is the the D:\webserver\php folder.
 
  so where could be the problem ?
  thx.
 
 You didn't mention if you were editing the php.ini file that phpinfo()
 tells you it is using. Make your changes to that one, and it should be
 OK. I have this problem a lot with Windows installations for some
 reason.


 Ash
 www.ashleysheridan.co.uk




-- 
Alain
---
Windows XP x64 SP2
PostgreSQL 8.3.5 / MS SQL server 2005
Apache 2.2.10
PHP 5.2.6
C# 2005-2008


Re: [PHP] issue with php.ini

2008-11-23 Thread Ashley Sheridan
On Sun, 2008-11-23 at 18:32 +0100, Alain Roger wrote:
 Yes, i do it in that way but nothing changed
 
 On Sun, Nov 23, 2008 at 6:34 PM, Ashley Sheridan
 [EMAIL PROTECTED]wrote:
 
  On Sun, 2008-11-23 at 17:33 +0100, Alain Roger wrote:
   Hi,
  
   i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i uncomment
  the
   following lines:
   extension=php_mysql.dll
   extension=php_pdo.dll
   extension=php_pdo_mysql.dll
   extension=php_pdo_pgsql.dll
   extension=php_pdo_sqlite.dll
   extension=php_pgsql.dll
   extension=php_sqlite.dll
   extension=php_dbg.dll-5.2.x
  
   after restaring the whole server apache+postgresql + php, i run a simple
   phpinfo() and i see nowhere anything about postgresql module or PDO.
   phpinfo show that it runs based on the php.ini from D:\webserver\php
  folder
   and not from c:\windows.
   which is correct as my php.ini is the the D:\webserver\php folder.
  
   so where could be the problem ?
   thx.
  
  You didn't mention if you were editing the php.ini file that phpinfo()
  tells you it is using. Make your changes to that one, and it should be
  OK. I have this problem a lot with Windows installations for some
  reason.
 
 
  Ash
  www.ashleysheridan.co.uk
 
 
 
 
So you've edited the right file, restarted the web server (Apache or
IIS) and it's still showing the old configuration. Just a quick
question, you're not trying to run PHP on Vista are you, as this has
some godawful behaviour on files it deems as system files, and it's an
absolute pain to actually try and edit them, even from an admin account!

If you are still having troubles and it's not Vista, have you made sure
that the libraries (dll files) you are trying to use actually exist?
They will usually be in the php directory, or in a sub-folder called
extensions. You might need to add the path to the system path to make
sure Windows can find them.


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] issue with php.ini

2008-11-23 Thread Alain Roger
On Sun, Nov 23, 2008 at 6:41 PM, Ashley Sheridan
[EMAIL PROTECTED]wrote:

 On Sun, 2008-11-23 at 18:32 +0100, Alain Roger wrote:
  Yes, i do it in that way but nothing changed
 
  On Sun, Nov 23, 2008 at 6:34 PM, Ashley Sheridan
  [EMAIL PROTECTED]wrote:
 
   On Sun, 2008-11-23 at 17:33 +0100, Alain Roger wrote:
Hi,
   
i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i
 uncomment
   the
following lines:
extension=php_mysql.dll
extension=php_pdo.dll
extension=php_pdo_mysql.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
extension=php_sqlite.dll
extension=php_dbg.dll-5.2.x
   
after restaring the whole server apache+postgresql + php, i run a
 simple
phpinfo() and i see nowhere anything about postgresql module or PDO.
phpinfo show that it runs based on the php.ini from D:\webserver\php
   folder
and not from c:\windows.
which is correct as my php.ini is the the D:\webserver\php folder.
   
so where could be the problem ?
thx.
   
   You didn't mention if you were editing the php.ini file that phpinfo()
   tells you it is using. Make your changes to that one, and it should be
   OK. I have this problem a lot with Windows installations for some
   reason.
  
  
   Ash
   www.ashleysheridan.co.uk
  
  
 
 
 So you've edited the right file, restarted the web server (Apache or
 IIS) and it's still showing the old configuration. Just a quick
 question, you're not trying to run PHP on Vista are you, as this has
 some godawful behaviour on files it deems as system files, and it's an
 absolute pain to actually try and edit them, even from an admin account!

 If you are still having troubles and it's not Vista, have you made sure
 that the libraries (dll files) you are trying to use actually exist?
 They will usually be in the php directory, or in a sub-folder called
 extensions. You might need to add the path to the system path to make
 sure Windows can find them.


 Ash
 www.ashleysheridan.co.uk


basically as you can see in my signature i run a windows x64 Sp2 system.
in fact i've checked and realized that som dll are not installed likeL
libpq.dll qnd some others.
to solve my problem i had to download and install :
NuSphere-phped-5.2-php5.2.6-Win32.exe

several dll (5 or 6) are not installed from official msi package :-(


Re: [PHP] issue with php.ini

2008-11-23 Thread Ashley Sheridan
On Sun, 2008-11-23 at 18:44 +0100, Alain Roger wrote:
 On Sun, Nov 23, 2008 at 6:41 PM, Ashley Sheridan
 [EMAIL PROTECTED]wrote:
 
  On Sun, 2008-11-23 at 18:32 +0100, Alain Roger wrote:
   Yes, i do it in that way but nothing changed
  
   On Sun, Nov 23, 2008 at 6:34 PM, Ashley Sheridan
   [EMAIL PROTECTED]wrote:
  
On Sun, 2008-11-23 at 17:33 +0100, Alain Roger wrote:
 Hi,

 i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i
  uncomment
the
 following lines:
 extension=php_mysql.dll
 extension=php_pdo.dll
 extension=php_pdo_mysql.dll
 extension=php_pdo_pgsql.dll
 extension=php_pdo_sqlite.dll
 extension=php_pgsql.dll
 extension=php_sqlite.dll
 extension=php_dbg.dll-5.2.x

 after restaring the whole server apache+postgresql + php, i run a
  simple
 phpinfo() and i see nowhere anything about postgresql module or PDO.
 phpinfo show that it runs based on the php.ini from D:\webserver\php
folder
 and not from c:\windows.
 which is correct as my php.ini is the the D:\webserver\php folder.

 so where could be the problem ?
 thx.

You didn't mention if you were editing the php.ini file that phpinfo()
tells you it is using. Make your changes to that one, and it should be
OK. I have this problem a lot with Windows installations for some
reason.
   
   
Ash
www.ashleysheridan.co.uk
   
   
  
  
  So you've edited the right file, restarted the web server (Apache or
  IIS) and it's still showing the old configuration. Just a quick
  question, you're not trying to run PHP on Vista are you, as this has
  some godawful behaviour on files it deems as system files, and it's an
  absolute pain to actually try and edit them, even from an admin account!
 
  If you are still having troubles and it's not Vista, have you made sure
  that the libraries (dll files) you are trying to use actually exist?
  They will usually be in the php directory, or in a sub-folder called
  extensions. You might need to add the path to the system path to make
  sure Windows can find them.
 
 
  Ash
  www.ashleysheridan.co.uk
 
 
 basically as you can see in my signature i run a windows x64 Sp2 system.
 in fact i've checked and realized that som dll are not installed likeL
 libpq.dll qnd some others.
 to solve my problem i had to download and install :
 NuSphere-phped-5.2-php5.2.6-Win32.exe
 
 several dll (5 or 6) are not installed from official msi package :-(

Well, there is no signature on your emails, and sorry, but Windows Vista
has just had SP2 released for it, so your Windows x64 SP2 could still be
Vista ;)

I'm not sure, but it could be failing over the missing libraries. Have
you tried making a few minor changes to the php.ini just to make sure
they are being recognised at all?


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] issue with php.ini

2008-11-23 Thread Alain Roger
Well if you check my 2nd email you will see my signature :-)
but it does not matter...

i did several little changes but i'm scared that only modules link to
php.exe at the make command status have been loaded. :-(
my changes where about modules loading, extension folder, and so on...

-- 
Alain
---
Windows XP x64 SP2
PostgreSQL 8.3.5 / MS SQL server 2005
Apache 2.2.10
PHP 5.2.6
C# 2005-2008


Re: [PHP] issue with php.ini

2008-11-23 Thread Nathan Rixham

i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i
extension=php_mysql.dll
extension=php_pdo.dll
extension=php_pdo_mysql.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
extension=php_sqlite.dll
extension=php_dbg.dll-5.2.x

phpinfo() and i see nowhere anything about postgresql module or PDO.

[/snip]

I've had the same problems with the msi for 5.2.6 on windows boxes; 
appears to be the php_pdo_pgsql dll that's causing the error.


2 things to do:

- check the apache error log to see exactly what php is saying the 
problem is (bet it's that php_pdo_dll)


- make sure you'd don't have the threads extension enabled.

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



Re: [PHP] issue with php.ini

2008-11-23 Thread Alain Roger
On Sun, Nov 23, 2008 at 6:57 PM, Nathan Rixham [EMAIL PROTECTED] wrote:

 i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i
 extension=php_mysql.dll
 extension=php_pdo.dll
 extension=php_pdo_mysql.dll
 extension=php_pdo_pgsql.dll
 extension=php_pdo_sqlite.dll
 extension=php_pgsql.dll
 extension=php_sqlite.dll
 extension=php_dbg.dll-5.2.x

 phpinfo() and i see nowhere anything about postgresql module or PDO.

 [/snip]

 I've had the same problems with the msi for 5.2.6 on windows boxes; appears
 to be the php_pdo_pgsql dll that's causing the error.

 2 things to do:

 - check the apache error log to see exactly what php is saying the problem
 is (bet it's that php_pdo_dll)

 - make sure you'd don't have the threads extension enabled.

 in fact i'm very surprised because the following modules can not be found
even if they are on the right folder.
PHP Warning:  PHP Startup: Unable to load dynamic library
'D:\\webserver\\PHP\\ext\\php_pdo_pgsql.dll' - The specified module could
not be found.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'D:\\webserver\\PHP\\ext\\php_pgsql.dll' - The specified module could not be
found.\r\n in Unknown on line 0

any idea ?


Re: [PHP] issue with php.ini

2008-11-23 Thread Alain Roger
On Sun, Nov 23, 2008 at 7:27 PM, Alain Roger [EMAIL PROTECTED] wrote:



 On Sun, Nov 23, 2008 at 6:57 PM, Nathan Rixham [EMAIL PROTECTED] wrote:

   i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i
 extension=php_mysql.dll
 extension=php_pdo.dll
 extension=php_pdo_mysql.dll
 extension=php_pdo_pgsql.dll
 extension=php_pdo_sqlite.dll
 extension=php_pgsql.dll
 extension=php_sqlite.dll
 extension=php_dbg.dll-5.2.x

 phpinfo() and i see nowhere anything about postgresql module or PDO.

 [/snip]

 I've had the same problems with the msi for 5.2.6 on windows boxes;
 appears to be the php_pdo_pgsql dll that's causing the error.

 2 things to do:

 - check the apache error log to see exactly what php is saying the problem
 is (bet it's that php_pdo_dll)

 - make sure you'd don't have the threads extension enabled.

 in fact i'm very surprised because the following modules can not be found
 even if they are on the right folder.
 PHP Warning:  PHP Startup: Unable to load dynamic library
 'D:\\webserver\\PHP\\ext\\php_pdo_pgsql.dll' - The specified module could
 not be found.\r\n in Unknown on line 0
 PHP Warning:  PHP Startup: Unable to load dynamic library
 'D:\\webserver\\PHP\\ext\\php_pgsql.dll' - The specified module could not be
 found.\r\n in Unknown on line 0

 any idea ?


it seems that it's a known problem. can someone comment it ?
http://www.wampserver.com/phorum/read.php?2,40270,40311


Fwd: [PHP] issue with php.ini

2008-11-23 Thread Alain Roger


 On Sun, Nov 23, 2008 at 6:57 PM, Nathan Rixham [EMAIL PROTECTED] wrote:

   i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i
 extension=php_mysql.dll
 extension=php_pdo.dll
 extension=php_pdo_mysql.dll
 extension=php_pdo_pgsql.dll
 extension=php_pdo_sqlite.dll
 extension=php_pgsql.dll
 extension=php_sqlite.dll
 extension=php_dbg.dll-5.2.x

 phpinfo() and i see nowhere anything about postgresql module or PDO.

 [/snip]

 I've had the same problems with the msi for 5.2.6 on windows boxes;
 appears to be the php_pdo_pgsql dll that's causing the error.

 2 things to do:

 - check the apache error log to see exactly what php is saying the problem
 is (bet it's that php_pdo_dll)

 - make sure you'd don't have the threads extension enabled.

 in fact i'm very surprised because the following modules can not be found
 even if they are on the right folder.
 PHP Warning:  PHP Startup: Unable to load dynamic library
 'D:\\webserver\\PHP\\ext\\php_pdo_pgsql.dll' - The specified module could
 not be found.\r\n in Unknown on line 0
 PHP Warning:  PHP Startup: Unable to load dynamic library
 'D:\\webserver\\PHP\\ext\\php_pgsql.dll' - The specified module could not be
 found.\r\n in Unknown on line 0

 any idea ?


it seems that it's a known problem. can someone comment it ?
http://www.wampserver.com/phorum/read.php?2,40270,40311

so i've downloaded PHP 5.2.5 winzip package and replace 5.2.6 files by 5.2.5
for the following files:
php_pdo_pgsql.dll
php_pgsql.dll

and it works perfectly.
so this is clear that something is wronf with those 2 files in the 5.2.6
version.

Alain


Re: [PHP] issue with php.ini

2008-11-23 Thread Nathan Rixham

Alain Roger wrote:

it seems that it's a known problem. can someone comment it ?
http://www.wampserver.com/phorum/read.php?2,40270,40311



you have to install PostgreSQL since enable extension only is not enough

makes sence!

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



Re: [PHP] issue with php.ini

2008-11-23 Thread Nathan Rixham

Alain Roger wrote:




Alain Roger wrote:

it seems that it's a known problem. can someone comment it ?
http://www.wampserver.com/phorum/read.php?2,40270,40311


you have to install PostgreSQL since enable extension only is not
enough

makes sence!

-- 
PHP General Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php


Yes it's clear but i already had installed postgresql :-( so problem 
is really located into files of v5.2.6 of PHP.


yeah i had the same thing, sent that one without hinking - it's def a 
5.2.6 files thing.. only things we have in common is that I'm on a 64bit 
processor (intel quad) and apache 2.2*, but my os is 32 bit windows 
vista ultimate


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



Re: [PHP] issue with php.ini

2008-11-23 Thread Alain Roger
Alain Roger wrote:

 it seems that it's a known problem. can someone comment it ?
 http://www.wampserver.com/phorum/read.php?2,40270,40311


 you have to install PostgreSQL since enable extension only is not enough

 makes sence!

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


Yes it's clear but i already had installed postgresql :-( so problem is
really located into files of v5.2.6 of PHP.


Re: [PHP] Issue with STRFTIME and Daylight Savings

2007-12-03 Thread Malcolm Green
Hi Rob:

Thanks for the feedback.

Just to throw one in from left field, the script is written in AWK, not
PHP (told you I was a novice!)

Have confirmed that 'systime' refers to hardware clock, so I have a quick
and dirty work-around by adding '3600' (seconds) to STRFTIME, but will look
into a cleaner solution.


Thanks  Regards,
Malcolm.

Malcolm Green
Voice Consultant, Managed Network Services
CSC Australia Pty Limited
M: 0401-002-569
T: (02) 9034-3114
E: [EMAIL PROTECTED]

Vision without action is a dream; action without vision is a nightmare. -
Chinese Proverb



This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.





   
 Robert Cummings   
 [EMAIL PROTECTED] 
 .com  To 
   Malcolm Green [EMAIL PROTECTED] 
 03/12/2007 04:53   cc 
 PMphp-general@lists.php.net   
   Subject 
   Re: [PHP] Issue with STRFTIME and   
   Daylight Savings
   
   
   
   
   
   




On Mon, 2007-12-03 at 15:14 +1000, Malcolm Green wrote:
 Hi Support:

 I've moved into a new role and inherited a system which uses the
'STRFTIME'
 function to create a filename in the form 'strftime(%Y%m%d)'; the
 filename is supposed to be today's date. (Note I've left out the file
 extension for clarity.)

 I've noticed that system creates the wrong filename when the process runs
 between midnight and 12:59am, during Daylight Savings time. That is, it
 creates a filename equal to yesterday's date. When run at 1:00am or
 later, everything OK.

 I've checked the Date/Time and 'Locale' settings in Windows, and
everything
 is ok. My initial thought was that STRFTIME was looking a the system
clock
 rather than Windows (?).

 Can you help?

 (PS ... please be gentle, I'm a novice at PHP!)

Check your timezone settings in php.ini

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

Leveraging the buying power of the masses!
...

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



Re: [PHP] Issue with STRFTIME and Daylight Savings

2007-12-02 Thread Robert Cummings
On Mon, 2007-12-03 at 15:14 +1000, Malcolm Green wrote:
 Hi Support:
 
 I've moved into a new role and inherited a system which uses the 'STRFTIME'
 function to create a filename in the form 'strftime(%Y%m%d)'; the
 filename is supposed to be today's date. (Note I've left out the file
 extension for clarity.)
 
 I've noticed that system creates the wrong filename when the process runs
 between midnight and 12:59am, during Daylight Savings time. That is, it
 creates a filename equal to yesterday's date. When run at 1:00am or
 later, everything OK.
 
 I've checked the Date/Time and 'Locale' settings in Windows, and everything
 is ok. My initial thought was that STRFTIME was looking a the system clock
 rather than Windows (?).
 
 Can you help?
 
 (PS ... please be gentle, I'm a novice at PHP!)

Check your timezone settings in php.ini

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

Leveraging the buying power of the masses!
...

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



[PHP] Issue with STRFTIME and Daylight Savings

2007-12-02 Thread Malcolm Green

Hi Support:

I've moved into a new role and inherited a system which uses the 'STRFTIME'
function to create a filename in the form 'strftime(%Y%m%d)'; the
filename is supposed to be today's date. (Note I've left out the file
extension for clarity.)

I've noticed that system creates the wrong filename when the process runs
between midnight and 12:59am, during Daylight Savings time. That is, it
creates a filename equal to yesterday's date. When run at 1:00am or
later, everything OK.

I've checked the Date/Time and 'Locale' settings in Windows, and everything
is ok. My initial thought was that STRFTIME was looking a the system clock
rather than Windows (?).

Can you help?

(PS ... please be gentle, I'm a novice at PHP!)


Thanks  Regards,
Malcolm.

Malcolm Green
Voice Consultant, Managed Network Services
CSC Australia Pty Limited
M: 0401-002-569
T: (02) 9034-3114
E: [EMAIL PROTECTED]

Vision without action is a dream; action without vision is a nightmare. -
Chinese Proverb




This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.


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



Re: [PHP] Issue when inserting Slovak characters in database via PHP code

2006-11-05 Thread M
The important steps:

1. display the form on utf-8 page:
header('Content-Type: text/html; codepage=utf-8');
... and the same in meta tag
2. use pg_set_client_encoding('UTF8') after connecting to posgres
3. have your database, tables and rows in UTF8 (you have already)
4. again, when retrieving, pg_set_client_encoding('UTF8')
5. display the form on utf-8 page

Alain Roger  wrote / napísal(a):
 Hi,
 
 Sorry to cross post this mail but i'm not able to know from where comes my
 issue.
 I have a postgreSQL database in UNICODE (UTF-8 in v8.1.4 and UNICODE in
 v8.0.1).
 
 Via my web application i type a sentence in Slovak language and it is
 stored
 into DB without any slovak characters. Instead of that, all particular
 characters are replace with \303\251 or \303\206 or \304\314 and so on...

perhaps the characters are stored as UTF-8, but you view them over ASCII
connection

 
 I was thinking that issue was coming from DB encryption but on 2 different
 versions of DB (see above) i get the same result.
 after, i was thinking that it was coming from my web browser, but even if i
 setup character mode in central europe and Slovak language as default
 coding...nothing change...i tried on IE and Firefox.
 
 Last step, i tried to type directly from my PhpPgAdmin (direct typing
 sentence there to DB), and i realize that when i click on save...the
 changes
 appear in DB aswritten above (e.g. : \303\251,...)
 
 My latest test was to write via PhpPgAdmin (directly to DB) the UNICODE of
 slovak character contained within my sentence...so i used #253, #237 and
 so on...
 if i do that, those code are correctly saved into DB and when my PHP code
 show web pages, all sentences are correct.

these are html entities, they are different, they use only 7 bits. I
would not recomend on using them, you will use many capabilities.

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



[PHP] Issue when inserting Slovak characters in database via PHP code

2006-11-04 Thread Alain Roger

Hi,

Sorry to cross post this mail but i'm not able to know from where comes my
issue.
I have a postgreSQL database in UNICODE (UTF-8 in v8.1.4 and UNICODE in
v8.0.1).

Via my web application i type a sentence in Slovak language and it is stored
into DB without any slovak characters. Instead of that, all particular
characters are replace with \303\251 or \303\206 or \304\314 and so on...

I was thinking that issue was coming from DB encryption but on 2 different
versions of DB (see above) i get the same result.
after, i was thinking that it was coming from my web browser, but even if i
setup character mode in central europe and Slovak language as default
coding...nothing change...i tried on IE and Firefox.

Last step, i tried to type directly from my PhpPgAdmin (direct typing
sentence there to DB), and i realize that when i click on save...the changes
appear in DB aswritten above (e.g. : \303\251,...)

My latest test was to write via PhpPgAdmin (directly to DB) the UNICODE of
slovak character contained within my sentence...so i used #253, #237 and
so on...
if i do that, those code are correctly saved into DB and when my PHP code
show web pages, all sentences are correct.

I can not imagine to write a special interface to convert slovak characters
to unicode everytime that user would like to type something new.
Something else must be badly setup...

Please, could you tell me where to search because i'm confused now...

thx.

Alain


[PHP] Issue regarding flow in php

2006-08-03 Thread weetat

Hi all ,

  I have a php page .

  The php page is display when i have completed upload xml file to server.
  In the php page , there is a function name insertxmldataToTempTbl(), 
which insert xml data to MYSQL database as shown below after i have 
uploaded xml file to server ,
After insert xml data to MYSQL , i have function name 
compareTable()which do comparisation between the table A(XML data 
inserted) and table B(User data table)and store comparisation array data 
to the $_SESSION .


However , sometimes when completed uploaded to xml file to server, the 
data is not display on the php page . I need to logout and login again 
then i can see the data on the same php page.

PHP developer who have any ideas or suggestion , please email to me?

Thanks.


 $data = $xml_util-getUnserializedData();
 insertxmldataToTempTbl($data);

 $compareTable();
 $comparearr = $_SESSION['LIST_SESSION'];
 $listchassis = $comparearr['listchassis'];

 $pagerOptions = array(
'itemData'  = $listchassis,
'perPage' = 10,
'delta' = 8,
'useSessions' = true,
'closeSession' = false,
'mode' = 'Sliding'
);
$pager =  Pager::factory($pagerOptions);
$chassisdata  = $pager-getPageData();
$links = $pager-getLinks();

while (list($name, $value) = each($chassisdata)) {
   blah blah blah - List data in HTML table tag
}

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



Re: [PHP] Issue regarding flow in php

2006-08-03 Thread Richard Lynch
On Thu, August 3, 2006 1:53 am, weetat wrote:
I have a php page .

The php page is display when i have completed upload xml file to
 server.
In the php page , there is a function name
 insertxmldataToTempTbl(),
 which insert xml data to MYSQL database as shown below after i have
 uploaded xml file to server ,
 After insert xml data to MYSQL , i have function name
 compareTable()which do comparisation between the table A(XML data
 inserted) and table B(User data table)and store comparisation array
 data
 to the $_SESSION .

 However , sometimes when completed uploaded to xml file to server, the
 data is not display on the php page . I need to logout and login again
 then i can see the data on the same php page.
 PHP developer who have any ideas or suggestion , please email to me?

My best guess is that the upload and/or insert and/or compare takes
'too long' and the browser and/or your session is timing out.

Unless all this upload and compare is done in a matter of a couple
seconds, you'd be better off to do the upload, and then have a
status page to check back later for the comparison.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Is this a PHP issue, or a CGI issue? [SOLVED]

2006-08-03 Thread Dave M G

Jochem,

Thank you for responding.

no doubt it will become a php issue in the near future ;-)
  
I'm sure it will. However, you have kick started me in the right 
direction, and I have the beginnings of a working page.


Thank you for your helpful advice.

--
Dave M G

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



[PHP] Is this a PHP issue, or a CGI issue?

2006-08-02 Thread Dave M G

PHP List,

I'm writing a PHP script that has a form which accesses a CGI script on 
an external web site.


The CGI I am accessing is a Japanese dictionary. My form will take 
Japanese input, send it to the external server, and hopefully return 
with a list of words and definitions. I hope to be able to trap the 
output from the external server in such a way that I can use PHP to 
maniplate the output and structure it for insertion into a database.


What I have for the form tag is:

echo form method=\uri\ 
action=\http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic?9MGI\;;


The 9MGI part is syntax specific to the CGI script at monash.edu.au 
that I am accessing. It says to use utf8 encoding, and specifies which 
dictionary to use.


The method is uri, so that the text included in the form will be 
appended to the URL.


When I test my script in my FireFox browser, I get a pop up window 
asking me what to do with a bin file. I click to save it, and I get a 
file called wwwjdic on my desktop.


I'm a little lost here. Is this a problem of PHP not knowing what to do 
with the returned output? Is it an issue with the script at 
monash.edu.au that I need to contact the developer about? Is it 
something do to with how the form action is structured?


Please advise on how to diagnose and address this problem.

If necessary, please tell me where this issue would be best addressed if 
it is not a PHP issue.


Thank you for your time and help.

--
Dave M G

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



Re: [PHP] Is this a PHP issue, or a CGI issue?

2006-08-02 Thread Jochem Maas
Dave M G wrote:
 PHP List,
 
 I'm writing a PHP script that has a form which accesses a CGI script on
 an external web site.
 
 The CGI I am accessing is a Japanese dictionary. My form will take
 Japanese input, send it to the external server, and hopefully return
 with a list of words and definitions. I hope to be able to trap the
 output from the external server in such a way that I can use PHP to
 maniplate the output and structure it for insertion into a database.
 
 What I have for the form tag is:
 
 echo form method=\uri\
 action=\http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic?9MGI\;;
 
 The 9MGI part is syntax specific to the CGI script at monash.edu.au
 that I am accessing. It says to use utf8 encoding, and specifies which
 dictionary to use.
 
 The method is uri, so that the text included in the form will be
 appended to the URL.

then the method should be 'get' no?

 
 When I test my script in my FireFox browser, I get a pop up window
 asking me what to do with a bin file. I click to save it, and I get a
 file called wwwjdic on my desktop.

well your browser doesn't know what to do with the file... therefore the 
download.
and *your* server (and it's php setup) is not involved with this transaction at 
all.

if you want php to parse/process the output of the CGI script on
the third party server then you will have to submit the form to YOUR server and
have the php script that process the submit perform a request to the third party
machine, something like the following (untested, would require ini setting
'allow_url_fopen' to be on, takes no account of the encoding hell you might need
to go through, input sanitation/validation left out for brevity, you might
not have some of the functions mentioned):

?php

$url  = 'http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic?9MGI'
$urlquery = http_build_query($_GET);
$response = file_get_contents($url.''.$urlquery);

// this is what the third party server gave you in reply to your request:
var_dump($response);


 
 I'm a little lost here. Is this a problem of PHP not knowing what to do
 with the returned output? Is it an issue with the script at
 monash.edu.au that I need to contact the developer about? Is it
 something do to with how the form action is structured?
 
 Please advise on how to diagnose and address this problem.
 
 If necessary, please tell me where this issue would be best addressed if
 it is not a PHP issue.

it's not a PHP issue (yet) because you have yet to involve php at any stage ...
no doubt it will become a php issue in the near future ;-)

 
 Thank you for your time and help.
 

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



[PHP] issue with Apache/PHP loadmodule

2006-06-26 Thread Alain Roger

Hi,

I did this installation i do not know how many times...it worked till now.
But it seems that today, i forget something and i'm lost :-(
I have the following lines in my http.conf from apache 2.2 configuration
file.

# - for PHP 
LoadModule php5_module c:\PHP\php5apache2.dll
AddType application/x-httpd-php .php
PHPIniDir c:\PHP\
# --

therefore, apache serve does not start. If i comment loadmodule and PHPdir
lines, Apache starts ...
could you help me to understand where is this stupid mistake ?

thanks a lot,

Alain


[PHP] issue with MySQL procedure and a result set

2006-04-20 Thread Alain Roger
Hi,

I'm trying to run a MySQL Procedure from one of my PHP page.

1. the procedure works perfectly under MySQL (it gives the correct results),
so no issue from this side.
2.user is able to connect without any issue to MySQL RDBMS, so no issue from
this side.

Here is what i've as error message when PHP page is displayed :
PROCEDURE test1 can't return a result set in the given context

i've searched on internet and i've found 2 intereseting information :
1. i should update MyODBC connector. But i do not understand it as it work
perfectly under MySQL query browser or under another Query tool.
2. i should add a flag in my command : mysql_connect();
this flag should be something like MULTI_CLIENT_. After controling the
PHP documentation (v5.1 and 4.6) this flag does not exist...

here is my stored procedure test1 (this procedure as 1 IN parameter named
criteria


BEGIN
   DECLARE crit VARCHAR(256) DEFAULT ;
   SET crit = CONCAT(%, criteria, $);
   SELECT * FROM persons WHERE login LIKE crit;
END
...

So what should i do ?

thanks a lot for help.

Alain


Re: [PHP] issue with MySQL procedure and a result set

2006-04-20 Thread Richard Lynch
On Thu, April 20, 2006 1:55 am, Alain Roger wrote:
 I'm trying to run a MySQL Procedure from one of my PHP page.

 1. the procedure works perfectly under MySQL (it gives the correct
 results),
 so no issue from this side.
 2.user is able to connect without any issue to MySQL RDBMS, so no
 issue from
 this side.

 Here is what i've as error message when PHP page is displayed :
 PROCEDURE test1 can't return a result set in the given context

 i've searched on internet and i've found 2 intereseting information :
 1. i should update MyODBC connector. But i do not understand it as it
 work
 perfectly under MySQL query browser or under another Query tool.

Are you using MyODBC?

Why?!

If you are, then this is probably the problem/solution.

See, what MySQL supports and what MyODBC will support in terms of SQL
and PROCEDURES and whatnot don't have to match up.

So you need the new MyODBC and that's all there is to it.

Or switch to using PHP's mysql() functions.

 2. i should add a flag in my command : mysql_connect();
 this flag should be something like MULTI_CLIENT_. After controling
 the
 PHP documentation (v5.1 and 4.6) this flag does not exist...

Check the MySQL docs.  It's probably a constant in MySQL, not in PHP.

Also just try this:

?php echo MULTI_CLIENT.;?

Only type the real constant name.

If it's not defined in PHP, you'll just see 'MULTI_CLIENT'

If it is defined, it will probably be a number like 15 or 63 or
something.

If it is not defined, you can probably find out what the number is in
the MySQL docs.  If you find out that it is, say, 3, then do:
?php
  define('MULTI_CLIENT...', 3);
?
and just follow the directions about connect.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] issue with MySQL procedure and a result set

2006-04-20 Thread Richard Lynch
On Thu, April 20, 2006 3:48 am, Alain Roger wrote:
 personally i do not use MyODBC. i just wrote that this is a common
 answer
 for such error message.
 but why should i check within MySQL documentation if the flag to write
 (if
 it is really the solution???) belongs to PHP command mysql_connect ?

Because the flag would have been made up and documented by the MySQL
guys.

Almost for sure.  A handful of exceptions like CURLOPT_BINARYTRANSFER
do exist.

PHP mysql *MIGHT* have caught that constant as one you need and
imported it.  Or not.

 or is
 mysql_connect command just a wripping command to ODBC command (and
 in this case i understand why to check in MySQL doc.).

mysql_connect() in PHP is a thinly-disguised wrapper for a MySQL
function of a very similar (if not the same) name.

99% of what many people think of as PHP is really a thinly-disguised
wrapper for functionality provided by the extension modules.

'Course, it took a TON of work to get those wrappers to work right, to
play well together, to not mess up other wrappers in PHP, and so on!

But the sooner you understand how PHP really works in relation to
the extension modules, the better off you'll be.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] Issue with encrypted string created with Crypt_CBC and urls and mod_rewrite

2006-02-22 Thread Dan Rossi
hi there im having issue decoding an encoded string created with a pear  
package Crypt_CBC which i am encoding a uri into the string and sending  
to a rewrite url. The query string is not returning the encoded part of  
the url properly for some reason and not decoding properly.


I have already sent this to the pear list, but maybe someone here has  
experienced issues with encoded strings and mod_rewrite not relocating  
with a url encoded string ?


The encoded string without mod_rewrite rules is

RandomIVQ%83%80%E6%0F%E7%E4%7CdY%E7%BA%9B%14%5B%60%98%A1%1D%04%94L_%16%E 
4%19%EF%F1%FE%5C%D6%CE%09%C8DI%A7%1F%04%25%A8%7B%FA%19%B51%1D%7C%0D%04%1 
3%E3%21%F1%60f%C6%91%A8b%82%11YK%21l+%C5%D0W%D9%9A%2B%CD3%C3%FA%82LE%D8% 
1EA%07%25%F5%BB%22%EA%B7%B8%82%F0WZ%40


With rewritten urls its from viewing source.

RandomIVQƒ€æçä|dY纛[`˜¡”L_äïñþ\ÖÎÈDI§%¨{úµ1|
ã!ñ`fÆ‘¨b‚YK!l+ÅÐWÙš+Í3Ãú‚LEØA%õ»ê·¸‚ðWZ@


The rewrite rule is

RewriteEngine on
RewriteBase /
RewriteRule ^feeds/(.*) refer.php?$1 [L]

Any ideas why its not urlencoding the urlencoded string in the rewrite  
url ?


I may have to use the request_uri instead of sending it as a query  
string if this is a flaw in mod_rewrite ?? I think however if i use the  
request_uri things could break a little.


Let me know.

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



Re: [PHP] Issue with encrypted string created with Crypt_CBC and urls and mod_rewrite

2006-02-22 Thread Dan Rossi
It also seems that any forward slash being encoded if it encodes,  
mod_rewrite doesnt like, therefore I have to split up the urls using  
parse_url, but it seems it still doesnt like the query part and some  
special characters like ampersands and equals ?


On 23/02/2006, at 12:30 PM, Dan Rossi wrote:

hi there im having issue decoding an encoded string created with a  
pear package Crypt_CBC which i am encoding a uri into the string and  
sending to a rewrite url. The query string is not returning the  
encoded part of the url properly for some reason and not decoding  
properly.


I have already sent this to the pear list, but maybe someone here has  
experienced issues with encoded strings and mod_rewrite not relocating  
with a url encoded string ?


The encoded string without mod_rewrite rules is

RandomIVQ%83%80%E6%0F%E7%E4%7CdY%E7%BA%9B%14%5B%60%98%A1%1D%04%94L_%16% 
E4%19%EF%F1%FE%5C%D6%CE%09%C8DI%A7%1F%04%25%A8%7B%FA%19%B51%1D%7C%0D%04 
%13%E3%21%F1%60f%C6%91%A8b%82%11YK%21l+%C5%D0W%D9%9A%2B%CD3%C3%FA%82LE% 
D8%1EA%07%25%F5%BB%22%EA%B7%B8%82%F0WZ%40


With rewritten urls its from viewing source.

RandomIVQƒ€æçä|dY纛[`˜¡”L_äïñþ\ÖÎÈDI§%¨{úµ1|
ã!ñ`fÆ‘¨b‚YK!l+ÅÐWÙš+Í3Ãú‚LEØA%õ»ê·¸‚ðWZ@


The rewrite rule is

RewriteEngine on
RewriteBase /
RewriteRule ^feeds/(.*) refer.php?$1 [L]

Any ideas why its not urlencoding the urlencoded string in the rewrite  
url ?


I may have to use the request_uri instead of sending it as a query  
string if this is a flaw in mod_rewrite ?? I think however if i use  
the request_uri things could break a little.


Let me know.

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



[PHP] issue with newsgroups server

2006-01-23 Thread Alain Roger
Hi,

I have a very long timeout when i try to use the news.php.net server.
moreover, my posted messages are not displayed.

Could someone help me please ?

thanks a lot,
Alain


Re: [PHP] Issue with curl and ssl

2005-11-03 Thread Jochem Maas

Dan Rossi wrote:
Hi there, I am trying to test out the new installed curl extension to 
connect to a site via ssl and auth basic. However everytime i try to 
connect with the browser , in ie it says cannot find server and in mac 
safari is says could not load any data etc. If i run the same script via 
php cli it works fine and is accepting the ssl certificate we setup on 
the IIs server we are connecting to. What could be cauasing this, there 
is no way to get php debug errors because it doesnt let the page load. 
Its around the curl_exec call. I also found that its causing an issue 
with apache in the logs


* About to connect() to ourserver port 443
*   Trying ip... * connected
* Connected to ourserver (ip) port 443
* successfully set certificate verify locations:
*   CAfile: /usr/local/share/curl/curl-ca-bundle.crt
  CApath: none
[Thu Nov  3 02:46:38 2005] [notice] child pid 49681 exit signal 
Segmentation fault (11)


any ideas ?


it helps when you tell us what versions of softwar eyou have.

are you running apache2? is it running using a threaded worker module?
is the curl extension thread safe?





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



Re: [PHP] Issue with curl and ssl

2005-11-03 Thread Dan Rossi
Just a standard php 4.3.11 and apache 1.3 ?? It works via php cli 
wierdly enough but not the apache module ?


On 03/11/2005, at 7:17 PM, Jochem Maas wrote:


Dan Rossi wrote:
Hi there, I am trying to test out the new installed curl extension to 
connect to a site via ssl and auth basic. However everytime i try to 
connect with the browser , in ie it says cannot find server and in 
mac safari is says could not load any data etc. If i run the same 
script via php cli it works fine and is accepting the ssl certificate 
we setup on the IIs server we are connecting to. What could be 
cauasing this, there is no way to get php debug errors because it 
doesnt let the page load. Its around the curl_exec call. I also found 
that its causing an issue with apache in the logs

* About to connect() to ourserver port 443
*   Trying ip... * connected
* Connected to ourserver (ip) port 443
* successfully set certificate verify locations:
*   CAfile: /usr/local/share/curl/curl-ca-bundle.crt
  CApath: none
[Thu Nov  3 02:46:38 2005] [notice] child pid 49681 exit signal 
Segmentation fault (11)

any ideas ?


it helps when you tell us what versions of softwar eyou have.

are you running apache2? is it running using a threaded worker module?
is the curl extension thread safe?




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



Re: [PHP] Issue with curl and ssl

2005-11-03 Thread Dan Rossi
Here is my code i am using, ive tried and tried, im still getting a no 
data sent error in the browser.


?
$ch = curl_init();


curl_setopt($ch, CURLOPT_URL, https://mydomain/Default.asmx;);
 curl_setopt($ch, CURLOPT_VERBOSE, 1);
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
 curl_setopt($ch, CURLOPT_FAILONERROR, 1);
 curl_setopt($ch, CURLOPT_SSLCERT, '/path/to/certs/cert.pem');
 curl_setopt($ch, CURLOPT_SSLCERTPASSWD, 'thepass');
 curl_setopt($ch, CURLOPT_SSLKEYTYPE, 'PEM');
 curl_setopt($ch, CURLOPT_SSLKEY, '/path/to/certs/key.pem');
 curl_setopt($ch, CURLOPT_USERPWD, 'user:pass');

 ob_start();
 curl_exec($ch);
 ob_end_flush();

 if(curl_error($ch)) {
printf(error: [%s] %s, curl_errno($ch), curl_error($ch));
 }

 curl_close($ch);
 
?

On 03/11/2005, at 7:31 PM, Dan Rossi wrote:

Just a standard php 4.3.11 and apache 1.3 ?? It works via php cli 
wierdly enough but not the apache module ?


On 03/11/2005, at 7:17 PM, Jochem Maas wrote:


Dan Rossi wrote:
Hi there, I am trying to test out the new installed curl extension 
to connect to a site via ssl and auth basic. However everytime i try 
to connect with the browser , in ie it says cannot find server and 
in mac safari is says could not load any data etc. If i run the same 
script via php cli it works fine and is accepting the ssl 
certificate we setup on the IIs server we are connecting to. What 
could be cauasing this, there is no way to get php debug errors 
because it doesnt let the page load. Its around the curl_exec call. 
I also found that its causing an issue with apache in the logs

* About to connect() to ourserver port 443
*   Trying ip... * connected
* Connected to ourserver (ip) port 443
* successfully set certificate verify locations:
*   CAfile: /usr/local/share/curl/curl-ca-bundle.crt
  CApath: none
[Thu Nov  3 02:46:38 2005] [notice] child pid 49681 exit signal 
Segmentation fault (11)

any ideas ?


it helps when you tell us what versions of softwar eyou have.

are you running apache2? is it running using a threaded worker module?
is the curl extension thread safe?




--
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] Issue with curl and ssl

2005-11-03 Thread Jochem Maas

can you get it to work without SSL?

Dan Rossi wrote:
Here is my code i am using, ive tried and tried, im still getting a no 
data sent error in the browser.


?
$ch = curl_init();


curl_setopt($ch, CURLOPT_URL, https://mydomain/Default.asmx;);
 curl_setopt($ch, CURLOPT_VERBOSE, 1);
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
 curl_setopt($ch, CURLOPT_FAILONERROR, 1);
 curl_setopt($ch, CURLOPT_SSLCERT, '/path/to/certs/cert.pem');
 curl_setopt($ch, CURLOPT_SSLCERTPASSWD, 'thepass');
 curl_setopt($ch, CURLOPT_SSLKEYTYPE, 'PEM');
 curl_setopt($ch, CURLOPT_SSLKEY, '/path/to/certs/key.pem');
 curl_setopt($ch, CURLOPT_USERPWD, 'user:pass');

 ob_start();
 curl_exec($ch);
 ob_end_flush();

 if(curl_error($ch)) {
 printf(error: [%s] %s, curl_errno($ch), curl_error($ch));
 }

 curl_close($ch);
 
?


On 03/11/2005, at 7:31 PM, Dan Rossi wrote:

Just a standard php 4.3.11 and apache 1.3 ?? It works via php cli 
wierdly enough but not the apache module ?


On 03/11/2005, at 7:17 PM, Jochem Maas wrote:


Dan Rossi wrote:

Hi there, I am trying to test out the new installed curl extension 
to connect to a site via ssl and auth basic. However everytime i try 
to connect with the browser , in ie it says cannot find server and 
in mac safari is says could not load any data etc. If i run the same 
script via php cli it works fine and is accepting the ssl 
certificate we setup on the IIs server we are connecting to. What 
could be cauasing this, there is no way to get php debug errors 
because it doesnt let the page load. Its around the curl_exec call. 
I also found that its causing an issue with apache in the logs

* About to connect() to ourserver port 443
*   Trying ip... * connected
* Connected to ourserver (ip) port 443
* successfully set certificate verify locations:
*   CAfile: /usr/local/share/curl/curl-ca-bundle.crt
  CApath: none
[Thu Nov  3 02:46:38 2005] [notice] child pid 49681 exit signal 
Segmentation fault (11)

any ideas ?



it helps when you tell us what versions of softwar eyou have.

are you running apache2? is it running using a threaded worker module?
is the curl extension thread safe?




--
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] Issue with curl and ssl

2005-11-03 Thread Dan Rossi
Yes there somehow seems to be an issue with ssl. Does the curl 
extension rely on any ssl module in apache to work ?


On 04/11/2005, at 12:34 AM, Jochem Maas wrote:


can you get it to work without SSL?

Dan Rossi wrote:
Here is my code i am using, ive tried and tried, im still getting a 
no data sent error in the browser.

?
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, https://mydomain/Default.asmx;);
 curl_setopt($ch, CURLOPT_VERBOSE, 1);
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
 curl_setopt($ch, CURLOPT_FAILONERROR, 1);
 curl_setopt($ch, CURLOPT_SSLCERT, '/path/to/certs/cert.pem');
 curl_setopt($ch, CURLOPT_SSLCERTPASSWD, 'thepass');
 curl_setopt($ch, CURLOPT_SSLKEYTYPE, 'PEM');
 curl_setopt($ch, CURLOPT_SSLKEY, '/path/to/certs/key.pem');
 curl_setopt($ch, CURLOPT_USERPWD, 'user:pass');
 ob_start();
 curl_exec($ch);
 ob_end_flush();
 if(curl_error($ch)) {
 printf(error: [%s] %s, curl_errno($ch), curl_error($ch));
 }
 curl_close($ch);
 ?
On 03/11/2005, at 7:31 PM, Dan Rossi wrote:
Just a standard php 4.3.11 and apache 1.3 ?? It works via php cli 
wierdly enough but not the apache module ?


On 03/11/2005, at 7:17 PM, Jochem Maas wrote:


Dan Rossi wrote:

Hi there, I am trying to test out the new installed curl extension 
to connect to a site via ssl and auth basic. However everytime i 
try to connect with the browser , in ie it says cannot find server 
and in mac safari is says could not load any data etc. If i run 
the same script via php cli it works fine and is accepting the ssl 
certificate we setup on the IIs server we are connecting to. What 
could be cauasing this, there is no way to get php debug errors 
because it doesnt let the page load. Its around the curl_exec 
call. I also found that its causing an issue with apache in the 
logs

* About to connect() to ourserver port 443
*   Trying ip... * connected
* Connected to ourserver (ip) port 443
* successfully set certificate verify locations:
*   CAfile: /usr/local/share/curl/curl-ca-bundle.crt
  CApath: none
[Thu Nov  3 02:46:38 2005] [notice] child pid 49681 exit signal 
Segmentation fault (11)

any ideas ?



it helps when you tell us what versions of softwar eyou have.

are you running apache2? is it running using a threaded worker 
module?

is the curl extension thread safe?




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



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



[PHP] Issue with curl and ssl

2005-11-02 Thread Dan Rossi
Hi there, I am trying to test out the new installed curl extension to 
connect to a site via ssl and auth basic. However everytime i try to 
connect with the browser , in ie it says cannot find server and in mac 
safari is says could not load any data etc. If i run the same script 
via php cli it works fine and is accepting the ssl certificate we setup 
on the IIs server we are connecting to. What could be cauasing this, 
there is no way to get php debug errors because it doesnt let the page 
load. Its around the curl_exec call. I also found that its causing an 
issue with apache in the logs


* About to connect() to ourserver port 443
*   Trying ip... * connected
* Connected to ourserver (ip) port 443
* successfully set certificate verify locations:
*   CAfile: /usr/local/share/curl/curl-ca-bundle.crt
  CApath: none
[Thu Nov  3 02:46:38 2005] [notice] child pid 49681 exit signal 
Segmentation fault (11)


any ideas ?

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



[PHP] Issue with generating asx playlist with php

2005-08-29 Thread Dan Rossi
Hi there I am trying to use php to output an asx playlist but depends 
on a special hash in the url to prevent hotlinking. I am using a 
session to store a generated token when generating the url to display 
in an embedded player. The token is added in the filename and  I am 
using rewrite rules to load another php script which does a check of 
the hash in the querystring with the token stored in the session. 
However its having unexpected results. When i add the check for the 
session token the media player either doesnt player in PC or outputs 
playlist format not recognised in Mac. If i do a check for the hash 
only its ok. Here is an example


if ($_GET['h']  $_GET['filename']  $this-hash) {

$file = 
WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']);
$this-filename = preg_replace('/stream/','wmv',$file);
$this-tpl-compile('playlist.html');
header(Content-Type: video/x-ms-wmv);
die(trim($this-tpl-outputObject($this)));
}

breaks with this

if ($_GET['h']  $_GET['filename']  $this-token) {

$file = 
WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']);
$this-filename = preg_replace('/stream/','wmv',$file);
$this-tpl-compile('playlist.html');
header(Content-Type: video/x-ms-wmv);
die(trim($this-tpl-outputObject($this)));
}

ideally i want it to look like

if ($_GET['h']  $_GET['filename']  
(strcmp($this-token,$this-hash)==0)) {


$file = 
WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']);
$this-filename = preg_replace('/stream/','wmv',$file);
$this-tpl-compile('playlist.html');
header(Content-Type: video/x-ms-wmv);
die(trim($this-tpl-outputObject($this)));
}


they are being set earlier in the script like so

$this-token = trim($_SESSION['token']);
$this-hash = trim($_GET['h']);

any ideas ?

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



Re: [PHP] Issue with generating asx playlist with php

2005-08-29 Thread Dan Rossi
I have just discovered on closer debugging, the windows media plugin is 
loading the file twice, i can see the stop button flicker twice and i 
made an error log and the word loaded shows up twice, would this be 
causing an issue with the session ?


On 29/08/2005, at 5:20 PM, Dan Rossi wrote:

Hi there I am trying to use php to output an asx playlist but depends 
on a special hash in the url to prevent hotlinking. I am using a 
session to store a generated token when generating the url to display 
in an embedded player. The token is added in the filename and  I am 
using rewrite rules to load another php script which does a check of 
the hash in the querystring with the token stored in the session. 
However its having unexpected results. When i add the check for the 
session token the media player either doesnt player in PC or outputs 
playlist format not recognised in Mac. If i do a check for the hash 
only its ok. Here is an example


if ($_GET['h']  $_GET['filename']  $this-hash) {

			$file = 
WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']);

$this-filename = preg_replace('/stream/','wmv',$file);
$this-tpl-compile('playlist.html');
header(Content-Type: video/x-ms-wmv);
die(trim($this-tpl-outputObject($this)));
}

breaks with this

if ($_GET['h']  $_GET['filename']  $this-token) {

			$file = 
WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']);

$this-filename = preg_replace('/stream/','wmv',$file);
$this-tpl-compile('playlist.html');
header(Content-Type: video/x-ms-wmv);
die(trim($this-tpl-outputObject($this)));
}

ideally i want it to look like

if ($_GET['h']  $_GET['filename']  
(strcmp($this-token,$this-hash)==0)) {


			$file = 
WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']);

$this-filename = preg_replace('/stream/','wmv',$file);
$this-tpl-compile('playlist.html');
header(Content-Type: video/x-ms-wmv);
die(trim($this-tpl-outputObject($this)));
}


they are being set earlier in the script like so

$this-token = trim($_SESSION['token']);
$this-hash = trim($_GET['h']);

any ideas ?

--
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] Issue with generating asx playlist with php

2005-08-29 Thread Dan Rossi


On 29/08/2005, at 10:00 PM, Dan Rossi wrote:

I have just discovered on closer debugging, the windows media plugin 
is loading the file twice, i can see the stop button flicker twice and 
i made an error log and the word loaded shows up twice, would this be 
causing an issue with the session ?


Ok its quite obvious I just discovered the session is being created 
again when the file is loaded from the windows media plugin therefore 
token variable is not there. Any ideas what could have been doing this 
? I logged two different sess id's being created.




On 29/08/2005, at 5:20 PM, Dan Rossi wrote:

Hi there I am trying to use php to output an asx playlist but depends 
on a special hash in the url to prevent hotlinking. I am using a 
session to store a generated token when generating the url to display 
in an embedded player. The token is added in the filename and  I am 
using rewrite rules to load another php script which does a check of 
the hash in the querystring with the token stored in the session. 
However its having unexpected results. When i add the check for the 
session token the media player either doesnt player in PC or outputs 
playlist format not recognised in Mac. If i do a check for the hash 
only its ok. Here is an example


if ($_GET['h']  $_GET['filename']  $this-hash) {

			$file = 
WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']);

$this-filename = preg_replace('/stream/','wmv',$file);
$this-tpl-compile('playlist.html');
header(Content-Type: video/x-ms-wmv);
die(trim($this-tpl-outputObject($this)));
}

breaks with this

if ($_GET['h']  $_GET['filename']  $this-token) {

			$file = 
WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']);

$this-filename = preg_replace('/stream/','wmv',$file);
$this-tpl-compile('playlist.html');
header(Content-Type: video/x-ms-wmv);
die(trim($this-tpl-outputObject($this)));
}

ideally i want it to look like

if ($_GET['h']  $_GET['filename']  
(strcmp($this-token,$this-hash)==0)) {


			$file = 
WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']);

$this-filename = preg_replace('/stream/','wmv',$file);
$this-tpl-compile('playlist.html');
header(Content-Type: video/x-ms-wmv);
die(trim($this-tpl-outputObject($this)));
}


they are being set earlier in the script like so

$this-token = trim($_SESSION['token']);
$this-hash = trim($_GET['h']);

any ideas ?

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



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



Re: [PHP] Issue with generating asx playlist with php

2005-08-29 Thread Andy Pieters
On Monday 29 August 2005 16:09, Dan Rossi wrote:
 ? I logged two different sess id's being created.

Hi

I have seen this behaviour as well, although in another context.  The solution 
was to have the session_start instruction be one of the very first.

In fact, in my software, the session_start is the second instruction on ALL 
pages.

?php

require_once 'globals.inc.php';

/* rest of script*/
?

And globals.inc.php is like

?php
session_start();

define(yadaydayda
?

Hope this helps



With kind regards



Andy


-- 
Registered Linux User Number 379093
Now listening to Blank and Jones and Friends (2005 week 34) - guest DJ Jochen 
Miller

   amaroK::the Coolest Media Player in the known Universe!


   Cockroaches and socialites are the only things that can 
   stay up all night and eat anything.
Herb Caen
--
-- --BEGIN GEEK CODE BLOCK-
Version: 3.1
GAT/O/E$ d-(---)+ s:(+): a--(-)? C$(+++) UL$ P-(+)++
L+++$ E---(-)@ W++$ !N@ o? !K? W--(---) !O !M- V-- PS++(+++)
PE--(-) Y+ PGP++(+++) t+(++) 5-- X++ R*(+)@ !tv b-() DI(+) D+(+++) G(+)
e$@ h++(*) r--++ y--()
-- ---END GEEK CODE BLOCK--
--
Check out these few php utilities that I released
 under the GPL2 and that are meant for use with a 
 php cli binary:
 
 http://www.vlaamse-kern.com/sas/

--


pgpkh2ZIq86nl.pgp
Description: PGP signature


Re: [PHP] Issue with generating asx playlist with php

2005-08-29 Thread Dan Rossi
Thanks andy, I'll give this a shot however I am already doing this in 
the constructor of my class. However its just after calling the 
constructor of the base class. What I have noticed is really freaky. 
The plugin is loading my php script 4 times when loading to play a 
file, for the 3 times the session variable is there, then on the 4th 
time a new session is created but the session variable is empty :|


On 30/08/2005, at 2:43 AM, Andy Pieters wrote:


On Monday 29 August 2005 16:09, Dan Rossi wrote:

? I logged two different sess id's being created.


Hi

I have seen this behaviour as well, although in another context.  The 
solution

was to have the session_start instruction be one of the very first.

In fact, in my software, the session_start is the second instruction 
on ALL

pages.

?php

require_once 'globals.inc.php';

/* rest of script*/
?

And globals.inc.php is like

?php
session_start();

define(yadaydayda
?

Hope this helps



With kind regards



Andy


--
Registered Linux User Number 379093
Now listening to Blank and Jones and Friends (2005 week 34) - guest DJ 
Jochen

Miller

   amaroK::the Coolest Media Player in the known Universe!


   Cockroaches and socialites are the only things that can
   stay up all night and eat anything.
Herb Caen
--
-- --BEGIN GEEK CODE BLOCK-
Version: 3.1
GAT/O/E$ d-(---)+ s:(+): a--(-)? C$(+++) UL$ P-(+)++
L+++$ E---(-)@ W++$ !N@ o? !K? W--(---) !O !M- V-- PS++(+++)
PE--(-) Y+ PGP++(+++) t+(++) 5-- X++ R*(+)@ !tv b-() DI(+) D+(+++) G(+)
e$@ h++(*) r--++ y--()
-- ---END GEEK CODE BLOCK--
--
Check out these few php utilities that I released
 under the GPL2 and that are meant for use with a
 php cli binary:

 http://www.vlaamse-kern.com/sas/

--


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



Re: [PHP] Issue with generating asx playlist with php

2005-08-29 Thread Dan Rossi
Just an update i've changed to use non cookie based sessions using 
pear's HTTP_Session so sending it in the filename string which loads in 
the query string of the php script within the plugin's file source. 
However the session isnt expiring now lol.


On 30/08/2005, at 10:32 AM, Dan Rossi wrote:

Thanks andy, I'll give this a shot however I am already doing this in 
the constructor of my class. However its just after calling the 
constructor of the base class. What I have noticed is really freaky. 
The plugin is loading my php script 4 times when loading to play a 
file, for the 3 times the session variable is there, then on the 4th 
time a new session is created but the session variable is empty :|


On 30/08/2005, at 2:43 AM, Andy Pieters wrote:


On Monday 29 August 2005 16:09, Dan Rossi wrote:

? I logged two different sess id's being created.


Hi

I have seen this behaviour as well, although in another context.  The 
solution

was to have the session_start instruction be one of the very first.

In fact, in my software, the session_start is the second instruction 
on ALL

pages.

?php

require_once 'globals.inc.php';

/* rest of script*/
?

And globals.inc.php is like

?php
session_start();

define(yadaydayda
?

Hope this helps



With kind regards



Andy


--
Registered Linux User Number 379093
Now listening to Blank and Jones and Friends (2005 week 34) - guest 
DJ Jochen

Miller

   amaroK::the Coolest Media Player in the known Universe!


   Cockroaches and socialites are the only things that can
   stay up all night and eat anything.
Herb Caen
--
-- --BEGIN GEEK CODE BLOCK-
Version: 3.1
GAT/O/E$ d-(---)+ s:(+): a--(-)? C$(+++) UL$ P-(+)++
L+++$ E---(-)@ W++$ !N@ o? !K? W--(---) !O !M- V-- PS++(+++)
PE--(-) Y+ PGP++(+++) t+(++) 5-- X++ R*(+)@ !tv b-() DI(+) D+(+++) 
G(+)

e$@ h++(*) r--++ y--()
-- ---END GEEK CODE BLOCK--
--
Check out these few php utilities that I released
 under the GPL2 and that are meant for use with a
 php cli binary:

 http://www.vlaamse-kern.com/sas/

--


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



[PHP] MySQL PHP issue?

2005-04-27 Thread Dustin Wish

OK, I have check all the mysql doc and php docs on using exists in the
query, but it seems I still can not get the query to work. Here it is:


SELECT * FROM icisp.account WHERE id in (select oldaccountID from
BillMax.account)

Or Using


sELECT * FROM icisp.account WHERE id exists(select oldaccountID from
BillMax.account)

Anyone have any idea what I'm doing wrong?

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005
 

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



RE: [PHP] MySQL PHP issue?

2005-04-27 Thread Jay Blanchard
[snip]
OK, I have check all the mysql doc and php docs on using exists in the
query, but it seems I still can not get the query to work. Here it is:


SELECT * FROM icisp.account WHERE id in (select oldaccountID from
BillMax.account)

Or Using


sELECT * FROM icisp.account WHERE id exists(select oldaccountID from
BillMax.account)

Anyone have any idea what I'm doing wrong?
[/snip]

Asking a MySQL question on a PHP list? *slaps knee!*

What version of MySQL are you running, does it allow sub queries?

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



Re: [PHP] MySQL PHP issue?

2005-04-27 Thread John Nichel
Dustin Wish wrote:
snip
Anyone have any idea what I'm doing wrong?
/snip
Asking on the wrong list.
--
John C. Nichel
berGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] MySQL PHP issue?

2005-04-27 Thread John Nichel
Jay Blanchard wrote:
snip
Asking a MySQL question on a PHP list? *slaps knee!*
/snip
I bet you think you're funny.  ;)
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] MySQL PHP issue?

2005-04-27 Thread Jay Blanchard
[snip]
Jay Blanchard wrote:
snip
 Asking a MySQL question on a PHP list? *slaps knee!*
/snip

I bet you think you're funny.  ;)
[/snip]

I know that you think I am. Yuk-yuk! 

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



RE: [PHP] MySQL PHP issue?

2005-04-27 Thread Dustin Wish


It is version 3.23.56

-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 27, 2005 2:44 PM
To: php-general@lists.php.net
Subject: Re: [PHP] MySQL PHP issue?

Jay Blanchard wrote:
snip
 Asking a MySQL question on a PHP list? *slaps knee!*
/snip

I bet you think you're funny.  ;)

-- 
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005
 

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



RE: [PHP] MySQL PHP issue?

2005-04-27 Thread Jay Blanchard
[snip]
It is version 3.23.56
[/snip]

Sub-queries are not supported in that version of MySQL.

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



RE: [PHP] MySQL PHP issue?

2005-04-27 Thread Dustin Wish

SH^*^t

Thanks guys. Figured something like that.

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 27, 2005 2:53 PM
To: Dustin Wish; php-general@lists.php.net
Subject: RE: [PHP] MySQL PHP issue?

[snip]
It is version 3.23.56
[/snip]

Sub-queries are not supported in that version of MySQL.

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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005
 

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



Re: [PHP] MySQL PHP issue?

2005-04-27 Thread John Nichel
Dustin Wish wrote:
It is version 3.23.56
snip
Know thy software.  3.x doesn't support sub-queries.
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] issue with accents and mysql

2005-02-15 Thread mario
Hello,

please help me on the following issue.
please reply to [EMAIL PROTECTED] too.
(I asked for help on the php-db ml, but nobody replied)

I have hacked the following function:
function accents($text) {
   global $export;
   $search  = array ( 'à', 'è', 'ì', 'ò' , 'ù');
   $replace = array ( '\\`{a}', '\\`{e}', '\\`{i}', '\\`{o}', '\\`{u}');
   $export= str_replace($search, $replace, $text);
   return $export;
}

It works fine, as long as I feed it with a string: 
accents('à') -- \`{a} 

The issue is when I get 'à' from a mysql table. 
I.e., for some record of a mysql table Table, let à the value of the
field Field, and say
$result =  mysql_fetch_array($answer, MYSQL_BOTH), 
where $answer= mysql_query(SELECT * FROM Table).


Now accents($result['Field']) returns à (instead of \`{a}).
Why? I have no idea. 

Any hint is welcome.
Thanks a lot
mario

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



Re: [PHP] issue with accents and mysql

2005-02-15 Thread Guillermo Rauch
Try
SHOW VARIABLES LIKE 'character_set%'

and verify your character set is latin1.

If not, see http://dev.mysql.com/doc/mysql/en/charset-database.html

On Tue, 15 Feb 2005 22:04:30 +, mario [EMAIL PROTECTED] wrote:
 Hello,
 
 please help me on the following issue.
 please reply to [EMAIL PROTECTED] too.
 (I asked for help on the php-db ml, but nobody replied)
 
 I have hacked the following function:
 function accents($text) {
   global $export;
   $search  = array ( 'à', 'è', 'ì', 'ò' , 'ù');
   $replace = array ( '\\`{a}', '\\`{e}', '\\`{i}', '\\`{o}', '\\`{u}');
   $export= str_replace($search, $replace, $text);
   return $export;
 }
 
 It works fine, as long as I feed it with a string:
 accents('à') -- \`{a}
 
 The issue is when I get 'à' from a mysql table.
 I.e., for some record of a mysql table Table, let à the value of the
 field Field, and say
 $result =  mysql_fetch_array($answer, MYSQL_BOTH),
 where $answer= mysql_query(SELECT * FROM Table).
 
 Now accents($result['Field']) returns à (instead of \`{a}).
 Why? I have no idea.
 
 Any hint is welcome.
 Thanks a lot
 mario
 
 --
 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] issue with accents and mysql

2005-02-15 Thread mario
Hi,

thanks, but that seems to be ok:
SQL result
Host: 127.0.0.1
Database : 
Generation Time: Feb 15, 2005 at 11:36 PM
Generated by: phpMyAdmin 2.5.7-pl1 / MySQL 3.23.58
SQL-query: SHOW VARIABLES LIKE 'character_set%'; 
Rows: 2 

   Variable_name 
   Value 
character_set
latin1
character_sets
latin1 big5 cp1251 cp1257 croat
czech danish dec8 ...

any further idea?
thanks
mario

ps of course, I could 
On Tue, 2005-02-15 at 21:42, Guillermo Rauch wrote:
 Try
 SHOW VARIABLES LIKE 'character_set%'
 
 and verify your character set is latin1.
 
 If not, see http://dev.mysql.com/doc/mysql/en/charset-database.html
 
 On Tue, 15 Feb 2005 22:04:30 +, mario [EMAIL PROTECTED] wrote:
  Hello,
  
  please help me on the following issue.
  please reply to [EMAIL PROTECTED] too.
  (I asked for help on the php-db ml, but nobody replied)
  
  I have hacked the following function:
  function accents($text) {
global $export;
$search  = array ( 'à', 'è', 'ì', 'ò' , 'ù');
$replace = array ( '\\`{a}', '\\`{e}', '\\`{i}', '\\`{o}', '\\`{u}');
$export= str_replace($search, $replace, $text);
return $export;
  }
  
  It works fine, as long as I feed it with a string:
  accents('à') -- \`{a}
  
  The issue is when I get 'à' from a mysql table.
  I.e., for some record of a mysql table Table, let à the value of the
  field Field, and say
  $result =  mysql_fetch_array($answer, MYSQL_BOTH),
  where $answer= mysql_query(SELECT * FROM Table).
  
  Now accents($result['Field']) returns à (instead of \`{a}).
  Why? I have no idea.
  
  Any hint is welcome.
  Thanks a lot
  mario
  
  --
  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] issue with accents and mysql

2005-02-15 Thread Bret Hughes
On Tue, 2005-02-15 at 17:40, mario wrote:
 Hi,
 
 thanks, but that seems to be ok:
 SQL result
 Host: 127.0.0.1
 Database : 
 Generation Time: Feb 15, 2005 at 11:36 PM
 Generated by: phpMyAdmin 2.5.7-pl1 / MySQL 3.23.58
 SQL-query: SHOW VARIABLES LIKE 'character_set%'; 
 Rows: 2 
 
Variable_name 
Value 
 character_set
 latin1
 character_sets
 latin1 big5 cp1251 cp1257 croat
 czech danish dec8 ...
 
 any further idea?
 thanks
 mario
 
 ps of course, I could 
 On Tue, 2005-02-15 at 21:42, Guillermo Rauch wrote:
  Try
  SHOW VARIABLES LIKE 'character_set%'
  
  and verify your character set is latin1.
  
  If not, see http://dev.mysql.com/doc/mysql/en/charset-database.html
  
  On Tue, 15 Feb 2005 22:04:30 +, mario [EMAIL PROTECTED] wrote:
   Hello,
   
   please help me on the following issue.
   please reply to [EMAIL PROTECTED] too.
   (I asked for help on the php-db ml, but nobody replied)
   
   I have hacked the following function:
   function accents($text) {
 global $export;
 $search  = array ( 'à', 'è', 'ì', 'ò' , 'ù');
 $replace = array ( '\\`{a}', '\\`{e}', '\\`{i}', '\\`{o}', '\\`{u}');
 $export= str_replace($search, $replace, $text);
 return $export;
   }
   
   It works fine, as long as I feed it with a string:
   accents('à') -- \`{a}
   
   The issue is when I get 'à' from a mysql table.
   I.e., for some record of a mysql table Table, let à the value of the
   field Field, and say
   $result =  mysql_fetch_array($answer, MYSQL_BOTH),
   where $answer= mysql_query(SELECT * FROM Table).
   
   Now accents($result['Field']) returns à (instead of \`{a}).
   Why? I have no idea.
   
   Any hint is welcome.
   Thanks a lot


I have no idea what might be the problem but I would probably start by
seeing what the difference is at the ascii level.

preg_split the strings and run ord on each one

foreach ( preg_split(//,this is a string) as $char ) {
echo The ascii value for $char is . ord($char) . \n;
}

post the results from both sources and lets see what can be found.

Bret

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



Re: [PHP] issue with accents and mysql

2005-02-15 Thread Burhan Khalid
mario wrote:
Hello,
please help me on the following issue.
please reply to [EMAIL PROTECTED] too.
(I asked for help on the php-db ml, but nobody replied)
I have hacked the following function:
function accents($text) {
   global $export;
   $search  = array ( 'à', 'è', 'ì', 'ò' , 'ù');
   $replace = array ( '\\`{a}', '\\`{e}', '\\`{i}', '\\`{o}', '\\`{u}');
   $export= str_replace($search, $replace, $text);
   return $export;
}
It works fine, as long as I feed it with a string: 
accents('à') -- \`{a} 

The issue is when I get 'à' from a mysql table. 
I.e., for some record of a mysql table Table, let à the value of the
field Field, and say
$result =  mysql_fetch_array($answer, MYSQL_BOTH), 
where $answer= mysql_query(SELECT * FROM Table).

Now accents($result['Field']) returns à (instead of \`{a}).
Why? I have no idea.
Try var_dump $text in accents() when you pass it $result['Field']
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Issue with virtual() calls...

2005-01-24 Thread Ford, Mike
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm



On 21 January 2005 22:01, Potter, Jeff wrote:

 Hello,
 
 Could someone help me understand why later versions of PHP (4.3.9,
 4.3.10,  5.0.3) do not maintain the same
 ordering for virtual() call output as the older versions?

Sounds like a known bug, which should already be fixed for future versions;
see http://bugs.php.net/bug.php?id=30446 for more details.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



RE: [PHP] Issue with virtual() calls...

2005-01-24 Thread Potter, Jeff
Hi Mike,

I would seem so, but the patch (in snapshot php4-200501201930) only
seems to work when the output_buffering is set to 0.  With
output_buffering set to the default 4096, the virtual() calls are sent
to the browser out of order. The concern with turning the output
buffering off is that the performance will drop off, or there will be an
increase in resource utilization, etc.  The pages and configuration that
are not rendering properly under PHP 4.3.9 have been QA tested without
this issue in PHP 4.3.7 for months, and seem to work fine in PHP 4.3.8.

Any advice or guidance would be appreciated.

Thanks,
JP

-Original Message-
From: Ford, Mike [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 24, 2005 6:40 AM
To: Potter, Jeff; php-general@lists.php.net
Subject: RE: [PHP] Issue with virtual() calls...


To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm



On 21 January 2005 22:01, Potter, Jeff wrote:

 Hello,
 
 Could someone help me understand why later versions of PHP (4.3.9, 
 4.3.10,  5.0.3) do not maintain the same ordering for virtual() call 
 output as the older versions?

Sounds like a known bug, which should already be fixed for future
versions; see http://bugs.php.net/bug.php?id=30446 for more details.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services, JG125, James
Graham Building, Leeds Metropolitan University, Headingley Campus,
LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



RE: [PHP] Issue with virtual() calls...

2005-01-24 Thread Ford, Mike
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm



On 24 January 2005 16:42, Potter, Jeff wrote:

 Hi Mike,
 
 I would seem so, but the patch (in snapshot php4-200501201930) only
 seems to work when the output_buffering is set to 0.  With
 output_buffering set to the default 4096, the virtual() calls are sent
 to the browser out of order. The concern with turning the output
 buffering off is that the performance will drop off, or there
 will be an
 increase in resource utilization, etc.  The pages and
 configuration that
 are not rendering properly under PHP 4.3.9 have been QA tested without
 this issue in PHP 4.3.7 for months, and seem to work fine in
 PHP 4.3.8.
 
 Any advice or guidance would be appreciated.

There's been a fix to the fix today which may or may not have some bearing
on this (I haven't looked at it in detail, and probably wouldn't understand
it if I did!) -- so look for a snapshot dated after about 200501241155.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] Issue with virtual() calls...

2005-01-24 Thread Richard Lynch
Potter, Jeff wrote:

 is still broken on others.  The content generated from the virtual()
 call inside a page ends up in the browser
 before the opening HTML tag.   See the simplified example below:

Work-Around:

Until you get this hammered out, you could use file_get_contents() with a
URL instead.

Granted, it's not an Apache sub-request, and it goes in the access_log, so
it's not THE SAME as virtual(), but your HTML output will be correct, at
least...

I'm guessing that performance will suffer slightly, as chewing up a whole
'nother HTTP connection is probably a bit more expensive than a
sub-request...  Or maybe not.  You'll have to test on your server to find
out.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



RE: [PHP] Issue with virtual() calls...

2005-01-24 Thread Potter, Jeff
Mike,

Thanks for the information.  The php4-200501241930 snapshot works much
better...  It looks like Joe Orton's ap_rflush() fix works with output
buffering turned on (output_buffering = 4096).

Regards,
JP

-Original Message-
From: Ford, Mike [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 24, 2005 1:09 PM
To: Potter, Jeff; php-general@lists.php.net
Subject: RE: [PHP] Issue with virtual() calls...


To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm



On 24 January 2005 16:42, Potter, Jeff wrote:

 Hi Mike,
 
 I would seem so, but the patch (in snapshot php4-200501201930) only 
 seems to work when the output_buffering is set to 0.  With 
 output_buffering set to the default 4096, the virtual() calls are sent

 to the browser out of order. The concern with turning the output 
 buffering off is that the performance will drop off, or there will be 
 an increase in resource utilization, etc.  The pages and
 configuration that
 are not rendering properly under PHP 4.3.9 have been QA tested without
 this issue in PHP 4.3.7 for months, and seem to work fine in
 PHP 4.3.8.
 
 Any advice or guidance would be appreciated.

There's been a fix to the fix today which may or may not have some
bearing on this (I haven't looked at it in detail, and probably wouldn't
understand it if I did!) -- so look for a snapshot dated after about
200501241155.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services, JG125, James
Graham Building, Leeds Metropolitan University, Headingley Campus,
LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



[PHP] Issue with virtual() calls...

2005-01-21 Thread Potter, Jeff
Hello,

Could someone help me understand why later versions of PHP (4.3.9,
4.3.10,  5.0.3) do not maintain the same 
ordering for virtual() call output as the older versions?   Basically,
generated pages that worked in 
PHP 4.3.7  PHP 4.3.8 are now broken.   Setting the output_buffering=0
seems to help on some pages, but it
is still broken on others.  The content generated from the virtual()
call inside a page ends up in the browser
before the opening HTML tag.   See the simplified example below:

Source page:

html
 head
style type=text/css
?php require ./glob.css ?
/style

   meta http-equiv=pragma content=no-cache

  script
  ?php 
 virtual('chp.js') ; 
 virtual('/hostinfo/getinfo');
   ?

  ...

Expected in the browser:

html
 head
style type=text/css

BODY { font-famliy:Veranda }
.pageheader { font-size:12 }

/style

   meta http-equiv=pragma content=no-cache

  script

  !-- begin content from virtual chp.js.en (about 5569 bytes of
javascript) --
  var moo=3;
 
  function pagein() 
  {
   var rc=false;
   retrun rc;
  }
  !-- end content from virtual chp.js.en --

  !-- begin content from virtual /hostinfo/getname --
 
  var myhostname=This computer is localhost.localdomain;
  var myipaddress=127.0.0.1;
 
  !-- end content from virtual /hostname/getname --
...

Actually in the browser:

  !-- begin content from virtual chp.js.en (about 5569 bytes of
javascript) --
  var moo=3;

  function pagein() 
  {
   var rc=false;
   retrun rc;
  }
  !-- end content from virtual chp.js.en --

html
 head
style type=text/css

BODY { font-famliy:Veranda }
.pageheader { font-size:12 }

/style

   meta http-equiv=pragma content=no-cache

  script

  !-- begin content from virtual /hostinfo/getname --

  var myhostname=This computer is localhost.localdomain;
  var myipaddress=127.0.0.1;

  !-- end content from virtual /hostname/getname --
...
 
So, what changed in the output buffering between 4.3.8 and 4.3.9?  Are
there any settings or coding practices 
that would force the virtual calls out in the proper order within a
page?  The php4-200501201930 snapshot 
with output_buffering=0 seems to work the best, but this new behavior
seems to be a bug.  There are similar reports 
#30446, #31594, and #30811.  Please advise.

Thanks,
JP

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



Re: [PHP] issue a value on header, not working..

2004-07-27 Thread Justin Patrin
On Tue, 27 Jul 2004 11:59:14 +0800, Louie Miranda [EMAIL PROTECTED] wrote:
 This outputs a filename on $catchresult, and im working on redirecting
 it to that file via header. But when ever i run this the value of
 $catchresult is not being pass to the header() on php.
 
 $catchresult = $db_view-getOne($getfile);
 header('Location: clients/FILES/$catchresult');
 
 Hmm, it seems simple but, its really not working..
 

When using single quotes, variables aren't replaced by their content.
Using double quotes would fix it, but consider this alternative:

header('Location: clients/FILES/'.$catchresult);

Cleaner, more obvious that you're using a variable, will be
highlighted correctly by syntax highlighters, and, most important,
it's faster. :-)

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

paperCrane --Justin Patrin--

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



Re: [PHP] issue a value on header, not working..

2004-07-27 Thread Louie Miranda
ah ic, thanks. it now works fine.

thanks also for the tip! :)

On Mon, 26 Jul 2004 23:29:06 -0700, Justin Patrin [EMAIL PROTECTED] wrote:
 On Tue, 27 Jul 2004 11:59:14 +0800, Louie Miranda [EMAIL PROTECTED] wrote:
  This outputs a filename on $catchresult, and im working on redirecting
  it to that file via header. But when ever i run this the value of
  $catchresult is not being pass to the header() on php.
 
  $catchresult = $db_view-getOne($getfile);
  header('Location: clients/FILES/$catchresult');
 
  Hmm, it seems simple but, its really not working..
 
 
 When using single quotes, variables aren't replaced by their content.
 Using double quotes would fix it, but consider this alternative:
 
 header('Location: clients/FILES/'.$catchresult);
 
 Cleaner, more obvious that you're using a variable, will be
 highlighted correctly by syntax highlighters, and, most important,
 it's faster. :-)
 
 --
 DB_DataObject_FormBuilder - The database at your fingertips
 http://pear.php.net/package/DB_DataObject_FormBuilder
 
 paperCrane --Justin Patrin--
 


-- 
Louie Miranda
http://www.axishift.com

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



[PHP] issue a value on header, not working..

2004-07-26 Thread Louie Miranda
This outputs a filename on $catchresult, and im working on redirecting
it to that file via header. But when ever i run this the value of
$catchresult is not being pass to the header() on php.

$catchresult = $db_view-getOne($getfile);
header('Location: clients/FILES/$catchresult');

Hmm, it seems simple but, its really not working..

-- 
Louie Miranda
http://www.axishift.com

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



Re: [PHP] issue a value on header, not working..

2004-07-26 Thread zareef ahmed

--- Louie Miranda [EMAIL PROTECTED] wrote:

 This outputs a filename on $catchresult, and im
 working on redirecting
 it to that file via header. But when ever i run this
 the value of
 $catchresult is not being pass to the header() on
 php.
 
 $catchresult = $db_view-getOne($getfile);
 header('Location: clients/FILES/$catchresult');
 
 Hmm, it seems simple but, its really not working..

Yes it is simple just change your single quotes to
double quotes. i.e.

 header(Location: clients/FILES/$catchresult);

zareef ahmed  

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


=
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com




__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

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



Re: [PHP] issue with inheriting private property from abstract class in php5rc3

2004-06-24 Thread Marek Kilimajer
Curt Zirzow wrote --- napsal::
* Thus wrote Marek Kilimajer:
Chris wrote --- nap?sal::
if anyone can, would you please explain why the below code does what it 
does?  I would expect $this-test in TestInstance to refer to the 
inherited $test from Test.  Using php5RC3.  Thanks.

?php
abstract class Test {
  private $test;
  abstract public function addToTest($i);
}
class TestInstance extends Test {
  public function __construct() {
  $this-test = 0;
  }
...
The variable is private for Test, so TestInstance does not have access 
to it. By assigning 0 to $this-test in the constructor of TestInstance, 
you create a new property of TestInstance that is public (the default).

var_dump() shows it clearly:
object(TestInstance)#1 (2) {
 [test:private]= NULL    belongs to Test
 [test]= int(3)  belongs to TestInstance
}

I think one could argue that that test:private shouldn't even be
there. To me that test:private would imply that is TestIntance's
private variable.

Right, [Test::test:private] would be better
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] issue with inheriting private property from abstract class in php5rc3

2004-06-23 Thread Chris
if anyone can, would you please explain why the below code does what it 
does?  I would expect $this-test in TestInstance to refer to the 
inherited $test from Test.  Using php5RC3.  Thanks.

?php
abstract class Test {
private $test;
abstract public function addToTest($i);
}
class TestInstance extends Test {
public function __construct() {
$this-test = 0;
}
public function addToTest($i) {
$this-test += $i;
}
}
$t = new TestInstance();
$t-addToTest(3);
var_dump($t);
// test var SHOULD be private
echo private test (shouldn't be able to access it directly, but i can): 
.$t-test.\n\n;

/*
output
---
object(TestInstance)#1 (2) {
  [test:private]=
  NULL
  [test]=
  int(3)
}
private test (shouldn't be able to access it directly, but i can): 3
*/
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] issue with inheriting private property from abstract class in php5rc3

2004-06-23 Thread Justin Patrin
Do you have E_STRICT turned on? If not, I believe PHP5 lets you access
private / protected vars wherever you want.

On Wed, 23 Jun 2004 13:40:48 -0400, Chris [EMAIL PROTECTED] wrote:
 
 if anyone can, would you please explain why the below code does what it
 does?  I would expect $this-test in TestInstance to refer to the
 inherited $test from Test.  Using php5RC3.  Thanks.
 
 ?php
 abstract class Test {
  private $test;
  abstract public function addToTest($i);
 }
 
 class TestInstance extends Test {
  public function __construct() {
  $this-test = 0;
  }
 
  public function addToTest($i) {
  $this-test += $i;
  }
 }
 
 $t = new TestInstance();
 $t-addToTest(3);
 
 var_dump($t);
 
 // test var SHOULD be private
 echo private test (shouldn't be able to access it directly, but i can):
 .$t-test.\n\n;
 
 /*
 output
 ---
 object(TestInstance)#1 (2) {
[test:private]=
NULL
[test]=
int(3)
 }
 private test (shouldn't be able to access it directly, but i can): 3
 */
 ?
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
paperCrane --Justin Patrin--

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



Re: [PHP] issue with inheriting private property from abstract class in php5rc3

2004-06-23 Thread Marek Kilimajer
Chris wrote --- napísal::
if anyone can, would you please explain why the below code does what it 
does?  I would expect $this-test in TestInstance to refer to the 
inherited $test from Test.  Using php5RC3.  Thanks.

?php
abstract class Test {
private $test;
abstract public function addToTest($i);
}
class TestInstance extends Test {
public function __construct() {
$this-test = 0;
}
public function addToTest($i) {
$this-test += $i;
}
}
$t = new TestInstance();
$t-addToTest(3);
var_dump($t);
// test var SHOULD be private
echo private test (shouldn't be able to access it directly, but i can): 
.$t-test.\n\n;

/*
output
---
object(TestInstance)#1 (2) {
  [test:private]=
  NULL
  [test]=
  int(3)
}
private test (shouldn't be able to access it directly, but i can): 3
*/
?
The variable is private for Test, so TestInstance does not have access 
to it. By assigning 0 to $this-test in the constructor of TestInstance, 
you create a new property of TestInstance that is public (the default).

var_dump() shows it clearly:
object(TestInstance)#1 (2) {
  [test:private]= NULL    belongs to Test
  [test]= int(3)  belongs to TestInstance
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] issue with inheriting private property from abstract class

2004-06-23 Thread Chris
ok, i understand now that private members are NOT inherited.  i guess it 
was just throwing me off that var_dump()/print_r() display the parents 
private member, even tho its not really a member of the subclass.

thanks
Marek Kilimajer wrote:
Chris wrote --- napísal::
if anyone can, would you please explain why the below code does what 
it does?  I would expect $this-test in TestInstance to refer to the 
inherited $test from Test.  Using php5RC3.  Thanks.

?php
abstract class Test {
private $test;
abstract public function addToTest($i);
}
class TestInstance extends Test {
public function __construct() {
$this-test = 0;
}
public function addToTest($i) {
$this-test += $i;
}
}
$t = new TestInstance();
$t-addToTest(3);
var_dump($t);
// test var SHOULD be private
echo private test (shouldn't be able to access it directly, but i 
can): .$t-test.\n\n;

/*
output
---
object(TestInstance)#1 (2) {
  [test:private]=
  NULL
  [test]=
  int(3)
}
private test (shouldn't be able to access it directly, but i can): 3
*/
?
The variable is private for Test, so TestInstance does not have access 
to it. By assigning 0 to $this-test in the constructor of TestInstance, 
you create a new property of TestInstance that is public (the default).

var_dump() shows it clearly:
object(TestInstance)#1 (2) {
  [test:private]= NULL    belongs to Test
  [test]= int(3)  belongs to TestInstance
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] issue with inheriting private property from abstract class

2004-06-23 Thread Justin Patrin
It's still a member, it just can't be accessed by the sub-class's
methods. If you call the parent's methods or a method in the parent is
called that isn't defined in the subclass, the private property is
still there are still used as normal.

On Wed, 23 Jun 2004 18:35:14 -0400, Chris [EMAIL PROTECTED] wrote:
 
 ok, i understand now that private members are NOT inherited.  i guess it
 was just throwing me off that var_dump()/print_r() display the parents
 private member, even tho its not really a member of the subclass.
 
 thanks
 
 Marek Kilimajer wrote:
  Chris wrote --- napísal::
 
  if anyone can, would you please explain why the below code does what
  it does?  I would expect $this-test in TestInstance to refer to the
  inherited $test from Test.  Using php5RC3.  Thanks.
 
  ?php
  abstract class Test {
  private $test;
  abstract public function addToTest($i);
  }
 
  class TestInstance extends Test {
  public function __construct() {
  $this-test = 0;
  }
 
  public function addToTest($i) {
  $this-test += $i;
  }
  }
 
  $t = new TestInstance();
  $t-addToTest(3);
 
  var_dump($t);
 
  // test var SHOULD be private
  echo private test (shouldn't be able to access it directly, but i
  can): .$t-test.\n\n;
 
  /*
  output
  ---
  object(TestInstance)#1 (2) {
[test:private]=
NULL
[test]=
int(3)
  }
  private test (shouldn't be able to access it directly, but i can): 3
  */
  ?
 
 
  The variable is private for Test, so TestInstance does not have access
  to it. By assigning 0 to $this-test in the constructor of TestInstance,
  you create a new property of TestInstance that is public (the default).
 
  var_dump() shows it clearly:
  object(TestInstance)#1 (2) {
[test:private]= NULL    belongs to Test
[test]= int(3)  belongs to TestInstance
  }
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
paperCrane --Justin Patrin--

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



Re: [PHP] issue with inheriting private property from abstract class in php5rc3

2004-06-23 Thread Curt Zirzow
* Thus wrote Marek Kilimajer:
 Chris wrote --- napísal::
 if anyone can, would you please explain why the below code does what it 
 does?  I would expect $this-test in TestInstance to refer to the 
 inherited $test from Test.  Using php5RC3.  Thanks.
 
 ?php
 abstract class Test {
 private $test;
 abstract public function addToTest($i);
 }
 
 class TestInstance extends Test {
 public function __construct() {
 $this-test = 0;
 }
 ...
 
 The variable is private for Test, so TestInstance does not have access 
 to it. By assigning 0 to $this-test in the constructor of TestInstance, 
 you create a new property of TestInstance that is public (the default).
 
 var_dump() shows it clearly:
 object(TestInstance)#1 (2) {
   [test:private]= NULL    belongs to Test
   [test]= int(3)  belongs to TestInstance
 }

I think one could argue that that test:private shouldn't even be
there. To me that test:private would imply that is TestIntance's
private variable.



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



[PHP] Issue with 'W' in the date() function?

2004-02-03 Thread William Bailey
Hi all,

	Can somebody please explain this for me...

[EMAIL PROTECTED]:/usr/home/wb [11]- php
?php
$time = strtotime('now -5 weeks');
printf(\n\n%s is in week %d of the year %d\n\n, date('Y-m-d', $time), 
date('W', $time), date('Y', $time));
?
^D

2003-12-30 is in week 1 of the year 2003

[EMAIL PROTECTED]:/usr/home/wb [12]-

	Why does it return 1 as the week of the year for that date?

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


RE: [PHP] non-php issue

2003-09-22 Thread Cody Phanekham
heres my 2cents

If you know what your doing, it is possible to secure a windows machine. It depends on 
the user, i keep my windows machine upto date, plus ive got a firewall running on it 
just incase. I havent had a virus or been compromised (not that i know of) since i 
bought my laptop.

Dont get me wrong linux is good if your the tinkering type (I use linux/netbsd at 
work), but use win2k at home. The reason why? the easy of use, installing hardware is 
a piece of cake. plus use it to play games as a stress relief.

I remember talking to my friend (who is a linux zealot) about the new sound card he 
just purchased. It took him freaking 3-5 days of tinkering to get it to work as there 
werent any linux drivers out for it at the time.

I can think of 101 better things to do than waste time installing a new hardware.


PS. Preach on Peter! :)


 -Original Message-
 From: Peter James [mailto:[EMAIL PROTECTED]
 Sent: Monday, 22 September 2003 15:34
 To: PHP-General
 Subject: Re: [PHP] non-php issue
 
 
 Not saying that there aren't lots of reasons to like and run 
 Unix.  I run
 FreeBSD as my webserver, for instance, because I think its 
 the right OS for
 the job.  I run WinXP on my desktop, though, because it has 
 the applications
 I want to use, is familiar and comfortable to me, and I have 
 the hardware to
 make it an enjoyable experience.  I run the dreaded Outlook 
 Express, and I
 (usually) love the integration present in Windows.  Sure, 
 that integration
 makes it easier to do stoopid things, but remember it's 
 people that kill
 people, not guns.
 
 Because I use FreeBSD, I know a lot of BSD gurus--you know 
 the type: long
 hair, longer beard, eyes that look like pissholes in the 
 snow.  You should
 hear what these guys have to say about Linux.  It's just a 
 big daisy-chain
 of supposed superiority.
 
 I'm not trying to stand on a soap box and defend Windows... I 
 just think
 that mocking others for using what they like/know/have is not 
 a good idea,
 whether it's Windows, Linux, BSD, whatever.  And in this case, mocking
 someone who has AIDS is probably not as useful as helping him 
 to prevent
 spreading it, which is sorta what he was asking (IINM).  
 Though this is
 probably not the venue for his question...
 
 Cheers,
 Pete.
 
 - Original Message - 
 From: Robert Cummings [EMAIL PROTECTED]
 To: Raditha Dissanayake [EMAIL PROTECTED]
 Cc: Peter James [EMAIL PROTECTED]; PHP-General
 [EMAIL PROTECTED]
 Sent: Sunday, September 21, 2003 11:08 PM
 Subject: Re: [PHP] non-php issue
 
 
  On Mon, 2003-09-22 at 01:09, Raditha Dissanayake wrote:
   relax guys,
  
   I have been dying to say  You can fix all of your problems by
   formatting your computer and installing a linux 
 distribution.  On this
   list for ages :-)
  
   but the fact remains that an out of the box installation 
 of any of the
   linux distros are far more secure than anything putout by 
 that redmond
   company.
 
  All security advantages aside, I prefer linux because everytime I
  install a new program or service I don't need to reboot :)
 
  Cheers,
  Rob.
  -- 
  ..
  | InterJinn Application Framework - http://www.interjinn.com |
  ::
  | An application and templating framework for PHP. Boasting  |
  | a powerful, scalable system for accessing system services  |
  | such as forms, properties, sessions, and caches. InterJinn |
  | also provides an extremely flexible architecture for   |
  | creating re-usable components quickly and easily.  |
  `'
 
  -- 
  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
 
 


*
This e-mail, including any attachments to it, may contain confidential and/or personal 
information.
If you have received this e-mail in error, you must not copy, distribute, or disclose 
it, use or take any action 
based on the information contained within it.

Please notify the sender immediately by return e-mail of the error and then delete the 
original e-mail.

The information contained within this e-mail may be solely the opinion of the sender 
and may not necessarily 
reflect the position, beliefs or opinions of Salmat on any issue.

This email has been swept for the presence of computer viruses known to Salmat's 
anti-virus systems.

For more information, visit our website at  www.salmat.com.au.
*

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



Re: [PHP] non-php issue

2003-09-22 Thread Curt Zirzow
* Thus wrote Peter James ([EMAIL PROTECTED]):
 You guys running Linux sure are cocky about these sorts of things.  I have
 no doubt that Linux' time will come, and then it will be the MacOS X users,
 or FreeBSD users, or [insert random-os-that-still-remains-under-the-radar
 here] users that think they are untouchable.
 
 If Linux enjoyed the same type of (often less-than-computer-literate) user
 base that Windows does, there'd be plenty for virus writers and
 vulnerability exploiters to do.  Linux is not necessarily more secure...
 just not a honeypot of large numbers of gullible users.
 

ssh.. don't tell them, but they're already infected with bliss.

 But that's just my 2 cents (for which I will almost certainly earn the title
 of troll).

heh.. but my kind of troll :)

 


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] non-php issue

2003-09-22 Thread Curt Zirzow
* Thus wrote John Nichel ([EMAIL PROTECTED]):
 Peter James wrote:
 You guys running Linux sure are cocky about these sorts of things.  I have
 no doubt that Linux' time will come, and then it will be the MacOS X users,
 or FreeBSD users, or [insert random-os-that-still-remains-under-the-radar
 here] users that think they are untouchable.
 
 If Linux enjoyed the same type of (often less-than-computer-literate) user
 base that Windows does, there'd be plenty for virus writers and
 vulnerability exploiters to do.  Linux is not necessarily more secure...
 just not a honeypot of large numbers of gullible users.
 
 Not as cut and dry as that.  By design, Linux IS more secure.  Great 
 deal of that security lies in the fact that it IS a true multi-user 
 system (like just about every other non-MS OS out there), with a real 
 permission / user / group mindset.

There is a lot lacking in the permission/user/group in *nix. Just
because it works hardly makes it right. Try managing 20 servers
with 100 users within 30 separate groups across a network. NT has
far more flexible and manageable permissions mindset.

 
 But that's just my 2 cents (for which I will almost certainly earn the 
 title
 of troll).
 
 Not a troll, just misinformed.

hmm, i guess he didn't snag you with his troll bate :)

But I think you missed his point.  virus/trojans/worms do exist for
*nix and linux, the reason why you don't see them widespread is the
literacy of the user base is much higher than you find on most
windows machines. And, not to mention, the linux virus's come with
GNU uninstallers :)

If and when linux becomes as 'mainstream' as windows, you will find
more virus's written for linux and more linux computers getting
infected with them.

Thats why *BSD is better, it doesn't demand the attention linux
does :)

hm.. is this a bad time to mention vi?

cheers,
Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] non-php issue

2003-09-22 Thread Robert Cummings
On Mon, 2003-09-22 at 03:10, Curt Zirzow wrote:
 
 hm.. is this a bad time to mention vi?
 

What would you mention about it? Everyone knows joe is the best editor
in the world -- *cough* back on topic -- the best editor for PHP source
and everything else *GRIN*.

Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] non-php issue

2003-09-22 Thread Jason Wong
On Monday 22 September 2003 13:08, Robert Cummings wrote:

 All security advantages aside, I prefer linux because everytime I
 install a new program or service I don't need to reboot :)

Or as some wag put it:

Your mouse has moved, you need to restart Windows for the changes to take 
effect.

-- 
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
--
/*
Whom are you? said he, for he had been to night school.
-- George Ade
*/

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



  1   2   >