On Apr 14, 2005, at 21:37, Marek Kilimajer wrote:
[EMAIL PROTECTED] wrote:
I have created (adapted) the follow function:
function imageresize($new_width, $new_height, $filename) {
// Content type
header('Content-type: image/jpeg');
// Get new dimensions
list($width, $height) = getimagesize($filenam
u mean remove it?
If so. I removed the header. And changed the output. The problem now
is that it displays it as code (becuase there is no header) it also
manages to display it without the print comment
Gareth
--
I have created (adapted) the follow function:
function imageresize($new_width, $new_height, $filename) {
// Content type
header('Content-type: image/jpeg');
// Get new dimensions
list($width, $height) = getimagesize($filename);
// Resample
$image_p = imagecreatetruecolor($new_width, $new_height);
$
Wouldn't using GET instead of POST help?
Gareth Williams
venditor.com
Buy cool stuff online at http://www.venditor.com";>venditor.com
On 3 Mar 2005, at 14:20, Jochem Maas wrote:
rory walsh wrote:
Thanks Eoghan, I have tried the following but it still reposts the
data from the form
Create some indexes. I spend most of my day messing around with a
table of 200 records, and indexes increased the speed from 40
seconds to 55 minutes for a query, down to the longest being less than
5 seconds.
On 28 Feb 2005, at 16:42, James Nunnerley wrote:
I'm creating a serious of pages
Use implode:
http://nl2.php.net/manual/en/function.implode.php
On 15 Feb 2005, at 16:37, Dave wrote:
PHP General,
The Situation:
I'm retrieving some email addresses from a database. I want to be
able assemble all the addresses into one string that I can use in the
mail() command. At no tim
I would agree with the Mandrake recommendation.
I first installed it a few years back, to help me get started in the
Linux/Unix world, and had very little trouble with it. It's hardware
recognition has always been very impressive. Since first installing
Mandrake, I have often thought I should
In the else part, you have the possibility to echo to the screen and
later on, then header("Location: ...");
This is the bit which isn't allowed.
If you are doing header("Location: ...");, you are not allowed to echo
before it.
On 18 Dec 2004, at 11:52, Ahmed Abdel-Aliem wrote:
Dear Groups memb
$result = mysql_query("SELECT name, description FROM table");
while ($row = mysql_fetch_assoc($result))
{
echo "{$row['name']}$row['description']";
}
On 14 Dec 2004, at 16:52, Steve Marquez wrote:
Greetings. I am trying to display looped information from a MySQL
database
in a PHP file.
Lo
Because you prefer it?
Seriously, you should choose what you are most happy with. Both work
fine, although, PHP rocks!
On 11 Dec 2004, at 10:11, Peter Lauri wrote:
Best groupmember,
Why should I choose PHP instead of JSP/Servlets when it comes to
develop a
high-traffic site. Assume that the inf
What happens is (if I understand it correctly):
First, PHP sets $i to equal 0, and then immediately sets $i to
$months_arr_length.
Every time the loop executes, it resets $1 to $months_arr_length, so
you are stuck in an infinite loop.
The reason behind this is you are using assignment equals (=
Try
$string = mysql_real_escape_string($string);
On 7 Dec 2004, at 14:12, Shaun wrote:
Hi,
I have been investigating the problem of apostrphes in a mysql insert /
update. I use a db_query function for all my queries:
function db_query($query) {
$qid = mysql_query($query);
return $qid;
}
It app
No
On 1 Dec 2004, at 15:37, abrea wrote:
Will the adoption and legalization of software patents actually
threaten the
activity of PHP software developers?
I see some people quite worried about this, e.g. at
http://www.knoppix.org
and http://swpat.ffii.org/index.en.html
Alberto Brea
--
PHP General
You could try chown user:group, where user and group are those apache
runs in.
Is this script running on your own machine, or on a web server hosted
somewhere?
On 1 Dec 2004, at 09:03, Michael Leung wrote:
Hi all,
I am still solving my upload script problems.
Here is the error Msg:
"Warning:
Try this:
class base_object()
{
function base_object()
{
echo "I'm the base";
}
function base_test()
{
echo "I'm the base test";
}
}
class extended_object() extends base_object
{
function extended_object()
You could add is_integer() into the if statement.
On 15 Oct 2004, at 14:07, Robert Cummings wrote:
On Fri, 2004-10-15 at 07:45, Gareth Williams wrote:
Do you even need a regex?
What about
if (strlen($_POST['mobile_number']) != 11 &&
substr($_POST['mobile_number'],0
Do you even need a regex?
What about
if (strlen($_POST['mobile_number']) != 11 &&
substr($_POST['mobile_number'],0,3) != 447)
{
$error="Invalid Number";
}
On 15 Oct 2004, at 13:38, Shaun wrote:
Hi,
Could anyone help me with a reugular expression for a UK mobile phone
number?
So far I have tried
What about in MySQL:
SELECT personID from persons ORDER BY RAND(NOW()) LIMIT 1
If the table is large, then the following might be better:
LOCK TABLES foo READ;
SELECT FLOOR(RAND() * COUNT(*)) AS rand_row FROM foo;
SELECT * FROM foo LIMIT $rand_row, 1;
UNLOCK TABLES;
There's a whole discussion on it
I think you'll find that this is more of a Javascript problem than a
PHP one.
On 13 Oct 2004, at 12:11, Bruno Santos wrote:
hello all.
I've a question that i might think is not much related with PHP, even
the pages are PHP and everything is working with PHP.
I've a FORM in my site to be written
header("Location: <>");
On 9 Oct 2004, at 20:21, Armands Pucs wrote:
Hi everyone!
Sorry for the probably stupid question. But I can`t find a way to make
a php
script to open an url in a browser!
Like " location = "example.html"; " does.
Armand from Latvia
--
PHP General Mailing List (http://www.p
Can't you sort the array?
On 8 Oct 2004, at 10:41, rich gray wrote:
Just a heads up on this change in array concatenation behaviour that
could cause a few probs for some people...
'Zero');
$arr2 = array(1 => 'One',2 => 'Two');
$arr2 = $arr1 + $arr2;
echo phpversion().'';
print_r($arr2);
?>
this co
Oh please. Not even as a joke.
On 7 Oct 2004, at 21:07, Matt M. wrote:
My boss recently called PHP "good for hobbyists" but REAL sites have
to
be done with Microsoft technologies. He wants to use Sharepoint for a
wiki type site because of versioning.
:)
real sites use iis
--
PHP General Mailing
Well, if you are running you own server at home, or have a dedicated
server, you can install your own MySQL server, and use version 5, which
has all this, but if you have a shared space, then you are probably
running version 4.whatever, and don't have them.
That's why I said not really, instead
Not Really.
On 30 Sep 2004, at 21:50, Sagar C Nannapaneni wrote:
Hi folks,
I wonder whether Mysql supports procedures and triggers
:?
/sagar
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Try header();
On 30 Sep 2004, at 14:09, welly limston wrote:
how to make my page refresh automaticly?
Can i use PHP function?
what is it?
-
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
--
PHP General Mailing List (http://www.php.net
Well, if you can do it without a regex, then it's always best, because
the regex engine slows things down.
On 30 Sep 2004, at 10:39, mario wrote:
Hi all
I have a string: ##CODE## and I want to replace that with CODE
can u help?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, vis
There's a simple one abbreviation answer
CVS.
It's probably the widest used version control system in the world, and
is integrated into XCode (if you are a Mac PHP developer).
On 30 Sep 2004, at 10:24, Dave Carrera wrote:
Hi List,
Is there a simple solution for two or more people to work on the s
Try something like this:
$string = 'A12B05C45D34';
$string = chunk_split($string, 3, ':');
//Should give you 'A12:B05:C45:D34';
$array = explode(":",$string);
Cheers,
Gareth
On 29 Sep 2004, at 15:40, blackwater dev wrote:
How can I take a string and create a
Hi there,
Try using:
round($number, 2);
cheers,
Gareth
On 25 May 2004, at 16:00, [EMAIL PROTECTED] wrote:
Hi,
please suppose PHP 4.3.2 and $number=502,3550
number_format($number,2,'.',' ') returns 502.36.
It seems ok, but if $number=253,0650
number_format($number,2,'.
The easiest language to learn for Windows is Visual Basic. You can get
a simple gui app up and running in minutes.
On 8 Mar 2004, at 14:40, Jay Blanchard wrote:
[snip]
I have been working with PHP for a few years now, and I feel very
comfortable with it. I am considering branching out into wind
I had programmed for years in OO, and when I learned PHP, it only
seemed natural to stay with it. I personally find the OO functionality
in PHP to be not quite complete, but good enough for daily use. In
fact, I don't write any sites in a non-oo manner. I love it.
On 28 Feb 2004, at 22:58,
Try this:
function tes(selCtrl){
document.write('JavaScript');
window.location.replace('http://192.168.23.1/coba/coba.php?
vtes='+selCtrl.value);
}
or this:
function tes(){
selCtrl = document.getElementById('vtes');
document.write('JavaScript');
window.location.replace('http://192.168.23.1
The function mysql_insert_id() will return the correct value.
On 26 Feb 2004, at 17:10, Brian Dunning wrote:
When I write a record to a MySQL db with an auto-incremented key
column, say it's called "id", what's the easy to retrieve that value?
Do I have to run a query?
--
PHP General Mailing
I'll second that one, I wrote a shell script in PHP to resize images,
using ImageMagicks mogrify
command, and it took ages. It's really much too slow for a web site.
If you need a faster solution, I think you have to buy something.
On 26 Feb 2004, at 09:15, Adam Bregenzer wrote:
On Thu, 2004-0
Hello Roger,
If you find a solution, I would also be interested to to see it. I
have tried almost everything to get Mac IE to not use the cache. It
just doesn't seem to accept anything.
On 18 Feb 2004, at 18:58, Roger Spears wrote:
Hello List,
I am using the following in a PHP script:
head
No probs.
On 18 Feb 2004, at 16:34, pete M wrote:
Wicked - that's the best tip I've seen for a long time... TA
Gareth Williams wrote:
Well if you are a unix/linux/os x user, drop to the command line, go
to the directory with all the php files, and type in:
grep php
or if your php
Well if you are a unix/linux/os x user, drop to the command line, go to
the directory with all the php files, and type in:
grep php
or if your php files are scattered around a load of sub-directories,
then go to a directory which sits above all your php files, and type
in:
grep -r *
if you
Hi,
In your mysql query, use the LIMIT keyword at or near to the end of the
query.
LIMIT 1000 will limit to the first thousand records
LIMIT 2000,1000 will retrieve 1000 records, offset by 2000 records.
Cheers,
Gareth
On 17 Feb 2004, at 22:12, Shaun wrote:
Hi,
I use the following function
Hi there,
Try include_once(), it's much safer
Cheers,
Gareth
On 17 Feb 2004, at 23:02, Alex Hogan wrote:
Hi All,
What are the rules of thumb for classes and included files?
Can I not include a file in a class function? If I put the include()
outside the class structure everything
Hi,
just updated from beta3 (which worked fine) and now my system is hosed. I am
running Apache 1.3.29 on WinXP and when I try and simply bring up phpinfo I
get the following message in the Apache error log file:
"Premature end of script headers: c:/php/php.exe"
Anyone any idea what is causing t
but I
don't use that, so I can't give you a definitive answer there.
From what I've read about the move from 4 to 5 backwards compatibility
will not be a problem.
MySQL works fine with PHP, as does PostgreSQL, and loads of other
databases.
cheers,
Gareth
On 16 Nov 2003, at 14:21,
k if there is a
session.
It works fine if I go passed the index.php file. Maybe it is because
the
index.php file has echoed information. Any idea
Tore
"Gareth Williams" <[EMAIL PROTECTED]> skrev i melding
news:[EMAIL PROTECTED]
Have you already sent anything to the browser?
Have you already sent anything to the browser? Once the first echo has
been performed, you can't send header information, as the header is
sent with the first bit of text.
On Friday, Oct 31, 2003, at 15:47 Europe/Amsterdam, Tore E. Mackay
wrote:
Hi,
I am creating a shopping cart but experien
Hi there,
Try this:
mysql_pconnect($_host, $_user, $_password) or die("Could not connect:
" . mysql_error());;
This open a permanent mysql connection. The first time you run it, it
opens the connection, and the second time, etc, it just uses the one
already opened.
On Friday, Oct 31, 200
t. :)
If someone sees that I'm leading Gareth astray here, feel free to
jump in
and correct me...
Your explanation squares with my experience. My understanding from
dealing
with some fairly complex OOP interactions is that PHP operators
generally
favor passing-by-value to passing-by-ref
ot;";
echo "parent: ".$instance->my_child->my_parent->my_array['name']."";
The above code give the output:
instance:
parent: test
where I want it to give:
instance: test
parent: test
but somewhere along the way, the reference to the parent obj
pplications.
Is there a way to stop this dialog box appearing everytime - can I just open
the document without it appearing. I know theres a checkbox at the bottom of
the dialog you can unitck but I only want this setting to apply to certain
pages.
Thanks in advance,
Gareth
CONFIDENTIAL
Hi,
I am trying to write data to a text file on my Windows 2000 server using PHP
at the command line. I am running PHP 4.3.2, and the script uses the 'touch'
function to create the file (which works fine) but when I try and open the
file to write to it and errors. Anyone any idea? I have checked t
;,'2003');
but the result is:
1048896001
-3661
1049065201
Therefore date is giving me 31 Dec 1969. Is this a problem with UNIX or PHP?
Thanks
Gareth
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
resource for
a PHP command line script in Linux?
Gareth
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
and restart the service
and it still simply ignores the PHP code...this is driving me insane.
Gareth
"Timothy Hitchens )" <[EMAIL PROTECTED]> wrote in message
007101c2b784$652736b0$0500a8c0@bambino">news:007101c2b784$652736b0$0500a8c0@bambino...
> Your se
I am trying to run a PHP page from my browser (Mozilla) and each time I load
the page it is attempting to force a dowload of the page instead, based on
the mime-type. I had been developing a command line PHP application which
works fine and then had just started on a web interface and realised that
here is one about. Anyway back to google :)
> -Original Message-
> From: Michael J. Pawlowsky [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 5:10 PM
> To: Gareth Hastings; [EMAIL PROTECTED]
> Subject: RE: [PHP] Some questions regarding pfsocketopen()
>
Bah, I meant
$a[] = "0";
$a[] = "1";
$b = $a;
echo $b[0];
> -Original Message-
> From: Gareth Hastings [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 5:05 PM
> To: 'Scott Fletcher'; [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
&
Yes you can simply assign arrays like
$a = "0";
$a = "1";
$b = $a;
echo $b[0];
would print
0
> -Original Message-
> From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 5:08 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Can it be doen with Array
>
>
t :/
> -Original Message-
> From: Michael J. Pawlowsky [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 4:32 PM
> To: Gareth Hastings
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] Some questions regarding pfsocketopen()
>
>
> Well I didnt try to wr
> You will need to have everythng on the same page. Your program ends
once
> the page does.
pfsocketopen() is persistent and stays open even after your script has
finished running until either the timeout period is reached or it gets
disconnected/closedI think. I just don't know how to acc
file resource error.
> -Original Message-
> From: Chris Shiflett [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 2:47 PM
> To: Gareth Hastings; 'PHP-List'
> Subject: Re: [PHP] Some questions regarding pfsocketopen()
>
> --- Gareth Hastings
ot;pf what??"
Thanks
Gareth
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I can't get this to work, I'm using RH 8 with php 4.2.2.
Is there a way to fix this? I think its something to do with ucd-snmp
and me needing to use net-snmp but I'm not sure.
Any ideas?
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.
r more information\])", $sp[1], $qb);
$url = $sp[0] . "See " . $qb[1] . " for more information";
}
Any ideas?
Gareth
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
built my own timeout loop into the code and voila!!
Gareth
"Gareth Thomas" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I am attempting to timeout a socket_read() that is part of a handshaking
> process using socket_
et_timeout($socket,1) which I believe is 1 second and it never times
out...
Any thoughts on this would be most appreciated.
Gareth
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I have some code that writes data to a socket (works fine) and stores the
resource id created in a table with the column defined as varchar (80). Then
the next time I need to write data to the same IP I retrieve the resource id
and reuse it. Problem is that the socket_write seems to work fine
Hi,
I really need some help here because I am going to lose my mind otherwise!!
A script that was running fine Friday has decided not to work for no
apparent reason today. The problem seems to be with a socket_create that
just stops the script, so I created a simple test script as shown below to
s
is 4.2.3. My server software is running on Windows and client
software on Linux although eventually both will be on Linux.
Thanks.
Gareth
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I am running 4.3.0pre2 on RH 7.2 and on Windows2k I am trying to implement a
socket based client/server communication program with the server being on
the Linux side and the current test client on windows (although it will be
on Linux eventually). A series of commands is sent by the client sid
Edward,
Try
Case "1":
.
Break;
-Original Message-
From: Edward Kehoe [mailto:emkehoe@;learn.senecac.on.ca]
Sent: Friday, October 25, 2002 6:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Trouble with switch statements
Ok...I just recently installed Apache1 and PHP 4.2.3 on m
Oops, sorry, forgot to turn off read receipt before I posted.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
or you just have something like
login.myhost.com
and all your sites use that to authenticate the user. In your php login
script you can just see which site they came back from and then on a
successful login you just redirect them back to that one. You wouldn't
need to use cookies. You could make
ok, had a look through the archives but couldn't find anything, so I'm
sorry if I'm asking questions answered long ago.
basically i'm trying to install imlib2 as a module for php rather than
compiled into it as that was giving errors.
when I run phpize, I get this:
root@snipe:/home/gaz/imlib#
il_from
[EMAIL PROTECTED]
sendmail_path
/usr/sbin/sendmail -t -i
smtp localhost
do I need to set the smtp to point to the server that holds the mx records?
any help/advice much appreciated,
thanks,
Gareth
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://
ens. Also, you script doesn't timeout half way through does it ?
(wild guessing now) Does your web server show anything in the logs ?
Gareth
-Original Message-
From: Michael Hall [mailto:[EMAIL PROTECTED]]
Sent: 07 December 2001 14:08
To: phantom
Cc: [EMAIL PROTECTED]
Subject:
I do forms like this
The if line just checks to see if any data has been passed if it has it
prints what you send else if shows the form
-Original Message-
From: Ben Clumeck [mailto:[EMAIL PROTECTED]]
Sent: 06 December 2001 17:14
To: [EMAIL PROTECTED]
Subject: [PHP] Forms and
frogtrade directory structure?
I am desperate for this help, but don't know where else to turn. Any help greatly
appreciated!!
Thanks,
Gareth Davies
Progressive Business Services Ltd
+44 (0) 1274 889592 Office
+44 (0) 1274 889656 Fax
+44 (0) 7970 733851 Mobile (24 Hour)
Thanks philip..I must confess to not having ventured too much into the
PHP.ini file. Simple when you know how, huh?
Thanks again, that's cheered the miserable little mood I've been having this
morning!
Gareth.
- Original Message -
From: Philip Olson <[EMAIL PROTECTED
ater tight regarding user entry?
Any help would be greatly appreciated - I've now spent more than one week just messing
around with apostrophes in one form or another - this is only the latest of my worries
- and I'm sure there are more quote related issues to come :O)
Gareth Davies
Pro
else out for a
change?
Thanks,
Gareth Davies
Progressive Business Services Ltd
+44 (0) 1274 889592 Office
+44 (0) 1274 889656 Fax
+44 (0) 7970 733851 Mobile (24 Hour)
78 matches
Mail list logo