[PHP] How to run PHP4 and PHP5 side-by-side

2003-11-02 Thread Adam Plocher
Hello, I'm using Apache 2.0 on a Linux box and I'm trying to figure out how to run 
PHP5 (beta2) and PHP4 co-existantly.  I have compiled both of them with 
--enable-versioning, but I can't figure out what I need to put in my httpd.conf to 
make it differentiate the two versions.
 
Ideally I would like php5 to be enabled for certain virtualhosts, and php4 for others. 
 But using .php5 file extensions would be acceptable too.
 
I have compiled PHP4 and PHP5 with the following configure options:
'./configure' '--with-apxs2=/home/httpd/bin/apxs' '--with-mysql=/home/mysql' 
'--enable-track-vars'  '--enable-versioning'
 
Thanks in advance
 
-Adam


[PHP] Running PHP4 and PHP5 together

2003-07-10 Thread Adam Plocher
Is there anyway I can use PHP4 and PHP5 (as modules, not cgi) together
in Apache2 (Linux)?  I've tried the --enable-versioning configure option
with php, but I'm not quite sure what that does.  I need PHP4 because
Gallery apparently won't work with PHP5.
 
If it's possible to load either php4 or php5 modules per virtualhost,
that would be an acceptible alternative, too, but that didn't seem to
work when I tried it.
 
Thanks
 
-Adam


[PHP] Error compiling php

2003-02-13 Thread Adam Plocher
Hello - I am attempting to upgrade one of our older PHP servers
(4.0.1pl2) to PHP 4.3.0.  We are running a fairly old version of apache
(1.3.12) and MySQL (3.22.32).  My question is - does PHP 4.3.0 support
older versions of MySQL?  When I go to configure PHP 4.3.0 it works
fine, but during compile I get the following errors:

lmysqlclient -lpng -lz -ljpeg -lz -lcrypt -lresolv -lm -ldl -lnsl
-lcrypt  -o sapi/cli/php
ext/mysql/php_mysql.o: In function `zif_mysql_client_encoding':
/home/aplocher/php-4.3.0/ext/mysql/php_mysql.c:1077: undefined reference
to `mysql_character_set_name'
ext/mysql/php_mysql.o: In function `zif_mysql_real_escape_string':
/home/aplocher/php-4.3.0/ext/mysql/php_mysql.c:1671: undefined reference
to `mysql_real_escape_string'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

My configure string looks like this - the MySQL directory should be fine
because this configure string is exactly the same as the one used for
4.0.1pl2 (minus the GD/graphics stuff):

'./configure' '--with-mysql=/usr/local/mysql'
'--with-apache=../apache_1.3.12' '--enable-track-vars' '--with-gd'
'--with-jpeg-dir=/usr/lib' '--with-zlib-dir=/usr/local/lib'


Any help would be really great.
Thanks
-Adam

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Function to catch all mySQL errors?

2003-01-04 Thread Adam Plocher
How about something like this..
 
function runquery($query)
{
 $query = mysql_query($query);
 if (mysql_error())
 {
 echo "MySQL Error: ". mysql_error() ."\n";
 exit(1);
 }
 
return $query;
}
 

-Original Message- 
From: Jeff Lewis [mailto:[EMAIL PROTECTED]] 
Sent: Sat 1/4/2003 6:43 PM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: [PHP] Function to catch all mySQL errors?



I know that mySQL errors are caught in mysql_error() and I find that
function extremely useful (kudos!). However, I have several queries in a few
scripts of mine but am wondering if anyone has written a small function that
catches errors and outputs them. What I mean is lets say I have a block of
code like so:

$result = mysql_query("SELECT field1, field2 FROM users WHERE userLogin =
'$authusername' AND userPassword = '$authpassword'");

Instead of a small loop under my query that is like so:

if (mysql_error()) {
 echo "Error: ".mysql_error();
 exit;
}

I'd like to be able to call a function that does this instead of adding this
if statement after all my queries...so...anyone do something similar?

Jeff



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






RE: [PHP] Read-only gif support in 4.3.0

2003-01-04 Thread Adam Plocher
There aren't any, however there is a GD section which says:
 
GD Support  enabled 
GD Version  bundled (2.0 compatible)
FreeType Supportenabled 
FreeType Linkagewith freetype   
JPG Support enabled 
PNG Support enabled 
WBMP Supportenabled 

Doesn't say anything about GIF =/.  I looked in the php.ini file and didn't see 
anything relating to gif support, and there aren't any gif extensions in the 
php\extensions directory.
 
Thx again.
-Adam

-Original Message- 
From: Michael J. Pawlowsky [mailto:[EMAIL PROTECTED]] 
Sent: Sat 1/4/2003 6:34 PM 
To: Adam Plocher; [EMAIL PROTECTED] 
Cc: 
Subject: RE: [PHP] Read-only gif support in 4.3.0




when you do a phpinfo() what are the compiled with options?




*** REPLY SEPARATOR  ***

On 04/01/2003 at 6:24 PM Adam Plocher wrote:

>This encoded message has been converted to an attachment.
>
>Michael, thanks for the response..
>
>Only prob is I'm using the win32 precompiled version.. I got a couple
>linux boxes I could throw this on I suppose, but I was kind of hoping to
>use this machine as a dev box.
>
>I ran the same code you posted and these were my results:
>
>Fatal error: Call to undefined function: imagecreatefromgif() in
>c:\apache\htdocs\test.php on line 14
>
>I don't get it - there are two gd dll's that come with it and I've tried
>both.  Any other advice would be appreciated. Thanks
>








RE: [PHP] Read-only gif support in 4.3.0

2003-01-04 Thread Adam Plocher
Michael, thanks for the response..
 
Only prob is I'm using the win32 precompiled version.. I got a couple linux boxes I 
could throw this on I suppose, but I was kind of hoping to use this machine as a dev 
box.
 
I ran the same code you posted and these were my results:

Fatal error: Call to undefined function: imagecreatefromgif() in 
c:\apache\htdocs\test.php on line 14
 
I don't get it - there are two gd dll's that come with it and I've tried both.  Any 
other advice would be appreciated. Thanks
 
-Adam

-Original Message- 
From: Michael J. Pawlowsky [mailto:[EMAIL PROTECTED]] 
Sent: Sat 1/4/2003 5:58 PM 
To: Adam Plocher; [EMAIL PROTECTED] 
Cc: 
Subject: Re: [PHP] Read-only gif support in 4.3.0





I just installed 4.3 today...  configured as

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mcrypt --with-zlib 
-
-with-gd --enable-exif --with-jpeg-dir=/usr/lib --with-png --with-ttf 
--with-fre
etype --enable-gd-native-ttf


I run this code:



and it works fine


Mike




*** REPLY SEPARATOR  ***

On 04/01/2003 at 4:50 PM Adam Plocher wrote:

>This encoded message has been converted to an attachment.
>
>I read on PHP.net that PHP 4.3.0 has read-only GIF support in it's version
>of gdlib.  I am using the windows version with apache and tried both
>php_gd.dll and php_gd2.dll and I could not access any GIF related image
>functions, however I could use JPG, PNG, etc.  Does anyone know if I need
>to do anything special to get those functions to work?  The function I am
>mainly needing to use is imagecreatefromgif().
>
>
>
>Thanks
>
>-Adam





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






[PHP] Read-only gif support in 4.3.0

2003-01-04 Thread Adam Plocher
I read on PHP.net that PHP 4.3.0 has read-only GIF support in it's version of gdlib.  
I am using the windows version with apache and tried both php_gd.dll and php_gd2.dll 
and I could not access any GIF related image functions, however I could use JPG, PNG, 
etc.  Does anyone know if I need to do anything special to get those functions to 
work?  The function I am mainly needing to use is imagecreatefromgif().

 

Thanks

-Adam




[PHP] crypt() function

2002-10-14 Thread Adam Plocher

Hello, I am trying to authenticate a password using the crypt()
function.  Here's what I got:
 
if (crypt($_SERVER['PHP_AUTH_PW'],$data[1]) == $data[1]) 
{
...
}
 
$data[1] being the salt..
 
It half-way works... If the users password is 'blah' it will
authenticate fine, but if you append anything to the end of the password
string, it will still allow authentication (ie 'blah12345' will still
work, even though the password is 'blah').  Completely random passwords
do not work, so it seems to be doing SOME checking.  Any help would be
very appreciated.
 
Thanks
-Adam



RE: [PHP] Linux PHP editor

2002-08-09 Thread Adam Plocher

I had problems compiling quanta on my redhat 7.1 box, I had to grab some cvs
files to fix it (Don't remember which files.. Probably whichever ones had
problems compiling - and the makefile).  Quanta is a great program, it's
basically a homesite clone for Linux.

-Adam

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]] 
Sent: Friday, August 09, 2002 5:46 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Linux PHP editor


On Friday 09 August 2002 20:34, [EMAIL PROTECTED] wrote:
> I use vim most of the time... but how 'bout some bluefish?
>
>   http://bluefish.openoffice.nl/

Last time I tried it (about a month ago) the syntax highlighting was 
atrocious. I've always favoured quanta over bluefish but Redhat 7.3
seriously 
broke quanta. That only leaves vim (nedit is good, but has problems 
integrating with the KDE clipboard which renders it impotent).

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
The end of the human race will be that it will eventually die of
civilization.
-- Ralph Waldo Emerson
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] POST Arrays with register globals..

2002-06-12 Thread Adam Plocher

  blah1
&nbps; blah2
  blah3
 
I can't seem to access that data correctly when that form gets submitted.
 
I have tried:

$groups[] = $_POST['groups[]'];
and
$groups[] = $_POST['groups'];
 
no luck..
 
Can somebody please give me a hand, thanks a lot.
 
-Adam



[PHP] PHP 4.2.0 RC2 + Apache 2.0.35 .. DirectoryIndex problem

2002-04-09 Thread Adam Plocher

So I just got PHP 4.2.0 RC2 and Apache 2.0.35 almost completely working.
The only problem I am having now, is Apache's DirectoryIndex option.
Whenever I add index.php to that (like I would do in Apache 1.3), I get a
403 error every time I visit my site.  When I look in my errorlog I see
this: 

[Sun Apr 07 00:51:34 2002] [error] [client xxx.xxx.xxx.xxx] Directory index
forbidden by rule: /home/apache2/htdocs/site1/index.php

AFAIK this should work, I've set this up a billion times in Apache 1.3.
Here is my DirectoryIndex line:

DirectoryIndex index.php index.phtml index.html index.html.var

I realize this isn't really a programming question, so it may be a little
off-topic, but if anybody could help me, I'm sure you guys could.
Thanks a lot.

-Adam



RE: [PHP] Two easy HTML/CSS questions

2002-03-18 Thread Adam Plocher

CSS Hover example:


a:link,a:visited,a:active {color: #213C4D; text-decoration: none;}
a:hover {color: #213C4D; text-decoration: underline; }


As for the size of a text field, you can set it with SIZE="" but note,
netscape and IE both interpret size VERY differently... Not sure about NS6,
but NS4 will make it a lot larger than IE will.

-Original Message-
From: Hunter, Ray [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 18, 2002 10:39 AM
To: 'Darren Gamble'; Hunter, Ray; 'Phil Schwarzmann';
[EMAIL PROTECTED]
Subject: RE: [PHP] Two easy HTML/CSS questions


Actually,

If I understand correctly, you want the actual text field box to be the same
size as the text (as in height)...You can only change the width of the text
field which is done by size="" and this is based on characters...

Example:

Then the width of the text field will be 25 characters...This is for the
text and password fields...


Thank you,

Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-Original Message-
From: Darren Gamble [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 18, 2002 11:32 AM
To: 'Hunter, Ray'; 'Phil Schwarzmann'; [EMAIL PROTECTED]
Subject: RE: [PHP] Two easy HTML/CSS questions


Good day,

Just to clarify, yes, you can set the size of a text field, as well as its
color, text font, border, and so on.  This is also done with css and is
outside the scope of this mailing list.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Hunter, Ray [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 11:31 AM
To: 'Phil Schwarzmann'; [EMAIL PROTECTED]
Subject: RE: [PHP] Two easy HTML/CSS questions


Answers:

1. Yes you can do it with css.  http://www.w3schools.com/css/default.asp

2. The text field area is defined by the browse...You cannot change the size
of the actual box that is the text field...



Thank you,

Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-Original Message-
From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 18, 2002 11:18 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Two easy HTML/CSS questions


I know I shouldn't be asking these questions on this mailing list but you
guys are ALWAYS EXTREMELY helpful...
 
1) I want a a text link to change color when the mouse is hovering over top
of it.  How do I do this?  Im sure it's some CSS thingy.
 
2) Is it possible to make a "text field" smaller when using forms. 
Let's say I'm using font size 1, I want the text field to be just as small
as the rest of text.
 
Thanks again



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Update database via email

2002-03-11 Thread Adam Plocher

If you want an html form in an email, that's possible, but the form will
probably need to submit to a php script (via http, not email).  You would
just need to set the content-type of the email to text/html.

You wouldn't be able to have an active php script embedded in an email
(other than having it called via http).

-Original Message-
From: Jackson Miller [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 11, 2002 8:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Update database via email


I am working on a site that I
would like to be able to
update content (basically news
stories) on via email.  I am
sitting with the problem
trying to figure out the best
way to do this before I start
coding.

I am curious if anyone else
has done this and has a list
of "lessons learned" that they
would be willing to share.
Also is there any code
available that does this kind
of thing.

Thanks in advance,

-Jaxn


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Informix Redback

2001-10-26 Thread Adam Plocher

Our company is looking into purchasing an application package that requires
the use of the Informix (IBM) Redback application. We have been told that
Redback objects can be used in php scripts but I was wondering if any of you
have had experiece with it and if you have had any problems or difficulties
using it.
 
Thx in advance for any help you can give
 
Larry Jeannette



RE: [PHP] How to obtain all the fields' names of a MySQL table?

2001-09-25 Thread Adam Plocher

How about this...

$db = "name_of_database";
$query = "DESCRIBE table_name";
$query = mysql_db_query($db,$query);
while ($row = mysql_fetch_row($query))
{
echo "$row[0]\n";
}


-Original Message-
From: Alex Shi [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 25, 2001 12:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to obtain all the fields' names of a MySQL table?


Hi,

I wanto know how can obtain all of the fields' names of a 
MySQL table in a php script. Anyone have an idea about
this please help. Thanks!

Alex


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To contact
the list administrators, e-mail: [EMAIL PROTECTED]



RE: [PHP] Variable naming

2001-09-25 Thread Adam Plocher

$id = 1;
${"sql_" . $id} = "hey";
print $sql_1;

Try that

-Original Message-
From: Kyle Moore [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 25, 2001 9:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Variable naming


I want to use the value of a variable in a variable name. For instance:

$id = 1;
$sql_$id = "hey"; //set variable $sql_1 to hey
print $sql_1; //should print hey

I have looked high and low on how to do this. My first idea was eval but I
can't seem to get that to work in this instance. Any ideas? I'm sure it is
possible and easy but I just can't figure out how to do this in php.

Thanks

--
Kyle


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To contact
the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] php script ownership

2001-09-25 Thread Adam Plocher

Is there anyway I could make a PHP script run as the user that owns the
script?



[PHP] Running virtualhosts under different users

2001-09-21 Thread Adam Plocher

I realize this is more of an apache question, not a php question, but I
thought you guys of all people, would be able to help me...
 
I have an apache server setup, hosting a number of sites.  I need one site
to be ran under a different user so it can execute shell commands via
system() under that user.  Does anybody know how I can do this?  I installed
the suexec module for apache, and either it doesn't work the way I need it
to, or I just misconfigured it.  
 
I'm baffled, any information would be greatly appreciated.

Thanks
-Adam



[PHP] using system() as a different user

2001-09-20 Thread Adam Plocher

I'm trying to use the system() function to execute a shell command, but the
shell command that needs to be executed, needs to be executed as a different
user (not the default 'nobody' user).  Can somebody show me what I need to
do, to accomplish this.  
 
Thanks
 
-Adam



[PHP] Image manipulation

2001-08-31 Thread Adam Plocher

Hey I got a few questions about image manipulation.  
 
First of all, is there anyway I could have my script take a full size image
and crop out a chunk of it to be used as a thumbnail - or just simply shrink
the image down to be used as a thumbnail?
 
Also, is there anyway to convert misc image types (gif, bmp, png, etc) into
a jpeg?
 
Any help will be very appreciated, thanks.
-Adam Plocher



RE: [PHP] What does PHP stand for?

2001-08-28 Thread Adam Plocher

>From what I heard, the acronym originally stood for Personal Home Page, but
it kind of changed (unofficially?) to Hypertext Preprocessor.

I could be wrong

-Original Message-
From: Martín Marqués [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 28, 2001 3:08 PM
To: John Meyer; [EMAIL PROTECTED]
Subject: Re: [PHP] What does PHP stand for?


On Mar 28 Ago 2001 19:52, John Meyer wrote:
> At 05:15 PM 8/28/01 +0228, you wrote:
> >It's actually a recursive acronym, like GNU:
> >
> > From the manual:
> >
> >"PHP, which stands for 'PHP: Hypertext Preprocessor', is an 
> >HTML-embedded scripting language."
> >
> >J
>
> Am I making things up, or Did it stand for Perl Hypertext Preprocessor 
> at one time?

I always thought it meant Personal Home Page (isn't this right?)

Saludos :-)

-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-
Martín Marqués  |[EMAIL PROTECTED]
Programador, Administrador, DBA |   Centro de Telematica
   Universidad Nacional
del Litoral
-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To contact
the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] Link Checker

2001-08-28 Thread Adam Plocher

Is there any function that will allow me to check to see if a link is valid?



[PHP] explode()

2001-07-16 Thread Adam Plocher

$reqmonth = ${explode("-",$row[5])}[1];

Is there anyway I can get that to work without having to use multiple lines
of code?



[PHP] Manipulating Images into JPG

2001-05-09 Thread Adam Plocher

I want to build a personal page that will have functionality to change many
types of image formats into a jpg.  Ie, convert gif to jpg, png to jpg, even
bmp to jpg.  Assuming this is possible, does anybody have any sample code I
can take a look at?

Thanks much.

Adam Plocher

"If ignorance is bliss, why aren't there more happy people in the world?"


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] finding Friday's date

2001-02-27 Thread Adam Plocher

Yeah I think that would work, but (as an example..) if the upcoming Friday
was on the 1st of next month, and today was Wednesday the 30th, would it
think that Friday was on the 32nd?

-Original Message-
From: Andrew Rush [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 12:59 PM
To: Adam Plocher
Subject: Re: [PHP] finding Friday's date


on 2/27/01 03:39 PM, Adam Plocher at [EMAIL PROTECTED] wrote:

> Could somebody show me an example of a script that will find out the date
of
> each upcoming Friday, thanks.

something like:

$days=array("Saturday", "Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday");

$today=date(l);
$todayNum=date(j);

if($today == "Friday") {

fDate=date("m-d-Y");

} else {

$todayKey=array_keys($days, $today);

for($i=$todayKey; $i < count($days); $i++)) {

$daysTilFri=$i;

}

$friday=$todayNum+$daysTilFri;

$friday=date("m-$friday-Y");

}

maybe? untested.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] finding Friday's date

2001-02-27 Thread Adam Plocher

Could somebody show me an example of a script that will find out the date of
each upcoming Friday, thanks.

Adam Plocher


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]