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
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
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
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
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
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
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
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()
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:
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
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
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
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,
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
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
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
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
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
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
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
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]]
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
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,
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
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:
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
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
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
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
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
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:
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
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
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.
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
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
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
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,
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);
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
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);
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,
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
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
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.
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
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
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
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.
- 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
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
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
101 - 152 of 152 matches
Mail list logo