as others have mentioned already, it's happening automatically because of the magic
quotes feature. use the function stripslashes() to remove the escaping character.
$text = o\'reilly;
$text = stripslashes($text);
// $text now equals o'reilly;
hth,
chris.
-Original
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,
On Thu, 2004-02-26 at 02:25, Will wrote:
I forgot to mention what I was trying to do.
There is a web page that pulls the image file name from the database
then reads the URL to the directory where the image is. Is it possible
to just resize it when the web page is brought up in the
gd seems to work fine ? even nconvert via command line does a good job and
it resizes gif too
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,
It's only IE? Perhaps IE keeps connections in a global structure and tries to
use already established connections, regardless of which window you're using?
It's just a guess, but it seems logical- it would cut down on TCP handshake
waste, but one window could effectively DoS another. I wonder
On Wednesday 25 February 2004 06:19 pm, Jeff Schwartz wrote:
Does anyone know how to access a DNS record? Can it be done with fopen?
it could be done with fsockopen (*grins maniacally*)... but
php.net/dns_get_record may be a better way to go.
Jeff
-
Do you
Hi List,
I would like to allow my visitors to send attachments via my contact form.
I already have email validation, field verifications and other nice bits but
I am stuck on the add attachment bit.
Also would this be limited to one file or can multiple files be allowed ?
Thank you in advance
Dave Carrera wrote:
I would like to allow my visitors to send attachments via my contact form.
the easiest way is to use the http://phpmailer.sf.net
great piece of software. it has a simple function to add attachments.
Also would this be limited to one file or can multiple files be allowed ?
Dave Carrera wrote:
Hi List,
I would like to allow my visitors to send attachments via my contact form.
I already have email validation, field verifications and other nice bits but
I am stuck on the add attachment bit.
Also would this be limited to one file or can multiple files be allowed ?
I am working on a pager class that relies on a standard statement like:
select * from my_table limit $offset, $limit
As a feature of my pager class, I would like to display the total number of
pages (each one of $limit rows) to display and the current page number. Does
anybody use any clever
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
On Feb 26, 2004, at 8:14 AM, Gareth Williams wrote:
The function mysql_insert_id() will return the correct value.
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
or this:
print('p$this-user-site[0]::/p');
print_r($this-user-site[0]);
wait... thats what he done hehe
nvm?
what is your php5 build?
have you tried the examples?
(http://www.php.net/manual/en/ref.simplexml.php)
did they work?
anyway, it looks
I've developed the web-site by PHP with using Ming-library. All worked well
on the local computer, but when I uploaded all to the internet server I have
got an error :(
Ming library does not set in php.ini. The hosting provider company does not
want to add extension=php_ming.so to php.ini.
What
Hi,
the error_log file shows the following message:
PHP Warning: Unknown(): Actual POST length does not match Content-Length, and exceeds
20 bytes in Unknown on line 0
and I have a php application not working properly and it looks like it may be caused
by something related to this error.
I just made the same test with IIS/PHP on Windows 2000 system and the
problem described previously doesn't occur. Looks like an Apache problem
then.
I've read that Internet Explorer is using only two connection / server.
Maybe it has something to do with that.
Thanks
Vincent
Evan Nemerson
I am aware of safe mode but, are you saying that when PHP is installed as a
CGI binary safe mode is on by default?
Chris
André cerqueira [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
http://www.php.net/set_time_limit
[snip]
HI all I have a Select that get a resultset, once I get this then I use the
values of this resultset to enter them into another table using an INSERT
statement. I get no errors from the statement but it just doesn't seem to
see my variables from the recordset,
below is my code:
$q=select *
Thanks!! I found some documentation on the GD library.
I most likely be posting again!! :)
~WILL~
[EMAIL PROTECTED] wrote:
gd seems to work fine ? even nconvert via command line does a good job and
it resizes gif too
I'll second that one, I wrote a shell script in PHP to resize images,
using
Nick Wilson wrote:
* and then Burhan Khalid declared
Nick Wilson wrote:
I'm looking for a tool that will parse an xml doc into somthing like an
associative array for me. Basically somthing to make life simple when
dealing with Amazon XML docs.
I have been all thru hotscripts and even tried
excape your variables like so in your insert statement - ' $a_row[p_company]
' (quick and dirty style),
or the clean way .$a_row['p_company'] .
Angelo Zanetti [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
HI all I have a Select that get a resultset, once I get this then I use
the
hi,
how about RCP,SCP, SFTP or FTP or worse comes to worse NFS
Harish wrote:
Hello All,
Is there any possibility to open a file in another machine, provided the IP
of the machine using PHP scripts.
I only need to open a file with the format abc190104.csv in another machine
write data into
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Vincent Bouret wrote:
| Hi,
|
| I have this strange problem. I have Apache 1.3.28 on Windows XP Home SP1
| with PHP 4.3.4 as a module:
|
| httpd.conf
| LoadModule php4_module c:/php/sapi/php4apache.dll
| AddType application/x-httpd-php .php
| AddType
Make sure you use imagecreatetruecolor() with GD when resizing images or
you'll get some undesirable results. Imagemagick's convert and mogrify
worked well for me although I was resizing an uploaded image.
Ed Curtis
On Thu, 26 Feb 2004, Will wrote:
Thanks!! I found some documentation on the
You may want to try putting single quotation marks around your values
and place your array values within curly braces...
VALUES ('{$a_row['p_name']}', '{$a_row['p_company']}',
... and so forth.
Also, try echoing $c_query to see if the values are being stored in the
variable properly, if you
Hi Im trying to build php4 and php5 with apache2 but get errors building
sapi_apache2.lo
Building php5 gives me FATAL: can't create sapi/apache2handler/mod_php5.lo: No such
file or director
Building php4 gives me FATAL: can't create sapi/apache2handler/sapi_apache2.lo: No
such file or directory
url: $PHP_SELF
get variables: $QUERY_STRING
Shaunak
-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 26, 2004 10:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Obtaing the URL of current page
Hi,
How can i obtain the URL of the current page
To be totally accurate --
1. $QUERY_STRING would only work with register_globals on. If
register_globals is off, use $_SERVER[QUERY_STRING].
2. I suppose you would also need the hostname. This can be obtained form
$_SERVER[HTTP_HOST]. Again, with register_globals on $HTTP_HOST may be
used.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
you may find insert ... select interesting for what you want hehe
try this:
$sql = INSERT INTO client (c_name, c_company, c_worktel, c_directtel,
c_hometel, c_fax, c_cell, c_email, c_address, c_city, c_pcode,
c_country)
SELECT p_name,
Take a look here, you may find this documentation useful:
http://www.php.net/manual/en/language.variables.predefined.php
Shaun wrote:
Hi,
How can i obtain the URL of the current page including any $_GET variables?
Thanks for your help
--
Regards,
Ben Ramsey
http://benramsey.com
Wednesday, February 25, 2004, 2:19:26 AM, you wrote:
D Hello all,
D I am having a problem with getting multiple socket reads working in a
D simple socket server!
D The writes appear to be working but the reads seam to only allow one read?
D I know i am missing something. Could even be
Hi All,
I am currently working with PHP5 beta and have found something strange
with the simplexml objects. It seems to be forgetting its values. Below
is an example..
[[the PHP5 code]]
snip
print('pre');
print('p$this-user::/p');
print_r($this-user);
Hi,
I am executing a SELECT query from PHP (4.3.4) through ODBC on a Pervasive
2000SP4 (all on Windows). odbc_result_all, odbc_fetch_into, and all other
php odbc function stop returning records before the end of the effective
resultset.
Here is what is happening :
* In Pervasive: SELECT * FROM
Hi,
I don't know if it's a bug in php but if I do
$fp=fopen(some_file,r);
while (!feof($fp))
{
fscanf($fp, %d %d,$var1,$var2);
// some treatment
}
fclose($fp);
and the file is big enough, php eat up memory like hot cakes.
But if I do
$fp=fopen(some_file,r);
while (!feof($fp))
{
$line =
Hello,
in the latest snapshot i found some very important differences to the php5
beta 4 version concerning the behavior of inherited classes. please look at
the following example:
pre
?php
class MyClass extends MyParent{
function test($arg) {
Hi,
I am looking for a PHP program to dynamically read big apache log files
(over 500 MBs) and show interesting stats and graphs. Does anything
like this exist?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Angelo Zanetti wrote:
[snip...]
$q=select * from prospects where p_id = '$p_id';
$result=mysql_query($q, $this-link) or die (.mysql_error());
while($a_row=mysql_fetch_array($result))
{
$c_query=Insert into client (c_name, c_company, c_worktel,
Hello,
On 02/26/2004 06:54 AM, Dave Carrera wrote:
I would like to allow my visitors to send attachments via my contact form.
I already have email validation, field verifications and other nice bits but
I am stuck on the add attachment bit.
Also would this be limited to one file or can multiple
Dont you need to use instead of ' as ' is a string literal, while parses
variables etc in that string
try this instead:
print(p$this-user-site[0]::/p);
Maybe that will help?
--
Luke
William Bailey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi All,
I am currently working
Hi,
Using the following function I can present any query in a table. However
some of the results are very large and I would like to limit all results to
1000 rows. So I am trying to paginate the results. However the page that
calls these queries uses form elements to create the query. So I need
hey so i've been struggling with an apparent bug in and older version of
(BPHP but i wouldn't know where to look about this bug, as it concerns the
(Binclude function and there is no mention of a bug that i can find...
(B
(Bversion of php: 4.1.0
(Bi have a line of code
(Binclude
Dave Carrera wrote:
Hi List,
I would like to allow my visitors to send attachments via my contact form.
I already have email validation, field verifications and other nice bits but
I am stuck on the add attachment bit.
Also would this be limited to one file or can multiple files be allowed ?
Hi,
Friday, February 27, 2004, 4:48:20 AM, you wrote:
SG Hi,
SG I don't know if it's a bug in php but if I do
SG $fp=fopen(some_file,r);
SG while (!feof($fp))
SG {
SG fscanf($fp, %d %d,$var1,$var2);
SG // some treatment
SG }
SG fclose($fp);
SG and the file is big enough, php eat up
Browser and FTP client act as if the image
files do not exist, even though the directory
contents can be views via FTP...
What did I do?
Bryan
On Thu, 26 Feb 2004 17:56:25 -0600, Bryan Henry [EMAIL PROTECTED]
wrote:
Hello all,
I wrote a small script to rename a few thousand images,
both
Check the permissions and ownership of the files, especially if you ran
the script as some privileged user like root. chmod or chown can be
used to changed these.
Mike
Bryan Henry wrote:
Browser and FTP client act as if the image
files do not exist, even though the directory
contents can be
Looking throught my FTP client it seems that the
permission are the same? Could this be incorrect?
Should I chmod or chown through a shell? or using PHP?
~ bryan
On Fri, 27 Feb 2004 00:01:47 +, Michael Nolan
[EMAIL PROTECTED] wrote:
Check the permissions and ownership of the files,
I wrote a small script to rename a few thousand images, both gif and
jpeg... After running the script, none of the renamed images can be
viewed or downloaded.
I now have over 3000 images I cannot download or view on our website.
What about rename caused this?
Well, on line 5 of your script... oh
Here is the script I used to rename images.
?php
clearstatcache();
$filename = product_tn.txt;
$imgs = (array) null;
$tmp = (array) null;
$config = file($filename);
reset ($config);
$handle = fopen(import_product_tn.txt, w);
$write = ;
foreach ($config as $line) {
if ( $line == )
Chmod and file_exists report that the file does not exist,
even though I can view the files via the FTP client.
bryan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Kyle Goetz mailto:[EMAIL PROTECTED]
on Thursday, February 26, 2004 3:06 PM said:
hey so i've been struggling with an apparent bug in and older version
of PHP but i wouldn't know where to look about this bug, as it
concerns the include function and there is no mention of a bug that i
can
Ryan A wrote:
which runs the sql in show_accounts.php:
SELECT *,now()-0 from .$tcname. where oorder='.$o.' and nname='.$n.'
and total='$p'
Try this:
which runs the sql in show_accounts.php:
SELECT *,now()-0 from .$tcname. where oorder='.$o.' and
nname='.$n.' and total=$p
without the single
On Thu, 2004-02-26 at 20:18, Bryan Henry wrote:
I realized that I did not trim the end line characters off of the file
extensions
after I grabbed all the file names from a text file. Now all the images
have
end of line chracters as part of the extension. I cannot access/edit the
files
Thanks everyone. I got GD2 to work quite well! The thumb look pretty good.
~WILL~
Ed Curtis wrote:
Make sure you use imagecreatetruecolor() with GD when resizing images or
you'll get some undesirable results. Imagemagick's convert and mogrify
worked well for me although I was resizing an
At 08:17 PM 2/26/2004, you wrote:
Warning. I would NOT use Webalizer. This guy went commercial around 1999
and it's well known that the free version (demo) contains code to
call-home on every use. Beware.
Talk to me - what do you mean? I can't find any references on that, and
the fact that the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
actually i thought you said your scripts were running in a remote host
which you cant change php.ini
and assuming that, i said that most servers setup php in safe mode
i believe php.ini is the same for php as module and cgi-bin
dont know if that
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
[snip]
I do think that a dot is valid in the URL coz it seems to be working if
there are 2 zeros in the
decimal part.
[/snip]
i think that means the dot DOESNT work hehe
because with 0's or not, a 4.00 is a 4, while 4.11 wouldnt be the same
thing
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
i dont know if that can be fixed using php, it looks like a firewall
setup problem?
which port is apache running?
i got confused with your ponctuation and explanations, maybe some
rephrasing and more details, like error message, could help
Rick
I am trying to upload a file to a server behind a firewall.
Notes
It works fine from inside the firewall.
I access the server and run the following
?php
phpinfo();
?
Bug when I run the following code. It works in from within the firewall.
But not from outside.
I have port
Hey everyone,
Thanks for your response,
I did try the query without the single quote, with double quotes but didnt
work.
I do think that a dot is valid in the URL coz it seems to be working if
there are 2 zeros in the
decimal part. I even tried running the SQL in PHPMyAdmin with same
results...
p=4.78
I wonder if a dot is a valid character for a URL adderss?
Hi,
Just been getting some weird results from a query...can anybody tell me
why..?
Basically am sending 3 variables via a link on the page...
http://localhost/show_accounts.php?o=8927437717300145n=shanep=4.78
which runs the
Daniel Clark wrote:
p=4.78
I wonder if a dot is a valid character for a URL adderss?
Yup. Just tried it, it works.
Erwin Kerk
Web Developer
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Just been getting some weird results from a query...can anybody tell me
why..?
Basically am sending 3 variables via a link on the page...
http://localhost/show_accounts.php?o=8927437717300145n=shanep=4.78
which runs the sql in show_accounts.php:
SELECT *,now()-0 from .$tcname. where
I realized that I did not trim the end line characters off of the file
extensions
after I grabbed all the file names from a text file. Now all the images
have
end of line chracters as part of the extension. I cannot access/edit the
files
through SHH, PHP or FTP...
Oh well...
bryan
On
Hello all,
I wrote a small script to rename a few thousand images,
both gif and jpeg... After running the script, none of
the renamed images can be viewed or downloaded.
Trying to download these images from an FTP client fails.
FTP client attempts to download the images PASSIVE-ly
Unaltered
hey...
(B
(Btrying to find a quick php script/sample code/etc... that does validation
(Bfor a user.
(B
(Bbasically, i want the admin to authorize a user via a form. i want the form
(Bto kick off an email to the user that will require the user to goto the link
(Bto complete the validation
Hi,
Friday, February 27, 2004, 8:31:32 AM, you wrote:
S Hi,
S Using the following function I can present any query in a table. However
S some of the results are very large and I would like to limit all results to
S 1000 rows. So I am trying to paginate the results. However the page that
S calls
I am looking for a PHP program to dynamically read big apache log files
(over 500 MBs) and show interesting stats and graphs. Does anything like
this exist?
It's not PHP, but it's probably exactly what you're looking for:
http://www.mrunix.net/webalizer/
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 List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
oops
i changed the name of a variable in one place and forgot the other...
mysql_query($sql, $this-link) or die (.mysql_error());
André cerqueira wrote:
you may find insert ... select interesting for what you want hehe
try this:
$sql = INSERT INTO
Hi,
How can i obtain the URL of the current page including any $_GET variables?
Thanks for your help
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
thanx yes i was echoing them and it worked!!
Angelo
Please remember to include the list on messages. Does this mean that
your code now works? Or it still doesn't work but the values are being
properly echoed?
--
Regards,
Ben Ramsey
http://benramsey.com
Right. I've found it.
The problem was an error in php.ini. I had the following line
post_max_size = 20M #commnent
and this is obviously incorrect because comments start with ;
I don't know how but php was reading it bad and post forms weren't working,
specially forms with long content.
Maybe
Change your provider... :-)
If it is a multi thread server, you wont be using extension=php_ming.so,
try using extension=php_ming.dll
Rostislav Kerey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I've developed the web-site by PHP with using Ming-library. All worked
well
on the
Hello All,
Is there any possibility to open a file in another machine, provided the IP
of the machine using PHP scripts.
I only need to open a file with the format abc190104.csv in another machine
write data into that file. Or to steam it through the HTTP.
Regards
Harish Rao K
--
PHP General
Walter A. Boring IV wrote:
I say keep compatibility. If you want to enforce this, then declare an
interface. That is after all why they exist.
Walt
...
Would be nice if you could give a simple example - i really have problems
working with interfaces :(
My problem was to design a
Quoting Vivian Steller [EMAIL PROTECTED]:
Walter A. Boring IV wrote:
I say keep compatibility. If you want to enforce this, then declare an
interface. That is after all why they exist.
Walt
...
Would be nice if you could give a simple example - i really have problems
working
76 matches
Mail list logo