What warnings are you receiving? Many can be avoided by doing various
checks:
e.g.
if (!isset($some_variable))
...some error code
else
...all is well
others which may be useful:
function_exists()
file_exists()
HTH
Neil
Yoel Benitez Fonseca wrote:
Hi!
There is in PHP some way
Hi there guys,
Who's awake today then? :) What I'm trying to do is create variable
variable arrays and then fill these arrays with values. The problem I
have though is that the values don't appear to be getting stored - as
following the assignment I have outputted a 'sizeof' command which
always
That's done the trick. More coffee for me I think :) Cheers Jason.
Jason Wong wrote:
On Friday 11 January 2002 20:02, Neil Freeman wrote:
Hi there guys,
Who's awake today then? :)
Someone isn't :)
Here's a snippet of the code. Any ideas guys???
...
//store children
You can use function_exists() to check whether a function actually exists:
eg:
if (function_exists('imap_open')) {
echo IMAP functions are available.br\n;
} else {
echo IMAP functions are not available.br\n;
}
HTH
Neil
S. Murali Krishna wrote:
Hai ALL
Is there any way to
You just have to remember that a string is simply a character array :)
Nick Wilson wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* On 17-01-02 at 12:57
* Steve Edberg said
Actually, you can treat a string as an array without any further
processing:
$Globbot =
Open up your server's config file, eg httpd.conf , and ensure that PHP's AddType line
has the extension .php3
Should look something like this:
AddType application/x-httpd-php .php .phtml .php3
HTH
Neil
Manu Verhaegen wrote:
Hi,
We have installed Apache 1.3.6 and PHP4
If we use
Hi there,
First off this may be more of a javascript question than PHP question
but I was wondering if anyone else has attempted something similar (and
it does involve the deletion of PHP sessions).
Here's the scenario: I have a 'stand alone' website on our intranet
which creates a PHP session
???
Nick Wilson wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* On 22-01-02 at 11:30
* Neil Freeman said
Does anyone have any suggestions as to how I could achieve the
following:
a) Browser window closed by user clicking on [X]
No but I'm sure someone will.
b) 'Logging
OK I'll have a look around. Thanks for your time Nick.
Nick Wilson wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* On 22-01-02 at 11:46
* Neil Freeman said
OK I agree with you there :) But as I haven't called the session_destroy()
function the session file still resides
Take a look at the articles on:
http://www.devshed.com/Server_Side/PHP
HTH
Neil
Gordon Stewart wrote:
Dear List
I have just compleated a PHP web frontend to the standard mail function in
PHP. I have got it to send and recieve email.
Can I take this programming task further and allow
What problems/errors are you getting?
Place the following code into a .php file under htdocs:
?php
phpinfo();
?
and then enter something like http://localhost/xxx.php into your browser.
Neil
liz lynch wrote:
hi all,
i have installed php and apache on my home computer..i am running xp
Oh yeah... extension_dir should also have a trailing '\' I believe.
Neil
liz lynch wrote:
hi all,
i have installed php and apache on my home computer..i am running xp home edition.
the problem is that the php and apache are not working together. what i have done so
far:
1. configured the
I've successfully installed the latest versions of both Apache and PHP on my XP
system with no problems.
Neil
Ben Clumeck wrote:
I am trying to install Apache and PHP4.0 on WinXP. Does anyone know of any
conflicts?
Thanks, Ben
--
PHP General Mailing List (http://www.php.net/)
To
Hi there,
Am I correct in thinking that you can specify the PHP include_path line
within an Apache .htaccess file? If so does anyone know the correct
syntax of doing this?
If you cannot specifiy PHP's include_path line from within this file -
how do you use different include paths for different
Hi,
This is my first time attempting to use htaccess files. I am running Apache
1.3.20 with PHP v4.0.6 installed as a module. Within Apache's httpd.conf
file I have the following value set:
AccessFileName apache.htaccess
And within an 'Alias' directory I have a file entitled 'apache.htaccess'
Thanks for the quick reply Jason. This looks like it'll achieve what I want but I
think that using a htaccess file is a better 'overall' method.
Cheers,
Neil
Jason Wong wrote:
On Monday 04 February 2002 17:43, Neil Freeman wrote:
Hi there,
Am I correct in thinking that you can specify
Thanks for the syntax info Lars.
Neil
Lars Torben Wilson wrote:
On Mon, 2002-02-04 at 01:43, Neil Freeman wrote:
Hi there,
Am I correct in thinking that you can specify the PHP include_path line
within an Apache .htaccess file? If so does anyone know the correct
syntax of doing
Hi,
This is my first time attempting to use htaccess files. I am running
Apache
1.3.20 with PHP v4.0.6 installed as a module. Within Apache's httpd.conf
file I have the following value set:
AccessFileName apache.htaccess
And within an 'Alias' directory I have a file entitled 'apache.htaccess'
receive the
message Internal Server Error
I imagine it's something simple but as I have not done this before
'simple' equates to unknown :) Any ideas???
Neil
Mark Roedel wrote:
-Original Message-
From: Neil Freeman [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 4:45 AM
I've taken out the '=' sign and.we have success!!! Thanks a lot for
your time Mark.
Neil :)
Mark Roedel wrote:
-Original Message-
From: Neil Freeman [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 10:36 AM
To: Mark Roedel
Cc: PHP General
Subject: Re: [PHP
Hi there,
I am trying to use the ImageTTFText function to output some text onto an
existing image. Problem being though that the text does not get
outputted. I have placed the ttf file 'arial.ttf' within the same
directory as my script. Here is a snippet of my code:
Header(Content-Type:
file in the same
directory eg ./arial.ttf but got it to work okay when i used the full path
eg :
$fontfile = /apache/htdocs/arial.ttf;
ImageTTFText($im, 20, 0, 3, 3, $text_colour, $fontfile, My text);
Regards
Girish
--
www.girishnath.co.uk
- Original Message -
From: Neil Freeman
I have a feeling that www.aletia.com use 4.1.1
Don't quote me on that though :)
Neil
Edward Marczak wrote:
I know the subject of web hosts that support PHP comes up frequently - but
here's a twist:
After going through the archives, and checking out many, many hosts, I
haven't found a web
Have a look at the function getenv()..
eg:
$ip = getenv (REMOTE_ADDR); // get the ip number of the user
HTH
Neil
Narvaez, Teresa wrote:
Hello,
I'm running PHP version 4.1.1. When I invoke this function, ?php
phpinfo()?, all variables are set. However, when I try to
What symbols are you trying to use? Verdana is good enough for most unicode characters.
hugh danaher wrote:
Help
Does anyone know where I can get a simple symbol font which is .ttf and unicode
compatible. Seems that my php graphic program is very sensitive to ttf problems.
It'll take one
Have you remembered to set up PHP's include_path to point to the area where
your scripts are located?
Neil
Mauricio Cuenca wrote:
Hello,
I have a very long script with several functions in it. I wanted to split
the script into several files, so I created two sub-scripts and one main
Hi,
For all you Unix gurus this should be run of the mill stuff but us
Windows boys tend to get confused easily :)
How can I easily match occurrences of text along the lines of RB and
replace it with RB ?
The regular expression s///g obviously replaces any occurrence of an
ampersand with a
**
$x = preg_replace( /([^\s])([^\s])/, $1$2, $x );
should do the job.
Michael
Neil Freeman [EMAIL PROTECTED] schrieb:
Hi,
For all you Unix gurus this should be run of the mill stuff but us
Windows boys tend to get confused easily :)
How can I easily match
Maguma Studio for PHP Light will do the job.
Neil
Daniel Negron/KBE wrote:
**
This Message Was Virus Checked With : SAVI 3.58 May 2002
Last Updated 11th June 2002
echo str_repeat(*, 50);
Don wrote:
**
This Message Was Virus Checked With : SAVI 3.58 May 2002
Last Updated 14th June 2002
**
Hi,
I'd like to
Hi there,
I'm trying to delete a file using PHP's unlink() function (on Windows).
This works fine on writable files but fails when trying to delete
read-only files. How can I delete read-only files? Is there a function
available to change the permissions?
Any help greatly appreciated.
Neil
**
From: Neil Freeman [EMAIL PROTECTED]
I'm trying to delete a file using PHP's unlink() function (on Windows).
This works fine on writable files but fails when trying to delete
read-only files. How can I delete read-only
You're right - the example is wrong.
Neil
Anthony Ritter wrote:
**
This Message Was Virus Checked With : SAVI 3.58 May 2002
Last Updated 14th June 2002
Last Updated 14th June 2002
**
On Wed, Jun 26, 2002 at 11:34:10AM +0100, Neil Freeman wrote:
I'm trying to delete a file using PHP's unlink() function (on Windows).
This works fine on writable files but fails when trying
LOL - nice one Jason :)
Jason Wong wrote:
**
This Message Was Virus Checked With : SAVI 3.59 May 2002
Last Updated 3rd July 2002
**
On Friday 05
Have a look at sort()
vins wrote:
**
This Message Was Virus Checked With : SAVI 3.59 May 2002
Last Updated 8th July 2002
**
I have an array
FYI - Works in Windows NT 4 SP 6a as well.
[EMAIL PROTECTED] wrote:
**
This Message Was Virus Checked With : SAVI 3.59 May 2002
Last Updated 8th July 2002
Maguma Studio Light is pretty good - www.maguma.com
Mark McCulligh wrote:
**
This Message Was Virus Checked With : SAVI 3.59 May 2002
Last Updated 8th July 2002
nl2br()
KK Lee wrote:
**
This Message Was Virus Checked With : SAVI 3.59 May 2002
Last Updated 8th July 2002
**
Dear ALL,
It seems that i
mysql_db_query has been depreciated since PHP 4.0.6
ctan wrote:
**
This Message Was Virus Checked With : SAVI 3.59 May 2002
Last Updated 8th July 2002
Hi guys,
Is there a function I can use to count the number of instances of a
value within an array. For example:
$a[0] = bob;
$a[1] = bob;
$a[2] = fred;
$a[3] = james;
$a[4] = bob;
$a[5] = carl;
Searching for 'bob' would return 3.
I've had a quick look through the array functions but didn't
Sorry - don't worry. Found the function I require.
FYI : array_count_values()
Neil Freeman wrote:
*
This Message Was Virus Checked With : SAVI 3.54 Feb 2002
Last Updated 24th April 2002
if (($foo % 2) == 0)
{
echo text;
}
Neil
Craig wrote:
*
This Message Was Virus Checked With : SAVI 3.54 Feb 2002
Last Updated 24th April 2002
Hi,
How do you obtain the value of 'error_log' (set within a .htaccess
file). Is there a $HTTP_x_VARS array available which contains this
information?
Any help greatly appreciated.
Cheers,
Neil
Email: [EMAIL PROTECTED]
[EMAIL PROTECTED]
2002, Neil Freeman wrote:
How do you obtain the value of 'error_log' (set within a .htaccess
file). Is there a $HTTP_x_VARS array available which contains this
information?
Nope. You can use phpinfo() to see what most of the predefined server
variables are. In your case you'll have to parse
/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Neil Freeman Design Engineer |
| Phone: +44 (0)1420 526600 Fax : +44 (0)1420 23741 |
| Email: [EMAIL PROTECTED
Seeing as a question concerning register_globals seems to be posted
every day - I thought this link might be useful to some:
http://www.zend.com/zend/art/art-sweat4.php
Neil
--
--
www.curvedvision.com
--
--
PHP General Mailing List
php_value register_globals 0
B i g D o g wrote:
**
This Message Was Virus Checked With : SAVI 3.59 May 2002
Last Updated 8th July 2002
**
Is it
Try this instead...
extension_dir = C:/PHP/extensions/
and ensure that the GD section is present in phpinfo() output.
Neil
Php wrote:
**
This Message Was Virus Checked With : SAVI 3.60 May 2002
Last Updated 8th August
www.aletia.com
db or not db wrote:
**
This Message Was Virus Checked With : SAVI 3.60 May 2002
Last Updated 16th August 2002
**
They
Why does your URL contain .asp?
[EMAIL PROTECTED] wrote:
I found the following code currently used on our website to match a url
expression. Unfortunately, when I added a question mark, the webpage that
contained the url with the question mark just hung and would not load into
my browser at
Probably not your problem but shouldn't your php line be as follows:
?php phpinfo(); ?
ie without the space between ? and php?
Caleb Carvalho wrote:
Hi all,
I've just finish upgrading my apache server to apache 1.3.22,
I have also compiled my php-4.0.6 with it.
When I try to test it
Have a look at:
http://www.faqts.com/knowledge_base/view.phtml/aid/863/fid/129
May be of some use.
Neil
Derek Mailer wrote:
I have a problem with a form on my website.
it's part of a shopping cart application, whereby the form consists of a list of
products and the user enters the
How about MySQL Front (www.mysqlfront.de). Couple of 'features' here and
there but overall pretty good.
Neil
Hai Nguyen wrote:
Hi,
I am a newbie at this. I was just wondering if there is a Graphical
User Interface for MySQL?
Cheers,
Hai Nguyen
--
PHP General Mailing List
I'm using gd png in 4.0.6 with no problems (Windows). What problems are you
having?
Robert Covell wrote:
A question about different release versions of PHP.
Why do things like png from gd 1.8 work in 4.0.4p1 and stops working in
4.0.6? We had to go back to 4.0.4p1. I have seen similar
Hi there,
Well after a few hours roaming around various websites I am at a loss.
Here is what I am trying to do:
1) Access a MySQL database which contains 1 table
2) Read the records from this table
3) Store the values returned from this table into javascript array
elements, ie, if I get the
are
ever going to have more than a few entries in the DB).
Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com
- Original Message -
From: Neil Freeman [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Wednesday, August 15, 2001 11:16 AM
Subject
Website Administrator
FoxJet, an ITW Company
www.foxjet.com
- Original Message -
From: Neil Freeman [EMAIL PROTECTED]
To: Sheridan Saint-Michel [EMAIL PROTECTED]
Cc: php-general [EMAIL PROTECTED]
Sent: Wednesday, August 15, 2001 12:09 PM
Subject: Re: [PHP] Creating a javascript array
it outputs it to html (in this case within a js function definition).
Try viewing the source produced.
Tim
--
From: Neil Freeman [SMTP:[EMAIL PROTECTED]]
Sent: 15 August 2001 18:10
To: Sheridan Saint-Michel
Cc: php-general
Subject
Hi,
I am having trouble getting a redirected file's php section activating.
Some info to help you understand:
1) Within Apache's httpd.conf file I have the following set:
DocumentRoot D:/Program Files/Apache Group/Apache/realdocs
Directory D:/Program Files/Apache Group/Apache/realdocs
Hi there,
In an ideal world I would like to be able to type http://localhost into
my browser and for Apache server to throw up a specific .htm file on my
hard drive. At the moment I have an Apache Alias set up as follows:
Alias /ife P:/My Projects/Storyboard
and you need to enter:
You appear to have a typo in your httpd.conf:
Action application/x-httpd-php /Php/php.exe
should be as follows: (note the )
Action application/x-httpd-php /Php/php.exe
Hope that helps,
Neil
[EMAIL PROTECTED] wrote:
***
This
Hi there,
I have downloaded the windows version of GD (php_gd.dll) as I wish to
use it's various image functions. I have edited my PHP.INI file in
C:\WINNT and uncommented the line:
extension=php_gd.dll
Where is a suitable location for this .dll file? And what should I set
this PHP.INI line
\
that should do it.
regards
girish
- Original Message -
From: Neil Freeman [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Wednesday, September 19, 2001 10:21 AM
Subject: [PHP] Problem installing GD on windows
Hi there,
I have downloaded the windows version
Message -
From: Neil Freeman ?[EMAIL PROTECTED]?
To: Girish Nath ?[EMAIL PROTECTED]?
Cc: PHP General ?[EMAIL PROTECTED]?
Sent: Wednesday, September 19, 2001 12:29 PM
Subject: Re: [PHP] Problem installing GD on windows
? Hi Girish,
?
? I installed PHP within D:\PHP. This folder currently
Hi there,
How do I generate variable names 'on the fly'? I wish to have variable
names along the lines of $genre_category_1, $genre_category_2,
$genre_category_3 etc.
Ideally it would be along the lines of this...
###
$current_field_number = 1;
$genre_number_fields = 7;
Hi,
When a form is submitted using a standard SUBMIT button it is possible
to catch this via php using if ($submit) but how do you catch this if
you are using an image for submitting instead of the button?
Any help would be greatly appreciated.
Here is a cut down version of my code:
OK cheers, that method seems to work ok.
Thanks, Neil
Michael van Bracht wrote:
- Original Message -
From: Neil Freeman [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Friday, September 21, 2001 3:30 PM
Subject: [PHP] Detecting an image form submission via PHP
you
Hi,
I have a form which contains an:
input type=image
When the user clicks this image I want a javascript function to be
called. I have added an onclick event to this input line (see code
below) which works great in IE and all is well. Netscape doesn't
recognise this onclick event though for
Or another way...
for ($value = 0; $value = 2000; $value += 100)
{
echo sprintf(option value=\%s\%s%s/option, $value,
(($min_rent==$value) ? selected=\selected\ : NULL), $value);
}
Hulf wrote:
**
This Email Has Been Virus Swept
**
I
Take a look at Maguma Studio Light (www.maguma.com)
Neil
Nilza Lafayette wrote:
**
This Message Was Virus Checked With : SAVI 3.61 September 2002
Last Updated 2nd January 2003
Looks like you're missing a closing bracket on the IF statement as well.
Neil
Shams wrote:
**
This Message Was Virus Checked With : SAVI 3.61 September 2002
Last Updated 17th January 2003
Have a look on devshed.com
Bryan Cassidy wrote:
Could someone point me to a VERY good doc for learning PHP for a
NEWBIE!!! Something I can understand from the beginning to the end. YES
I am willing to put my time into learning and reading docs as long as
they are clear and made for what they say
Try removing the double quotes around LC_TIME
Neil
Mike At Spy wrote:
***
This Message Was Virus Checked With : SAVI 3.69 May 2003
Last Updated/Checked 2nd June 2003
Ensure that you have a die; after the Header() line.
Neil
deno vichas wrote:
***
This Message Was Virus Checked With : SAVI 3.70 June 2003
Last Updated/Checked 12th June 2003
Hi,
I am using Header(Location:http://www.mysite.com/mypage.php;); to do a
browser redirect. This works fine. The problem though is that doing this
adds a page to the browser's window.self.history() collection.
Is there any way that I can do a PHP Header() statement that does the
equivalent
***
-Original Message-
From: Neil Freeman [mailto:[EMAIL PROTECTED]
Is there any way that I can do a PHP Header() statement that does the
equivalent of JavaScript's
window.self.location.replace(http://www.mysite.com/mypage.php;)?
No. JavaScript (if turned
I believe getallheaders() has been supported since v4.0.0
Ananth Kesari wrote:
***
This Email Has Been Virus Swept
***
Hi,
For some reason, getallheaders() is not working with the NetWare port
of PHP 4.2.3
Hi there,
Does anyone have any suggestions as to how I can calculate whether one
timestamp is within one second of another timestamp.
e.g.
Timestamp 110:59:59
Timestamp 211:00:00
Essentially I need to create a function which'll take two parameters and
return whether the two parameters
Perfect - thanks Bogdan
Bogdan Stancescu wrote:
***
This Email Has Been Virus Swept
***
Neil Freeman wrote:
Hi there,
Does anyone have any suggestions as to how I can calculate whether one
timestamp
How about:
exec(chmod -R 755 /somedir/);
[EMAIL PROTECTED] wrote:
***
This Email Has Been Virus Swept
***
Is there anyway to use CHMOD:
chmod (/somedir/somefile, 0755);
but have it set all files, folders
You will need to ensure that the session save path is set to a valid
directory:
e.g.
session.save_path = C:/Temp
Neil
E. Ricardo Santos wrote:
***
This Email Has Been Virus Swept
***
Somebody could say to
Or you can use sizeof() which is an alias for count()
Scott Fletcher wrote:
***
This Email Has Been Virus Swept
***
Ah! Thanks!!!
Chris Hayes [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
At
Or with PHP you could do:
Header(Location:$launch);
die;
Make sure that nothing is outputted before this is called though. The
variable $launch should also be an absolute URL.
Neil
Richard Davey wrote:
***
This Email Has Been Virus Swept
You're missing a right bracket within the if statement.
Paul Furman wrote:
***
This Email Has Been Virus Swept
***
I don't see what's wrong with this if statement:
while ... and ... {
if (($pic_num + 1) =
If I remember correctly the second parameter of move_uploaded_file()
needs to be the full filename, ie path plus required filename.
so...
if(!move_uploaded_file($_FILES['myfile']['tmp_name'],
(/var/www/html/upload/ . $_FILES['myfile']['name'])))
Neil
Mike Mapsnac wrote:
How about this - untested by the way:
$order = ASC;
if (isset($_GET[ORDER]))
{
$value = $_GET[ORDER];
if (($value == ASC) || ($value == DESC))
{
$order = $value;
}
else if ($value == RAND)
{
$order = RAND();
Take a look at explode()
www.php.net/explode
Neil
Jeff Oien wrote:
***
This Email Has Been Virus Swept
***
If I have a list like this:
Firstname1 LastName1
Firstname2 Lastname2
etc.
I can split the names by
Why not just use a switch?...
switch ($x) {
case $a:
case $b:
case $c:
case $d:
//do whatever you need
break;
default:
//catch any other values here
break;
}
Neil
BOOT wrote:
John Holmes wrote:
***
This Email Has Been Virus Swept
***
Okay... I've done this before but can't get it working now. I've got
PHP5 working correctly, but I'm trying to load the MySQL php_mysql.dll
file. I'm
[EMAIL PROTECTED] wrote:
***
This Email Has Been Virus Swept
***
Is there anything special one has to do in order to enable the use of the php_value
directive in the context of an apache .htaccess file?
I
Just a quick question. What is the purpose of the underscore character
within the following echo statement? I had a quick look in the manual
and archives but couldn't find any reference to it.
?php echo _(Username) ?
Thanks,
Neil
This communication is confidential to the intended recipient(s).
Marek Kilimajer wrote:
***
This Email Has Been Virus Swept
***
Neil Freeman wrote:
Just a quick question. What is the purpose of the underscore character
within the following echo statement? I had a quick look
93 matches
Mail list logo