Robert Cummings | 1 Dec 2003 01:21
Favicon
Gravatar

Re: Stumped

On Sun, 2003-11-30 at 18:45, Brian V Bonini wrote:
> Warning: Invalid argument supplied for foreach() in
> /usr/local/www/vhosts/pa.eastcoastbicycles.com/htdocs/mainfile.php on
> line 42
> 
> Warning: Invalid argument supplied for foreach() in
> /usr/local/www/vhosts/pa.eastcoastbicycles.com/htdocs/mainfile.php on
> line 57
> 
> 42: foreach ($_GET as $secvalue) {
> 57: foreach ($_POST as $secvalue) {
> 
> %less php.ini
> register_globals = On
> 
> %./php -i | grep -i globals
> register_globals => On => On

Which version of PHP?

Rob.
--

-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
(Continue reading)

Brian V Bonini | 1 Dec 2003 02:52
Picon

Re: Stumped

On Sun, 2003-11-30 at 19:21, Robert Cummings wrote:
> On Sun, 2003-11-30 at 18:45, Brian V Bonini wrote:
> > Warning: Invalid argument supplied for foreach() in
> > /usr/local/www/vhosts/pa.eastcoastbicycles.com/htdocs/mainfile.php on
> > line 42
> > 
> > Warning: Invalid argument supplied for foreach() in
> > /usr/local/www/vhosts/pa.eastcoastbicycles.com/htdocs/mainfile.php on
> > line 57
> > 
> > 42: foreach ($_GET as $secvalue) {
> > 57: foreach ($_POST as $secvalue) {
> > 
> > %less php.ini
> > register_globals = On
> > 
> > %./php -i | grep -i globals
> > register_globals => On => On
> 
> Which version of PHP?

Yup, that was the issue.. ;-) It was 4.0.something (old) so I installed
a 4.3.x version and it's good to go. Thanks!

--

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

David T-G | 1 Dec 2003 03:59

Re: move_uploaded_file, umask, and permissions

Hi, all --

...and then David T-G said...
% 
...
% I have set my umask to 117 (and I change it when making a directory) and
% I use move_uploaded_file to handle submitted files.
...
% Must I really run chmod() on every move_uploaded_file() I process?  Isn't
% there a better way?

Wow, it's not often that a post falls completely on deaf ears here.
Maybe I'm the first person who's ever reported this problem.  I'll be
famous!  Men of all nations will bow down before me!!!

Nah; more likely that it just isn't that important.  Does *nobody* else
have this problem, really?!?

TIA & HAND

:-D
--

-- 
David T-G                      * There is too much animal courage in 
(play) davidtg <at> justpickone.org * society and not sufficient moral courage.
(work) davidtgwork <at> justpickone.org  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Eugene Lee | 1 Dec 2003 05:24
Favicon

Re: How to see the table structure

On Sun, Nov 30, 2003 at 11:53:41PM +0530, narayanan wrote:
: 
: BlankCan any body tell how to view the structure of a table from php.
: I was thinking around for the past two days.  I am using postgresql
: database.

From the command line psql monitor, do a "\d <tablename>".

--

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

Curt Zirzow | 1 Dec 2003 06:22
Picon

Re: getting an variable value from an array entry

* Thus wrote zhuravlev alexander (zaa <at> ulstu.ru):
> 
> % cat temp.txt
> Temperature $temp degree.
> % cat temp.php
> <?php
> 
> 	$temp = '5';
>  
> 	$filename = "./temp.txt"; 
> 	$handle = fopen ($filename, "r"); 
> 	$code = fread ($handle, filesize ($filename)); 
> 	fclose ($handle);
> 	print $code."<br>";
> 	eval("\$result = \"".addslashes($code)."\";");
> 	echo $result;
> ?>

- or -

$code = file_get_contents($filename);
$result = str_replace('$temp', $temp, $code);
echo $results;

Curt
-- 
If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP

--

-- 
(Continue reading)

JeRRy | 1 Dec 2003 06:15
Picon
Favicon

RE: [PHP-DB] Dynamic Website Question!

Hi,

Okay let me explain what I want to do.

Now I have a variety of queries to do to the database
and echo's to echo out and how to output on the PHP
page.  But I am not sure how to get my code (below)
sucessfully to work in the example in the previous
email.  (found lower)  Could someone point me in the
right direction please?  I need the echo's shown in
the queries to be outputed on the page as it says. 
But I need only that part of the page to be refreshed
once every 5 seconds and not the enitre page to
reload.. Just the data from the database.

Here is my code:

<?

require('header.php');

// delete user if user=admin and action=deleteuser

        if ($username == $adminloginname AND $action
== "deleteuser")

        {

                $sql = "DELETE from user WHERE
naam='$delname'";
(Continue reading)

Curt Zirzow | 1 Dec 2003 06:33
Picon

Re: Script help about array dimension

* Thus wrote orlandopozo <at> icnet.com.ve (orlandopozo <at> icnet.com.ve):
> $array['ojpp'][1][][] = 'ferrer';
> $array['test'][0] = 'ojpp';
> $array['test'][1] = 'ferrer';
> 
> How could I do a script that give me this output:
> 
> Array
> (
>     [0] => Array
>         (
>             [0] => ojpp
>             [1] => 1
>             [2] => 0
>             [3] => 0
>         )
I'm not sure what your asking this makes no sense to me. Try and
explain what you are trying to do.

Curt
-- 
If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP

--

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

Curt Zirzow | 1 Dec 2003 06:46
Picon

Re: config/compile problems

* Thus wrote Brian V Bonini (b-bonini <at> cox.net):
> './configure' '--with-apxs=/usr/local/www/bin/apxs'
> '--with-config-file-path=/usr/local/www/etc' '--enable-versioning'
> '--with-system-regex' '--disable-debug' '--enable-track-vars'
> '--with-gd=/usr/local' '--with-freetype-dir=/usr/local'
> '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-zlib'
> '--with-imap=/usr/local' '--with-mysql=/usr/local'
> '--with-imap=/usr/local' '--prefix=/usr/local/www' 'i386--freebsd4.4'

Any reson why you have two --with-imaps's?

> 
> Couple secs into make:
> 
> /root/php-4.3.4/ext/imap/php_imap.c:342: syntax error before `QUOTALIST'

It seems you might have a issue with the version of headers found
vs the actual libraries being used. The function mail_getquota()
should only be define if you have imap2000 or imap2001 libraries.

HTH,

Curt
-- 
If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP

--

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

JeRRy | 1 Dec 2003 06:38
Picon
Favicon

Re: RE: [PHP-DB] Dynamic Website Question!

I am using frames.  As mentioned in the email(s)... If
you read it it shows 3 different php files.  One is
the index to display 1 frame and hide the second
frame.  The displaying frame has the outputed
information and a section defined to be refreshed by
the hidden frame.  The hidden frame consists of the
parameters to refresh frame showing and tell frame
showing to update a set area with updated information.

The email(s) state that, read all emails.

Jerry

 --- Jason Sheets <jsheets <at> idahoimageworks.com> wrote:
> JeRRy wrote:
> 
> >Hi,
> >
> >Okay let me explain what I want to do.
> >
> >Now I have a variety of queries to do to the
> database
> >and echo's to echo out and how to output on the PHP
> >page.  But I am not sure how to get my code (below)
> >sucessfully to work in the example in the previous
> >email.  (found lower)  Could someone point me in
> the
> >right direction please?  I need the echo's shown in
> >the queries to be outputed on the page as it says. 
> >But I need only that part of the page to be
(Continue reading)

Curt Zirzow | 1 Dec 2003 07:03
Picon

Re: move_uploaded_file, umask, and permissions

* Thus wrote David T-G (davidtg-php <at> justpickone.org):
> Hi, all --
> 
> I have set my umask to 117 (and I change it when making a directory) and
> I use move_uploaded_file to handle submitted files.
> 
> The temporary file is mode 600 when it lands in /var/tmp but somehow gets
> changed to 666 during the move.  It seems that move_uploaded_file changes
> the file perms and yet does not honor the umask.
> 
> Must I really run chmod() on every move_uploaded_file() I process?  Isn't
> there a better way?

I believe it does, move_uploaded_file() uses the current
envirionment's umask which seems to be set at an awkward stage.

what is the output of:
  echo `umask`;

I bet its '11'. I'm not sure how your system is configured but it
seems the user apache is running under has that umask set that way
which, IMO, is a bad thing (tm).

Curt
-- 
If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP

--

-- 
PHP General Mailing List (http://www.php.net/)
(Continue reading)


Gmane