php-general Digest 2 Dec 2005 20:57:42 -0000 Issue 3828
Topics (messages 226759 through 226790):
Re: shortest possible check: field is set, integer or 0
226759 by: Jochem Maas
226761 by: Marco Kaiser
why php not running ?
226760 by: Mehmet Fatih AKBULUT
226762 by: Marco Kaiser
php problem
226763 by: Rama
226764 by: Marco Kaiser
226765 by: Jochem Maas
226766 by: Rama
A User-Request PHP Book
226767 by: Sumit Datta
IE and AJAX returning HTML with <link stylesheet>
226768 by: Georgi Ivanov
226769 by: Jay Blanchard
226770 by: Jochem Maas
Re: can PHP do what tie does in Perl?
226771 by: Jochem Maas
226778 by: Robert Cummings
226779 by: Jochem Maas
Re: Submit Form Values To Parent
226772 by: Shaun
226773 by: Jay Blanchard
226781 by: Shaun
226782 by: Jay Blanchard
PDF Generator
226774 by: Rick Lim
226775 by: Jay Blanchard
226776 by: Jim Moseby
226777 by: Chris Boget
226780 by: Ray Hauge
226783 by: Ben
Re: Regex to wrap <a href=""> tag around a <p> tag
226784 by: Kristen G. Thorson
Upgrading on RH ES3
226785 by: Jeff McKeon
226788 by: Kristen G. Thorson
226789 by: Jeff McKeon
Re: script won't work on other server
226786 by: Kristen G. Thorson
Zend Sudio's Optimizer / PHP 5.1.1
226787 by: Joseph Crawford
Re: Upgrading on RH ES3 [SOLVED]
226790 by: Jeff McKeon
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:
php-general@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
Steve Edberg wrote:
At 5:30 PM +0100 12/1/05, Jochem Maas wrote:
Steve Edberg wrote:
Only problem with intval() is that it returns 0 (a valid value) on
I knew that. :-)
I figured so, but I thought I'd make it explicit for the mailing list...
failure, so we need to check for 0 first. Adding more secure checks
do we? given that FALSE casts to 0.
would make this more than just a one-liner, eg;
$_CLEAN['x'] = false;
if (isset($_POST['x'])) {
if (0 == 1*$_POST['x']) {
I find the 1*_POST['x'] line a bit odd. why do you bother with the '1*' ?
I tend to use that to explicitly cast things to numeric; usually not
necessary, but I have occasionally hit situations where something got
misinterpreted, so I habitually do the 1*.
$_CLEAN['x'] = 0;
} else {
$x = intval($_POST['x']);
if ($x > 0 && $x == 1*$_POST['x']) {
this is wrong ... if $_POST['x'] is '5.5' this won't fly
but is valid according to the OP.
I guess I was interpreting the OP differently; your version is the
shortest method I can see to force the input to an integer (but to
ensure the non-negative requirement, one should say
$_CLEAN['x'] = abs(intval(@$_POST['x']));
for some reason I have been assuming that intval() drops the sign - but
it doesn't the use of abs() would indeed be required.
thanks for that info :-)
). I was adding extra code to indicate an invalid entry as false. And I
think that 5.5 would not be considered valid - to quote: "What is the
shortest possible check to ensure that a field coming from a form as a
text type input is either a positive integer or 0, but that also
accepts/converts 1.0 or 5.00 as input?"
Although, with more caffeine in my system, doing something like
$x = abs(intval(@$_POST['x']));
$_CLEAN['x'] = isset($_POST['x']) ? ($x == $_POST['x'] ? $x : false)
: false;
or, to be more obfuscated,
$_CLEAN['x'] = isset($_POST['x']) ? (($x =
abs(intval(@$_POST['x']))) == $_POST['x'] ? $x : false) : false;
should do what I was trying to do, more succinctly.
- slightly more awake steve
plenty for the OP to chew on anyway ;-)
--- End Message ---
--- Begin Message ---
whats with
if (isset($_POST['field']) && (INT)$_POST['field']>=0) {
? This should cover the requirements.
$_POST['field'] should be eq 0 or higher as int.
(INT) converts 1.44 to 1 (cuts .44)
-- Marco
2005/12/2, Jochem Maas <[EMAIL PROTECTED]>:
> Steve Edberg wrote:
> > At 5:30 PM +0100 12/1/05, Jochem Maas wrote:
> >
> >> Steve Edberg wrote:
> >> Only problem with intval() is that it returns 0 (a valid value) on
> >>
> >> I knew that. :-)
> >
> >
> >
> > I figured so, but I thought I'd make it explicit for the mailing list...
> >
> >
> >> failure, so we need to check for 0 first. Adding more secure checks
> >>
> >> do we? given that FALSE casts to 0.
> >>
> >>> would make this more than just a one-liner, eg;
> >>>
> >>> $_CLEAN['x'] = false;
> >>> if (isset($_POST['x'])) {
> >>> if (0 == 1*$_POST['x']) {
> >>
> >>
> >> I find the 1*_POST['x'] line a bit odd. why do you bother with the '1*' ?
> >
> >
> >
> > I tend to use that to explicitly cast things to numeric; usually not
> > necessary, but I have occasionally hit situations where something got
> > misinterpreted, so I habitually do the 1*.
> >
> >
> >>> $_CLEAN['x'] = 0;
> >>> } else {
> >>> $x = intval($_POST['x']);
> >>> if ($x > 0 && $x == 1*$_POST['x']) {
> >>
> >>
> >> this is wrong ... if $_POST['x'] is '5.5' this won't fly
> >> but is valid according to the OP.
> >
> >
> >
> > I guess I was interpreting the OP differently; your version is the
> > shortest method I can see to force the input to an integer (but to
> > ensure the non-negative requirement, one should say
> >
> > $_CLEAN['x'] = abs(intval(@$_POST['x']));
>
> for some reason I have been assuming that intval() drops the sign - but
> it doesn't the use of abs() would indeed be required.
>
> thanks for that info :-)
>
> >
> > ). I was adding extra code to indicate an invalid entry as false. And I
> > think that 5.5 would not be considered valid - to quote: "What is the
> > shortest possible check to ensure that a field coming from a form as a
> > text type input is either a positive integer or 0, but that also
> > accepts/converts 1.0 or 5.00 as input?"
> >
> > Although, with more caffeine in my system, doing something like
> >
> > $x = abs(intval(@$_POST['x']));
> > $_CLEAN['x'] = isset($_POST['x']) ? ($x == $_POST['x'] ? $x : false)
> > : false;
> >
> > or, to be more obfuscated,
> >
> > $_CLEAN['x'] = isset($_POST['x']) ? (($x =
> > abs(intval(@$_POST['x']))) == $_POST['x'] ? $x : false) : false;
> >
> > should do what I was trying to do, more succinctly.
> >
> > - slightly more awake steve
> >
> >
>
> plenty for the OP to chew on anyway ;-)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Marco Kaiser
--- End Message ---
--- Begin Message ---
hi all.
i installed php5_extensions on my system (Freebsd5.4)
please look the lines below and tell me where i am doing something wrong.
[EMAIL PROTECTED] -> [~]#php /*hit the tab*/
php php-config phpize
[EMAIL PROTECTED] -> [~]#php
a simple php code:
[EMAIL PROTECTED] -> [~]#cat first.php
<%php
echo "Hello World!";
%>
[EMAIL PROTECTED] -> [~]#
/* chmod a+x first.php*/
when trying to run the code :
[EMAIL PROTECTED] -> [~]#php first.php
PHP Warning: Method panda::__set() must take exactly 2 arguments in Unknown
on line 0
Segmentation fault (core dumped)
[EMAIL PROTECTED] -> [~]#
whats wrong ?
first time i met this problem dont know how to solve and google show nearly
nothing about it. (except a page which was if not mistaken german.)
--- End Message ---
--- Begin Message ---
Hi Mehmet,
can you provider a full backtrace of your core dumped php?`
> [EMAIL PROTECTED] -> [~]#cat first.php
> <%php
> echo "Hello World!";
> %>
> [EMAIL PROTECTED] -> [~]#
>
> Segmentation fault (core dumped)
> [EMAIL PROTECTED] -> [~]#
--
Marco Kaiser
--- End Message ---
--- Begin Message ---
in a huge php page it's happen that some page included in index.php, for some
strange reason went write.
2 byte are write on the pages included, and are always the same (FF and FE in
hexadecilam) at the start of file.
so the file will be
FF FE<? php blablabla ?>
i cannot understand why, i don't use fopen, fwrite, and things like that, so
what i can do to debug this script? also i cannot understand where the problem
is, so i don't know if is regarded to a page included in index.php or in some
other place.
Any help is appreciated!
best regards
Matteo
--- End Message ---
--- Begin Message ---
Hi Matteo,
can you reduce the code to the smallest one and provide your scripts
here to reproduce it?
> in a huge php page it's happen that some page included in index.php, for some
> strange reason went write.
> 2 byte are write on the pages included, and are always the same (FF and FE in
> hexadecilam) at the start of file.
>
--
Marco Kaiser
--- End Message ---
--- Begin Message ---
anyone looking for an example of how not to ask a question
on a mailing list, this is it:
Rama wrote:
in a huge php page it's happen that some page included in index.php, for some
strange reason went write.
2 byte are write on the pages included, and are always the same (FF and FE in
hexadecilam) at the start of file.
so the file will be
FF FE<? php blablabla ?>
i cannot understand why, i don't use fopen, fwrite, and things like that, so
what i can do to debug this script? also i cannot understand where the problem
is, so i don't know if is regarded to a page included in index.php or in some
other place.
I can't even debug the question, let alone tell the OP how to debug his script.
any mindreaders here?
Any help is appreciated!
best regards
Matteo
--- End Message ---
--- Begin Message ---
just to know, make an echo with è can be a problem?
Hi Matteo,
can you reduce the code to the smallest one and provide your scripts
here to reproduce it?
--- End Message ---
--- Begin Message ---
Hello,
I am writing a PHP book (using a wiki software!) to guide mainly new PHP
user through all sorts of issues. The most important part is that I intend
to make this a User-Request Book where user tell me what they want and I
write articles on those topics. This is because I dont have a lot of time so
I want to make good use of the time I have. It is available at
http://php.techfundas.com/wiki/doku.php
You can take a look at it. There is a feedback form there. Also anyone can
simply email me to my email address. I hope I can make a good contribution
to those who are learning PHP.
Bye
Sumit
http://php.techfundas.com/wiki/doku.php
--- End Message ---
--- Begin Message ---
Hi,
I have application that does this:
When one press a specific button, I'm calling JS function that make http(ajax)
request to some php file . The php returns HTML like this :
------------------------------
<link href="left.css" rel="stylesheet" type="text/css" >
<p>SOME HTML HERE</p>
------------------------------
The returned HTML i placed in <div> tag.
The logic is as follows:
When one click on link "left", the php file returns <link> with specific CSS
(left.css). If other button is clicked, the PHP returns html with other CSS
linked.
Everything is OK in Firefox. The problem is in IE . It appears that IE
doesn't evaluate the CSS in <link> tag in returned HTML.
Any suggestions?
--- End Message ---
--- Begin Message ---
[snip]
I have application that does this:
When one press a specific button, I'm calling JS function that make
http(ajax)
request to some php file . The php returns HTML like this :
------------------------------
<link href="left.css" rel="stylesheet" type="text/css" >
<p>SOME HTML HERE</p>
------------------------------
The returned HTML i placed in <div> tag.
The logic is as follows:
When one click on link "left", the php file returns <link> with specific CSS
(left.css). If other button is clicked, the PHP returns html with other CSS
linked.
Everything is OK in Firefox. The problem is in IE . It appears that IE
doesn't evaluate the CSS in <link> tag in returned HTML.
Any suggestions?
[/snip]
None of this appears to be a PHP problem. Either it is an IE CSS problem (in
the source is the proper CSS being called?) or it is a JavaScript problem
related to AJAX.
--- End Message ---
--- Begin Message ---
Georgi Ivanov wrote:
Hi,
I have application that does this:
When one press a specific button, I'm calling JS function that make http(ajax)
request to some php file . The php returns HTML like this :
------------------------------
<link href="left.css" rel="stylesheet" type="text/css" >
<p>SOME HTML HERE</p>
------------------------------
The returned HTML i placed in <div> tag.
The logic is as follows:
When one click on link "left", the php file returns <link> with specific CSS
(left.css). If other button is clicked, the PHP returns html with other CSS
linked.
Everything is OK in Firefox. The problem is in IE . It appears that IE
doesn't evaluate the CSS in <link> tag in returned HTML.
<link> is only allowed in the HEAD of a document no?
my suggestion would be to use DOM methods to
extract the <link> params from the XML you get from the
php script you call via XHTTPRequestObject (or whatever the
*** its called) and then use some more DOM methods to inject
a new <link> element into the HEAD of the doc.
also try googling for 'stylesheet switcher' for possible
alternative approaches....
oh and what was the php question again? ;-)
Any suggestions?
--- End Message ---
--- Begin Message ---
Bing Du wrote:
Hi,
In Perl, hash can be stored in a file like this:
tie(%contact,'SDBM_File',$tmp_file,O_RDWR|O_CREAT,0666);
How the function should be implemented in PHP if it's possible?
file_put_contents('/path/to/your/file', $someFingArray)
Thanks,
Bing
--- End Message ---
--- Begin Message ---
On Fri, 2005-12-02 at 09:42, Jochem Maas wrote:
> Bing Du wrote:
> > Hi,
> >
> > In Perl, hash can be stored in a file like this:
> >
> > tie(%contact,'SDBM_File',$tmp_file,O_RDWR|O_CREAT,0666);
> >
> > How the function should be implemented in PHP if it's possible?
>
> file_put_contents('/path/to/your/file', $someFingArray)
Shouldn't that be:
file_put_contents('/path/to/your/file', serialize($someFingArray));
Cheers,
Rob
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
Robert Cummings wrote:
On Fri, 2005-12-02 at 09:42, Jochem Maas wrote:
Bing Du wrote:
Hi,
In Perl, hash can be stored in a file like this:
tie(%contact,'SDBM_File',$tmp_file,O_RDWR|O_CREAT,0666);
How the function should be implemented in PHP if it's possible?
file_put_contents('/path/to/your/file', $someFingArray)
Shouldn't that be:
file_put_contents('/path/to/your/file', serialize($someFingArray));
<brain_fart>
well I thought so too (its what I wrote originally) but then I reread
the manual and apparently its not necessary - you can shove an array
into file_put_contents() I have no idea what that has as a result but
then I have not idea what tie() does in Perl ... actually I figured
either the OP would notice and go 'er, hows that work?' or not and
do it blindly (and then suffer the potential consequences - which
would hopefully teach him to RTFM)
if some one can write a line like that in Perl, they should be
smart enough to make some kind of attempt in PHP no? I found the OPs
question annoying but couldn't resist answering something so easy ...
then I thought that a short/incomplete answer was probably better than
writing a great big monologue (so I deleted it ;-)
</brain_fart>
Cheers,
Rob
--- End Message ---
--- Begin Message ---
Hi all,
I have made an example of this now. If you click on this link:
http://www.assertia.com/iframe.html
and then click on 'Click Here'. I am trying to display the form results in
the parent window, but I am having no luck!
Here is my code:
iframe.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<iframe src="form.html"></iframe>
</body>
</html>
form.html:
<form name="myform">
<input type="hidden" name="text" value="test">
<a href="result.php" target="_parent"
onclick="document.myform.submit();">Click here</a>
</form>
result.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?= print_r($_POST); ?>
</body>
</html>
Any ideas?
"Terence" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
>
> Shaun wrote:
>> Hi,
>>
>> How can I get the form values submitted from an iframe where the target
>> is the parent window?
>
> Use Javascript. Check out irt.org -> Javascript
> They have lots of great examples.
--- End Message ---
--- Begin Message ---
[snip]
I have made an example of this now. If you click on this link:
http://www.assertia.com/iframe.html
and then click on 'Click Here'. I am trying to display the form results in
the parent window, but I am having no luck!
[/snip]
Actually it is working properly. You have no POST method in your form call
form.html:
<form name="myform"> <---WHAT IS THE METHOD?
<input type="hidden" name="text" value="test">
<a href="result.php" target="_parent"
onclick="document.myform.submit();">Click here</a>
</form>
--- End Message ---
--- Begin Message ---
"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> [snip]
> I have made an example of this now. If you click on this link:
>
> http://www.assertia.com/iframe.html
>
> and then click on 'Click Here'. I am trying to display the form results in
> the parent window, but I am having no luck!
> [/snip]
>
> Actually it is working properly. You have no POST method in your form call
>
> form.html:
> <form name="myform"> <---WHAT IS THE METHOD?
> <input type="hidden" name="text" value="test">
> <a href="result.php" target="_parent"
> onclick="document.myform.submit();">Click here</a>
> </form>
Hi Jay,
Thanks for your reply, I'm not sure what is happening because I have added
the method yet it still isn't working...
Any ideas?
--- End Message ---
--- Begin Message ---
[snip]
> http://www.assertia.com/iframe.html
>
> and then click on 'Click Here'. I am trying to display the form results in
> the parent window, but I am having no luck!
> [/snip]
>
> Actually it is working properly. You have no POST method in your form call
>
> form.html:
> <form name="myform"> <---WHAT IS THE METHOD?
> <input type="hidden" name="text" value="test">
> <a href="result.php" target="_parent"
> onclick="document.myform.submit();">Click here</a>
> </form>
Thanks for your reply, I'm not sure what is happening because I have added
the method yet it still isn't working...
[/snip]
It is working. The POST array contains the text=>test you set up for it. If
you think that it is not the proper behavior, what exactly is it that you
expect?
--- End Message ---
--- Begin Message ---
What is the best FREE pdf generator for PHP?
--- End Message ---
--- Begin Message ---
[snip]
What is the best FREE pdf generator for PHP?
[/snip]
http://www.fpdf.org and you know that PHP has some built-in functionality
using PDFlib http://www.php.net/pdf
--- End Message ---
--- Begin Message ---
>
> What is the best FREE pdf generator for PHP?
>
PHP *is* a free PDF generator.
http://us3.php.net/manual/en/ref.pdf.php
JM
--- End Message ---
--- Begin Message ---
What is the best FREE pdf generator for PHP?
We use HTMLDoc and it works reasonably well.
thnx,
Chris
--- End Message ---
--- Begin Message ---
http://www.fpdf.org is a very good resource for PDF generation. I use
it all the time. It was faster than writing up my own PDF class. It's
fairly well documented as well.
There's also http://fpdi.setasign.de/ if you want to put text, images,
etc on an existing PDF.
Jay Blanchard wrote:
[snip]
What is the best FREE pdf generator for PHP?
[/snip]
http://www.fpdf.org and you know that PHP has some built-in functionality
using PDFlib http://www.php.net/pdf
--- End Message ---
--- Begin Message ---
Jay Blanchard said the following on 12/02/2005 07:49 AM:
[snip]
What is the best FREE pdf generator for PHP?
[/snip]
http://www.fpdf.org and you know that PHP has some built-in functionality
using PDFlib http://www.php.net/pdf
If you're able to GPL your code you can use PDFlib freely. IIRC that
change was made to the PDFlib lite license a few years ago.
IANAL, but if I understand things correctly if you (or your client) have
no plans to redistribute your resulting code you can GPL it and that
would then qualify you to use PDFlib for free. If you are working for a
client you would of course have to provide your code to your client, but
then you have to do that with PHP anyway.
- Ben
--- End Message ---
--- Begin Message ---
Shaun wrote:
Hi M,
Thanks for your help, the code works fine except if there is a line break in
the html, for example
this works
<p>test</p>
But this doesnt
<p>test
</p>
Any ideas?
See the last user contributed note from *csaba at alum dot mit dot edu
*at http://us3.php.net/manual/en/reference.pcre.pattern.modifiers.php,
particularly the last paragraph. He gives a very good explanation of
pattern modifiers that answers your question.
kgt
--- End Message ---
--- Begin Message ---
I've got a server with RedHat ES3 running. It has PHP 4.3.2 installed
but for an application I want to install I need a min of 4.3.9. This
server also runs apache2.0.
I can't find RPMs for RH ES3 so I downloaded the source for PHP4.4.1
figuring I would just compile myself. Problem is, the INSTALL file
gives instructions based on the idea that you don't already have Apache2
or an earlier ver of PHP Installed already. Since Apache2 was installed
via RPM originally the INSTALL instruction for PHP with Apache2 prob
won't work.
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
It's the:
--with-apxs2=/usr/local/apache2/bin/apxs
Switch that has got me scratching my head. /usr/local/apache2/ doesn't
exist and I can't find apxs anywhere on the sys.
Can I just configure with ./configure --with-mysql??
Thanks,
Jeff
--- End Message ---
--- Begin Message ---
Jeff McKeon wrote:
I've got a server with RedHat ES3 running. It has PHP 4.3.2 installed
but for an application I want to install I need a min of 4.3.9. This
server also runs apache2.0.
I can't find RPMs for RH ES3 so I downloaded the source for PHP4.4.1
figuring I would just compile myself. Problem is, the INSTALL file
gives instructions based on the idea that you don't already have Apache2
or an earlier ver of PHP Installed already. Since Apache2 was installed
via RPM originally the INSTALL instruction for PHP with Apache2 prob
won't work.
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
It's the:
--with-apxs2=/usr/local/apache2/bin/apxs
Switch that has got me scratching my head. /usr/local/apache2/ doesn't
exist and I can't find apxs anywhere on the sys.
Can I just configure with ./configure --with-mysql??
Thanks,
Jeff
I believe you need the httpd-devel rpm to get apxs2.
kgt
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Kristen G. Thorson [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 02, 2005 14:50
> To: Jeff McKeon
> Cc: php
> Subject: Re: [PHP] Upgrading on RH ES3
>
>
> Jeff McKeon wrote:
>
> >I've got a server with RedHat ES3 running. It has PHP 4.3.2
> installed
> >but for an application I want to install I need a min of
> 4.3.9. This
> >server also runs apache2.0.
> >
> >I can't find RPMs for RH ES3 so I downloaded the source for PHP4.4.1
> >figuring I would just compile myself. Problem is, the INSTALL file
> >gives instructions based on the idea that you don't already have
> >Apache2 or an earlier ver of PHP Installed already. Since
> Apache2 was
> >installed via RPM originally the INSTALL instruction for PHP with
> >Apache2 prob won't work.
> >
> >./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
> >
> >It's the:
> >
> >--with-apxs2=/usr/local/apache2/bin/apxs
> >
> >Switch that has got me scratching my head.
> /usr/local/apache2/ doesn't
> >exist and I can't find apxs anywhere on the sys.
> >
> >Can I just configure with ./configure --with-mysql??
> >
> >Thanks,
> >
> >Jeff
> >
> >
> >
>
> I believe you need the httpd-devel rpm to get apxs2.
>
>
> kgt
>
Interesting. Would the current ver of php run if I didn't have
httpd-devel installed? What exactly does the switch
--with-apxs2=/usr/local/apache2/bin/apxs do?
Currently PHP 4.3.2 runs find on this system.
--- End Message ---
--- Begin Message ---
Peppy wrote:
This info is for the server where the script does not work:
Apache/1.3.33 (Unix) PHP/4.3.10
FreeBSD cliffb55.iserver.net 4.7-RELEASE-p28 FreeBSD 4.7-RELEASE-p28 #42: Tu i386
This info is for the server where the script works:
Apache/2.0.40 (Red Hat Linux) PHP Version 4.3.2
Linux pl1.qcinet.net 2.4.20-8smp #1 SMP Thu Mar 13 17:45:54 EST 2003 i686
Thanks for your help.
------------ Original Message ------------
Date: Wednesday, November 30, 2005 02:15:47 PM -0600
From: Peppy <[EMAIL PROTECTED]>
To: php-general@lists.php.net
Subject: [PHP] script won't work on other server
I have a small script that I am testing out on two different
servers. It uses the $_SERVER['HTTP_USER_AGENT'] to detect the
browser and serve up a style sheet dependent on the results.
(Please don't comment on its usefulness, it's just an example.)
On one server, I can get this script to run correctly in all
browsers that I test. On another server, it will not run correctly
in Netscape (testing for the word Gecko, but have used Netscape
also). Any help would be appreciated.
Link to script:
http://www.asrm.org/class/php/angelia.php
In case it's needed, link to file with phpinfo():
http://www.asrm.org/test/test.php
Using Netscape to view this page:
http://www.asrm.org/class/php/angelia.php
My stylesheet link is:
<link rel='stylesheet' type='text/css' href='net.css' />
Looks like it works for me.
kgt
--- End Message ---
--- Begin Message ---
i keep getting an error that zend optimizer doesnt work with this version of
PHP, can anyone explain why that would be?
i have gone into zend studio and went to /lib/Optimizer-2.5.13/ created the
php-5.1.x dir and copied the ZendOptimizer.dll from the php-5.0.x directory
but it still complains ;( is there something else i need to change in zend
studio server?
Thanks,
--
Joseph Crawford Jr.
Zend Certified Engineer
Codebowl Solutions, Inc.
1-802-671-2021
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Jeff McKeon
> Sent: Friday, December 02, 2005 15:18
> To: php
> Subject: RE: [PHP] Upgrading on RH ES3
>
>
> > -----Original Message-----
> > From: Kristen G. Thorson [mailto:[EMAIL PROTECTED]
> > Sent: Friday, December 02, 2005 14:50
> > To: Jeff McKeon
> > Cc: php
> > Subject: Re: [PHP] Upgrading on RH ES3
> >
> >
> > Jeff McKeon wrote:
> >
> > >I've got a server with RedHat ES3 running. It has PHP 4.3.2
> > installed
> > >but for an application I want to install I need a min of
> > 4.3.9. This
> > >server also runs apache2.0.
> > >
> > >I can't find RPMs for RH ES3 so I downloaded the source
> for PHP4.4.1
> > >figuring I would just compile myself. Problem is, the
> INSTALL file
> > >gives instructions based on the idea that you don't already have
> > >Apache2 or an earlier ver of PHP Installed already. Since
> > Apache2 was
> > >installed via RPM originally the INSTALL instruction for PHP with
> > >Apache2 prob won't work.
> > >
> > >./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
> > >
> > >It's the:
> > >
> > >--with-apxs2=/usr/local/apache2/bin/apxs
> > >
> > >Switch that has got me scratching my head.
> > /usr/local/apache2/ doesn't
> > >exist and I can't find apxs anywhere on the sys.
> > >
> > >Can I just configure with ./configure --with-mysql??
> > >
> > >Thanks,
> > >
> > >Jeff
> > >
> > >
> > >
> >
> > I believe you need the httpd-devel rpm to get apxs2.
> >
> >
> > kgt
> >
>
> Interesting. Would the current ver of php run if I didn't
> have httpd-devel installed? What exactly does the switch
> --with-apxs2=/usr/local/apache2/bin/apxs do?
>
> Currently PHP 4.3.2 runs find on this system.
>
> --
Kristin was correct, I needed to install the rpm for httpd-devel.
Thanks Kristin!
-Jeff
--- End Message ---