php-general Digest 20 Aug 2002 14:05:45 -0000 Issue 1536

Topics (messages 113283 through 113323):

Re: database value count retrieval
        113283 by: David Freeman

Re: tracking visitors till registration?
        113284 by: Randy Johnson
        113287 by: Rasmus Lerdorf
        113289 by: Daren Cotter
        113291 by: Manuel Lemos

Replicate string or something similar
        113285 by: Saci
        113286 by: Martin Towell
        113288 by: Tom Rogers
        113290 by: Tom Rogers
        113293 by: Saci
        113307 by: lallous

Re: Php page runs from one computer but not another
        113292 by: Jaskirat  Singh

Can i send post variable thur header?
        113294 by: NoWhErEMan
        113295 by: Jome
        113318 by: robert mischke

Re: fopen(http:...) problems
        113296 by: php

cURL and POST
        113297 by: Samantha Savvakis
        113306 by: lallous

<!--#exec cgi= equivalent in PHP
        113298 by: Peter Janett
        113299 by: Scott Houseman
        113301 by: Bas Jobsen

Re: array_unique & multi-dimensional arrays
        113300 by: Tim Ward
        113322 by: Tim Ward

Output problem
        113302 by: George E. Papadakis

4.04 --> 4.1.2 incompatible
        113303 by: Petre Agenbag
        113304 by: Thies C. Arntzen
        113305 by: Petre Agenbag
        113308 by: Thies C. Arntzen

Apache 2
        113309 by: Adrian Ciutureanu

Embeding images in HTML emails
        113310 by: Radu Manole
        113316 by: Michael Sims

crone job for iptc image creation
        113311 by: Sascha Braun

array_splice()
        113312 by: Riccardo Sepe

how to fight backslash in char variable???
        113313 by: Maris Kalnins
        113314 by: Michael Sims
        113315 by: Jason Wong

Apache
        113317 by: Roman Duriancik
        113320 by: David Robley

Re: halloween documents
        113319 by: Steve Mallett

POST & SID
        113321 by: simanhew

NS4.x / IE3.0 Browser Detection
        113323 by: Andre Dubuc

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---

 > >SELECT COUNT(x) FROM table;
 > >
 > >Make 'x' equal to any column name in the table and add WHERE to the
 > >clause as needed.
 > 
 >          err...all very well, but how do i retrieve the 
 > value afterwards? 

 >          $sqlcom="select count(codigo) from comments where 
 > codigo=$id";

  SELECT COUNT(codigo) AS SomeName FROM comments WHERE codigo='$id'

Then you'll have 'SomeName' to play with.

CYA, Dave



--- End Message ---
--- Begin Message ---
How do I surpress php warnings from being displayed to the screen


Randy


--- End Message ---
--- Begin Message ---
See your php.ini file.  Specifically the display_errors directive.  See
also log_errors and error_log.

-Rasmus

On Mon, 19 Aug 2002, Randy Johnson wrote:

> How do I surpress php warnings from being displayed to the screen
>
>
> Randy
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
php.ini config file

--- Randy Johnson <[EMAIL PROTECTED]> wrote:
> How do I surpress php warnings from being displayed
> to the screen
> 
> 
> Randy
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
--- End Message ---
--- Begin Message ---
On 08/19/2002 06:01 PM, Andy wrote:
> Hi there,
> 
> I am wondering if following scenario would be possible:
> 
> - Create a unique referer id to make sure that the visitior has been refered
> by a particular person. (e.g. server.com?ref=20)
> - The visitor enters the site and browses around, but the ref=20 should not
> be stored inside the url, but in a coockie
> - If the visitor signs up and there is a referer id assign the person who
> refered it some points.
> 
> The problem I see, is how to make sure that the refered id does not get lost
> and in case the person comes back another day still be able to asign the
> person who refered it the points.
> 
> Has anybody a good suggestion on that?

Cookies and volatile referer id in URL are not a good idea because many 
of them will get lost in the process and the referer looses credits. 
That is why affiliate programs like those use by Barnes and Noble are 
worthless as they hardly return any credit to the referer.

OTOH, referral tracking methods that pass the referer page by page like 
the one that Amazon uses are much more efficient because they survive 
bookmarking as the referer id is always in the URL and not in a cookie 
that may be discarded if the user only registers some other day going to 
the bookmarked pages.

The problem of Amazon method of keeping the referer id in the URL is 
that all pages that the user goes in the site have to be dynamically 
generated so the links are personalized to always include the referer id.

A better method that I use to keep track of referal, is to include the 
referer in the domain of the URL. That means instead of requiring that 
the site have a URL domain of the type, www.mydomain.com, you can have 
alias in the DNS and in the Web server configuration,
so that refererid.referertype.mydomain.com shows the same pages as 
www.mydomain.com .

This is very easy to achieve if you control your DNS and Web server 
configuration. Just make *.mydomain.com be an alias of www.mydomain.com .

 From then on, it is not important if the user registers right away or 
bookmarks the site to come back some other day. When he registers, just 
check GetEnv("HTTP_HOST") to see where he is coming.

For instance, I have an initiative that is called friends of the PHP 
Classes site. If your login name in the site is bigfriend, you just need 
to tell other people to go to http://bigfriend.users.phpclasses.org/ . 
Any URL under that domain will do.

Then I have  things like easy to paste latest classes or latest reviews 
tables that the friends of the site can use in Javascript format or XML 
format. The URLs in those tables are ready to keep tracking your user id 
if you put them in a site of yours.

Users that go to your site and use the links from those tables will tell 
the site that it was you that referred the user to the site and when he 
subscribes you are credited.

With that information, the site stores in the database and every day 
recomputes the friends of the site top charts.

http://www.phpclasses.org/browse.html/top/top.html#friends

There are also easy ways to pass referer ids by e-mail. Just login the 
site and click on the Recommend this page link that shows at the top of 
most pages.

For more details look at the page of the friends of the PHP Classes site:

http://www.phpclasses.org/friends.html

-- 

Regards,
Manuel Lemos

--- End Message ---
--- Begin Message ---
In ASP I use the expression     myvar = string(254,"A")

to have a var filled with 254 characters 'A'

What is the similar one in PHP?



--- End Message ---
--- Begin Message ---
str_repeat()

-----Original Message-----
From: Saci [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 1:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Replicate string or something similar


In ASP I use the expression     myvar = string(254,"A")

to have a var filled with 254 characters 'A'

What is the similar one in PHP?




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

Tuesday, August 20, 2002, 1:04:12 PM, you wrote:
S> In ASP I use the expression     myvar = string(254,"A")

S> to have a var filled with 254 characters 'A'

S> What is the similar one in PHP?

Try this:

$string = array();
$string = array_pad($string,254,'A');

-- 
regards,
Tom

--- End Message ---
--- Begin Message ---
Hi,

TR> $string = array();
TR> $string = array_pad($string,254,'A');

TR> -- 
TR> regards,
TR> Tom

 Ignore this I was asleep :)


-- 
regards,
Tom

--- End Message ---
--- Begin Message ---
Thank you

That's it.





--- End Message ---
--- Begin Message ---
$str = str_pad('', 254, 'A');

"Saci" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> In ASP I use the expression     myvar = string(254,"A")
>
> to have a var filled with 254 characters 'A'
>
> What is the similar one in PHP?
>
>
>


--- End Message ---
--- Begin Message ---
Hi,

"I can run the same page on the machine with the problem if I 
simply rename it."

If you could tell what the name was when it didn't work and what 
when it worked.

If by rename you mean change of extension like say from php3 to 
php then it indicates that apache config file (I am not sure for 
IIS or others) is not configured to handle that particular 
extension through php.

regards
Jaski

On Tue, 20 Aug 2002 Jonathan Black wrote :
>Hello,
>
>php 4.2.1 Internet Explorer 6.
>
>After some server upgrades at my webhoster I can see the phpinfo 
>page from a
>computer running windows 98, but not from another computer 
>running windows
>2000 server. Here I just see the php code in my browser.
>I can run the same page on the machine with the problem if I 
>simply rename
>it.
>
>The relevant url is:
>http://www.natureinfo.org.il/users/webmaster/phpnatureinfo/phpinfo.php
>
>I have tried to disable caching as you can see from the code of 
>the page
>which follows but this does not help:
>
><?php
>added by jjb due to caching problems
>
>header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
>header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
>header("Cache-Control: no-cache,must-revalidate");
>header("Pragma: no-cache");
>
>
>// Show all information, defaults to INFO_ALL
>phpinfo();
>
>
>?>
>
>Thanks
>
>Jonathan
>
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Hi all,

I want to redirect to another page and pass some post variables to that
page.
I know how to pass get variables ( just include at the end of url)
But i have no idea how to pass post variables, is it possible ?

Thanks


--- End Message ---
--- Begin Message ---
> I want to redirect to another page and pass some post variables to that
> page.
> I know how to pass get variables ( just include at the end of url)
> But i have no idea how to pass post variables, is it possible ?

You cannot do a redirect but you can send POST variables to a page without a
form. Check out the URL below.

http://www.faqts.com/knowledge_base/view.phtml/aid/12039/fid/51

  -Jome


--- End Message ---
--- Begin Message ---
Possibly you could use the header() function.

header(Content-type: application/x-www-form-urlencoded);
header(Content-length: echo $conten_length_in_byte;);
header(var=$content&var2=$conten3);

It's a gess,
didn't tryed.

Try curl 
or 
snoppy class <- at sourceforge
also at phpclasse.org a lot of dealing with http.

robert


> -----Ursprüngliche Nachricht-----
> Von: NoWhErEMan [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 20. August 2002 07:54
> An: [EMAIL PROTECTED]
> Betreff: [PHP] Can i send post variable thur header?
> 
> 
> Hi all,
> 
> I want to redirect to another page and pass some post
> variables to that page. I know how to pass get variables ( 
> just include at the end of url) But i have no idea how to 
> pass post variables, is it possible ?
> 
> Thanks
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
Why don't you try chmoding the file 777.
Next use readfile:
http://www.php.net/manual/en/function.readfile.php


--- End Message ---
--- Begin Message ---
HI,

I'm using the cURL binary to perform a HTTP POST to a web page. I am sending
XML data to this web page.

The issue I've come up against if the size of the data that I'm trying to
post and it looks like cURL is crapping out.

This is the command line that I'm currently using:

/usr/local/bin/curl -m 600 -d "$strXML" http://myurl.com/webpage.php -L -s

$strXML - variable containing the XML data. I run this command using "exec".

The return code I receive is: 127. This means a fatal error has occured with
cURL but that's all I know.

I have read the detail about using the -F option. I do not want to POST the
"file" as such, but rather the "DATA" in the file is I create a file of the
XML. The manpage for cURL states:

"-F : To just get  the content part from a file, prefix the file name with
the letter <. The difference between @ and < is then that @ makes a file get
attached in the post as a file upload, while the < makes a text field and
just  get  the contents for that text field from a file."

So I've tried going:

/usr/local/bin/curl -m 600 -F </tmp/tempfile.xml
http://myurl.com/webpage.php -L -s

/tmp/tempfile.xml - contains the XML data. This isn't working.I'm getting a
return code of "2" meaning: "Failed to initialize".

I'm at a loss. I need to post this large amount of XML data to a remote site
and don't know how to get it there.

Any ideas?

Thanks,
Sam





--- End Message ---
--- Begin Message ---
Try to post it via other than CURL,

http://Sloppycode.net  and search for clsHtmlSource.php

Good luck,
Elias
"Samantha Savvakis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> HI,
>
> I'm using the cURL binary to perform a HTTP POST to a web page. I am
sending
> XML data to this web page.
>
> The issue I've come up against if the size of the data that I'm trying to
> post and it looks like cURL is crapping out.
>
> This is the command line that I'm currently using:
>
> /usr/local/bin/curl -m 600 -d "$strXML" http://myurl.com/webpage.php -L -s
>
> $strXML - variable containing the XML data. I run this command using
"exec".
>
> The return code I receive is: 127. This means a fatal error has occured
with
> cURL but that's all I know.
>
> I have read the detail about using the -F option. I do not want to POST
the
> "file" as such, but rather the "DATA" in the file is I create a file of
the
> XML. The manpage for cURL states:
>
> "-F : To just get  the content part from a file, prefix the file name with
> the letter <. The difference between @ and < is then that @ makes a file
get
> attached in the post as a file upload, while the < makes a text field and
> just  get  the contents for that text field from a file."
>
> So I've tried going:
>
> /usr/local/bin/curl -m 600 -F </tmp/tempfile.xml
> http://myurl.com/webpage.php -L -s
>
> /tmp/tempfile.xml - contains the XML data. This isn't working.I'm getting
a
> return code of "2" meaning: "Failed to initialize".
>
> I'm at a loss. I need to post this large amount of XML data to a remote
site
> and don't know how to get it there.
>
> Any ideas?
>
> Thanks,
> Sam
>
>
>
>
>


--- End Message ---
--- Begin Message ---
I'm converting over some .shtml files that call an external Perl script with
the following format:
<!--#exec cgi= "PATH_TO_PERLSCRIPT.CGI" -->

I'm not sure what php function to use, as I'm returning the results of a
Perl script, not really a UNIX command.

Thanks,

Peter Janett

New Media One Web Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New Upgrades Are Now Live!!!
Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1
Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25,
Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PostgreSQL coming soon!

http://www.newmediaone.net
[EMAIL PROTECTED]
(303)828-9882


--- End Message ---
--- Begin Message ---
Hi Peter.

I think fopen( "http://site/PATH_TO_PERLSCRIPT.CGI"; ) should do the trick.

It will basically return the output of that script.

Hope this helps.

-Scott

-----Original Message-----
From: Peter Janett [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2002 09:47
To: [EMAIL PROTECTED]
Subject: [PHP] <!--#exec cgi= equivalent in PHP


I'm converting over some .shtml files that call an external Perl script with
the following format:
<!--#exec cgi= "PATH_TO_PERLSCRIPT.CGI" -->

I'm not sure what php function to use, as I'm returning the results of a
Perl script, not really a UNIX command.

Thanks,

Peter Janett

New Media One Web Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New Upgrades Are Now Live!!!
Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1
Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25,
Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PostgreSQL coming soon!

http://www.newmediaone.net
[EMAIL PROTECTED]
(303)828-9882



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


--- End Message ---
--- Begin Message ---
echo `PATH_TO_PERLSCRIPT.CGI 2>&1`;

Op dinsdag 20 augustus 2002 09:47, schreef Peter Janett:
> I'm converting over some .shtml files that call an external Perl script
> with the following format:
> <!--#exec cgi= "PATH_TO_PERLSCRIPT.CGI" -->
>
> I'm not sure what php function to use, as I'm returning the results of a
> Perl script, not really a UNIX command.
>
> Thanks,
>
> Peter Janett
>
> New Media One Web Services
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> New Upgrades Are Now Live!!!
> Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1
> Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25,
> Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> PostgreSQL coming soon!
>
> http://www.newmediaone.net
> [EMAIL PROTECTED]
> (303)828-9882
--- End Message ---
--- Begin Message ---
array_unique tests the values of each element of the top level array - which
are all 'array' - hence you only get one element left

the way I'd do this is ...
$archive_nav["$year/$month"] = array(month => $month, year => $year,
longmonth => $longmonth);

this will prevent duplicate combinations of month and year (and,
incidentally, allow you to sort on year and month very easily).

Tim Ward
www.chessish.com

> -----Original Message-----
> From: sasha [mailto:[EMAIL PROTECTED]]
> Sent: 19 August 2002 19:10
> To: [EMAIL PROTECTED]
> Subject: array_unique & multi-dimensional arrays
> 
> 
> I am trying to clean up some junky code in a journal/news type 
> script and redoing the archive navigation.  I am pulling all of 
> the dates of the entries and pushing it into a multi-
> dimensional array like so:
> 
> array_push($archive_nav, array(month => $month, year => $year, 
> longmonth => $longmonth));
> 
> I assumed I could just use array_unique to filter out all of 
> the duplicates in the array.  But it doesn't seem to work that 
> way, and the only month/year combo I end up with is the very 
> oldest one (according to year/month) in the array.
> 
> $archive_nav = array_unique($archive_nav);
> 
> If I leave out array_unique, I am getting all of the 
> appropriate month/year combos in my script while doing a 
> foreach... just one for every single entry in the database for 
> that combo (which is a lot in some cases!).
> 
> Is there a better way to do this?
> 
> sasha
> 
> 
> 
--- End Message ---
--- Begin Message ---
Sasha ... I'm sending this again to the list as it seemed to bounce from
your address

the way I was doing it prevents unique values from being created in the
first place. The only array that gets overwritten is one that would be the
same any way

while ($row = mysql_fetch_array($result))
{       $month = date("m", $row['timestamp']);
        $year = date("Y", $row['timestamp']);
        $archive_date = mktime(1,1,1,$month,1,$year);
        
        $archive_nav[$archive_date] = $archive_date;
}

... ensures that if the date has already been added to the array then it
overwrites the existing one instead of adding a new element.

        Tim Ward


> -----Original Message-----
> From: sasha [mailto:[EMAIL PROTECTED]]
> Sent: 20 August 2002 14:36
> To: Tim Ward
> Subject: Re: RE: array_unique & multi-dimensional arrays
> 
> 
> It may just have been that I was not putting your 
> sample code in the right location...  I had ended up 
> doing it differently than I originally intended:
> 
> while ($row = mysql_fetch_array($result)) {
>       $month = date("m", $row['timestamp']);
>       $year = date("Y", $row['timestamp']);
>       $archive_date = mktime(1,1,1,$month,1,$year);
>       
>       array_push($archive_nav, $archive_date);
> }
> $archive_nav = array_values(array_unique
> ($archive_nav));
> 
> And then later on, I do a date check on the new 
> timestamp to get the month/year/longmonth out of it.  
> Only 3 extra lines of code this way.
> 
> I don't understand exactly how your code works.  If I 
> do it inside of the while loop, it would overwrite the 
> previous contents of the array (unless I did a '.=', 
> instead of just '=').  So when I tried doing it 
> outside of the loop, all I ended up with was nothing.
> 
> thanks
> sasha
> 
> 8/20/2002 3:58:01 AM, Tim Ward 
> <[EMAIL PROTECTED]> wrote:
> 
> >array_unique tests the values of each element of the 
> top level array - which
> >are all 'array' - hence you only get one element left
> >
> >the way I'd do this is ...
> >$archive_nav["$year/$month"] = array(month => $month, 
> year => $year,
> >longmonth => $longmonth);
> >
> >this will prevent duplicate combinations of month and 
> year (and,
> >incidentally, allow you to sort on year and month 
> very easily).
> >
> >Tim Ward
> >www.chessish.com
> >
> >> -----Original Message-----
> >> From: sasha [mailto:[EMAIL PROTECTED]]
> >> Sent: 19 August 2002 19:10
> >> To: [EMAIL PROTECTED]
> >> Subject: array_unique & multi-dimensional arrays
> >> 
> >> 
> >> I am trying to clean up some junky code in a 
> journal/news type 
> >> script and redoing the archive navigation.  I am 
> pulling all of 
> >> the dates of the entries and pushing it into a 
> multi-
> >> dimensional array like so:
> >> 
> >> array_push($archive_nav, array(month => $month, 
> year => $year, 
> >> longmonth => $longmonth));
> >> 
> >> I assumed I could just use array_unique to filter 
> out all of 
> >> the duplicates in the array.  But it doesn't seem 
> to work that 
> >> way, and the only month/year combo I end up with is 
> the very 
> >> oldest one (according to year/month) in the array.
> >> 
> >> $archive_nav = array_unique($archive_nav);
> >> 
> >> If I leave out array_unique, I am getting all of 
> the 
> >> appropriate month/year combos in my script while 
> doing a 
> >> foreach... just one for every single entry in the 
> database for 
> >> that combo (which is a lot in some cases!).
> >> 
> >> Is there a better way to do this?
> >> 
> >> sasha
> >> 
> >> 
> >> 
> >
> 
> 
> 
--- End Message ---
--- Begin Message ---
Hi,

After unsuccessful try to install apache2.0.4 with php I went back to
apache1.3 and the same php config I had before.
Yet for some reason php is not working the way its supposed to.
The header function wont do a thing and no syntax errors or warnings are
shown . I guess it has to do something with output handling but I didn't
find anything on the php.ini file relative to it, in fact I used the old
php.ini file (working one).
Is there any chance this is an Apache fault ? If not what would you suggest?

Thanks.

-- georgep

--- End Message ---
--- Begin Message ---
Hi
Can someone please tell me what settings to check for on 4.1.2 in order
to ensure that scripts that runs on 4.0.4 will run on 4.1.2?

I HAVE checked registered_globals = on, but I still get variables that
are not passed on via URL and form submits.

The app has a "login" form that submits to an action page, on the action
page I generate a link that goes to another form, I append the username
and password to the end of the URL of the link on the action page, and
then create hidden fields that echo the username and password in the
subsequent form to be passed along with the extra form field to the last
page.

This whole process works 100% on 4.0.4, but breaks at the second page on
4.1.2 (ie, it DOESN't pass the username and password to the action page
from the form fields).

I need to resove this, as I have lots of applications that was written
in this way, and are currently working, but want to upgrade the server
to RedHat 7.3 that comes with 4.1.2 and don't want to end up with a
bunch of broken apps.

I know it's not the correct way to have coded, but it's done now, and
for now, I won't mind to have register_globals = On, although THAT
doesn't seem to be the solution...
Please advise.
Thanks
--- End Message ---
--- Begin Message ---
On Tue, Aug 20, 2002 at 11:28:55AM +0200, Petre Agenbag wrote:
> Hi
> Can someone please tell me what settings to check for on 4.1.2 in order
> to ensure that scripts that runs on 4.0.4 will run on 4.1.2?
> 
> I HAVE checked registered_globals = on, but I still get variables that
> are not passed on via URL and form submits.
> 
> The app has a "login" form that submits to an action page, on the action
> page I generate a link that goes to another form, I append the username
> and password to the end of the URL of the link on the action page, and
> then create hidden fields that echo the username and password in the
> subsequent form to be passed along with the extra form field to the last
> page.
> 
> This whole process works 100% on 4.0.4, but breaks at the second page on
> 4.1.2 (ie, it DOESN't pass the username and password to the action page
> from the form fields).
> 
> I need to resove this, as I have lots of applications that was written
> in this way, and are currently working, but want to upgrade the server
> to RedHat 7.3 that comes with 4.1.2 and don't want to end up with a
> bunch of broken apps.
> 
> I know it's not the correct way to have coded, but it's done now, and
> for now, I won't mind to have register_globals = On, although THAT
> doesn't seem to be the solution...
> Please advise.
> Thanks

    have you checked that register_globals _is_ actually on? just
    look at the output of phpinfo();

    re,
    tc
--- End Message ---
--- Begin Message ---
Yes, phpinfo() returns that register globals is ON...

On Tue, 2002-08-20 at 11:52, Thies C. Arntzen wrote:
> On Tue, Aug 20, 2002 at 11:28:55AM +0200, Petre Agenbag wrote:
> > Hi
> > Can someone please tell me what settings to check for on 4.1.2 in order
> > to ensure that scripts that runs on 4.0.4 will run on 4.1.2?
> > 
> > I HAVE checked registered_globals = on, but I still get variables that
> > are not passed on via URL and form submits.
> > 
> > The app has a "login" form that submits to an action page, on the action
> > page I generate a link that goes to another form, I append the username
> > and password to the end of the URL of the link on the action page, and
> > then create hidden fields that echo the username and password in the
> > subsequent form to be passed along with the extra form field to the last
> > page.
> > 
> > This whole process works 100% on 4.0.4, but breaks at the second page on
> > 4.1.2 (ie, it DOESN't pass the username and password to the action page
> > from the form fields).
> > 
> > I need to resove this, as I have lots of applications that was written
> > in this way, and are currently working, but want to upgrade the server
> > to RedHat 7.3 that comes with 4.1.2 and don't want to end up with a
> > bunch of broken apps.
> > 
> > I know it's not the correct way to have coded, but it's done now, and
> > for now, I won't mind to have register_globals = On, although THAT
> > doesn't seem to be the solution...
> > Please advise.
> > Thanks
> 
>     have you checked that register_globals _is_ actually on? just
>     look at the output of phpinfo();
> 
>     re,
>     tc
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
On Tue, Aug 20, 2002 at 12:01:24PM +0200, Petre Agenbag wrote:
> Yes, phpinfo() returns that register globals is ON...

    and does a simple testpage work?

    
    test.php
    <?php
    echo $hallo;
    ?>

    http://localhost/test.php?hallo=test

    should show a page containing the word test

    re,
    tc
> 
> On Tue, 2002-08-20 at 11:52, Thies C. Arntzen wrote:
> > On Tue, Aug 20, 2002 at 11:28:55AM +0200, Petre Agenbag wrote:
> > > Hi
> > > Can someone please tell me what settings to check for on 4.1.2 in order
> > > to ensure that scripts that runs on 4.0.4 will run on 4.1.2?
> > > 
> > > I HAVE checked registered_globals = on, but I still get variables that
> > > are not passed on via URL and form submits.
> > > 
> > > The app has a "login" form that submits to an action page, on the action
> > > page I generate a link that goes to another form, I append the username
> > > and password to the end of the URL of the link on the action page, and
> > > then create hidden fields that echo the username and password in the
> > > subsequent form to be passed along with the extra form field to the last
> > > page.
> > > 
> > > This whole process works 100% on 4.0.4, but breaks at the second page on
> > > 4.1.2 (ie, it DOESN't pass the username and password to the action page
> > > from the form fields).
> > > 
> > > I need to resove this, as I have lots of applications that was written
> > > in this way, and are currently working, but want to upgrade the server
> > > to RedHat 7.3 that comes with 4.1.2 and don't want to end up with a
> > > bunch of broken apps.
> > > 
> > > I know it's not the correct way to have coded, but it's done now, and
> > > for now, I won't mind to have register_globals = On, although THAT
> > > doesn't seem to be the solution...
> > > Please advise.
> > > Thanks
> > 
> >     have you checked that register_globals _is_ actually on? just
> >     look at the output of phpinfo();
> > 
> >     re,
> >     tc
> > 
> > -- 
> > 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

-- 
Thies C. Arnzten   -   Looking for all sorts of freelance work  -   just ask..
    Whishlist:  http://www.amazon.de/exec/obidos/wishlist/AB9DY62QWDSZ
--- End Message ---
--- Begin Message ---
Hi,

There is a note at http://www.php.net/ChangeLog-4.php for Version 4.2.0
(Note: Apache2 support is EXPERIMENTAL.)
Is it still justified?

adu



--- End Message ---
--- Begin Message ---
Hi,

Does anyone know how to embed images in HTML emails in order to avoid a
server request (no <img src="http://server/foo.img";>)?
Is this possible?

Many thanks,
Radu

--- End Message ---
--- Begin Message ---
On Tue, 20 Aug 2002 14:52:21 +0300, you wrote:

>Hi,
>
>Does anyone know how to embed images in HTML emails in order to avoid a
>server request (no <img src="http://server/foo.img";>)?
>Is this possible?

It is possible.  If you are sending a multipart MIME message, attach
the image as MIME type image/gif or image/jpeg with a particular name,
and then inside your HTML attachment reference the image like so:

<img src="cid:myimage.gif";>

I'm personally using a Perl module, MIME::Lite, as the basis for the
above.  There may be other ways to implement it.  I imagine that
Manuel Lemos' PHP Classes site has a class that would take care of
this for you...
--- End Message ---
--- Begin Message ---
Hi,

I want to build up an image library for the first time and there are some problems to 
solve.

I need to create a cron job (whatever this may be) for picking up pictures in an 
special folder and extracting the iptc text fields in the images and write them to a 
DB. On the other hand the cronejob should create jpeg preview images on the fly and 
also create small thumbnails.

I'm not the super dupa PHP Programmer and need some informations or help about doing 
this. If you got some information or scripts you would like to provide, please send me 
an email.

Ciao, Folks

Schura
--- End Message ---
--- Begin Message ---
Hi evey1,
in order to remove a whole array of values from a multidimensional array 
I tried the following:

foreach($bkmks as $val) {                             
                            if($val[8]==$cod){
                                            array_splice($bkmks,$val,1);
                                                        }
                                       }    
It works fine for all the arrays but the first ($bkmks[0]).... When I 
try to remove that array this is what I get :
Fatal error: Maximum execution time of 30 seconds exceeded in .....
.... after that if I read $bkmks all the arrays have been removed but 
$bkmks[0](the array I wanted to  remove)
Why ?
Is there a better way to do it ?

thanks again

--- End Message ---
--- Begin Message ---
Hi guys!

Situation:

$intext = "blablabla ' blablabla";
then this $intext is passed to out.php (as parameter out.php?intext=...)

the problem is that from out.php I need to echo this $intext but I get:

blablabla \' blablabla

the question is.. how to fight this backslash out of there?


Thanks, Maris


--- End Message ---
--- Begin Message ---
On Tue, 20 Aug 2002 15:13:53 +0300, you wrote:

>the problem is that from out.php I need to echo this $intext but I get:
>
>blablabla \' blablabla
>
>the question is.. how to fight this backslash out of there?

The magic_quotes_gpc setting is enabled on your server.  If you have
access to the server config, I would suggest disabling it (I find it
to be a huge pain).  If you don't, but can place PHP directives in
.htaccess files, you can disable it on a per-directory basis.  If that
option is unavailable, you'll be forced to use the stripslashes()
function on data that comes from get, post, or cookie.

HTH
--- End Message ---
--- Begin Message ---
On Tuesday 20 August 2002 20:13, Maris Kalnins wrote:
> Hi guys!
>
> Situation:
>
> $intext = "blablabla ' blablabla";
> then this $intext is passed to out.php (as parameter out.php?intext=...)
>
> the problem is that from out.php I need to echo this $intext but I get:
>
> blablabla \' blablabla
>
> the question is.. how to fight this backslash out of there?

If you want to disable this behaviour:

  php.ini -> magic_quotes_gpc

Otherwise use stripslashes()

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

/*
The idle mind knows not what it is it wants.
                -- Quintus Ennius
*/

--- End Message ---
--- Begin Message ---
Please help me with my trouble.
This is not php trouble but trouble with apache and perl scripts. How I
configure apache (httpd.conf) for running pearl script in web page. If I
create script with some name (e.g. test.pl) and if in www expoler write
http://server/test.pl result is source code of script. But I need result of
this script.

Thank you

        Roman


--- End Message ---
--- Begin Message ---
In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> Please help me with my trouble.
> This is not php trouble but trouble with apache and perl scripts. How I
> configure apache (httpd.conf) for running pearl script in web page. If I
> create script with some name (e.g. test.pl) and if in www expoler write
> http://server/test.pl result is source code of script. But I need result of
> this script.

You probably should be asking this in an Apache newsgroup or mailing list.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam
--- End Message ---
--- Begin Message ---
A plea for help....

Would anyone be willing to code the Halloween Documents so we could 
print them as PDF files????

http://opensource.org/halloween/

-- 

Steve Mallett | [EMAIL PROTECTED]
http://open5ource.net <personal>

"The more I contemplate death and my mortality, the
more it inspires me to live my life like a work of art."
                                -Brian Clifton

--- End Message ---
--- Begin Message ---
hi all,

I have a question regarding POST and SID:
I am trying to make a no-cookies browser work with session_id, according to
some tutorial, using <?=SID?> in URL is one choice.  I tried that and it
worked if it is only a hyperlink, but it DOES NOT work when I use POST.

Any one has experience in this ?

Thanks in advance,

siman


--- End Message ---
--- Begin Message ---
I need to differentiate between different versions of NS4, particularly 
the ones that are used by Mac. So far, I've used the following to detect 
variants:

if(eregi("(Mozilla/4.[0-8][0-9])",$_SERVER['HTTP_USER_AGENT']))

However, I'm aware that it will not distinguish between PC and Mac-based NS4. 
My question is: what versions of NS (if any) do Mac's use? I've used the 
following to detect IE3.0 users:

if(eregi("(mozilla/3.0)",$_SERVER['HTTP_USER_AGENT']))

Is this correct?

Any insights or advice most welcome.
Tia,
Andre
--- End Message ---

Reply via email to