|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 2 Dec 2005 08:52:18 -0000 Issue 3827
php-general-digest-help
lists.php.net
Date: Fri Dec 02 2005 - 02:52:18 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 2 Dec 2005 08:52:18 -0000 Issue 3827
Topics (messages 226714 through 226758):
Re: CDATA in PHP DOM
226714 by: Rob Richards
226718 by: Guy Brom
Re: weird error, cookies??
226715 by: David Grant
226716 by: Jochem Maas
226755 by: Matt Monaco
Re: shortest possible check: field is set, integer or 0
226717 by: Steve Edberg
Problems with PHP and Apache 2.x 404 ErrorDocument handlers
226719 by: Jason Z
226747 by: James Benson
226754 by: Jason Z
Manage directory security on iis
226720 by: Mariano Guadagnini
226721 by: Jay Blanchard
226723 by: Richard Lynch
226734 by: Mariano Guadagnini
javascript, forms and php
226722 by: Kelly Meeks
226724 by: Brent Baisley
xml->load via dom and http authentication
226725 by: jonathan
how to resolve this conflict?
226726 by: Bing Du
226729 by: James Benson
226740 by: Bing Du
Question about Request.php
226727 by: Danilo Azevedo
226728 by: jonathan
226730 by: James Benson
226731 by: Danilo Azevedo
226732 by: Danilo Azevedo
Re: Regex to wrap <a href=""> tag around a <p> tag
226733 by: Shaun
Re: Lowest PHP version to work with MySQL 4.1.x
226735 by: AmirBehzad Eslami
Re: $_POST won't work for me
226736 by: Unknown Unknown
PHP server problem
226737 by: Eric Lommatsch
226738 by: John Nichel
226741 by: James Benson
226744 by: Eric Lommatsch
226745 by: James Benson
226746 by: James Benson
226748 by: Eric Lommatsch
Re: script won't work on other server
226739 by: Unknown Unknown
226756 by: Peppy
226757 by: Unknown Unknown
Re: Database Class Help
226742 by: Unknown Unknown
can PHP do what tie does in Perl?
226743 by: Bing Du
Re: Automatic log out
226749 by: James Benson
226750 by: James Benson
Submit Form Values To Parent
226751 by: Shaun
226753 by: DvDmanDT
226758 by: Terence
Re: MVC platform choice.
226752 by: Ahmed Saad
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Guy Brom wrote:
> Any idea what's wrong with the following? ($this_item['description'] has
> some html text I would like to paste as a CDATA section)
>
> $item->appendChild($dom->createElement('description',
> $dom->createCDATASection($this_item['description'])));
createElement takes a string not a DOMNode. Append the CDATASection to
the element.
Rob
attached mail follows:
worked!!
"Rob Richards" <rrichards
php.net> wrote in message
news:438F29DD.9030906
php.net...
> Guy Brom wrote:
>> Any idea what's wrong with the following? ($this_item['description'] has
>> some html text I would like to paste as a CDATA section)
>>
>> $item->appendChild($dom->createElement('description',
>> $dom->createCDATASection($this_item['description'])));
>
> createElement takes a string not a DOMNode. Append the CDATASection to the
> element.
>
> Rob
attached mail follows:
Hi Angelo,
This simply means that the redirection keeps going, like so:
foo.php
<?php
header('Location: /bar.php');
?>
bar.php
<?php
header('Location /foo.php');
?>
Check the logic in your application that decides if the user gets
redirected and make sure you're not making any incorrect assumptions.
Cheers,
David Grant
Angelo Zanetti wrote:
> Hi guys.
>
> Been working on my site and then been trying to navigate through it, the
> once page redirects to another.
>
> then all of a sudden I get this weird popup (in mozilla) "Redirection
> limit for this URL exceeded. Unable to load requested page"
>
> Also IE seems to timeout.
>
> The page redirects from http to https.
>
> anyone come across this or know what the problem is?
>
> Thanks in advance.
>
--
David Grant
http://www.grant.org.uk/
attached mail follows:
Angelo Zanetti wrote:
> Hi guys.
>
> Been working on my site and then been trying to navigate through it, the
> once page redirects to another.
>
> then all of a sudden I get this weird popup (in mozilla) "Redirection
> limit for this URL exceeded. Unable to load requested page"
>
> Also IE seems to timeout.
>
> The page redirects from http to https.
yeah and I bet by the time the request comes back to your webserver it sees
it as a HTTP request - ergo an infinite loop.
are you using Squid per chance? or maybe doing something fancy with
url rewriting in Apache? one of those is likely to be causing the infinite loop.
>
> anyone come across this or know what the problem is?
I have been fighting the such a problem all today - a site that requires
HTTPS for logged in customers (only), the site lives behind Squid (reverse proxy)
and Squid hits Apache with HTTP requests... and if you try to hit the login page
as http://mydomain/login.php it redirects to https://mydomain/login.php which
is recieved by Squid which passes it to http://127.0.0.1/login.php - and the redirect
occurs again - lots of fun really, and Squid configuration isn't mind numbingly
painful either!
hth to give you some possible insight :-/
>
> Thanks in advance.
>
attached mail follows:
Check your http access file to verify what david and jochem have said, you
should see lines upon lines of access for the pages in question.
"Jochem Maas" <jochem
iamjochem.com> wrote in message
news:438F2EC6.9070201
iamjochem.com...
> Angelo Zanetti wrote:
>> Hi guys.
>>
>> Been working on my site and then been trying to navigate through it, the
>> once page redirects to another.
>>
>> then all of a sudden I get this weird popup (in mozilla) "Redirection
>> limit for this URL exceeded. Unable to load requested page"
>>
>> Also IE seems to timeout.
>>
>> The page redirects from http to https.
>
> yeah and I bet by the time the request comes back to your webserver it
> sees
> it as a HTTP request - ergo an infinite loop.
>
> are you using Squid per chance? or maybe doing something fancy with
> url rewriting in Apache? one of those is likely to be causing the infinite
> loop.
>
>>
>> anyone come across this or know what the problem is?
>
> I have been fighting the such a problem all today - a site that requires
> HTTPS for logged in customers (only), the site lives behind Squid (reverse
> proxy)
> and Squid hits Apache with HTTP requests... and if you try to hit the
> login page
> as http://mydomain/login.php it redirects to https://mydomain/login.php
> which
> is recieved by Squid which passes it to http://127.0.0.1/login.php - and
> the redirect
> occurs again - lots of fun really, and Squid configuration isn't mind
> numbingly
> painful either!
>
> hth to give you some possible insight :-/
>
>>
>> Thanks in advance.
>>
attached mail follows:
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']));
). 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
>> $_CLEAN['x'] = $x;
>> }
>> }
>>}
>>
>>Reducing to a two-liner, if you *really* want:
>>
>>$x = intval(
$_POST['x']);
>>$_CLEAN['x'] = (isset($_POST['x']) ? ((0 == 1*$_POST['x']) ? 0 :
>>(($x > 0 && $x == 1*$_POST['x']) ? $x : false)) : false);
>>
>>(all untested)
>>
>>That *should* return false unless all your conditions are set, in
>>which case it will return your cardinal number (non-negative
>>integer).
>>
>>Disclaimer: Currently operating on caffeine deficit; it's possible
>>I'm answering a question no one asked.
>
>now that is funny :-)
--
+--------------- my people are the people of the dessert, ---------------+
| Steve Edberg http://pgfsun.ucdavis.edu/ |
| UC Davis Genome Center sbedberg
ucdavis.edu |
| Bioinformatics programming/database/sysadmin (530)754-9127 |
+---------------- said t e lawrence, picking up his fork ----------------+
attached mail follows:
I used to have a number of sites direct 404 errors towards PHP scripts for
error handling and the such. Recently I upgraded my PHP installs to 4.4.1(from
4.3.11) with the configure parameters listed below. Now, none of my PHP
handlers are functioning. They are all returning 0 size responses. After
quite a bit of troubleshooting I have determined it is not Apache as it's
ErrorHandler functions are working correctly and I can drop a Perl (or other
language) script in place of the PHP script and they function as desired.
Has anybody else run into this problem lately, and if so, does anybody know
how to resolve it?
The configure parameters used are as follows:
--with-apxs2=/usr/local/apache2/bin/apxs
--enable-force-cgi-redirect
--enable-discard-path
--enable-fastcgi
--enable-magic-quotes
--with-openssl
--with-kerberos
--with-zlib
--enable-calendar
--with-curl
--enable-exif
--with-dom
--enable-ftp
--with-gd
--with-jpeg-dir
--with-png-dir
--with-xpm-dir
--with-xlib-dir
--with-imap-ssl
--with-pspell
--with-recode
--with-readline
--with-snmp
--with-imap
--enable-sockets
--with-pdflib=/Archives/Linux/PDFLib/5.0.4/PDFlib-5.0.4-Linux/bind/c
--with-pspell
--with-swf=/Archives/Linux/LibSWF/dist
--with-xmlrpc
--with-pear
--with-mysql
--with-gmp
--with-expat-dir=/usr
Thank you for any assistance anyone is able to offer regarding this issue.
Jason Ziemba
attached mail follows:
Well if all other PHP scripts work then it must be a problem with your
script or something changed in the latest PHP version that your script
used, if you post the code someone may be able to say if something is
wrong with it.
James
Jason Z wrote:
> I used to have a number of sites direct 404 errors towards PHP scripts for
> error handling and the such. Recently I upgraded my PHP installs to 4.4.1(from
> 4.3.11) with the configure parameters listed below. Now, none of my PHP
> handlers are functioning. They are all returning 0 size responses. After
> quite a bit of troubleshooting I have determined it is not Apache as it's
> ErrorHandler functions are working correctly and I can drop a Perl (or other
> language) script in place of the PHP script and they function as desired.
>
> Has anybody else run into this problem lately, and if so, does anybody know
> how to resolve it?
>
> The configure parameters used are as follows:
> --with-apxs2=/usr/local/apache2/bin/apxs
> --enable-force-cgi-redirect
> --enable-discard-path
> --enable-fastcgi
> --enable-magic-quotes
> --with-openssl
> --with-kerberos
> --with-zlib
> --enable-calendar
> --with-curl
> --enable-exif
> --with-dom
> --enable-ftp
> --with-gd
> --with-jpeg-dir
> --with-png-dir
> --with-xpm-dir
> --with-xlib-dir
> --with-imap-ssl
> --with-pspell
> --with-recode
> --with-readline
> --with-snmp
> --with-imap
> --enable-sockets
> --with-pdflib=/Archives/Linux/PDFLib/5.0.4/PDFlib-5.0.4-Linux/bind/c
> --with-pspell
> --with-swf=/Archives/Linux/LibSWF/dist
> --with-xmlrpc
> --with-pear
> --with-mysql
> --with-gmp
> --with-expat-dir=/usr
>
> Thank you for any assistance anyone is able to offer regarding this issue.
>
> Jason Ziemba
>
attached mail follows:
Unfortunately, and even more frustrating, I tried swapping out my script
with the basic 'hello world'. It still doesn't run (when triggered via the
404 ErrorDocument parameter), but direct access run's just fine.
I attempted to debug (per the PHP faq (
http://us2.php.net/manual/en/faq.installation.php#faq.installation.nodata))
and received the following output:
--------------------------------------------------------------------------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 2336)]
0x405cd794 in php_handler (r=0x86624b8)
at /tmp/PHP/php-4.4.1/sapi/apache2handler/sapi_apache2.c:535
535 if (!parent_req) {
--------------------------------------------------------------------------------
then (per the FAQ) I issued the bt command received:
#0 0x405cd794 in php_handler (r=0x86624b8)
at /tmp/PHP/php-4.4.1/sapi/apache2handler/sapi_apache2.c:535
#1 0x080a9b25 in ap_run_handler (r=0x86624b8) at config.c:152
#2 0x080aa130 in ap_invoke_handler (r=0x86624b8) at config.c:364
#3 0x0808e428 in ap_internal_redirect (new_uri=0x8620948
"\020\tb\bh¨a\bÀ\t7\b¸$f\b", r=0x8620948)
at http_request.c:465
#4 0x0808de0c in ap_process_request (r=0x8620948) at http_request.c:262
#5 0x080892bd in ap_process_http_connection (c=0x861a868) at
http_core.c:251
#6 0x080b4f55 in ap_run_process_connection (c=0x861a868) at connection.c:43
#7 0x080a8124 in child_main (child_num_arg=140642632) at prefork.c:610
#8 0x080a833b in make_child (s=0x407c597c, slot=0) at prefork.c:650
#9 0x080a8398 in startup_children (number_to_start=10) at prefork.c:722
#10 0x080a8c0a in ap_mpm_run (_pconf=0x80f7598, plog=0x8133688, s=0x80fdbe8)
at prefork.c:941
#11 0x080af18d in main (argc=4, argv=0xbffffd44) at main.c:618
Don't know if that helps any, but that's all I've been able to come up with
(so far).
On 12/1/05, James Benson <jb
jamesbenson.co.uk> wrote:
>
> Well if all other PHP scripts work then it must be a problem with your
> script or something changed in the latest PHP version that your script
> used, if you post the code someone may be able to say if something is
> wrong with it.
>
> James
>
>
>
> Jason Z wrote:
> > I used to have a number of sites direct 404 errors towards PHP scripts
> for
> > error handling and the such. Recently I upgraded my PHP installs to
> 4.4.1(from
> > 4.3.11) with the configure parameters listed below. Now, none of my PHP
> > handlers are functioning. They are all returning 0 size
> responses. After
> > quite a bit of troubleshooting I have determined it is not Apache as
> it's
> > ErrorHandler functions are working correctly and I can drop a Perl (or
> other
> > language) script in place of the PHP script and they function as
> desired.
> >
> > Has anybody else run into this problem lately, and if so, does anybody
> know
> > how to resolve it?
> >
> > The configure parameters used are as follows:
> > --with-apxs2=/usr/local/apache2/bin/apxs
> > --enable-force-cgi-redirect
> > --enable-discard-path
> > --enable-fastcgi
> > --enable-magic-quotes
> > --with-openssl
> > --with-kerberos
> > --with-zlib
> > --enable-calendar
> > --with-curl
> > --enable-exif
> > --with-dom
> > --enable-ftp
> > --with-gd
> > --with-jpeg-dir
> > --with-png-dir
> > --with-xpm-dir
> > --with-xlib-dir
> > --with-imap-ssl
> > --with-pspell
> > --with-recode
> > --with-readline
> > --with-snmp
> > --with-imap
> > --enable-sockets
> > --with-pdflib=/Archives/Linux/PDFLib/5.0.4/PDFlib-5.0.4-Linux/bind/c
> > --with-pspell
> > --with-swf=/Archives/Linux/LibSWF/dist
> > --with-xmlrpc
> > --with-pear
> > --with-mysql
> > --with-gmp
> > --with-expat-dir=/usr
> >
> > Thank you for any assistance anyone is able to offer regarding this
> issue.
> >
> > Jason Ziemba
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Hi guys, I wonder if it would be able to manage access to some
directories using php, on a website using iis 6.0.
To be more clear, the application i'm working on has a database with
users, accounts and an administrator. So, i need to grant access to
specific directories in the site to the users that the admin allow. The
thing is that the accounts created are not present on the system (in
this case, windows 2003 web edition), but only on the site database, i
wouldn't like to create a system account per user so as to apply windows
directories polycies. Is there a way to achieve this inside php? i know
that with apache htaccess, this can be done, but i am not able to change
the web server right now.
Any ideas?
Thanks!
Mariano G.
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 30/11/2005
attached mail follows:
[snip]
Hi guys, I wonder if it would be able to manage access to some
directories using php, on a website using iis 6.0.
To be more clear, the application i'm working on has a database with
users, accounts and an administrator. So, i need to grant access to
specific directories in the site to the users that the admin allow. The
thing is that the accounts created are not present on the system (in
this case, windows 2003 web edition), but only on the site database, i
wouldn't like to create a system account per user so as to apply windows
directories polycies. Is there a way to achieve this inside php? i know
that with apache htaccess, this can be done, but i am not able to change
the web server right now.
Any ideas?
[/snip]
You'll want to read http://support.microsoft.com/?kbid=324064 and
http://www.google.com/search?hl=en&q=htaccess+on+IIS
attached mail follows:
On Thu, December 1, 2005 1:03 pm, Mariano Guadagnini wrote:
> Hi guys, I wonder if it would be able to manage access to some
> directories using php, on a website using iis 6.0.
> To be more clear, the application i'm working on has a database with
> users, accounts and an administrator. So, i need to grant access to
> specific directories in the site to the users that the admin allow.
> The
> thing is that the accounts created are not present on the system (in
> this case, windows 2003 web edition), but only on the site database, i
> wouldn't like to create a system account per user so as to apply
> windows
> directories polycies. Is there a way to achieve this inside php? i
> know
> that with apache htaccess, this can be done, but i am not able to
> change
> the web server right now.
> Any ideas?
Create a table that has 'user_id' and 'directory' in it and who can
access which as a flag.
Then you check which directory you are in and the user and include()
your login page if they aren't allowed to access that directory
according to your database rules.
There's nothing tricky here, really...
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
Well, the htaccess on iis seems to be the best solution for us, thanks
people!
Cheers,
Mariano
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 30/11/2005
attached mail follows:
Hi all,
I'm hoping someone can help me with this problem.
I'm using javascript for some client side field validation in a form
(method=post) that gets managed via php.
This particular form makes extensive use of checkboxes. I've always like
how when named properly (field name of "checkbox1[ ]"), php will pass that
variable as an array that contains all the values selected in the form.
Very handy. BUT,
How do you then reference that variable via javascript to do any client-side
validation? The code I use makes reference to the field's id, and it still
doesn't seem to check things properly.
Is there any way around this, or what am I missing?
TIA,
Kelly
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
attached mail follows:
You should have posted this to a javascript board, it has nothing to
do with PHP. That said, if the form field name contains special
characters, like [], you can reference it like this:
document.formname.elements['checkbox1[]'].
Use the elements[] reference style.
On Dec 1, 2005, at 12:42 PM, Kelly Meeks wrote:
> Hi all,
>
>
>
> I'm hoping someone can help me with this problem.
>
>
>
> I'm using javascript for some client side field validation in a form
> (method=post) that gets managed via php.
>
>
>
> This particular form makes extensive use of checkboxes. I've
> always like
> how when named properly (field name of "checkbox1[ ]"), php will
> pass that
> variable as an array that contains all the values selected in the
> form.
> Very handy. BUT,
>
>
>
> How do you then reference that variable via javascript to do any
> client-side
> validation? The code I use makes reference to the field's id, and
> it still
> doesn't seem to check things properly.
>
>
>
> Is there any way around this, or what am I missing?
>
>
>
> TIA,
>
>
>
> Kelly
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
attached mail follows:
i'm loading a dynamically generated xml file like this:
$xml=new DomDocument();
$xml->load("menu_render.php?menu_id=$menu_id&format=xml");
The problem is that this file is in a directory that requires http
authentication (via the .htpasswds file).
How could I specify the uname and pwd loading this? I'm using php5
and apache 1.3.33
thanks in advance.
-jonathan
attached mail follows:
Hello,
I've already posted it on the MySQL General Discussion list. Thought I
wanted to try this list as well in case somebody knows.
5.0.11-beta-standard is already running. Now I need to install php-mysql
which requires mysql-3.23.58-15.RHEL3.1.i3.
Here is what I did and the errors I got:
////////////////////////////////////////////////////////
$ sudo up2date -i php-mysql
Password:
Fetching Obsoletes list for channel: rhel-i386-ws-3...
Fetching Obsoletes list for channel: rhel-i386-ws-3-extras...
Fetching Obsoletes list for channel: dag-ws...
Fetching Obsoletes list for channel: isl-channel-ws...
Fetching Obsoletes list for channel: dag...
Fetching rpm headers...
########################################
Name Version Rel
----------------------------------------------------------
php-mysql 4.3.2 26.ent
i386
Testing package set / solving RPM inter-dependencies...
Downloading headers to solve dependencies...
########################################
php-mysql-4.3.2-26.ent.i386 ########################## Done.
mysql-3.23.58-15.RHEL3.1.i3 ########################## Done.
Preparing ########################################### [100%]
An error has occurred:
Failed running transaction of packages:
('file /usr/bin/comp_err from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
'/usr/bin/comp_err', 0L))
('file /usr/bin/mysql_config from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
'/usr/bin/mysql_config', 0L))
See /var/log/up2date for more information
///////////////////////////////////////////////////
More information I found in /var/log/up2date is:
//////////////////////////////////
[Thu Dec 1 12:50:02 2005] up2date updating login info
[Thu Dec 1 12:50:02 2005] up2date logging into up2date server
[Thu Dec 1 12:50:03 2005] up2date successfully retrieved authentication
token from up2date server
[Thu Dec 1 12:50:03 2005] up2date availablePackageList from network
[Thu Dec 1 12:50:03 2005] up2date Unable to import repomd support so
repomd support w
ill not be available
[Thu Dec 1 12:50:15 2005] up2date solving dep for: ['libmysqlclient.so.10']
[Thu Dec 1 12:50:19 2005] up2date solving dep for: ['libmysqlclient.so.10']
[Thu Dec 1 12:50:22 2005] up2date installing packages:
['php-mysql-4.3.2-26.ent', 'mysql-3.23.58-15.RHEL3.1']
[Thu Dec 1 12:50:25 2005] up2date Failed running transaction of packages:
('file /usr/bin/comp_err from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
'/usr/bin/comp_err', 0L))
('file /usr/bin/mysql_config from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
'/usr/bin/mysql_config', 0L))
[Thu Dec 1 12:50:25 2005] up2date File "/usr/sbin/up2date", line 1265,
in ?
sys.exit(main() or 0)
File "/usr/sbin/up2date", line 800, in main
fullUpdate, dryRun=options.dry_run))
File "/usr/sbin/up2date", line 1137, in batchRun
batch.run()
File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 90, in run
self.__installPackages()
File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 174, in
__installPackages
self.kernelsToInstall =
up2date.installPackages(self.packagesToInstall, self.rpmCallback)
File "/usr/share/rhn/up2date_client/up2date.py", line 749, in
installPackages
runTransaction(ts, added, removed,rpmCallback, rollbacktrans =
rollbacktrans)
File "/usr/share/rhn/up2date_client/up2date.py", line 634, in
runTransaction
rpmUtils.runTransaction(ts,rpmCallback, transdir)
File "/usr/share/rhn/up2date_client/rpmUtils.py", line 520, in
runTransaction
"Failed running transaction of packages: %s") % errors, deps=rc)
//////////////////////////////////
So any way to walk around this conflict? Thanks in advance for any
suggestions.
Bing
Bing
attached mail follows:
You obviously need to remove the old package or compile your own from source
Bing Du wrote:
> Hello,
>
> I've already posted it on the MySQL General Discussion list. Thought I
> wanted to try this list as well in case somebody knows.
>
> 5.0.11-beta-standard is already running. Now I need to install php-mysql
> which requires mysql-3.23.58-15.RHEL3.1.i3.
>
> Here is what I did and the errors I got:
>
> ////////////////////////////////////////////////////////
> $ sudo up2date -i php-mysql
> Password:
>
> Fetching Obsoletes list for channel: rhel-i386-ws-3...
>
> Fetching Obsoletes list for channel: rhel-i386-ws-3-extras...
>
> Fetching Obsoletes list for channel: dag-ws...
>
> Fetching Obsoletes list for channel: isl-channel-ws...
>
> Fetching Obsoletes list for channel: dag...
>
> Fetching rpm headers...
> ########################################
>
> Name Version Rel
> ----------------------------------------------------------
> php-mysql 4.3.2 26.ent i386
>
>
> Testing package set / solving RPM inter-dependencies...
>
> Downloading headers to solve dependencies...
> ########################################
> php-mysql-4.3.2-26.ent.i386 ########################## Done.
> mysql-3.23.58-15.RHEL3.1.i3 ########################## Done.
> Preparing ########################################### [100%]
> An error has occurred:
> Failed running transaction of packages:
> ('file /usr/bin/comp_err from install of mysql-3.23.58-15.RHEL3.1
> conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
> '/usr/bin/comp_err', 0L))
> ('file /usr/bin/mysql_config from install of mysql-3.23.58-15.RHEL3.1
> conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
> '/usr/bin/mysql_config', 0L))
>
> See /var/log/up2date for more information
> ///////////////////////////////////////////////////
>
> More information I found in /var/log/up2date is:
>
> //////////////////////////////////
> [Thu Dec 1 12:50:02 2005] up2date updating login info
> [Thu Dec 1 12:50:02 2005] up2date logging into up2date server
> [Thu Dec 1 12:50:03 2005] up2date successfully retrieved authentication
> token from up2date server
> [Thu Dec 1 12:50:03 2005] up2date availablePackageList from network
> [Thu Dec 1 12:50:03 2005] up2date Unable to import repomd support so
> repomd support w
> ill not be available
> [Thu Dec 1 12:50:15 2005] up2date solving dep for:
> ['libmysqlclient.so.10']
> [Thu Dec 1 12:50:19 2005] up2date solving dep for:
> ['libmysqlclient.so.10']
> [Thu Dec 1 12:50:22 2005] up2date installing packages:
> ['php-mysql-4.3.2-26.ent', 'mysql-3.23.58-15.RHEL3.1']
> [Thu Dec 1 12:50:25 2005] up2date Failed running transaction of packages:
> ('file /usr/bin/comp_err from install of mysql-3.23.58-15.RHEL3.1
> conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
> '/usr/bin/comp_err', 0L))
> ('file /usr/bin/mysql_config from install of mysql-3.23.58-15.RHEL3.1
> conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
> '/usr/bin/mysql_config', 0L))
>
> [Thu Dec 1 12:50:25 2005] up2date File "/usr/sbin/up2date", line 1265,
> in ?
> sys.exit(main() or 0)
> File "/usr/sbin/up2date", line 800, in main
> fullUpdate, dryRun=options.dry_run))
> File "/usr/sbin/up2date", line 1137, in batchRun
> batch.run()
> File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 90, in run
> self.__installPackages()
> File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 174, in
> __installPackages
> self.kernelsToInstall =
> up2date.installPackages(self.packagesToInstall, self.rpmCallback)
> File "/usr/share/rhn/up2date_client/up2date.py", line 749, in
> installPackages
> runTransaction(ts, added, removed,rpmCallback, rollbacktrans =
> rollbacktrans)
> File "/usr/share/rhn/up2date_client/up2date.py", line 634, in
> runTransaction
> rpmUtils.runTransaction(ts,rpmCallback, transdir)
> File "/usr/share/rhn/up2date_client/rpmUtils.py", line 520, in
> runTransaction
> "Failed running transaction of packages: %s") % errors, deps=rc)
> //////////////////////////////////
>
> So any way to walk around this conflict? Thanks in advance for any
> suggestions.
>
> Bing
> Bing
attached mail follows:
James Benson wrote:
> You obviously need to remove the old package or compile your own from
> source
>
>
>
> Bing Du wrote:
>
>> Hello,
>>
>> I've already posted it on the MySQL General Discussion list. Thought
>> I wanted to try this list as well in case somebody knows.
>>
>> 5.0.11-beta-standard is already running. Now I need to install php-mysql
>> which requires mysql-3.23.58-15.RHEL3.1.i3.
>>
>> Here is what I did and the errors I got:
>>
>> ////////////////////////////////////////////////////////
>> $ sudo up2date -i php-mysql
>> Password:
>>
>> Fetching Obsoletes list for channel: rhel-i386-ws-3...
>>
>> Fetching Obsoletes list for channel: rhel-i386-ws-3-extras...
>>
>> Fetching Obsoletes list for channel: dag-ws...
>>
>> Fetching Obsoletes list for channel: isl-channel-ws...
>>
>> Fetching Obsoletes list for channel: dag...
>>
>> Fetching rpm headers...
>> ########################################
>>
>> Name Version Rel
>> ----------------------------------------------------------
>> php-mysql 4.3.2 26.ent i386
>>
>>
>> Testing package set / solving RPM inter-dependencies...
>>
>> Downloading headers to solve dependencies...
>> ########################################
>> php-mysql-4.3.2-26.ent.i386 ########################## Done.
>> mysql-3.23.58-15.RHEL3.1.i3 ########################## Done.
>> Preparing ########################################### [100%]
>> An error has occurred:
>> Failed running transaction of packages:
>> ('file /usr/bin/comp_err from install of mysql-3.23.58-15.RHEL3.1
>> conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3',
>> (7,
>> '/usr/bin/comp_err', 0L))
>> ('file /usr/bin/mysql_config from install of mysql-3.23.58-15.RHEL3.1
>> conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3',
>> (7,
>> '/usr/bin/mysql_config', 0L))
>>
>> See /var/log/up2date for more information
>> ///////////////////////////////////////////////////
>>
>> More information I found in /var/log/up2date is:
>>
>> //////////////////////////////////
>> [Thu Dec 1 12:50:02 2005] up2date updating login info
>> [Thu Dec 1 12:50:02 2005] up2date logging into up2date server
>> [Thu Dec 1 12:50:03 2005] up2date successfully retrieved authentication
>> token from up2date server
>> [Thu Dec 1 12:50:03 2005] up2date availablePackageList from network
>> [Thu Dec 1 12:50:03 2005] up2date Unable to import repomd support so
>> repomd support w
>> ill not be available
>> [Thu Dec 1 12:50:15 2005] up2date solving dep for:
>> ['libmysqlclient.so.10']
>> [Thu Dec 1 12:50:19 2005] up2date solving dep for:
>> ['libmysqlclient.so.10']
>> [Thu Dec 1 12:50:22 2005] up2date installing packages:
>> ['php-mysql-4.3.2-26.ent', 'mysql-3.23.58-15.RHEL3.1']
>> [Thu Dec 1 12:50:25 2005] up2date Failed running transaction of
>> packages:
>> ('file /usr/bin/comp_err from install of mysql-3.23.58-15.RHEL3.1
>> conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3',
>> (7,
>> '/usr/bin/comp_err', 0L))
>> ('file /usr/bin/mysql_config from install of mysql-3.23.58-15.RHEL3.1
>> conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3',
>> (7,
>> '/usr/bin/mysql_config', 0L))
>>
>> [Thu Dec 1 12:50:25 2005] up2date File "/usr/sbin/up2date", line 1265,
>> in ?
>> sys.exit(main() or 0)
>> File "/usr/sbin/up2date", line 800, in main
>> fullUpdate, dryRun=options.dry_run))
>> File "/usr/sbin/up2date", line 1137, in batchRun
>> batch.run()
>> File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 90, in run
>> self.__installPackages()
>> File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 174, in
>> __installPackages
>> self.kernelsToInstall =
>> up2date.installPackages(self.packagesToInstall, self.rpmCallback)
>> File "/usr/share/rhn/up2date_client/up2date.py", line 749, in
>> installPackages
>> runTransaction(ts, added, removed,rpmCallback, rollbacktrans =
>> rollbacktrans)
>> File "/usr/share/rhn/up2date_client/up2date.py", line 634, in
>> runTransaction
>> rpmUtils.runTransaction(ts,rpmCallback, transdir)
>> File "/usr/share/rhn/up2date_client/rpmUtils.py", line 520, in
>> runTransaction
>> "Failed running transaction of packages: %s") % errors, deps=rc)
>> //////////////////////////////////
>>
>> So any way to walk around this conflict? Thanks in advance for any
>> suggestions.
>>
>> Bing
I remember it's possible to install several versions of MySQL and pick
one depending on your need, but I cannot find where I saw it anymore.
Anybody know where that information is?
Thanks,
Bing
attached mail follows:
Hi, my name is Danilo, i am from Brazil
I need your assistence with a code made by your self, if you are not too
busy :P
I am using PHP/XML with your request.php file, but i cant get some
attributes from a Tag, everything is working fine, but it :(
The Tag name is "RUA" and have some attributes that i need for my
application, i am adding all Tags and if i do a echo $Response i cant
see any attributes.
If you cant help please tell me where can i find some support!! please!! :)
Thanks for all and sorry for my badly english :D
Danilo
----------------------------------------------------------
my request code:
...
$Response = '';
$Req = &new HTTP_Request("
http://www.geoportal.com.br/mapapp/avl/xservmapa1.asp")<http://www.geoportal.com.br/mapapp/avl/xservmapa1.asp%22%29>
;
$Req->setMethod(HTTP_REQUEST_METHOD_POST);
$Req->clearPostData();
$Req->addHeader("Ticket",$HTTP_SESSION_VARS["ticket"]);
$Req->addPostData('CX', $LongC);
$Req->addPostData('CY', $LatC);
$Req->addPostData('Z', $LargM);
$Req->addPostData('N', 1);
$Req->addPostData('P1', "MAX");
$Req->addPostData('X1', $Long);
$Req->addPostData('Y1', $Lat);
$Req->addPostData('RT1',$Texto);
$Req->addPostData('E1', "SXCAR1-32;D30");
$Req->addPostData('H', $Alt);
$Req->addPostData('W', $Larg);
$Req->addPostData('RINFO', 100);
$Req->addPostData('INFO', "S");
if (empty($Zoom)){
if (!empty($LongI) || !empty($LatI)){
$Req->addPostData('XP',$LongI);
$Req->addPostData('YP',$LatI);
switch ($TCentr){
case 1:
$Req->addPostData('CMD',"C"); break;
case 2:
$Req->addPostData('CMD',"C+"); break;
case 3:
$Req->addPostData('CMD',"C-"); break;
default:
$Req->addPostData('CMD',"C"); break;
}
}
}else{
$Req->addPostData('XP',round($Larg / 2));
$Req->addPostData('YP',round($Alt / 2));
if ($Zoom == 1)
$Req->addPostData('CMD',"C+");
elseif ($Zoom == -1)
$Req->addPostData('CMD',"C-");
}
$Req->sendRequest();
$Response = $Req->getResponseBody();
...
----------------------------------------------
echo $Response dont show the attributes (NroIni, NroFim, Bairro) :(
here is how the server send a correct XML request, look at the RUA tag:
<?xml version="1.0" encoding="windows-1252" ?>
<SERVMAPA>
<LOCALIDADE> // dados sobre a localização do CENTRO DO MAPA
<CIDADE>nome da cidade</CIDADE>
<ESTADO>sigla do estado</ESTADO>
</LOCALIDADE>
<MAPA>
<PIC>url do GIF gerado</PIC>
<CX>longitude do centro do mapa</CX>
<CY>latitude do centro do mapa</CY>
<Z>zoom</Z>
<N>quantidade de pontos</N>
<PONTO indice=""> // Haverão N itens do tipo PONTO
<P>identificação do ponto</P>
<X>longitude</X>
<Y>latitude</Y>
<XP>posição do ponto sobre o GIF. Coordenada em
pixels</XP>
<YP>posição do ponto sobre o GIF. Coordenada em
pixels</YP>
<LOCALIDADE> // dados sobre a localização do PONTO
<RUA NroIni="" NroFim="" Bairro="">nome da
cidade</RUA>
<CIDADE>nome da cidade</CIDADE>
<ESTADO>sigla do estado</ESTADO>
</LOCALIDADE>
</PONTO>
</MAPA>
</SERVMAPA>
attached mail follows:
do a:
print_r($_REQUEST)
on the php page. if nothing, things aren't configured correctly or
you aren't passing in variables correctly.
On Dec 1, 2005, at 12:15 PM, Danilo Azevedo wrote:
> Hi, my name is Danilo, i am from Brazil
> I need your assistence with a code made by your self, if you are
> not too
> busy :P
> I am using PHP/XML with your request.php file, but i cant get some
> attributes from a Tag, everything is working fine, but it :(
> The Tag name is "RUA" and have some attributes that i need for my
> application, i am adding all Tags and if i do a echo $Response i cant
> see any attributes.
>
> If you cant help please tell me where can i find some support!!
> please!! :)
> Thanks for all and sorry for my badly english :D
>
> Danilo
>
> ----------------------------------------------------------
> my request code:
> ...
>
> $Response = '';
> $Req = &new HTTP_Request("
> http://www.geoportal.com.br/mapapp/avl/xservmapa1.asp")<http://
> www.geoportal.com.br/mapapp/avl/xservmapa1.asp%22%29>
> ;
> $Req->setMethod(HTTP_REQUEST_METHOD_POST);
> $Req->clearPostData();
> $Req->addHeader("Ticket",$HTTP_SESSION_VARS["ticket"]);
> $Req->addPostData('CX', $LongC);
> $Req->addPostData('CY', $LatC);
> $Req->addPostData('Z', $LargM);
> $Req->addPostData('N', 1);
> $Req->addPostData('P1', "MAX");
> $Req->addPostData('X1', $Long);
> $Req->addPostData('Y1', $Lat);
> $Req->addPostData('RT1',$Texto);
> $Req->addPostData('E1', "SXCAR1-32;D30");
> $Req->addPostData('H', $Alt);
> $Req->addPostData('W', $Larg);
> $Req->addPostData('RINFO', 100);
> $Req->addPostData('INFO', "S");
>
> if (empty($Zoom)){
> if (!empty($LongI) || !empty($LatI)){
> $Req->addPostData('XP',$LongI);
> $Req->addPostData('YP',$LatI);
> switch ($TCentr){
> case 1:
> $Req->addPostData
> ('CMD',"C"); break;
> case 2:
> $Req->addPostData('CMD',"C
> +"); break;
> case 3:
> $Req->addPostData
> ('CMD',"C-"); break;
> default:
> $Req->addPostData
> ('CMD',"C"); break;
> }
> }
> }else{
> $Req->addPostData('XP',round($Larg / 2));
> $Req->addPostData('YP',round($Alt / 2));
> if ($Zoom == 1)
> $Req->addPostData('CMD',"C+");
> elseif ($Zoom == -1)
> $Req->addPostData('CMD',"C-");
> }
> $Req->sendRequest();
> $Response = $Req->getResponseBody();
> ...
>
> ----------------------------------------------
>
> echo $Response dont show the attributes (NroIni, NroFim, Bairro) :(
> here is how the server send a correct XML request, look at the RUA
> tag:
>
> <?xml version="1.0" encoding="windows-1252" ?>
> <SERVMAPA>
> <LOCALIDADE> // dados sobre a localização do CENTRO DO MAPA
> <CIDADE>nome da cidade</CIDADE>
> <ESTADO>sigla do estado</ESTADO>
> </LOCALIDADE>
> <MAPA>
> <PIC>url do GIF gerado</PIC>
> <CX>longitude do centro do mapa</CX>
> <CY>latitude do centro do mapa</CY>
> <Z>zoom</Z>
> <N>quantidade de pontos</N>
> <PONTO indice=""> // Haverão N itens do tipo PONTO
> <P>identificação do ponto</P>
> <X>longitude</X>
> <Y>latitude</Y>
> <XP>posição do ponto sobre o GIF. Coordenada em
> pixels</XP>
> <YP>posição do ponto sobre o GIF. Coordenada em
> pixels</YP>
> <LOCALIDADE> // dados sobre a localização
> do PONTO
> <RUA NroIni="" NroFim=""
> Bairro="">nome da
> cidade</RUA>
> <CIDADE>nome da cidade</CIDADE>
> <ESTADO>sigla do estado</ESTADO>
> </LOCALIDADE>
> </PONTO>
> </MAPA>
> </SERVMAPA>
attached mail follows:
Try checking for the error after:- $Req->sendRequest();
Example:-
$response = $Req->sendRequest();
if (PEAR::isError($response)) {
die($response->getMessage());
}
$Response = $Req->getResponseBody();
You may also want to include some options like so:-
$options = array(
'method' => 'GET',
'http' => '1.1',
'allowRedirects' => true,
'saveBody' => true,
);
$Req = &new
HTTP_Request("http://www.geoportal.com.br/mapapp/avl/xservmapa1.asp",
$options);
James
Danilo Azevedo wrote:
> Hi, my name is Danilo, i am from Brazil
> I need your assistence with a code made by your self, if you are not too
> busy :P
> I am using PHP/XML with your request.php file, but i cant get some
> attributes from a Tag, everything is working fine, but it :(
> The Tag name is "RUA" and have some attributes that i need for my
> application, i am adding all Tags and if i do a echo $Response i cant
> see any attributes.
>
> If you cant help please tell me where can i find some support!! please!! :)
> Thanks for all and sorry for my badly english :D
>
> Danilo
>
> ----------------------------------------------------------
> my request code:
> ...
>
> $Response = '';
> $Req = &new HTTP_Request("
> http://www.geoportal.com.br/mapapp/avl/xservmapa1.asp")<http://www.geoportal.com.br/mapapp/avl/xservmapa1.asp%22%29>
> ;
> $Req->setMethod(HTTP_REQUEST_METHOD_POST);
> $Req->clearPostData();
> $Req->addHeader("Ticket",$HTTP_SESSION_VARS["ticket"]);
> $Req->addPostData('CX', $LongC);
> $Req->addPostData('CY', $LatC);
> $Req->addPostData('Z', $LargM);
> $Req->addPostData('N', 1);
> $Req->addPostData('P1', "MAX");
> $Req->addPostData('X1', $Long);
> $Req->addPostData('Y1', $Lat);
> $Req->addPostData('RT1',$Texto);
> $Req->addPostData('E1', "SXCAR1-32;D30");
> $Req->addPostData('H', $Alt);
> $Req->addPostData('W', $Larg);
> $Req->addPostData('RINFO', 100);
> $Req->addPostData('INFO', "S");
>
> if (empty($Zoom)){
> if (!empty($LongI) || !empty($LatI)){
> $Req->addPostData('XP',$LongI);
> $Req->addPostData('YP',$LatI);
> switch ($TCentr){
> case 1:
> $Req->addPostData('CMD',"C"); break;
> case 2:
> $Req->addPostData('CMD',"C+"); break;
> case 3:
> $Req->addPostData('CMD',"C-"); break;
> default:
> $Req->addPostData('CMD',"C"); break;
> }
> }
> }else{
> $Req->addPostData('XP',round($Larg / 2));
> $Req->addPostData('YP',round($Alt / 2));
> if ($Zoom == 1)
> $Req->addPostData('CMD',"C+");
> elseif ($Zoom == -1)
> $Req->addPostData('CMD',"C-");
> }
> $Req->sendRequest();
> $Response = $Req->getResponseBody();
> ...
>
> ----------------------------------------------
>
> echo $Response dont show the attributes (NroIni, NroFim, Bairro) :(
> here is how the server send a correct XML request, look at the RUA tag:
>
> <?xml version="1.0" encoding="windows-1252" ?>
> <SERVMAPA>
> <LOCALIDADE> // dados sobre a localização do CENTRO DO MAPA
> <CIDADE>nome da cidade</CIDADE>
> <ESTADO>sigla do estado</ESTADO>
> </LOCALIDADE>
> <MAPA>
> <PIC>url do GIF gerado</PIC>
> <CX>longitude do centro do mapa</CX>
> <CY>latitude do centro do mapa</CY>
> <Z>zoom</Z>
> <N>quantidade de pontos</N>
> <PONTO indice=""> // Haverão N itens do tipo PONTO
> <P>identificação do ponto</P>
> <X>longitude</X>
> <Y>latitude</Y>
> <XP>posição do ponto sobre o GIF. Coordenada em
> pixels</XP>
> <YP>posição do ponto sobre o GIF. Coordenada em
> pixels</YP>
> <LOCALIDADE> // dados sobre a localização do PONTO
> <RUA NroIni="" NroFim="" Bairro="">nome da
> cidade</RUA>
> <CIDADE>nome da cidade</CIDADE>
> <ESTADO>sigla do estado</ESTADO>
> </LOCALIDADE>
> </PONTO>
> </MAPA>
> </SERVMAPA>
>
attached mail follows:
Jonathan, thanks for ur assistence, i did the print_r($_REQUEST) , its
working fine all my get vars returned
i did all my website using the Request.php/PEAR class but only this page
dont work, because i never used a Tag with attributes before :(
attached mail follows:
Hi James, thanks for ur help :)
the Request isnot returning any errors, the return (echo $Response) is:
SALVADORBA http://200.198.180.228/temp/PICAVL892344533.GIF -38.4554367175679
-12.9185714316371 550 900 999 1
MAX
-38.455436706543-12.918571472168450275R DA DOMINICAR DA MAURITANIAR DAS
HONDURASR DAS HONDURASSALVADORBA
its ALMOST right, its only missing the attributes from the RUA tag :(
the following text is the RUA Tag, but there is no attributes :(
R DA DOMINICA
R DA MAURITANIA
R DAS HONDURAS
R DAS HONDURAS
thx for the help :D
Danilo
attached mail follows:
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?
"M" <lists
gazelasport.sk> wrote in message
news:438EAD90.1040601
gazelasport.sk...
> The second parameter to preg_replace is the replacement string (with
> optional backreferences), not another patern.
>
> Use '/<p\>(.*)(?=<\/p>)/' for patern, '<a
> href="edit_paragraph&text=$1"><p>$1' for replacement string, however, this
> does not urlencode the text parameter. You can use preg_replace_callback
> instead of preg_replace to encode it in the callback function.
>
> This won't work for long paragraphs because the lenght of GET request is
> limited. Change it to use forms instead.
>
> Shaun wrote:
>> Hi,
>>
>> I am trying to read the contents of a file into a string and wrap an <a
>> href=""> tag around every <p> tag and output it to the browser. This is
>> how far I have got:
>>
>> // Get file contents
>> $file_contents = file_get_contents($file);
>> // Replace <p> tags
>> $file_contents = preg_replace('/^<p\>[a-z][0-9]<\/p>$/', '/^<a
>> href="edit_paragraph&text="">\<p>[a-z][0-9]<\/p><\/a>$/',
>> $file_contents);
>> // Output to browser
>> echo $file_contents;
>>
>> I have two problems.
>>
>> 1. - The regex doesn't work!
>> 2. - I need to add the <p> tags and all contents to the link
>>
>> Here is an example
>>
>> <html>
>> <body>
>> <p>Here is a paragraph</p>
>> <p>Here is another paragraph</p>
>> </body>
>> </html>
>>
>> would become
>>
>> <html>
>> <body>
>> <a href="edit_paragraph&text="<p>Here is a paragraph</p>"><p>Here is a
>> paragraph</p></a>
>> <a href="edit_paragraph&text="<p>Here is another paragraph</p>"><p>Here
>> is another paragraph</p></a>
>> </body>
>> </html>
>>
>> Any advice would be greatly appreciated
attached mail follows:
Brent and Oliver,
Thank you for your assistance.
I found some notable solutions from MySQL Forums:
http://forums.mysql.com/read.php?11,6400,6400#msg-6400
Regards,
Behzad
attached mail follows:
I have heard from someone you must keep turning register_globals on and off
while restarting your web server for $_POST and $_GET to work
properly although I'm not very sure..
On 12/1/05, Norbert van Nobelen <norbert-php
hipersonik.com> wrote:
>
> register_globals=on will result in a totally non transparant way of
> variables
> from a post being usuable. For example: You post the variable tt_name with
> a
> value, than echo $tt_name will show that value without you having to
> assign
> it from the post.
> It is not only insecure, it is also very bad coding practice.
>
> On Thursday 01 December 2005 14:27, Matt Monaco wrote:
> > As I learned recently, register_globals should always be off, you do not
> > need it to enable GET and POST variables. I believe enabling it will do
> > something like set $_POST["name"] to $name automatically (of course
> there's
> > always the 90% chance that I'm absolutely wrong).
> >
> > You might want to see if your _GET variables are working correctly too.
> > Try creating a simple page:
> >
> > <?php //testGet.php
> > echo "TEST GET: <br>";
> > var_dump($_GET);
> > echo "<br>END TEST";
> > ?>
> >
> > If you call the page like localhost/testGet.php?testVar=testString than
> > there might be some security settings within your http server preventing
> > this and you should check both your http access and error logs.
> >
> > "Fil" <fil_mat
dodo.com.au> wrote in message
> > news:438E82FF.3050001
dodo.com.au...
> >
> > > Ladies and Gentlemen,
> > >
> > > Thankyou for this opportunity of picking someones brains before I tear
> > > the place apart. I am just starting with PHP but have encountered an
> > > insurmountable hurdle.. I need to work through HTML form "posting"
> > > examples to a PHP script. ONE STEP after "Hello World"
> > >
> > > I have taken the following steps:
> > >
> > > 1: My php.ini (The only one on the system ) is located in
> > > /etc/php.ini
> > >
> > > Because I am using an above 4.1 version of PHP
> > > I have manually altered the values of
> > >
> > > register_globals = On
> > >
> > > 2: I have repeatedly stopped and restarted Apache webserver.
> > > (Version 2)
> > >
> > > 3. I have a "Hello World" HTML - > hello.php that loads and runs
> > > succesfully hence I have a valid Webserver PHP HTML connection with
> my
> > > browser.
> > >
> > > 4. In "Hello World I have taken the liberty of including a phpinfo()
> > >
> > > 5. The output of phpinfo() among others reveals:
> > >
> > > post_max_size 8M 8M
> > > precision 14 14
> > > register_argc_argv On On
> > > register_globals On On
> > > safe_mode Off Off
> > >
> > > 5. I should ???? be able to use GLOBALS ( even if this will become a
> > > health hazard later on)
> > >
> > >
> > > 6. I have used the two examples from PHP's Documentation.
> > >
> > > Literally cut and paste...
> > >
> > > "Action.html "
> > >
> > >> <html>
> > >> <head>
> > >> <meta content="text/html; charset=ISO-8859-1"
> > >> http-equiv="content-type">
> > >> <title>filsform</title>
> > >> </head>
> > >> <body>
> > >> <div style="text-align: center;"><span
> > >> style="text-decoration: underline;">Fils Form<br>
> > >> <br>
> > >> <br>
> > >> </span>
> > >> <div style="text-align: left;">
> > >> <form action="action.php" method="post"> Name: <input name="name"
> > >> type="text"><br>
> > >>
> > >> Email: <input name="email" type="text"><br>
> > >> <input name="submit" value="Submit me!" type="submit"></form>
> > >> <br>
> > >> <span style="text-decoration: underline;"></span></div>
> > >> </div>
> > >> </body>
> > >> </html>
> > >
> > > and action.php
> > >
> > >> <html>
> > >> <head>
> > >> <title>PHP Test</title>
> > >> </head>
> > >> <body>
> > >> HI <?php echo $_POST['name']; ?>.
> > >> Your email <?php echo $_POST['email']; ?>
> > >> </body>
> > >> </html>
> > >
> > > 7. After submitting "action.html" action.php loads and prints
> > >
> > > Hi
> > > Your email
> > >
> > > The contents of $_POST['name'] and $_POST['email'] appear to be
> > > unavailable to action.php. If I understand the documentation correctly
> > > this should not be the case and whatever strings are filled in the
> form
> > > of action.html should now be available???
> > >
> > > What or where or how or why or whatever ????? must I do next... ????
> > >
> > > Many thanks for those interested in advance
> > >
> > > Fil
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Hello,
This is my first time posting to this particular list, so please be patient
with me.
I am not exactly sure if this is the right list to post this to or if the
description of what is happening will be enough to really make what my
questions is
We have a Linux server that we use to run several PHP based programs on. Up
until today it has been working well. Today we tried to install a new PHP
based accounting program called "NolaPro" which also includes the Zend
optimizer as part of the installation. when I got finished installing this
program and said that the Zend optimizer was not installed. I tried
Installing this program again and the results were the same. But, trying to
get this program is now my secondary concern.
Since I have run this installation program none of the other PHP scripts that
we have installed on this server run anymore but instead are now asking if we
try to open them if I want to save the file to disk or open them in our PHP
editing tools. It appears that Apache is no longer recognizing and serving
PHP scripts.
I have tried reinstalling PHP but the results are still the same. Can
somebody please help me get back to the point where PHP is back running on
this server?
Thank you
Eric H. Lommatsch
Programmer
MICRONix, Inc.
2087 South Grant Street
Denver, CO 80210
Tel 303-777-8939
Fax 303-778-0378
ericl
Micronix.com
attached mail follows:
Eric Lommatsch wrote:
> Hello,
>
> This is my first time posting to this particular list, so please be patient
> with me.
>
> I am not exactly sure if this is the right list to post this to or if the
> description of what is happening will be enough to really make what my
> questions is
>
> We have a Linux server that we use to run several PHP based programs on. Up
> until today it has been working well. Today we tried to install a new PHP
> based accounting program called "NolaPro" which also includes the Zend
> optimizer as part of the installation. when I got finished installing this
> program and said that the Zend optimizer was not installed. I tried
> Installing this program again and the results were the same. But, trying to
> get this program is now my secondary concern.
>
> Since I have run this installation program none of the other PHP scripts that
> we have installed on this server run anymore but instead are now asking if we
> try to open them if I want to save the file to disk or open them in our PHP
> editing tools. It appears that Apache is no longer recognizing and serving
> PHP scripts.
>
> I have tried reinstalling PHP but the results are still the same. Can
> somebody please help me get back to the point where PHP is back running on
> this server?
Look at steps 14 and 15 under "Example 4-1..." on this page, and ensure
those lines are in your httpd.conf
http://www.php.net/manual/en/install.unix.php
--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
jnichel
dotcomholdingsofbuffalo.com
attached mail follows:
It probably modified your httpd.conf, if your being prompted to download
the file it sounds like the following line is missing from it,
AddType application/x-httpd-php .php .phtml
Eric Lommatsch wrote:
> Hello,
>
> This is my first time posting to this particular list, so please be patient
> with me.
>
> I am not exactly sure if this is the right list to post this to or if the
> description of what is happening will be enough to really make what my
> questions is
>
> We have a Linux server that we use to run several PHP based programs on. Up
> until today it has been working well. Today we tried to install a new PHP
> based accounting program called "NolaPro" which also includes the Zend
> optimizer as part of the installation. when I got finished installing this
> program and said that the Zend optimizer was not installed. I tried
> Installing this program again and the results were the same. But, trying to
> get this program is now my secondary concern.
>
> Since I have run this installation program none of the other PHP scripts that
> we have installed on this server run anymore but instead are now asking if we
> try to open them if I want to save the file to disk or open them in our PHP
> editing tools. It appears that Apache is no longer recognizing and serving
> PHP scripts.
>
> I have tried reinstalling PHP but the results are still the same. Can
> somebody please help me get back to the point where PHP is back running on
> this server?
>
> Thank you
>
> Eric H. Lommatsch
> Programmer
> MICRONix, Inc.
> 2087 South Grant Street
> Denver, CO 80210
> Tel 303-777-8939
> Fax 303-778-0378
>
> ericl
Micronix.com
>
>
attached mail follows:
I have looked at this page and and in the httpd.conf file that file had this
information in it. But when I look at the httpd2.conf file this file is
missing this information I have tried adding this information to this file I
am still getting the same result. One thing that I did notice in looking at
the httpd.conf is that these statement have an <ifdefine HAVE_PHP4> statement
around them. But that is the version of PHP that is installed on this system.
Thank you
Eric H. Lommatsch
Programmer
MICRONix, Inc.
2087 South Grant Street
Denver, CO 80210
Tel 303-777-8939
Fax 303-778-0378
ericl
Micronix.com
-----Original Message-----
From: John Nichel [mailto:john
kegworks.com]
Sent: Thursday, December 01, 2005 3:07 PM
To: php-general
lists.php.net
Subject: Re: [PHP] PHP server problem
Eric Lommatsch wrote:
> Hello,
>
> This is my first time posting to this particular list, so please be
> patient with me.
>
> I am not exactly sure if this is the right list to post this to or if
> the description of what is happening will be enough to really make
> what my questions is
>
> We have a Linux server that we use to run several PHP based programs
> on. Up until today it has been working well. Today we tried to install
> a new PHP based accounting program called "NolaPro" which also
> includes the Zend optimizer as part of the installation. when I got
> finished installing this program and said that the Zend optimizer was
> not installed. I tried Installing this program again and the results
> were the same. But, trying to get this program is now my secondary concern.
>
> Since I have run this installation program none of the other PHP
> scripts that we have installed on this server run anymore but instead
> are now asking if we try to open them if I want to save the file to
> disk or open them in our PHP editing tools. It appears that Apache is
> no longer recognizing and serving PHP scripts.
>
> I have tried reinstalling PHP but the results are still the same. Can
> somebody please help me get back to the point where PHP is back
> running on this server?
Look at steps 14 and 15 under "Example 4-1..." on this page, and ensure those
lines are in your httpd.conf
http://www.php.net/manual/en/install.unix.php
--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
jnichel
dotcomholdingsofbuffalo.com
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
attached mail follows:
Have you tried removing the <ifdefine HAVE_PHP4>
James
Eric Lommatsch wrote:
>
> I have looked at this page and and in the httpd.conf file that file had this
> information in it. But when I look at the httpd2.conf file this file is
> missing this information I have tried adding this information to this file I
> am still getting the same result. One thing that I did notice in looking at
> the httpd.conf is that these statement have an <ifdefine HAVE_PHP4> statement
> around them. But that is the version of PHP that is installed on this system.
>
> Thank you
>
> Eric H. Lommatsch
> Programmer
> MICRONix, Inc.
> 2087 South Grant Street
> Denver, CO 80210
> Tel 303-777-8939
> Fax 303-778-0378
>
> ericl
Micronix.com
>
> -----Original Message-----
> From: John Nichel [mailto:john
kegworks.com]
> Sent: Thursday, December 01, 2005 3:07 PM
> To: php-general
lists.php.net
> Subject: Re: [PHP] PHP server problem
>
> Eric Lommatsch wrote:
>
>>Hello,
>>
>>This is my first time posting to this particular list, so please be
>>patient with me.
>>
>>I am not exactly sure if this is the right list to post this to or if
>>the description of what is happening will be enough to really make
>>what my questions is
>>
>>We have a Linux server that we use to run several PHP based programs
>>on. Up until today it has been working well. Today we tried to install
>>a new PHP based accounting program called "NolaPro" which also
>>includes the Zend optimizer as part of the installation. when I got
>>finished installing this program and said that the Zend optimizer was
>>not installed. I tried Installing this program again and the results
>>were the same. But, trying to get this program is now my secondary concern.
>>
>>Since I have run this installation program none of the other PHP
>>scripts that we have installed on this server run anymore but instead
>>are now asking if we try to open them if I want to save the file to
>>disk or open them in our PHP editing tools. It appears that Apache is
>>no longer recognizing and serving PHP scripts.
>>
>>I have tried reinstalling PHP but the results are still the same. Can
>>somebody please help me get back to the point where PHP is back
>>running on this server?
>
>
> Look at steps 14 and 15 under "Example 4-1..." on this page, and ensure those
> lines are in your httpd.conf
>
> http://www.php.net/manual/en/install.unix.php
>
>
> --
> John C. Nichel IV
> Programmer/System Admin (ÜberGeek)
> Dot Com Holdings of Buffalo
> 716.856.9675
> jnichel
dotcomholdingsofbuffalo.com
>
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
> http://www.php.net/unsub.php
attached mail follows:
I cant see why you have two httpd.conf files, unless that app installed
another, in which case I would remove the <ifdefine HAVE_PHP4> block, im
sure thats only their for when/if you need to disable PHP
James
Eric Lommatsch wrote:
>
> I have looked at this page and and in the httpd.conf file that file had this
> information in it. But when I look at the httpd2.conf file this file is
> missing this information I have tried adding this information to this file I
> am still getting the same result. One thing that I did notice in looking at
> the httpd.conf is that these statement have an <ifdefine HAVE_PHP4> statement
> around them. But that is the version of PHP that is installed on this system.
>
> Thank you
>
> Eric H. Lommatsch
> Programmer
> MICRONix, Inc.
> 2087 South Grant Street
> Denver, CO 80210
> Tel 303-777-8939
> Fax 303-778-0378
>
> ericl
Micronix.com
>
> -----Original Message-----
> From: John Nichel [mailto:john
kegworks.com]
> Sent: Thursday, December 01, 2005 3:07 PM
> To: php-general
lists.php.net
> Subject: Re: [PHP] PHP server problem
>
> Eric Lommatsch wrote:
>
>>Hello,
>>
>>This is my first time posting to this particular list, so please be
>>patient with me.
>>
>>I am not exactly sure if this is the right list to post this to or if
>>the description of what is happening will be enough to really make
>>what my questions is
>>
>>We have a Linux server that we use to run several PHP based programs
>>on. Up until today it has been working well. Today we tried to install
>>a new PHP based accounting program called "NolaPro" which also
>>includes the Zend optimizer as part of the installation. when I got
>>finished installing this program and said that the Zend optimizer was
>>not installed. I tried Installing this program again and the results
>>were the same. But, trying to get this program is now my secondary concern.
>>
>>Since I have run this installation program none of the other PHP
>>scripts that we have installed on this server run anymore but instead
>>are now asking if we try to open them if I want to save the file to
>>disk or open them in our PHP editing tools. It appears that Apache is
>>no longer recognizing and serving PHP scripts.
>>
>>I have tried reinstalling PHP but the results are still the same. Can
>>somebody please help me get back to the point where PHP is back
>>running on this server?
>
>
> Look at steps 14 and 15 under "Example 4-1..." on this page, and ensure those
> lines are in your httpd.conf
>
> http://www.php.net/manual/en/install.unix.php
>
>
> --
> John C. Nichel IV
> Programmer/System Admin (ÜberGeek)
> Dot Com Holdings of Buffalo
> 716.856.9675
> jnichel
dotcomholdingsofbuffalo.com
>
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
> http://www.php.net/unsub.php
attached mail follows:
I tried removing the <ifdefine HAVE_PHP4> block and the result with the
applications that we have installed is still the same. Just for testing
purposes I created a simple "Hello World" php script and tried running this
from this system and this appears to have run correctly. But any of the more
complex scripts appear not to work.
Thank you
Eric H. Lommatsch
Programmer
MICRONix, Inc.
2087 South Grant Street
Denver, CO 80210
Tel 303-777-8939
Fax 303-778-0378
ericl
Micronix.com
-----Original Message-----
From: James Benson [mailto:jb
jamesbenson.co.uk]
Sent: Thursday, December 01, 2005 3:45 PM
To: php-general
lists.php.net
Subject: Re: FW: [PHP] PHP server problem
I cant see why you have two httpd.conf files, unless that app installed
another, in which case I would remove the <ifdefine HAVE_PHP4> block, im sure
thats only their for when/if you need to disable PHP
James
Eric Lommatsch wrote:
>
> I have looked at this page and and in the httpd.conf file that file
> had this information in it. But when I look at the httpd2.conf file
> this file is missing this information I have tried adding this
> information to this file I am still getting the same result. One thing
> that I did notice in looking at the httpd.conf is that these statement
> have an <ifdefine HAVE_PHP4> statement around them. But that is the version
of PHP that is installed on this system.
>
> Thank you
>
> Eric H. Lommatsch
> Programmer
> MICRONix, Inc.
> 2087 South Grant Street
> Denver, CO 80210
> Tel 303-777-8939
> Fax 303-778-0378
>
> ericl
Micronix.com
>
> -----Original Message-----
> From: John Nichel [mailto:john
kegworks.com]
> Sent: Thursday, December 01, 2005 3:07 PM
> To: php-general
lists.php.net
> Subject: Re: [PHP] PHP server problem
>
> Eric Lommatsch wrote:
>
>>Hello,
>>
>>This is my first time posting to this particular list, so please be
>>patient with me.
>>
>>I am not exactly sure if this is the right list to post this to or if
>>the description of what is happening will be enough to really make
>>what my questions is
>>
>>We have a Linux server that we use to run several PHP based programs
>>on. Up until today it has been working well. Today we tried to install
>>a new PHP based accounting program called "NolaPro" which also
>>includes the Zend optimizer as part of the installation. when I got
>>finished installing this program and said that the Zend optimizer was
>>not installed. I tried Installing this program again and the results
>>were the same. But, trying to get this program is now my secondary concern.
>>
>>Since I have run this installation program none of the other PHP
>>scripts that we have installed on this server run anymore but instead
>>are now asking if we try to open them if I want to save the file to
>>disk or open them in our PHP editing tools. It appears that Apache is
>>no longer recognizing and serving PHP scripts.
>>
>>I have tried reinstalling PHP but the results are still the same. Can
>>somebody please help me get back to the point where PHP is back
>>running on this server?
>
>
> Look at steps 14 and 15 under "Example 4-1..." on this page, and
> ensure those lines are in your httpd.conf
>
> http://www.php.net/manual/en/install.unix.php
>
>
> --
> John C. Nichel IV
> Programmer/System Admin (ÜberGeek)
> Dot Com Holdings of Buffalo
> 716.856.9675
> jnichel
dotcomholdingsofbuffalo.com
>
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
> http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
attached mail follows:
What are the server types like Apache IIS or something else?
i am asking because the webserver might not give the PHP script all the data
from the browser like browser name and stuff...
On 11/30/05, Peppy <peppy
foxedge.net> wrote:
>
> Short tags are on on both servers.
>
> ----- Original Message -----
> From: <replies-lists-php
listmail.innovate.net>
> To: "Peppy" <peppy
foxedge.net>
> Sent: Wednesday, November 30, 2005 2:23 PM
> Subject: Re: [PHP] script won't work on other server
>
>
> > you're using the short-tag form:
> >
> > <?
> >
> > rather than:
> >
> > <?php
> >
> > this may not be supported on both machines.
> >
> > haven't looked at other aspects of the script.
> >
> >
> > ------------ Original Message ------------
> > > Date: Wednesday, November 30, 2005 02:15:47 PM -0600
> > > From: Peppy <peppy
foxedge.net>
> > > 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
> > >
> > >
> >
> > ---------- End Original Message ----------
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!
attached mail follows:
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 -----
From: "Unknown Unknown" <phpinfolist
gmail.com>
To: "Peppy" <peppy
foxedge.net>
Cc: <php-general
lists.php.net>
Sent: Thursday, December 01, 2005 4:08 PM
Subject: Re: [PHP] script won't work on other server
What are the server types like Apache IIS or something else?
i am asking because the webserver might not give the PHP script all the data
from the browser like browser name and stuff...
On 11/30/05, Peppy <peppy
foxedge.net> wrote:
>
> Short tags are on on both servers.
>
> ----- Original Message -----
> From: <replies-lists-php
listmail.innovate.net>
> To: "Peppy" <peppy
foxedge.net>
> Sent: Wednesday, November 30, 2005 2:23 PM
> Subject: Re: [PHP] script won't work on other server
>
>
> > you're using the short-tag form:
> >
> > <?
> >
> > rather than:
> >
> > <?php
> >
> > this may not be supported on both machines.
> >
> > haven't looked at other aspects of the script.
> >
> >
> > ------------ Original Message ------------
> > > Date: Wednesday, November 30, 2005 02:15:47 PM -0600
> > > From: Peppy <peppy
foxedge.net>
> > > 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
> > >
> > >
> >
> > ---------- End Original Message ----------
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!
attached mail follows:
---------- Forwarded message ----------
From: Unknown Unknown <phpinfolist
gmail.com>
Date: Dec 1, 2005 8:26 PM
Subject: Re: [PHP] script won't work on other server
To: Peppy <peppy
foxedge.net>
execute this code:
print_r($_SERVER);
on a page, what is the result?
On 12/1/05, Peppy <peppy
foxedge.net> 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 ----- From: "Unknown Unknown" <phpinfolist
gmail.com
> >
> To: "Peppy" <peppy
foxedge.net >
> Cc: <php-general
lists.php.net >
> Sent: Thursday, December 01, 2005 4:08 PM
> Subject: Re: [PHP] script won't work on other server
>
> What are the server types like Apache IIS or something else?
> i am asking because the webserver might not give the PHP script all the
> data
> from the browser like browser name and stuff...
>
>
> On 11/30/05, Peppy < peppy
foxedge.net> wrote:
> >
> > Short tags are on on both servers.
> >
> > ----- Original Message -----
> > From: < replies-lists-php
listmail.innovate.net>
> > To: "Peppy" < peppy
foxedge.net>
> > Sent: Wednesday, November 30, 2005 2:23 PM
> > Subject: Re: [PHP] script won't work on other server
> >
> >
> > > you're using the short-tag form:
> > >
> > > <?
> > >
> > > rather than:
> > >
> > > <?php
> > >
> > > this may not be supported on both machines.
> > >
> > > haven't looked at other aspects of the script.
> > >
> > >
> > > ------------ Original Message ------------
> > > > Date: Wednesday, November 30, 2005 02:15:47 PM -0600
> > > > From: Peppy < peppy
foxedge.net>
> > > > 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
> > > >
> > > >
> > >
> > > ---------- End Original Message ----------
> > >
> > >
> >
> > --
> > PHP General Mailing List ( http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!
>
--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!
--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!
attached mail follows:
Echo should be echo and also are you sure that you have those tables and
databases?? make some DB's called table1 and table 2 and in that make tables
db1 and db2 that might work...
On 12/1/05, Ahmed Saad <ahmed.lists
gmail.com> wrote:
>
> On 12/1/05, Albert <albert
fastworx.com> wrote:
> > The downside of this is that you do not have persistent connections
> which
> > last beyond the end of the script.
>
> Maybe it's not a real downside :)
> http://wordpress.org/support/topic/42389
> and
> http://www.mysql.com/news-and-events/newsletter/2002-11/a0000000086.html
>
> -ahmed
>
--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!
attached mail follows:
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?
Thanks,
Bing
attached mail follows:
Store the last time someone accessed their session into the $_SESSION
array then when requesting a protected page just check x amount of time
has not passed, if x amount has time has passed redirect to a login page
or re-enter their user password
small example you would use on the top of every page,
session_start();
if(isset($_SESSION['timeout'])) {
if(time() > $_SESSION['timeout']) {
// session has expired, redirect to login...
} else {
// reset the timeout time...
$_SESSION['timeout'] = time() + 3600;
}
} else {
$_SESSION['timeout'] = time() + 3600;
}
James
Adrian Bruce wrote:
> Hi
>
> I currently use an automatic logout out system that sets a time out in
> two ways.
>
> (If the ip address on computer is recognized then set timeout to 10
> mins, if not then set to 2 mins.)
>
> 1) The time out setting is used to create a meta refresh tag that will
> re-direct the user to the logout page after X seconds. 2) At the
> beginning of each page i set a variable with the current time and check
> to see if the difference between the previously set variable and the now
> current time is greater than X seconds, if so then log the user out.
> I know meta refresh is not to be relied on and that is why i use the 2nd
> method as well, but i have had varied reports that this system does not
> work, i.e. it logs people out to quickly.
> Does anyone know a better way of doing this or improvements?? it would
> also be nice to stop the pages displaying after a time out when a user
> presses the back button!
>
> Thanks a lot in advance
>
> Adrian
attached mail follows:
"it would also be nice to stop the pages displaying after a time out
when a user
presses the back button!"
For that you would need to destroy the session data, use session_destroy();
http://php.net/session_destroy
attached mail follows:
Hi,
How can I get the form values submitted from an iframe where the target is
the parent window?
attached mail follows:
Like you do it if the target was the same window? PHP doesn't know which
window is the target..
--
// DvDmanDT
mail: dvdmandt¤telia.com
msn: dvdmandt¤hotmail.com
""Shaun"" <shaunthornburgh
hotmail.com> skrev i meddelandet
news:1B.6B.14828.CA68F834
pb1.pair.com...
> Hi,
>
> How can I get the form values submitted from an iframe where the target is
> the parent window?
attached mail follows:
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.
attached mail follows:
Hi Greg,
On 12/1/05, Greg Donald <destiney
destiney.com> wrote:
> Do you still have to reassign the data in the view for use in the
> template after having already created it once in the action? That is
> quite the pain.
in View::execute() you can quickly import all request parameters or
attributes into your template...
for parameters, use View::importAttributes() (yes the name is correct)
for attributes use $this->setAttributes($request->getAttributes());
be sure to check out the latest SVN version for many bugfixes and enhancments
-ahmed
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]