Re: [PHP] adjusting time() to correct for time zones

2002-05-24 Thread Chris Boget
If there is no other choice, there is no other choice. But in a perfect world, there would be a way to locally correct the server time on a global basis and thus correct ALL applications -- present and future -- that need to know the local time. Is there a way to back track an IP address to

Re: [PHP] Security problem, need help

2002-05-24 Thread Thalis A. Kalfigopoulos
Read 'Secure Programming in PHP': http://www.zend.com/zend/art/art-oertli.php cheers, thalis On Fri, 24 May 2002, Hawk wrote: I was checking around on a page I made, and I just noticed the lack of security, it is rather easy to gain admin status if you enter the right ?blabal=blablabla

[PHP] Re: File lock - warning ?

2002-05-24 Thread Peter
I'm not familiar with PHP 3 stuff but try echo start; $fpLog = fopen (/usr/home/aurica/aurica.com/cannesEmail/emailblastSendLog.txt,a); if (!$fpLOG) { die (Could not open file); } if (flock ($fpLog, 2) ) { $strFileLog = Manisha Test; fwrite($fpLog,$strFileLog); } flock

[PHP] Time/date function MYSQL-UNIX

2002-05-24 Thread Peter
Is there a built in PHP function which will convert a MySQL type date (DDMM or whatever) into a unix timestamp so it can be used with the other PHP time and date functions? I'm currently using substr() to extract bits of the date so it displays as DD / MM / but it's annoying! -- PHP

RE: [PHP] adjusting time() to correct for time zones

2002-05-24 Thread SP
Baba told me about his time zone class in pear just recently. http://pear.php.net/package-info.php?pacid=57 -Original Message- From: John Hughes [mailto:[EMAIL PROTECTED]] Sent: May 24, 2002 4:45 PM To: Miguel Cruz; [EMAIL PROTECTED] Subject: Re: [PHP] adjusting time() to correct for

RE: [PHP] Time/date function MYSQL-UNIX

2002-05-24 Thread John Holmes
Use DATE_FORMAT() in your query to format the MySQL date to whatever format you want. You can also use UNIX_TIMESTAMP() in your query to return a Unix timestamp instead of the MySQL format. But if that's all you want to do is format it a certain way, do it in your query. Check Chapter 6 of the

[PHP] using header() to display info in excel

2002-05-24 Thread Sk8PR2k
Hey, I am looking to read information from a database and when you click a link all of those arrays will be displayed in excel using header();. I have heard there are lots of commands in cgi but I don't know cgi and I am wondering if it is still possible with php. I would also like info on

[PHP] Re: Time/date function MYSQL-UNIX

2002-05-24 Thread Hugh Bothwell
Peter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is there a built in PHP function which will convert a MySQL type date (DDMM or whatever) into a unix timestamp so it can be used with the other PHP time and date functions? I'm currently using substr()

[PHP] Announcements

2002-05-24 Thread Peter
How come the last announcement in the php.announce newsgroup was regarding GTK 0.5.0 and the one before was for PHP 4.1.1? Why weren't 4.2.0 and 4.2.1 announced? Have I missed something somewhere? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: Time/date function MYSQL-UNIX

2002-05-24 Thread Peter
OK cheers. I'll have a try. I saw UNIX_TIMESTAMP() in the MySQL docs but I didn't quite understand it (PHP is MUCH easier for me!) Thanks for the example too Peter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is there a built in PHP function which will

[PHP] Is this doable?

2002-05-24 Thread Sandman
I am currently using Roxen and it's built-in pike-based markup language RXML for my dynamic websites. PHP is naturally alot more flexible than RXML, but there are some thing I -really- like about Roxen that I don't know if I can have PHP replicate, please tell me if anything of the following

[PHP] using array to declare globals in function?

2002-05-24 Thread Jeff Field
Anyone know how to declare globals in a function from an array? The following doesn't seem to work: foreach($_POST as $key = $value) global $form_var[$key]; Thanks for any help! Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Wierd problem.... Perhaps is the while ()

2002-05-24 Thread Fernando Gonzalez
I have to php pages that call the same mysql query The first page would be: ?php include ('conection.inc'); $sql=SELECT mae_articulos.fecha_pub, mae_medios.des_medio, mae_articulos.pagina, mae_periodistas.nom_periodista, mae_periodistas.ap_periodista, mae_articulos.alto,

Re[2]: [PHP] Using php to parse mail

2002-05-24 Thread Cedric Fontaine
Hello ! AS Are you calling environment or server variables directly? For _example_ AS $PATH. If so, call them using the superglobal $_SERVER['PATH']. Or AS perhaps you're utilizing $argv to bring in stuff from the command line? AS Similarly, use $_SERVER['argv']. AS These chagnes are due

[PHP] xslt extension unable to find files on windows 95

2002-05-24 Thread Sukhwinder Singh
Hello, I am using php 4.2.0 and apache 2.0 on win95. I am facing some problems with xslt extension. Nobody replied at [EMAIL PROTECTED] Problem is that xslt processor is unable to find the xml and xsl files. Files are in the same directory as the php file and document_root is

[PHP] Multiple queries on multiple databases

2002-05-24 Thread d3crypt
Hello, I'd like to know the method to connect and query multiple databases in the same php script ... I've to do something like this : do query on db1_on_server_1 while( get results of query on db1_on_server_1){ do query on db2_on_server_2 } the

Re[2]: [PHP] Using php to parse mail

2002-05-24 Thread Cedric Fontaine
Hello, MC qmail uses the exit code to determine what happened to the message. Try MC ending your script with exit(99); that tells qmail that you're done with MC the message and never want to see it again. MC miguel Yep but it doesn't work anymore with a such exit(99)... But it's something

Re: [PHP] adjusting time() to correct for time zones

2002-05-24 Thread Miguel Cruz
On Fri, 24 May 2002, Chris Boget wrote: Is there a way to back track an IP address to find out where in the world the user is? I believe it can be done because I've seen several graphical trace ip utils do this. Perhaps you can do something similar to get the local TZ? The graphical

Re[2]: [PHP] Using php to parse mail

2002-05-24 Thread Miguel Cruz
On Fri, 24 May 2002, Cedric Fontaine wrote: MC qmail uses the exit code to determine what happened to the message. Try MC ending your script with exit(99); that tells qmail that you're done with MC the message and never want to see it again. MC miguel Yep but it doesn't work anymore

Re[3]: [PHP] Using php to parse mail

2002-05-24 Thread Cedric Fontaine
Hello, MC For one thing, change your php invocation to 'php -q'. Yes, I've done this, even php -q -d phpa=0 to avoid phpa messages... But same problem ! -- Cordialement, Cedricmailto:[EMAIL PROTECTED] http://www.sincever.com : Actu Music Only -- PHP General

RE: [PHP] Multiple queries on multiple databases

2002-05-24 Thread John Holmes
Just use MySQL_select_db() to switch between databases between your queries. Remember to switch back, too. Or you can just give the database name in your query: SELECT * FROM database.table WHERE ... ---John Holmes... -Original Message- From: d3crypt [mailto:[EMAIL PROTECTED]]

RE: [PHP] using header() to display info in excel

2002-05-24 Thread John Holmes
I don't know if this is the best way or not, but I just use the following function to send Excel headers, then just create your page as a normal HTML table. Excel will take the HTML table and create a spreadsheet with it. ## # # Creates headers to

RE: [PHP] Is this doable?

2002-05-24 Thread John Holmes
Can PHP do that? Of course. Can it do it that easily right out of the box. No. Just like the RXML backend is already written that parses accessed per=day / into the appropriate number, the backend would have to be written for PHP to do the same thing. You'd have to write a template engine,

[PHP] including functions on every php page in a site

2002-05-24 Thread Darren Gates
Hello, I have about 10 function definitions that I want included on every page in my website. Instead of calling: ? include( myFunctions.php); ? on every page, I'd prefer to have the functions automatically loaded into memory when a user visits any page of my site. I was thinking that there

Re: [PHP] including functions on every php page in a site

2002-05-24 Thread Jerome Houston
go to: http://www.php.net/manual/en/configuration.php and look for auto_prepend_file -jerome Original Message Follows From: Darren Gates [EMAIL PROTECTED] Reply-To: Darren Gates [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP] including functions on every php page in a site Date:

Re: [PHP] including functions on every php page in a site

2002-05-24 Thread Richard Baskett
You could include it in the auto_prepend_file variable in your php.ini. This will make this file available to every page.. You could include it in your .htaccess file, if you do not have access to the php.ini Something like this in your .htaccess file: php_value auto_prepend_file

[PHP] Install problem

2002-05-24 Thread Dani
I have just installed the PHP 4.2.1 Installer but get this error message: Security Alert! The PHP CGI cannot be accessed directly. This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via

[PHP] HELP!!! QUOTES!

2002-05-24 Thread Shane
Question Please. What is the syntax for getting double quotes to appear in an echo statement. EXAMPLE: echo My dog has 'fleas'; puts out... My dog has 'fleas' But I need it to put out... My dog has fleas (NOTE DOUBLE QUOTES) (So I can call a JavaScript function) What am I missing here? As

Re: [PHP] HELP!!! QUOTES!

2002-05-24 Thread Liam MacKenzie
echo My dog has \fleas\; - Original Message - From: Shane [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, May 25, 2002 9:20 AM Subject: [PHP] HELP!!! QUOTES! Question Please. What is the syntax for getting double quotes to appear in an echo statement. EXAMPLE: echo My dog

Re: [PHP] HELP!!! QUOTES!

2002-05-24 Thread Richard Baskett
Well if there are no variables to be parsed just do it like this: echo 'My dog has fleas'; // notice single quotes If there are variables to be parsed to it like this: echo My dog has \$var\; Cheers! Rick If I accept you as you are, I will make you worse; however, if I treat you as though

RE: [PHP] HELP!!! QUOTES!

2002-05-24 Thread John Holmes
Escape the quotes with \ echo My dog has \fleas\; Or use single quotes echo 'My dog has fleas'; But note that variables aren't evaluated within single quotes. ---John Holmes... -Original Message- From: Shane [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 7:21 PM To:

[PHP] Selective SafeMode {?!}

2002-05-24 Thread Liam MacKenzie
Hi guys, I was wondering if it were possibe to have safemode activated for some users but not others. Say I have 3 Virtual Hosts in Apache. I don't trust one, but I want him to have PHP, so I enable safe mode. But the others are my mates and they don't want safe mode. How could I get around

Re: [PHP] HELP!!! QUOTES!

2002-05-24 Thread Philip Olson
Read a tutorial about using strings here: http://www.zend.com/zend/tut/using-strings.php The manual also talks about them: http://www.php.net/manual/en/language.types.string.php Regards, Philip Olson On Fri, 24 May 2002, Shane wrote: Question Please. What is the syntax for getting

[PHP] Fatal Error: Cannot use assign-op operators

2002-05-24 Thread John Holmes
Hi. I'm getting this error on my scripts: Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets in c:\inetpub\wwwroot\usap\reports\Daily_Report_Student.php on line 40 After doing some searching, I concluded the errors are caused by using .=, +=, etc on an array.

Re: [PHP] Selective SafeMode {?!}

2002-05-24 Thread Rasmus Lerdorf
Like every other PHP directive which can be used in a per-dir manner: VirtualHost ... ... php_admin_flag safe_mode On ... /VirtualHost On Sat, 25 May 2002, Liam MacKenzie wrote: Hi guys, I was wondering if it were possibe to have safemode activated for some users but not others. Say I

Re: [PHP] image_create(), header.....

2002-05-24 Thread Gerard Samuel
While Natalie's example, was doable, this one takes the cake for me. Thank you all for your suggestions Jerome Houston wrote: While Natalie's solution is a valid one, i have another first - the error you're getting is because the headers are sent AS SOON as you echo, print or

Re: [PHP] Install problem - FIX

2002-05-24 Thread Dani
probelm Fix!\ thanks Dani wrote: I have just installed the PHP 4.2.1 Installer but get this error message: Security Alert! The PHP CGI cannot be accessed directly. This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the

[PHP] IMAGE CREATE() header problem

2002-05-24 Thread Dani
Hi again, I have got this script : ?PHP //setup image $height = 200; $width = 200; $im = ImageCreate($width,$height); $white = ImageColorAllocate($im, 255, 255, 255); $black = ImageColorAllocate($im, 0, 0, 0); //Draw on image ImageFill($im, 0, 0, $black); ImageLine($im, 0, 0, $width, $height,

Re: [PHP] IMAGE CREATE() header problem

2002-05-24 Thread Miguel Cruz
On Sat, 25 May 2002, Dani wrote: I have got this script : ?PHP //setup image $height = 200; $width = 200; $im = ImageCreate($width,$height); $white = ImageColorAllocate($im, 255, 255, 255); $black = ImageColorAllocate($im, 0, 0, 0); //Draw on image ImageFill($im, 0, 0, $black);

RE: [PHP] IMAGE CREATE() header problem

2002-05-24 Thread John Holmes
Something is being output in index.php on Line 10. That's causing the headers to fail. Check for whitespace. ---John Holmes... -Original Message- From: Dani [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 11:27 PM To: [EMAIL PROTECTED] Subject: [PHP] IMAGE CREATE() header

Re: [PHP] IMAGE CREATE() header problem STILL

2002-05-24 Thread Dani
Thanks Miguel! I have checked everything but it seems there aren't any blank space but I still get the error message. Miguel Cruz wrote: On Sat, 25 May 2002, Dani wrote: I have got this script : ?PHP //setup image $height = 200; $width = 200; $im = ImageCreate($width,$height);

Re: [PHP] IMAGE CREATE() header problem

2002-05-24 Thread Gerard Samuel
Double check your file for the whitspace like the others have stated. I tried your example and had no problems with it... Dani wrote: Hi again, I have got this script : ?PHP //setup image $height = 200; $width = 200; $im = ImageCreate($width,$height); $white = ImageColorAllocate($im, 255,

Re: [PHP] IMAGE CREATE() header problem

2002-05-24 Thread Dani
Thanks for the advice. I found out there I shouldn't put the script in between any html tags at all. Now my question is: What if we want to insert image which is generated by the php in the table? thanks Gerard Samuel wrote: Double check your file for the whitspace like the others have

RE: [PHP] IMAGE CREATE() header problem

2002-05-24 Thread John Holmes
Create a separate PHP file that creates your image, and put it in the HTML like this: img src=file.php All file.php should do is output image headers and the binary image data. ---John Holmes... -Original Message- From: Dani [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 25, 2002

[PHP] SegFaults with PHP4.2.1 and Apache 2.0.36

2002-05-24 Thread Rodolfo Segleau
Not sure if you guys have already responded to this, but here we go (I'm checking the archives of PHP as I am writing this). I have Apache 2.0.36 running with PHP 4.2.1. Apache seg faults with a certain application (which has redirected me back here). Child processes quit with a signal 11.

[PHP] RE: Fatal Error: Cannot use assign-op operators

2002-05-24 Thread John Holmes
Okay, just upgraded to PHP 4.2.1 and it doesn't appear to care if you do $val['key'] .= string; or other +=, overload-type, operations. So is it safe to assume that anything Pre-4.2.1 will choke on lines like that? ---John Holmes... -Original Message- From: John Holmes

[PHP] php apache log analysers/website stats

2002-05-24 Thread John Ngo
hey does anybody know of any good apache log analyser or website statistics php projects? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] php apache log analysers/website stats

2002-05-24 Thread Ray Hunter
Do a search on google and you will find plenty to keep you busy with... Thanks, Ray Hunter -Original Message- From: John Ngo [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 8:47 PM To: [EMAIL PROTECTED] Subject: [PHP] php apache log analysers/website stats hey does anybody

[PHP] How is SESSION_ID passed?

2002-05-24 Thread Alex Shi
Hello, I have created several web sites using php. In all these sites session id is passed via cookie. However I noticed that some times it was passed by url. I am thinking that to pass session id by url will be safer than by cookie. However I don't know how can do this without change my code.

Re: [PHP] How is SESSION_ID passed?

2002-05-24 Thread Janet Valade
- Original Message - From: Alex Shi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 24, 2002 8:25 PM Subject: [PHP] How is SESSION_ID passed? Hello, I have created several web sites using php. In all these sites session id is passed via cookie. However I noticed that some

[PHP] Popup window from form on php page

2002-05-24 Thread David Bourne
Hello I noticed a recent thread regarding popup windows from a php page. The solution appears to work using JavaScript for client side action. This worked OK, except I want to open a new window and display data from the previous page. I'm using php 4.1.2. What I want is Page1.php containing

[PHP] Fwd: Popup window from form on php page

2002-05-24 Thread David Bourne
Sorry, asked and answered: The code (in Page1.php): form action=javascript: OpenWindow('Page2.php?a1=? echo $a1; ?a2=? echo $a2; ?a3=? echo $a3; ?a4=? echo $a4; ?', 'Answers','toolbar=no,resizable=yes,scrollbars=yes,dependent=yes,status=0, alwaysRaised=yes,width=600,height=600'); method=post

<    1   2