freelanceprogrammers.org Forum Index » PHP
php5 not working
Joined: 11 May 2005
Posts: 7
php5 not working
I`ve installed PHP5 with apache 2.0 in windows. Apparently string interpolation
doesn`t seem to be working as per the following example.
<?php
if (array_key_exits(`product_id`,$_POST){
echo "hello there";
else
echo "isn`t there";
?>
The source displays as <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
Please help me.
Thanks
Ralph
[Non-text portions of this message have been removed]
Joined: 08 Apr 2005
Posts: 10
php5 not working
You`ve got an extra open curly brace there. Or you need to close it
before the else clause.
<?php
if (array_key_exits(`product_id`,$_POST)
echo "hello there";
else
echo "isn`t there";
?>
OR
<?php
if (array_key_exits(`product_id`,$_POST){
echo "hello there";
} else {
echo "isn`t there";
}
?>
I can`t speak for the rest of the code, however.
-jmb
Ralph Kessel wrote:
>I`ve installed PHP5 with apache 2.0 in windows. Apparently string interpolation
doesn`t seem to be working as per the following example.
><?php
>if (array_key_exits(`product_id`,$_POST){
> echo "hello there";
>else
> echo "isn`t there";
>?>
>
>The source displays as <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
><HTML><HEAD>
><META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
><BODY></BODY></HTML>
>
>Please help me.
>Thanks
>Ralph
>
>[Non-text portions of this message have been removed]
>
>
>
>
>
>PHP Data object relational mapping generator - http://www.meta-language.net/
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
Joined: 08 Apr 2005
Posts: 10
php5 not working
Oops, also missing a closing paren:
<?php
if (array_key_exits(`product_id`,$_POST))
echo "hello there";
else
echo "isn`t there";
?>
-jmb
Ralph Kessel wrote:
>I`ve installed PHP5 with apache 2.0 in windows. Apparently string interpolation
doesn`t seem to be working as per the following example.
><?php
>if (array_key_exits(`product_id`,$_POST){
> echo "hello there";
>else
> echo "isn`t there";
>?>
>
>The source displays as <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
><HTML><HEAD>
><META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
><BODY></BODY></HTML>
>
>Please help me.
>Thanks
>Ralph
>
>[Non-text portions of this message have been removed]
>
>
>
>
>
>PHP Data object relational mapping generator - http://www.meta-language.net/
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
Joined: 11 May 2005
Posts: 5
php5 not working
El 11 May 2005 15:09 CLT escribiste:
> Is anyone aware of a way to detect is the user has a Flash Plugin
> installed?
>
AFAIK, there is no direct way on PHP, but:
http://www.quirksmode.org/js/flash.html
regards...
Jose M. Santibaņez A.
Joined: 12 May 2005
Posts: 12
php5 not working
Is anyone aware of a way to detect is the user has a Flash Plugin
installed?
Urb
Joined: 12 May 2005
Posts: 2
php5 not working
Hi,
You have to close the close brace at last.
like
<?php
if (array_key_exits(`product_id`,$_POST))
echo "hello there";
else
echo "isn`t there";
?>
--- Jeff Bennett <JBennett@...> wrote:
> You`ve got an extra open curly brace there. Or you
> need to close it
> before the else clause.
>
> <?php
> if (array_key_exits(`product_id`,$_POST)
> echo "hello there";
> else
> echo "isn`t there";
> ?>
>
> OR
>
> <?php
> if (array_key_exits(`product_id`,$_POST){
> echo "hello there";
> } else {
> echo "isn`t there";
> }
> ?>
>
> I can`t speak for the rest of the code, however.
>
> -jmb
>
> Ralph Kessel wrote:
>
> >I`ve installed PHP5 with apache 2.0 in windows.
> Apparently string interpolation doesn`t seem to be
> working as per the following example.
> ><?php
> >if (array_key_exits(`product_id`,$_POST){
> > echo "hello there";
> >else
> > echo "isn`t there";
> >?>
> >
> >The source displays as <!DOCTYPE HTML PUBLIC
> "-//W3C//DTD HTML 4.0 Transitional//EN">
> ><HTML><HEAD>
> ><META http-equiv=Content-Type content="text/html;
> charset=windows-1252"></HEAD>
> ><BODY></BODY></HTML>
> >
> >Please help me.
> >Thanks
> >Ralph
> >
> >[Non-text portions of this message have been
> removed]
> >
> >
> >
> >
> >
> >PHP Data object relational mapping generator -
> http://www.meta-language.net/
> >Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
__________________________________
Do you Yahoo!?
Make Yahoo! your home page
http://www.yahoo.com/r/hs
Joined: 02 May 2005
Posts: 7
php5 not working
http://www.quirksmode.org/js/flash.html
Urb LeJeune wrote:
> Is anyone aware of a way to detect is the user has a Flash Plugin
> installed?
>
> Urb
>
>
>
>
> PHP Data object relational mapping generator -
> http://www.meta-language.net/
>
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/php-objects/
>
> * To unsubscribe from this group, send an email to:
> php-objects-unsubscribe@yahoogroups.com
> <mailto:php-objects-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
[Non-text portions of this message have been removed]
Joined: 12 May 2005
Posts: 12
php5 not working
Hi Jose,
>AFAIK, there is no direct way on PHP, but:
>
>http://www.quirksmode.org/js/flash.html
This is great thanks
Urb
Joined: 12 May 2005
Posts: 12
php5 not working
Are any of you folks out there ham radio operators who might
be interested in working on a PHP CMS to manage ham radio club
websites? If so please contact me off the list.
Tnx
Urb, W2DEC
Joined: 13 May 2005
Posts: 4
php5 not working
The way this script operates is by returning a variable "pluginlist",
which contains a comma separated list of working plugins of your
browser. The full list of plugins it detects are:
- Flash
- Windows Media Player
- Java
- Shockwave
- RealPlayer
- QuickTime
- Acrobat Reader
- SVG Viewer
Save below lines into plugins.js
______________________
var agt=navigator.userAgent.toLowerCase();
var ie = (agt.indexOf("msie") != -1);
var ns = (navigator.appName.indexOf("Netscape") != -1);
var win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
var mac = (agt.indexOf("mac")!=-1);
if (ie && win) { pluginlist = detectIE("Adobe.SVGCtl","SVG Viewer") +
detectIE("SWCtl.SWCtl.1","Shockwave Director") +
detectIE("ShockwaveFlash.ShockwaveFlash.1","Shockwave Flash") +
detectIE("rmocx.RealPlayer G2 Control.1","RealPlayer") +
detectIE("QuickTimeCheckObject.QuickTimeCheck.1","QuickTime") +
detectIE("MediaPlayer.MediaPlayer.1","Windows Media Player") +
detectIE("PDF.PdfCtrl.5","Acrobat Reader"); }
if (ns || !win) {
nse = ""; for (var i=0;i<navigator.mimeTypes.length;i++) nse +=
navigator.mimeTypes[i].type.toLowerCase();
pluginlist = detectNS("image/svg-xml","SVG Viewer") +
detectNS("application/x-director","Shockwave Director") +
detectNS("application/x-shockwave-flash","Shockwave Flash") +
detectNS("audio/x-pn-realaudio-plugin","RealPlayer") +
detectNS("video/quicktime","QuickTime") +
detectNS("application/x-mplayer2","Windows Media Player") +
detectNS("application/pdf","Acrobat Reader");
}
function detectIE(ClassID,name) { result = false;
document.write(`<SCRIPT LANGUAGE=VBScript>
on error resume next
result = IsObject(CreateObject("` + ClassID + `"))</SCRIPT>
`); if
(result) return name+`,`; else return ``; }
function detectNS(ClassID,name) { n = ""; if (nse.indexOf(ClassID) !=
-1) if (navigator.mimeTypes[ClassID].enabledPlugin != null) n =
name+","; return n; }
pluginlist += navigator.javaEnabled() ? "Java," : "";
if (pluginlist.length > 0) pluginlist =
pluginlist.substring(0,pluginlist.length-1);
_____________________________________________________________
Add below lines into your page in which you want to detect flash plugins
<script src="plugins.js">
if (pluginlist.indexOf("Flash")!=-1)
document.write("You have flash installed")
</script>
Regards,
Rashid Rupani
GlobalinfoTerms.com
http://www.globalinfoterms.com/sitemap.html
On 5/12/05, Urb LeJeune <urb@...> wrote:
> Is anyone aware of a way to detect is the user has a Flash Plugin
> installed?
>
> Urb
>
>
>
>
> PHP Data object relational mapping generator - http://www.meta-language.net/
>
>
> ________________________________
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/php-objects/
>
> To unsubscribe from this group, send an email to:
> php-objects-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Joined: 11 May 2005
Posts: 7
php5 not working
sorry about the grammar but I didn`t even get a grammar error message about that
one. I`m more concerned that there is a dll or two that has not been installed.
I believe I`ve set all the parameters correctly. This the part of my Apache
httpd file pointing to php:# configuration.
Also provided this code segment and this doesn`t display:
<?php
phpinfo(INFO_ALL);
if (array_key_exists(`my_name`,$_POST)){
echo "Hello, ". $_POST[`my_name`];
else{
echo `<html><head>
<title>Untitled</title></head><body>
<form method="post" action="`.$PHP_SELF.`">
Your Name:<input type=text name="my_name">
<br/>
<input type="submit" value="Say Hello"
<br>
</form>
</body>
</html>`;
}
?>
#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
# ServerAdmin webmaster@...
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
----- Original Message -----
From: Jeff Bennett
To: php-objects@yahoogroups.com
Sent: Wednesday, May 11, 2005 12:24 PM
Subject: Re: [php-objects] php5 not working
Oops, also missing a closing paren:
<?php
if (array_key_exits(`product_id`,$_POST))
echo "hello there";
else
echo "isn`t there";
?>
-jmb
Ralph Kessel wrote:
>I`ve installed PHP5 with apache 2.0 in windows. Apparently string
interpolation doesn`t seem to be working as per the following example.
><?php
>if (array_key_exits(`product_id`,$_POST){
> echo "hello there";
>else
> echo "isn`t there";
>?>
>
>The source displays as <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
><HTML><HEAD>
><META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
><BODY></BODY></HTML>
>
>Please help me.
>Thanks
>Ralph
>
>[Non-text portions of this message have been removed]
>
>
>
>
>
>PHP Data object relational mapping generator - http://www.meta-language.net/
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
PHP Data object relational mapping generator - http://www.meta-language.net/
------------------------------------------------------------------------------
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/php-objects/
b.. To unsubscribe from this group, send an email to:
php-objects-unsubscribe@yahoogroups.com
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
Joined: 13 May 2005
Posts: 4
php5 not working
Hi,
Can anyone tell me the code for force download in php
Joined: 11 May 2005
Posts: 7
php5 not working
I did manage to get the error messages turned on and the following message
displayed for the script I have in production on php5 server:
<b>Notice</b>: Undefined variable: PHP_SELF in <b>C:Program FilesApache
GroupApache2htdocsdatecalc.php</b> on line <b>59</b><br />
">
the error in interpretation is based on the following code segment: <form
method=`get` action ="<?php echo $PHP_SELF;?>">
It`s like either Apache or PHP hasn`t included the proper dll for processing.
----- Original Message -----
From: Ralph Kessel
To: php-objects@yahoogroups.com
Sent: Friday, May 13, 2005 9:32 AM
Subject: Re: [php-objects] php5 not working
sorry about the grammar but I didn`t even get a grammar error message about
that one. I`m more concerned that there is a dll or two that has not been
installed. I believe I`ve set all the parameters correctly. This the part of my
Apache httpd file pointing to php:# configuration.
Also provided this code segment and this doesn`t display:
<?php
phpinfo(INFO_ALL);
if (array_key_exists(`my_name`,$_POST)){
echo "Hello, ". $_POST[`my_name`];
else{
echo `<html><head>
<title>Untitled</title></head><body>
<form method="post" action="`.$PHP_SELF.`">
Your Name:<input type=text name="my_name">
<br/>
<input type="submit" value="Say Hello"
<br>
</form>
</body>
</html>`;
}
?>
#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
# ServerAdmin webmaster@...
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
----- Original Message -----
From: Jeff Bennett
To: php-objects@yahoogroups.com
Sent: Wednesday, May 11, 2005 12:24 PM
Subject: Re: [php-objects] php5 not working
Oops, also missing a closing paren:
<?php
if (array_key_exits(`product_id`,$_POST))
echo "hello there";
else
echo "isn`t there";
?>
-jmb
Ralph Kessel wrote:
>I`ve installed PHP5 with apache 2.0 in windows. Apparently string
interpolation doesn`t seem to be working as per the following example.
><?php
>if (array_key_exits(`product_id`,$_POST){
> echo "hello there";
>else
> echo "isn`t there";
>?>
>
>The source displays as <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
><HTML><HEAD>
><META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
><BODY></BODY></HTML>
>
>Please help me.
>Thanks
>Ralph
>
>[Non-text portions of this message have been removed]
>
>
>
>
>
>PHP Data object relational mapping generator -
http://www.meta-language.net/
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
PHP Data object relational mapping generator - http://www.meta-language.net/
------------------------------------------------------------------------------
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/php-objects/
b.. To unsubscribe from this group, send an email to:
php-objects-unsubscribe@yahoogroups.com
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
PHP Data object relational mapping generator - http://www.meta-language.net/
------------------------------------------------------------------------------
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/php-objects/
b.. To unsubscribe from this group, send an email to:
php-objects-unsubscribe@yahoogroups.com
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
Joined: 19 Mar 2005
Posts: 12
php5 not working
use $_SERVER[`SCRIPT_NAME`] instead
greets
2005/5/16, Ralph Kessel <kesselr1@...>:
> I did manage to get the error messages turned on and the following message
displayed for the script I have in production on php5 server:
> <b>Notice</b>: Undefined variable: PHP_SELF in <b>C:Program FilesApache
GroupApache2htdocsdatecalc.php</b> on line <b>59</b><br />
> ">
>
> the error in interpretation is based on the following code segment: <form
method=`get` action ="<?php echo $PHP_SELF;?>">
> It`s like either Apache or PHP hasn`t included the proper dll for processing.
> ----- Original Message -----
> From: Ralph Kessel
> To: php-objects@yahoogroups.com
> Sent: Friday, May 13, 2005 9:32 AM
> Subject: Re: [php-objects] php5 not working
>
> sorry about the grammar but I didn`t even get a grammar error message about
that one. I`m more concerned that there is a dll or two that has not been
installed. I believe I`ve set all the parameters correctly. This the part of my
Apache httpd file pointing to php:# configuration.
>
> Also provided this code segment and this doesn`t display:
> <?php
> phpinfo(INFO_ALL);
> if (array_key_exists(`my_name`,$_POST)){
> echo "Hello, ". $_POST[`my_name`];
> else{
> echo `<html><head>
> <title>Untitled</title></head><body>
> <form method="post" action="`.$PHP_SELF.`">
> Your Name:<input type=text name="my_name">
> <br/>
> <input type="submit" value="Say Hello"
> <br>
> </form>
> </body>
> </html>`;
>
> }
> ?>
>
> #
> # Use name-based virtual hosting.
> #
> #NameVirtualHost *:80
>
> #
> # VirtualHost example:
> # Almost any Apache directive may go into a VirtualHost container.
> # The first VirtualHost section is used for requests without a known
> # server name.
> #
> #<VirtualHost *:80>
> # ServerAdmin webmaster@...
> # DocumentRoot /www/docs/dummy-host.example.com
> # ServerName dummy-host.example.com
> # ErrorLog logs/dummy-host.example.com-error_log
> # CustomLog logs/dummy-host.example.com-access_log common
> #</VirtualHost>
>
> # For PHP 5 do something like this:
> LoadModule php5_module "c:/php/php5apache2.dll"
> AddType application/x-httpd-php .php
>
> # configure the path to php.ini
> ----- Original Message -----
> From: Jeff Bennett
> To: php-objects@yahoogroups.com
> Sent: Wednesday, May 11, 2005 12:24 PM
> Subject: Re: [php-objects] php5 not working
>
> Oops, also missing a closing paren:
>
> <?php
> if (array_key_exits(`product_id`,$_POST))
> echo "hello there";
> else
> echo "isn`t there";
> ?>
>
> -jmb
>
> Ralph Kessel wrote:
>
> >I`ve installed PHP5 with apache 2.0 in windows. Apparently string
interpolation doesn`t seem to be working as per the following example.
> ><?php
> >if (array_key_exits(`product_id`,$_POST){
> > echo "hello there";
> >else
> > echo "isn`t there";
> >?>
> >
> >The source displays as <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
> ><HTML><HEAD>
> ><META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
> ><BODY></BODY></HTML>
> >
> >Please help me.
> >Thanks
> >Ralph
> >
> >[Non-text portions of this message have been removed]
> >
> >
> >
> >
> >
> >PHP Data object relational mapping generator -
http://www.meta-language.net/
> >Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
> PHP Data object relational mapping generator -
http://www.meta-language.net/
>
>
------------------------------------------------------------------------------
> Yahoo! Groups Links
>
> a.. To visit your group on the web, go to:
> http://groups.yahoo.com/group/php-objects/
>
> b.. To unsubscribe from this group, send an email to:
> php-objects-unsubscribe@yahoogroups.com
>
> c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
> [Non-text portions of this message have been removed]
>
> PHP Data object relational mapping generator - http://www.meta-language.net/
>
> ------------------------------------------------------------------------------
> Yahoo! Groups Links
>
> a.. To visit your group on the web, go to:
> http://groups.yahoo.com/group/php-objects/
>
> b.. To unsubscribe from this group, send an email to:
> php-objects-unsubscribe@yahoogroups.com
>
> c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
> [Non-text portions of this message have been removed]
>
> PHP Data object relational mapping generator - http://www.meta-language.net/
> Yahoo! Groups Links
>
>
>
>
>
--
Oreste Attanasio
attanasio@...
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







