php-windows Digest 5 Mar 2003 01:12:29 -0000 Issue 1618
Topics (messages 18830 through 18846):
Re: Unexplained CGI error
18830 by: Rich Gray
18835 by: Michael Power
Re: Retrieving Server and PHp variables
18831 by: fran.thomas.barclays.co.uk
18832 by: Sharat Hegde
18834 by: Rich Gray
internal server error - any idea whats this?
18833 by: Ruby Otero
php_pgsql.dll problem
18836 by: Peter Kmet
EZ_Publish
18837 by: Franco Pozzer
Anyone using PHP with activePDF Toolkit?
18838 by: Herhuth, Ron
ADOdb for PHP Website... anyone know what's wrong?
18839 by: Asendorf, John
18845 by: Rich Gray
ARRAY Question!
18840 by: Matt Babineau
18841 by: Chris Kranz
18842 by: Ben O'Neill
18843 by: Ben O'Neill
18844 by: Matt Babineau
transferring another .jpg file to yours
18846 by: Anthony Ritter
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
> I have the same problem. And it is totaly random. You can hit F5 several
> times - everything works fine and on the next hit - "CGI error....". It
> sounds to me like bug of uninitialized variable or some buffer overrun
> problems (if it would be a problem in php.ini - at least it would not be
> random :).
> Do you know how to fix this problem?
> I'm using PHP4.3.1 in CGI mode. Btw, which version works better CGI or
> ISAPI??
>
> Thanks,
> Vlad
FWIW I am supporting several sites on v4.3.0/Win2K/IIS5 running as ISAPI
modules without any problems (so far!)... still prefer LAMP tho' :)
Cheers
Rich
--- End Message ---
--- Begin Message ---
I say again:
> > At last found some info...
> >
> > http://bugs.php.net/bug.php?id=9852
> "Vlad"
>
> Hi,
>
> I have the same problem. And it is totaly random. You can hit F5 several
> times - everything works fine and on the next hit - "CGI error....". It
> sounds to me like bug of uninitialized variable or some buffer overrun
> problems (if it would be a problem in php.ini - at least it would not be
> random :).
> Do you know how to fix this problem?
> I'm using PHP4.3.1 in CGI mode. Btw, which version works better CGI or
> ISAPI??
>
> Thanks,
> Vlad
>
> > "Michael Power"
> >
> > At last found some info...
> >
> > http://bugs.php.net/bug.php?id=9852
> >
> > Looks like I might have to move to ASP.NET after all unless the PHP boys
> > pull their fingers out...
> >
> > :(
> >
> > Cheers
> > Mike
> >
<SNIP>
--- End Message ---
--- Begin Message ---
Autoglobals not on,use $_SERVER['{VAR}'] instead.
.:Fran
-----Original Message-----
From: Rich Gray [mailto:[EMAIL PROTECTED]
Sent: 04 March 2003 10:41
To: Sharat Hegde; php-windows
Subject: RE: [PHP-WIN] Retrieving Server and PHp variables
> Hello,
>
> I just upgraded from PHP3 to PHP4 on Apache 1.3.x on Windows NT. I need to
> access the PHP and SERVER variables on my PHP 4 installation. My
> code is as
> follows:
>
> <?php
> echo $SERVER_SOFTWARE;
> echo $PHP_SELF;
> ?>
>
> However, I get the following error:
>
> Notice: Undefined variable: SERVER_SOFTWARE in c:\program files\apache
> group\apache\htdocs\test\test1.php on line 2
>
> Notice: Undefined variable: PHP_SELF in c:\program files\apache
> group\apache\htdocs\test\test1.php on line 3
>
> Also, one more thing I noticed was that <?php phpinfo(); ?> shows
> the Server
> and PHP variables fine.
>
> Can you help out?
>
> Thanks,
> Sharat
Sharat
You will need to look up the superglobal array $_SERVER[] in the PHP
manual - a lot has changed since php3!
Try ...
<?
echo $_SERVER['SERVER_SOFTWARE'].' '.$_SERVER['PHP_SELF'];
?>
HTH
Rich
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Internet communications are not secure and therefore the Barclays Group
does not accept legal responsibility for the contents of this message.
Although the Barclays Group operates anti-virus programmes, it does not
accept responsibility for any damage whatsoever that is caused by
viruses being passed. Any views or opinions presented are solely those
of the author and do not necessarily represent those of the Barclays
Group. Replies to this email may be monitored by the Barclays Group
for operational or business reasons.
--- End Message ---
--- Begin Message ---
Thanks Rich,
That worked fine on my PHP Version 4.3.1
The older syntax seems to work fine on an earlier version of PHP though
(Version 4.2.3)!!
Regards,
Sharat
-----Original Message-----
From: Rich Gray [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 04, 2003 4:11 PM
To: Sharat Hegde; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Retrieving Server and PHp variables
> Hello,
>
> I just upgraded from PHP3 to PHP4 on Apache 1.3.x on Windows NT. I need to
> access the PHP and SERVER variables on my PHP 4 installation. My
> code is as
> follows:
>
> <?php
> echo $SERVER_SOFTWARE;
> echo $PHP_SELF;
> ?>
>
> However, I get the following error:
>
> Notice: Undefined variable: SERVER_SOFTWARE in c:\program files\apache
> group\apache\htdocs\test\test1.php on line 2
>
> Notice: Undefined variable: PHP_SELF in c:\program files\apache
> group\apache\htdocs\test\test1.php on line 3
>
> Also, one more thing I noticed was that <?php phpinfo(); ?> shows
> the Server
> and PHP variables fine.
>
> Can you help out?
>
> Thanks,
> Sharat
Sharat
You will need to look up the superglobal array $_SERVER[] in the PHP
manual - a lot has changed since php3!
Try ...
<?
echo $_SERVER['SERVER_SOFTWARE'].' '.$_SERVER['PHP_SELF'];
?>
HTH
Rich
*********************************************************************
Disclaimer: The information in this e-mail and any attachments is
confidential / privileged. It is intended solely for the addressee or
addressees. If you are not the addressee indicated in this message, you may
not copy or deliver this message to anyone. In such case, you should destroy
this message and kindly notify the sender by reply email. Please advise
immediately if you or your employer does not consent to Internet email for
messages of this kind.
*********************************************************************
--- End Message ---
--- Begin Message ---
> Thanks Rich,
>
> That worked fine on my PHP Version 4.3.1
>
> The older syntax seems to work fine on an earlier version of PHP though
> (Version 4.2.3)!!
>
> Regards,
> Sharat
>
If register_globals is switched on in your php.ini (it's off by default in
later versions of php) then it'll work in v4.3.1 as well but there are
security implications in having globals on...
Cheers
Rich
--- End Message ---
--- Begin Message ---
i encounter this error while i;m testing my php script, its just a form to
send email using mail() function, when suddenly it says that php.exe
performs illegal operation.
[Thu Feb 27 14:55:14 2003] [error] [client 127.0.0.1] Premature end of
script headers: c:/php-4.3.0-win32/php.exe
i uses
win98
php 4.3 (as cgi )
apache 1.3x
--
Rubylinda F. Otero
Cathay Drug Co., Inc.
--- End Message ---
--- Begin Message ---
Hello,
i'm trying to use php with postgres on win32 i have found some problems
with php 4.3.1 (same for php 4.3.0) and php_pgsql.dll.
When i try to load php_pgsql.dll extension in php.ini i get error notice
PHP Warning: Unknown(): Unable to load dynamic library
'C:\Program Files\php\extensions\php_pgsql.dll' - The specified
procedure could not be found.
file php_pgsql.dll exists. I have found on internet that this problem can
be caused by missing libpq.dll from postgres distribution so i downloaded
postgresql-7.3.1 and compiled with VC5.0 interface libpq and copied
libpq.dll and libpq.lib and copied it to winnt/system32 folder (i tried php
dll extensions dir as well) but i still have same warning and pg_*
functions are not avilable.
Your help is very appreciated
Peter Kmet
--
--- End Message ---
--- Begin Message ---
> Can anyone explain to me how to do to make a demo db?
I have load in my dbrms demokernel.sql and i have modify httpd.conf with
indication about ez_publish/doc/install.
I have modify set.ini with a name of the db and the uid a pwd to access of the
db.
Thanks for all.
--- End Message ---
--- Begin Message ---
I'm trying to dynamically generate PDFs using an FDF form, a SQL database and PHP
along with activePDF Toolkit. I basically have created an FDF form using Acrobat and
I need to auto populate the form and save a PDF from the resulting data merge. Does
anyone have any samples of how to do this using PHP? I'm on a very tight deadline so
any help will be greatly appreciated.
Thanks,
Ron
--- End Message ---
--- Begin Message ---
I think I'm going to shoot myself. I LOVE ADOdb for PHP but his website
seems to be down (has been for two days now)... anyone have an inside track
as to when/if he's coming back?
http://php.weblogs.com/adodb
Thanks,
John
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit
--- End Message ---
--- Begin Message ---
> I think I'm going to shoot myself. I LOVE ADOdb for PHP but his website
> seems to be down (has been for two days now)... anyone have an
> inside track
> as to when/if he's coming back?
>
> http://php.weblogs.com/adodb
>
> Thanks,
>
> John
Don't pull that trigger yet... I just loaded the site no problem... try
again...
If it fails again then what does tracert/traceroute tell you?
Cheers
Rich
--- End Message ---
--- Begin Message ---
Ok here goes!
Lets say I have an array:
$myArray = array();
Now lets say I am looping over something
<LOOP>
How do I simply add a new value to the array??
I just want to start tacking on new key/value pairs to the array.
I must be missing something really basic, but I'm not getting it LOL.
<END LOOP>
Thanks,.
<MAtt>
--- End Message ---
--- Begin Message ---
Something like...
$array_length = count( $myArray );
$myArray[$array_length + 1] = $new_data;
This what your after? I think there might be a function for this tho,
but I'm a bit thick :p
chris kranz
fatcuban.com
-----Original Message-----
From: Matt Babineau [mailto:[EMAIL PROTECTED]
Sent: 04 March 2003 21:55
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] ARRAY Question!
Ok here goes!
Lets say I have an array:
$myArray = array();
Now lets say I am looping over something
<LOOP>
How do I simply add a new value to the array??
I just want to start tacking on new key/value pairs to the array.
I must be missing something really basic, but I'm not getting it LOL.
<END LOOP>
Thanks,.
<MAtt>
--- End Message ---
--- Begin Message ---
Well, you can add items onto the end of an array by doing:
$myarray[] = "added on end";
--
Ben "SheepCow" O'Neill
GameSpyDaily Weekend Editor
http://www.gamespydaily.com
"Matt Babineau" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Ok here goes!
>
> Lets say I have an array:
>
> $myArray = array();
>
> Now lets say I am looping over something
>
>
> <LOOP>
>
> How do I simply add a new value to the array??
>
> I just want to start tacking on new key/value pairs to the array.
>
> I must be missing something really basic, but I'm not getting it LOL.
>
> <END LOOP>
>
>
> Thanks,.
>
> <MAtt>
>
--- End Message ---
--- Begin Message ---
Using that it would be:
$array_length = count($myArray);
$myArray[$array_length] = $new_data;
As arrays start at 0, and count() returns the number of elements.
- Ben O'Neill
"Chris Kranz" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Something like...
>
> $array_length = count( $myArray );
> $myArray[$array_length + 1] = $new_data;
>
> This what your after? I think there might be a function for this tho,
> but I'm a bit thick :p
>
> chris kranz
> fatcuban.com
>
>
>
> -----Original Message-----
> From: Matt Babineau [mailto:[EMAIL PROTECTED]
> Sent: 04 March 2003 21:55
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] ARRAY Question!
>
>
> Ok here goes!
>
> Lets say I have an array:
>
> $myArray = array();
>
> Now lets say I am looping over something
>
>
> <LOOP>
>
> How do I simply add a new value to the array??
>
> I just want to start tacking on new key/value pairs to the array.
>
> I must be missing something really basic, but I'm not getting it LOL.
>
> <END LOOP>
>
>
> Thanks,.
>
> <MAtt>
>
>
--- End Message ---
--- Begin Message ---
It's a numerical key so $myArray[] = "value"; will work perfectly!
Thanks!
--> -----Original Message-----
--> From: Ben O'Neill [mailto:[EMAIL PROTECTED]
--> Sent: Tuesday, March 04, 2003 5:06 PM
--> To: [EMAIL PROTECTED]
--> Subject: Re: [PHP-WIN] ARRAY Question!
-->
-->
--> Using that it would be:
-->
--> $array_length = count($myArray);
--> $myArray[$array_length] = $new_data;
-->
--> As arrays start at 0, and count() returns the number of elements.
-->
--> - Ben O'Neill
-->
--> "Chris Kranz" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Something like...
>
> $array_length = count( $myArray );
> $myArray[$array_length + 1] = $new_data;
>
> This what your after? I think there might be a function for this tho,
> but I'm a bit thick :p
>
> chris kranz
> fatcuban.com
>
>
>
> -----Original Message-----
> From: Matt Babineau [mailto:[EMAIL PROTECTED]
> Sent: 04 March 2003 21:55
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] ARRAY Question!
>
>
> Ok here goes!
>
> Lets say I have an array:
>
> $myArray = array();
>
> Now lets say I am looping over something
>
>
> <LOOP>
>
> How do I simply add a new value to the array??
>
> I just want to start tacking on new key/value pairs to the array.
>
> I must be missing something really basic, but I'm not getting it LOL.
>
> <END LOOP>
>
>
> Thanks,.
>
> <MAtt>
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Using PHP 4.1.1. / Apache / Win 98
I'd like to use a .jpg from another URL - say:
http://www.blah.com/foo.jpg
and turn it into a variable using PHP and then once it is a variable to try
to manipulate that image using GD Libraries which are installed.
Is this possible?
I tried placing the string of the URL into a variable like:
$theoldimage="http://www.blah.com/foo.jpg";
and then calling this function of:
$thenewimage=imagecreatefromjpeg ($theoldimage);
but it did not return a value when I echo'ed
$thenewimage
Many thanks,
Tony Ritter
..................................................................
function LoadJpeg ($imgname) {
$im = @imagecreatefromjpeg ($imgname); /* Attempt to open */
if (!$im) { /* See if it failed */
$im = imagecreate (150, 150); /* Create a blank image */
$bgc = imagecolorallocate ($im, 255, 255, 255);
$tc = imagecolorallocate ($im, 0, 0, 0);
imagefilledrectangle ($im, 0, 0, 150, 30, $bgc);
/* Output an errmsg */
imagestring ($im, 1, 5, 5, "Error loading $imgname", $tc);
}
return $im;
}
--- End Message ---