Re: [PHP] MySQL connect used to work PLUS errors not displaying

2007-08-24 Thread comex
On 8/24/07, Linux NG/Lists [EMAIL PROTECTED] wrote:

 b) Why does the error reporting NOT work as soon as I jam a $db new
 mysql call into the code?
Because you disabled it with an '@'.

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



Re: [PHP] HN CAPTCHA at http://www.phpclasses.org

2006-02-19 Thread comex
 You got me. Where are you hiding it?

In test.js:
http://www.xn--ovg.com/no_bot/rpc.php?action=one

Unless you hide it in a different place each time, how useful is that?

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



Re: [PHP] what is the session equivalent to setcookie?

2006-01-21 Thread comex
 session_register(cookie[$food], $new $name);

$_SESSION['cookie'][$food] = $new $name;

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



Re: [PHP] Str to Int

2006-01-20 Thread comex
 if ($cardID=''||is_int($cardID))

Two problems with that statement:
First of all, this statement _sets_ cardID to '', and then (I think)
returns a false value since '' doesn't evaluate to true.  You probably
wanted ==.
Second of all, now that $cardID is '', it certainly isn't an int.  It
isn't an int, and it wouldn't be an int if you fixed that statement
because is_int only tests if it is, actually, an integer. 
$HTTP_GET_VARS['cardID'] could be '123', but it can't be 123 and so
that will be false.  From the PHP manual:

Note:  To test if a variable is a number or a numeric string (such
as form input, which is always a string), you must use is_numeric().

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



Re: [PHP] Re: Using GPG in Safe Mode

2006-01-17 Thread comex
 If you are using gnupg comand line, there is not way on PHP-safe mode.

I think it's possible to create a shell script that the PHP script can
call and get around safe_mode that way.

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



Re: [PHP] question about compositing objects

2006-01-12 Thread comex
 $map=new Map();
$this-map = new Map();

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



Re: [PHP] Re: Set variable outside of scope (redo)

2006-01-05 Thread comex
  if ($row[range] != )
This should be $row['range'], not $row[range], although it doesn't
make a difference unless you define a constant named range.


Your problem isn't actually scope, it's that your PHP script is being
called twice.  Once to show the form, once to submit it.  The second
time, your script doesn't have any of the things you set the first
time.

input type=\hidden\ name=\id\ value=\$row[id]\ /

If you put that in your delete form, you could use $_POST['id'] to get
the proper id.

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



Re: [PHP] Callbacks in XML Parser

2005-12-17 Thread comex
 xml_set_element_handler($this-xmlParser, $this-startTag,
 $this-endTag);
xml_set_element_handler($this-xmlParser, array($this, 'startTag'),
array($this, 'endTag'));

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



Re: [PHP] setcookie doesn't save session properly

2005-12-16 Thread comex
 I'm using
 setcookie($sessionName, $sessionid, time()+60*60*24*1,
 $sessionCookie['path'], $sessionCookie['domain'],
 $sessionCookie['secure']);

 to, obviously, store a session.
 Also, I only use session_start() so perhaps I'm supposed to call
 session_id()?

I'm not sure why the cookie is being mis-saved, but sessions ARE
supposed to save the cookies automatically.

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



Re: [PHP] When using foreach(), how to use $value in php 4??

2005-12-14 Thread comex
XmlTreeCDataAsciiLoopThrough($value);
This should work:
XmlTreeCDataAsciiLoopThrough($tree[$key]);

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



Re: [PHP] When using foreach(), how to use $value in php 4??

2005-12-14 Thread comex
What?  Why is this on the top of my email if it's two months old?

Sorry everyone for replying to a dead topic, I think.  That or the
original poster has a messed up system clock.

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



Re: [PHP] Sending $_GET directly to AJAX

2005-12-13 Thread comex
 But when I try to set the variables again for AJAX to use after a
 timeout, nothing happens and it only displays what is called (RSD:
 received) AJAX debug mode. Which seems to be the answer to AJAX question.

As far as I know, AJAX is just the use of the Javascript
XMLHttpRequest object to make HTTP requests of the server; it looks
like you have some AJAX framework that tries to automate things.  Can
you be more specific about what you're using?

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



Re: [PHP] Class Constant PHP 5

2005-12-07 Thread comex
 It would be foolish (and would fail anyhow) to do something like this;
Nope. :P
?php
define(RANDOM, rand(5,12));
var_dump(RANDOM);
?
int(12)

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



Re: [PHP] Preventing Cross Site Scripting Vulnerbilities

2005-12-07 Thread comex
 Similarly is there a library function for escaping database content for
 inclusion in HTML pages?
http://php.net/htmlspecialchars
http://php.net/htmlentities

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



Re: [PHP] Urlencode vs htmlentities

2005-12-06 Thread comex
 Should I use htmlentites on $top first?

AFAIK, all of what you said is correct except for that, where you
should use htmlentities(urlencode($top)).

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



Re: [PHP] Count and Preg_Replace Using Version 4.4.1

2005-12-04 Thread comex
 form'.$count.'...
You can use preg_replace_callback or the e pattern modifier to let you
run php code for the replacement:
http://us3.php.net/manual/en/function.preg-replace-callback.php
http://us3.php.net/manual/en/reference.pcre.pattern.modifiers.php

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



Re: [PHP] Security/$_REQUEST vars... How do you do it?

2005-12-03 Thread comex
 if((isset($_REQUEST['sub']))  (!empty($_REQUEST['sub']))) {
empty is a language construct, not a function, so that is not
necessary.  You can just do !empty(...).


 $error = false;
  return $error;
In your security_check function, you set $error to false in the
beginning for no reason; in fact, you don't need to use it all.  You
could return false or return true, or simply
return !empty($x);

However, that doesn't actually work because when you call the
function, it assumes that $_REQUEST[whatever] is defined and could
cause a notice if it isn't; and $x will always be defined, even if set
to null.

Since your variables are coming from REQUEST anyway, you could write
it like this:
function security_check($x) {
 return !empty($_REQUEST[$x]);
}

Then, if(!security_check('sub')) { ... }

Of course, there are people who can be more helpful and will probably
tell you to do more than just check if the variable exists.

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



Re: [PHP] Security/$_REQUEST vars... How do you do it?

2005-12-03 Thread comex
 Oh, do you mean that I should do this instead:
No, I meant that you don't have to include the isset at all.  From the manual:

empty() is the opposite of (boolean) var, except that no warning is
generated when the variable is not set.

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



Re: [PHP] Re: Can't execute external program

2005-11-23 Thread comex
 Hi
 Still desperate

Try adding 21 to the command line; maybe that will show an error.

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



Re: [PHP] a code question..??

2005-11-11 Thread comex
 would the approach be to use an iframe, and some sort of ajax code, to allow
 the user to interact with the dialog/code within the iframe. keep in mind,
 that the code within the iframe would be running on the remote server...

Sorry, I had forgotten the content of the original question.  If what
you want is a login dialog, then it would probably be easiest to make
your own login form, then use CURL (or HttpClient
(http://scripts.incutio.com/httpclient/index.php), which doesn't
require anything external) like the other posters suggested when the
form is submitted, to pretend to be a person filling out app B's login
dialog.

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



Re: [PHP] a code question..??

2005-11-10 Thread comex
 in your example, wouldn't app A, essentially download the code from app B,
 and run the source on app A? or would the code be run on app B, with the
 resulting html/content/page being transferred to app A?

If the PHP file has a .php extension, it will be run on the webserver
like any PHP page.  If it is .txt or you set Apache directives, etc.,
it will be transferred to the client app.

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



Re: [PHP] a code question..??

2005-11-10 Thread comex
 the app B server would then return a result, based on the user input... i'm
 trying to figure out how to essentially allocate a section of the page, to a
 remote application. after i've finished with the remote stuff, the user
 could go ahead and select other items/buttons on the page that are in the
 current environment

You could just use an iframe...

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



Re: [PHP] How can I track the value in php

2005-11-05 Thread comex
 in my index page, I firstly inlcude_once a A.php file, where i defined an
 array, secondly I include another .php file named B.php, where I want to use
 the array, I have claimed it as global type, but it seems I can't retrieve
 any value from the array.

When you include a PHP file, it will be executed in the current
context (AFAIK).  If you're not including it from a function, then it
should be global automatically.  The global keyword makes variables in
functions global.

Maybe this is obvious, but are you sure you have ?php in the B.php?

What does var_dump($xxx); say, if $xxx is the array name?

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



Re: [PHP] Re: Pictureupload

2005-11-03 Thread comex
 if (isset($_POST['submit'])) //If you push the submit-button
Maybe the user pressed ENTER instead of clicking the button.

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



Re: [PHP] Using Ajax to spit out a php-generated embed tag

2005-10-30 Thread comex
 Can you use AJAX to output an entire php-generated
 embed tag into a web page?

You could use XMLHttpRequest's responseText property with innerHTML,
which is probably easier than using XML.

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



Re: [PHP] Re: Using DOM object, how?

2005-09-19 Thread comex
  $dom = new DOMDocument('1.0', 'iso-8859-1');
Shouldn't this be
  $this-dom = new DOMDocument('1.0', 'iso-8859-1');
?

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



Re: [PHP] How to suppress HTTP headers?

2005-08-18 Thread comex
 2) While the 'q' switch (php -q) is necessary and sufficient to suppress
 HTTP header generation using the CLI ('command line interface'), it is not
 clear to me how to apply this switch in a CGI configuration. Any ideas?
I believe that switch works on CGI, and that in CLI headers are
surpressed by default.

$ php-cgi
test
Content-type: text/html
X-Powered-By: PHP/4.3.10-15

test

$ php
test
test

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



Re: [PHP] display error line in object method

2005-08-10 Thread comex
On 8/10/05, Georgi Ivanov [EMAIL PROTECTED] wrote:
 Hi,
 I have a db wrapper class.
 I use it like this :
 $db-query(SQL HERE) or die ($db-error());
 Is there a way to display the line on which $db-error() is executed without
 doing die (__LINE__. .$db-error() )?

http://us3.php.net/debug_backtrace
Wouldn't that work?

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



Re: [PHP] define (true/false)

2005-07-27 Thread comex
 i never really used constants before so this may sound stupid..
 when you define a constant using define() and want to return true/false
 is this logical:

http://us2.php.net/defined

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



Re: [PHP] Is there any way that PHP will issue a warning when using undeclared vars?

2005-01-02 Thread Comex
 Is there any way at all to control this? I went into my PHP.ini file,
 but my errors are set to E_ALL  E_STRICT which seems to be the
 highest level I can set.

That error generates an E_NOTICE.

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



Re: [PHP] A serious bug? or operator gives out diffferent results depending on order of operands

2004-12-23 Thread Comex
Uh.. $y is  5.

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



Re: [PHP] Re: Recursion to sanitize user input

2004-10-08 Thread Comex
The recursion doesn't do anything with the returned value from the function.

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



Re: [PHP] Recursion to sanitize user input

2004-10-08 Thread Comex
 foreach ( $userInput as $key = $value )
   {
$newvalue[$key] = sanitize( $value );
   }
return $newvalue;

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



Re: [PHP] php4 and php5 on the same apache server

2004-09-13 Thread Comex
It is possible if one is CGI.

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



Re: [PHP] Re: Broken data within an Array

2004-09-01 Thread Comex
That still makes no sense..

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



Re: [PHP] Re: xml tags interfere with php tags

2004-09-01 Thread Comex
?='?xml version=1.0?'?

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



Re: [PHP] Re: Broken data within an Array

2004-08-31 Thread Comex
What is $result?

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



Re: [PHP] Re: Embedding JavaScript into a PHP generated web page

2004-07-25 Thread Comex
That wouldn't include newlines..

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



Re: [PHP] Weeeeee! ;)))

2004-07-24 Thread Comex
but there isn't any archive..

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



Re: [PHP] PHP Form Field Validation

2004-07-18 Thread Comex
not enough =s.

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



[PHP] Re: servers in php

2004-03-14 Thread Comex
On Sat, 13 Mar 2004 19:06:38 -0500, Comex [EMAIL PROTECTED] wrote:

I was wondering how to go about making a server in PHP that would accept 
multiple connections..in windows, so I can't use forks.  I'd need to 
call the program from itself but I don't know how the listening works.


I found an example from the Zend mailing list that allowed this by looping 
through the clients..thanks.

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


Re: [PHP] servers in php

2004-03-13 Thread Comex
On Sun, 14 Mar 2004 01:15:32 +0100, Norbert Pfeiffer [EMAIL PROTECTED] 
wrote:

Hi Comex,

forget Win-PHP, it only scarcely to 60% of the
functions are supported. Everything which with
Sockets, Pipes or the like to do has, became
omitted.
m. b. G. Norbert
_
normal:  02686-987103
Notruf:  0177-2363368
-
e.o.m.


Sockets work fine..I just don't get how to accept multiple connections.

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


[PHP] servers in php

2004-03-13 Thread Comex
I was wondering how to go about making a server in PHP that would accept 
multiple connections..in windows, so I can't use forks.  I'd need to call 
the program from itself but I don't know how the listening works.

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


Re: Re[4]: [PHP] problems with spam

2004-02-17 Thread Comex
[EMAIL PROTECTED]
Richard Davey:
 Hello mayo,

 Monday, February 16, 2004, 3:51:30 PM, you wrote:

 m As for my email being harvested because I wrote it out
 m ([EMAIL PROTECTED]). Well I'll change it to
 m something else. :-)

 There are other ways - spam bots can actually subscribe to the list
 and then just reap the email address of anyone who posts. Or of course
 just scan the web version of the list archives.

 m As it is members of one listserv has gotten swamped. The response
 there was m a deluge of me too!

 I bet. It's annoying, but not as annoying as when you post to the list
 and get a stack of Delivery Reports, Out of office replies, user
 mailbox full errors and various other things back again from the
 actual subscribers.

The only way to get rid of it would be to use the newsgroup version.

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



Re: [PHP] Problems with authentication (I think)

2004-02-17 Thread Comex
[EMAIL PROTECTED]
Leif Gregory:
 Hello Leif,

 Monday, February 16, 2004, 7:13:30 PM, you wrote:
PHPTest http://www.resynthesize.com/code/phptest_info.php

 Just a followup. I found out that the PHPTest showing just a blank
 page was a mistype in my config.inc.php file. It now shows me the
 login screen, but when I login it does not do it. If I create a new
 user via the PHPTest interface, it does indeed create the new user,
 but I can't login with that one either.

 I know I'm asking about a specific app here, but the problem spans a
 few apps, and the problem is the same with all of them (namely,
 authentication won't work).

 Thanks again.


 Cheers,
 Leif Gregory


What does phpinfo say?

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



Re: [PHP] Headers Again

2004-02-17 Thread Comex
[EMAIL PROTECTED]
Petcol:
 Jason,

 What I shock, 307,000 entries returned.

 Maybe someone with ability greater or other than I, should give some
 serious consideration to a solution or work around.

 I've been using ColdFuion for 7 years and I can do a cflocation
 url=anotherlocation.htm anywhere in the page, no matter if I've
 run CFML, Javascript it still works.

 Sorry I'm just frustrated.

 Regards
 Col


Put ob_start(); in the beginning of the script.

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



[PHP] 12 seconds!?!?

2003-12-01 Thread Comex
I have a script that replicates a human on a message board, and its logs
(logging in, going to inventory, etc.) occur every 12 (no more no less)
seconds.  Do you know why?

function sendreq($addy,$type,$content = ,$cookie =
,$useragent=,$host=---) {
$msg = strtoupper($type); // get or post
$msg .=  ;
$msg .= $addy;
$msg .=  HTTP/1.1\r\n;
$msg .= Host: $host\r\n;
$msg .= User-agent: $useragent\r\n;
if($cookie != ) $msg .= Cookie: $cookie\r\n;
if (strtolower($type) == 'post') {
$msg .= Content-type: application/x-www-form-urlencoded\r\n;
$msg .= Content-length: ;

$msg .= strlen($content);
$msg .= \r\n\r\n;
$msg .= $content;
} else {
$msg .= \r\n;
}

//message is prepared!

$fp = fsockopen ($host, 80, $errno, $errstr, 30);
if (!$fp) {
die($errstr ($errno)br\n);
} else {
fputs ($fp, $msg);
while (!feof($fp)) {
$result.= fgets ($fp);
}
fclose ($fp);
}
return $result;

}
function extractcookie($result) {
preg_match_all(!Set-Cookie: (.*);!,$result,$matches);

$matches = $matches[1];

return $matches[count($matches)-1];
}

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



Re: [PHP] Add Reply-To to this list(s)

2003-11-25 Thread Comex
[EMAIL PROTECTED]
Dave G:
   This is, I suppose, a completely off topic thread. However, I just
 read the web page
 http://www.unicom.com/pw/reply-to-harmful.html
 and I was completely unconvinced.

Yes, I do use OE which is completely broken.  And no I don't have to.  Oh
well.  I still agree with that web page, and while I was partly convincedd
that reply-to should be added that page really changed my mind.  In OE, to
break the reply-to rule - it's called reply-to.  That means you're supposed
to reply to that. - I must manually copy and paste the headers.  Of course,
I use the news server anyway so this doesn't apply to me.  But even so.
-- 
Comex

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



[PHP] Re: is it safe to store username and password for mysql connection in session variables?

2003-11-23 Thread Comex
[EMAIL PROTECTED]
Anders Thoresson:
 Hi,

   In the ini-files for my php-projects, I store various settings. Two
 of them is username and password for my mysql-connections.

   Is it safe to load these two into session variables when a user
 logs in to my application? Or is it better to access the ini-file
 each time a mysql-connection is needed?

   What I don't understand, and hence the questions, is wether session
 variables are accessible by my website's visitors, or just to the
 php-scripts on the server.

AFAIK only to the scripts.  But then again it's always good to be secure.
Read the ini file.

-- 
Comex

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



Re: [PHP] Setting up PHP5 alongside PHP4 on apache

2003-11-04 Thread Comex
[EMAIL PROTECTED]
Eugene Lee:
 On Tue, Nov 04, 2003 at 11:41:45AM +0200, Luke van Blerk wrote:

 I currently have Apache 2 (port 8080) setup with PHP 5 which can run
 simultaneously with the Apache 1.3.28 (port 80) and PHP4, but I'd
 like to find out if they can both run on the same Apache. I don't
 think its possible to specify diferrent locations of your php.ini
 file though for each PHP (on Windows that is).

 I don't know if this is possible as there are probably lots of symbol
 conflicts between PHP4 and PHP5.

It is.  I have it set up on Windows.

See this post:

[EMAIL PROTECTED]
Adam Plocher:
 Hello, I'm using Apache 2.0 on a Linux box and I'm trying to figure
 out how to run PHP5 (beta2) and PHP4 co-existantly.  I have compiled
 both of them with --enable-versioning, but I can't figure out what I
 need to put in my httpd.conf to make it differentiate the two
 versions.

 Ideally I would like php5 to be enabled for certain virtualhosts, and
 php4 for others.  But using .php5 file extensions would be acceptable
 too.

 I have compiled PHP4 and PHP5 with the following configure options:
 './configure' '--with-apxs2=/home/httpd/bin/apxs'
 '--with-mysql=/home/mysql' '--enable-track-vars'
 '--enable-versioning'

 Thanks in advance

 -Adam

I have this set up...

LoadModule php5_module C:/php5/sapi/php4apache2.dll
ScriptAlias php C:php
AddType application/x-httpd-php .php5
AddType application/x-httpd-php4 .php
Action application/x-httpd-php4 /php/php.exe

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



Re: [PHP] Setting up PHP5 alongside PHP4 on apache

2003-11-04 Thread Comex
[EMAIL PROTECTED]
Marek Kilimajer:
 Comex uses this configuration

Oops.  I didn't see this post.

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



Re: [PHP] Setting up PHP5 alongside PHP4 on apache

2003-11-04 Thread Comex
[EMAIL PROTECTED]
Comex:
 ScriptAlias php C:php
It copied wrong:
ScriptAlias php C:/php/

Sorry for the triple post.

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



[PHP] Re: Mail Delivery Acknowledgement

2003-11-03 Thread Comex
[EMAIL PROTECTED]
[EMAIL PROTECTED]:
 Thank you for contacting me

 Your e-mail has been forwarded to the appropriate person Mr. Imran
 Asghar.

 We welcome all comments and suggestions.

 Due to the high volume of e-mails received, not all e-mails are
 responded to directly.

 All e-mails that are responded to are handled in the order in which
 they are received.  If you need more immediate information or
 assistance, call us on following telephone numbers

 +92 3009467711

???

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



[PHP] Re: How to run PHP4 and PHP5 side-by-side

2003-11-02 Thread Comex
[EMAIL PROTECTED]
Adam Plocher:
 Hello, I'm using Apache 2.0 on a Linux box and I'm trying to figure
 out how to run PHP5 (beta2) and PHP4 co-existantly.  I have compiled
 both of them with --enable-versioning, but I can't figure out what I
 need to put in my httpd.conf to make it differentiate the two
 versions.

 Ideally I would like php5 to be enabled for certain virtualhosts, and
 php4 for others.  But using .php5 file extensions would be acceptable
 too.

 I have compiled PHP4 and PHP5 with the following configure options:
 './configure' '--with-apxs2=/home/httpd/bin/apxs'
 '--with-mysql=/home/mysql' '--enable-track-vars'
 '--enable-versioning'

 Thanks in advance

 -Adam

I have this set up...

LoadModule php5_module C:/php5/sapi/php4apache2.dll
ScriptAlias /php/ C:/php/
AddType application/x-httpd-php .php5
AddType application/x-httpd-php4 .php
Action application/x-httpd-php4 /php/php.exe

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



Re: [PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-20 Thread Comex
[EMAIL PROTECTED]
Curt Zirzow:
 * Thus wrote Comex ([EMAIL PROTECTED]):

 All this is is a xml, yet it breaks all xml rules, ironic as
 it sounds.

 Curt

I don't know much about XML, so clue me in.

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



[PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-17 Thread Comex
[EMAIL PROTECTED]
Bas:
 That tags? It should not be used anyway...
what???

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



Re: [PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-17 Thread Comex
[EMAIL PROTECTED]
Chris Shiflett:
 --- Comex [EMAIL PROTECTED] wrote:
 Bas:
 That tags? It should not be used anyway...
 what???

 Would you two please take this discussion elsewhere? This is about
 the tenth message that makes no sense to anyone else.

 Thank you.

 Chris

 =
 My Blog
  http://shiflett.org/
 HTTP Developer's Handbook
  http://httphandbook.org/
 RAMP Training Courses
  http://www.nyphp.org/ramp


Tenth message that makes no sense to anyone else??

Bas makes BTML.  An 'experimentally' version of HTML, in other words, a
fake markup language.

 Yes, i think that you want to know the structure of the BTML-file:

 bttag=btml
 /bttag
 bttag=title
 Title of the page
 /bttag
 bttag=text
 Here any valid HTML-MARKUP
 br
 /bttag
 bttag=image
 Path to a image
 /bttag

 This is the structure of a BTML file.

I like the idea, and make it more usable.

 Yes, thanx. I always wanted to make a version where you can use multiple
 tags of one type. And, what do you find of it? Please rate it 1 to 10

I wasn't expecting that, but...

 I don't know... lol...

I don't know what I 'find' of it.

 BTW, what should happen to text not in any tags?

I was wondering if the preg_match_all should be a preg_replace... should
text not within tags be displayed.

 That tags? It should not be used anyway...

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



Re: [PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-17 Thread Comex
Now I'm confused, because of the canceled message.


[EMAIL PROTECTED]
Chris Shiflett:
 --- Comex [EMAIL PROTECTED] wrote:
 Bas:
 That tags? It should not be used anyway...
 what???
 
 Would you two please take this discussion elsewhere? This is about
 the tenth message that makes no sense to anyone else.
 
 Thank you.
 
 Chris
 
 =
 My Blog
  http://shiflett.org/
 HTTP Developer's Handbook
  http://httphandbook.org/
 RAMP Training Courses
  http://www.nyphp.org/ramp


Tenth message that makes no sense to anyone else??

Bas makes BTML.  An 'experimentally' version of HTML, in other words, a
fake markup language.

 Yes, i think that you want to know the structure of the BTML-file:
 
 bttag=btml
 /bttag
 bttag=title
 Title of the page
 /bttag
 bttag=text
 Here any valid HTML-MARKUP
 br
 /bttag
 bttag=image
 Path to a image
 /bttag
 
 This is the structure of a BTML file.

I like the idea, and make it more usable.

 Yes, thanx. I always wanted to make a version where you can use multiple
 tags of one type. And, what do you find of it? Please rate it 1 to 10

I wasn't expecting that, but...

 I don't know... ...

I don't know what I 'find' of it.

 BTW, what should happen to text not in any tags?

I was wondering if the preg_match_all should be a preg_replace... should
text not within tags be displayed.

 That tags? It should not be used anyway...

I don't know what that means.  So I ask, what???

 Would you two please take this discussion elsewhere?

Where else?  This is a PHP discussion in a PHP group!

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



[PHP] Re: Getting spam from manual notes email address...

2003-10-17 Thread Comex
[EMAIL PROTECTED]
Jon Kriek:
 Same issue here.
Is it possible to use CSS and display:none or something to mask the e-mail?

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



[PHP] Re: Use include function (newbie)

2003-10-17 Thread Comex
[EMAIL PROTECTED]
Rich Fox:
 But *why* does logic.php need html.php?

 There is no recursion issue, or endless nesting of includes, because
 html.php refers to logic.php as an action for a form... this does not
 include the logic.php code into the html.php page.

 Rich
The idea is, AFAIK, when you first start, you're on html.php.  Then, any
link goes to logic.php, which uses html.php to display its data.

That's a bit confusing.  Try either including logic.php into html.php, or
start with logic.php and never have the browser go to html.php...

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



[PHP] Re: (ANNOUNCE) codeSECURE 1.0 released - - Protecting PHP code

2003-10-17 Thread Comex
[EMAIL PROTECTED]
John Black:

 If  you have any questions...fire away, I and my partner will try our
 best to answer all questions/suggestions/criticisms etc.

Is there an actual example somewhere?

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



[PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-15 Thread Comex
[EMAIL PROTECTED]
Bas:
 Yes, thanx. I always wanted to make a version where you can use
 multiple tags of one type. And, what do you find of it? Please rate
 it 1 to 10 Comex [EMAIL PROTECTED] wrote in message

I don't know... lol...

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



[PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-15 Thread Comex
[EMAIL PROTECTED]
Comex:
 [EMAIL PROTECTED]
 Bas:
 Yes, thanx. I always wanted to make a version where you can use
 multiple tags of one type. And, what do you find of it? Please rate
 it 1 to 10 Comex [EMAIL PROTECTED] wrote in message

 I don't know... lol...

BTW, what should happen to text not in any tags?

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



Re: [PHP] Pulling variables from a URL

2003-10-14 Thread Comex
[EMAIL PROTECTED]
Daniel Guerrier:
 Who keeps telling people to use :)
 $_GET[$username]

$_GET[$username]???
http://whatever.com/whatever.php?username=blahblah=value???

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



[PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-13 Thread Comex
?php
function parseTags($file) {
  /* readfile... here */
  $filedata = file_get_contents($file);
  $tag_match =(!bttag=(\w*)\s*(.*?)\s*/bttag!is);
  preg_match_all($tag_match, $filedata, $matches);
  for ($i=0; $i count($matches[0]); $i++) {

$tagname = $matches[1][$i];
$tag['tagname'] = $tagname;
$tag['value'] = $matches[2][$i];
$tags[] = $tag;
  }
  return $tags;
}
$filename = $_GET['name'];
$bttags = parseTags($filename);
echo HTMLHEAD;
foreach($bttags as $tag) {
switch($tag['tagname']) {
case 'title':
echo TITLE . $tag['value'] . /TITLE/HEADBODY;
echo H1 . $tag['value'] . /h1br;
break;
case 'heading':
echo H1 . $tag['value'] . /h1br;
break;
case 'image':
if (!empty($tag['value'])) {
echo IMG SRC=\ . $tag['value'] . \;
}
break;
case 'text':
echo nl2br($tag['value']);
break;
case 'nl':
echo br\n;
break;
}
}


echo /body/html;


?

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



Re: [PHP] php variable

2003-10-13 Thread Comex
[EMAIL PROTECTED]
Onno Kuipers:
 Jay Blanchard wrote:
 [snip]
 $var=¨How are you¨;
 THE PROBLEM IS THAT I ALSO WANT TO USE $VAR IN SCRIPTTWO.
 [/snip]

 Pleace $var in a hidden form element.

 I tried... something like this

 input type=hidden name=var2
 value=¨?php print $var2; ?¨

 but it doesn't work. Maybe you mean something totaly different, can
 you show me what you mean.

Should work, if not use sessions.

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



Re: [PHP] PNG to GIF conversion

2003-10-12 Thread Comex
[EMAIL PROTECTED]
John Ryan:
 Loser

And believe it or
 not, the shift key is there for a reason.
Please don't flame.

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



[PHP] Re: PHP Notice: Undefined variable

2003-10-04 Thread Comex
[EMAIL PROTECTED]
Nabil:
 I got PHP Notice: Undefined variable

 Should I define always any var ?? when do I have do define a var??

 example if I want to write
 ?php
 if ($_POST['msg'] =='hi')
 {
 do something ...
 }

?php
if (!isset($_POST['msg'])) die(No message!);
if ($_POST['msg'] == 'hi')
{
// do something
}
?

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



[PHP] um...

2003-09-19 Thread Comex
[EMAIL PROTECTED]
[EMAIL PROTECTED]:
 Please contact your system administrator.


 The scanned document was deleted.


 Violation Information:
 The subject violated the content filtering rule PHP as subject is a
 malacious code - Not Allowed.  No attempt was made to repair.
umm... since it doesn't come from [EMAIL PROTECTED], spells things wrong, and
raises issues over the subject Re: [PHP-WIN] generate img with fonts..., I
think it's fake... let me know if I'm wrong.

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



[PHP] Re: um...

2003-09-19 Thread Comex
[EMAIL PROTECTED]
Comex:
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]:
 Please contact your system administrator.


 The scanned document was deleted.


 Violation Information:
 The subject violated the content filtering rule PHP as subject is a
 malacious code - Not Allowed.  No attempt was made to repair.
 umm... since it doesn't come from [EMAIL PROTECTED], spells things
 wrong, and raises issues over the subject Re: [PHP-WIN] generate img
 with fonts..., I think it's fake... let me know if I'm wrong.

Guess what, I got another one.  From posting this.

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



[PHP] Re: um...

2003-09-19 Thread Comex

 Guess what, I got another one.  From posting this.


Never mind, I see another thread. sorry

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



Re: [PHP] um...

2003-09-19 Thread Comex
[EMAIL PROTECTED]
R'Twick Niceorgaw:
because of the new PHP virus (PHP.virdrus) and opussoft's anti
virus program decided not to accept any mails that contains the
 word php.
$result = str_ireplace(PHP,P*HP,$mail);
-- 
begin  theend

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



Re: [PHP] Returns..

2003-09-19 Thread Comex
[EMAIL PROTECTED]
Marek Kilimajer:
 The space is there so it does not break some old browsers which could
 thing it is BR/ tag (yes, it does not exists). Change your logic or
   do preg_replace(array(\r\n,\n,\r), 'br', $string) instead -
 not
 tested
Why not use str_replace instead of preg_replace?

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



[PHP] Re: cookies under php 4.06

2003-09-04 Thread Comex
 sorry for kinda answering my own post... but anyway...
Or you could use header()..
http://wp.netscape.com/newsref/std/cookie_spec.html

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



Re: [PHP] Re: How can I load load Additional extensions ?

2003-08-15 Thread Comex
[EMAIL PROTECTED]
Leif K-Brooks:
 Dennis Lee wrote:

 Why it is wrong when I run php as module under apache 2.0.46 ?

 PHP and Apache 2 are currently unstable together.

They might crash on any high traffic, but they start fine, at least when
I've tried it.



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



Re: [PHP] How to get data from database with a click

2003-08-15 Thread Comex
[EMAIL PROTECTED]
Curt Zirzow:
 I'm confused, does this message have anything to do with what the
 original message, below, is asking?
I think it is the common mistake of pressing Reply instead of taking the
trouble to type in the [EMAIL PROTECTED]



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



[PHP] Re: detecting referer

2003-08-14 Thread Comex
Do not depend on the referrer, it can easily and is commonly turned off.
Creative Solutions New Media [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,

 Bit of a newbie question I guess.

 What is the best way, using php, to detect information about the referrer
to
 a page.  Is this possible/difficult using PHP?

 Thanks,

 Tim Winters
 Manager, Creative Development
 Sampling Technologies Incorporated (STI)
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 W: 902 450 5500
 C:  902 430 8498






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



Re: [PHP] [PROBLEM] Killed sshd, want to start it via PHP script.

2003-08-14 Thread Comex
[EMAIL PROTECTED]
Jason Wong:
 What I'm saying is apache/php has little part to play in system
 maintenance. Those solutions I proposed are started by root, once
 they've started they will (hopefully) ensure that sshd would be
 running, and auto-restarted whenever it is stopped (or in the case of
 using xinetd, whenever it is needed).

I think he wants to do it from Apache /only/, instead of dragging a
monitor/keyboard to the computer.  But Apache is not running as root.



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



[PHP] Re: how can I get errors to display in a browser?

2003-08-03 Thread Comex
display_errors

Jswalter [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I have a test script, with deliberate errors.

 The broswer shows nothing, blank, empty.

 It used to show errors, now it does not.

 No idea what I did to turn it off.

 Can someone tell me hoew to turn it back on?

 In my php.ini file, it says...

  error_reporting  =  E_ALL

 I thought that was what it needed.

 I guess not.

 Thanks

 walter






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



Re: [PHP] Idiot problem

2003-08-03 Thread Comex
[EMAIL PROTECTED]
Ryan A:
 everytime I
 write to the list if its with a question or with an answer I get this
 message: 

Can't you just set a message rule?

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



Re: [PHP] Re: anchor in php page

2003-07-29 Thread Comex
  is a _reserved_ word in .asp which acts like the symbol # - serving as
 the
 anchor.

Are you sure?  ASP is a server-side language, it would have to output HTML
to go to the anchor, and I don't think there /is/ any such html.



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



Re: [PHP] convert mysql datetime to unix timestamp

2003-07-28 Thread Comex
[EMAIL PROTECTED]
Chris Hayes (SENSE):
 hi,
 i have to move data from a table with a datetime (2003-05-14
 13:36:04) to a unix timestamp (e.g. 2147483647) . Any ideas?
 
 Chris

strtotime();

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



Re: [PHP] Get Local IP Address

2003-07-28 Thread Comex
[EMAIL PROTECTED]
Mark:
 For Win9x, use winipcfg instead of ipconfig.
winipcfg is a windows-based utility, which can't work with PHP.

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



[PHP] ming problems

2003-07-28 Thread Comex
This is probably the wrong list, but:
1. The ming extension won't work on PHP5 b1.  It crashes.  Apache
2.0.47/Windows.
2. It works on PHP4 though (same Apache, does that matter?) but this code:

?php
$s = new SWFShape();
$s-setLine(20, 0xff, 0, 0);

$s-drawLine(200, 0);
$s-drawLine(0, 200);
$s-drawLine(-200, 0);
$s-drawLine(0, -200);

$m = new SWFMovie();
$m-setDimension(800, 600);

$i = $m-add($s);
$i-moveTo(400, 300);

for($j=0; $j25; ++$j)
{
  $m-nextFrame();
  $i-rotate(15);
}

$m-nextFrame();

header('Content-type: application/x-shockwave-flash');


// Date in the past
/*
header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);

// always modified
header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT);

// HTTP/1.1
header(Cache-Control: no-store, no-cache, must-revalidate);
header(Cache-Control: post-check=0, pre-check=0, false);

// HTTP/1.0
header(Pragma: no-cache);
*/
$m-output();

?

turns the square around fully, and then moves it 15 degrees and then back.

And, 3. this is more about Flash than PHP, but when I uncomment the no-cache
headers, it won't let me see the movie (it offers it to download and won't
run).
-- 
?=???



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



[PHP] Re: ming problems

2003-07-28 Thread Comex
[EMAIL PROTECTED]
Comex:
 turns the square around fully, and then moves it 15 degrees and then
 back.
Whoops, I know the solution to that problem.



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



Re: [PHP] funny output

2003-07-26 Thread Comex
Chris Shiflett wrote:
--- Ryan A [EMAIL PROTECTED] wrote:

So how do i get my scripts working again? the authentication part
was working perfectly but now it just kicks me back to the login
page...
plus it looks like I am unable to set sessions properly, and i
suspect thats why i am getting kicked back to the login page.


You're probably right.

This is a wild guess, but I bet register_globals is disabled on your new host.
Check the archives for lots of good information about what this means, what you
need to do, etc. This question comes up weekly, so there should be plenty of
information.
Hope that helps.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
It's actually ENabled, from the link that he sent us.

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


Re: [PHP] Re: php5 + php4 on same server

2003-07-26 Thread Comex
Volker wrote:
hi,

you also could run two static compiled versions of apache (if apache) with
php4 and 5 compiled in, 
Possible...
but you need another ip-address to bind to
No, you can run them both on the same IP address... that's what he wanted.
- also
have to manage 2 apaches(not a problem or what? ;-)


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


Re: [PHP] Include(remote HTML file) doesn't work since upgrade

2003-07-25 Thread Comex
[EMAIL PROTECTED]
Police Trainee:
 my phpinfo output does not have that particular init
 value disable-url-fopen-wrapper. allow_url_fopen
 is enabled, safemode is off, and include_path is set
 to .:/usr/local/lib/php. further ideas?

What happens when you try to include it?  Is there an error?



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



Re: [PHP] Link acting as a submit button

2003-07-25 Thread Comex
[EMAIL PROTECTED]
Matt Palermo:
 I just remembered (I'm not sure if it makes a difference) that I am
 using frames on this page.  Does this matter at all?  Thanks.

 Matt

No, it doesn't... well it shouldn't anyway.  Check the source code of the
outputted page.  Is it exactly what you want it to be?  If not, you might
want to try using single quotes...



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



Re: [PHP] Link acting as a submit button

2003-07-25 Thread Comex
[EMAIL PROTECTED]
Matt Palermo:
 Actually, I found out what the problem is.  I have a normal submit
 button in the same page, however when I take out the submit button,
 the javascript code works fine.  When I put the submit button back
 in, I get the error again.  Is there a fix for this, or do I need to
 make the submit button into a link instead?

 Thanks,
 Matt


But you say it works in a HTML page.  So I still think you should check if
the output is right.



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



Re: [PHP] Link acting as a submit button

2003-07-25 Thread Comex
[EMAIL PROTECTED]
skate:
 what is the javascript on it? sorry, missed the start of the thread...
http://tinyurl.com/i0un

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



Re: [PHP] 4.3.3-RC1 = possible bug in in_array()?

2003-07-25 Thread Comex
[EMAIL PROTECTED]
Marek Kilimajer:
 in_array searches for a value, you suply key. This will work as you
 expect:
array_key_exists searches for a key.



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



Re: [PHP] PHP should know my data!

2003-07-25 Thread Comex
[EMAIL PROTECTED]
Step Schwarz:
 I'm trying to open a pop-up window with PHP but I keep getting an
 error. HELP!  Does anyone know if they plan to fix this
 bug in PHP5? 
LOL!

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



Re: [PHP] Link acting as a submit button

2003-07-25 Thread Comex
[EMAIL PROTECTED]
Ray Hunter:
 On Fri, 2003-07-25 at 05:30, Matt Palermo wrote:
 I just remembered (I'm not sure if it makes a difference) that I am
 using frames on this page.  Does this matter at all?  Thanks.

 Yes it matters tons with the javascript call.

 Here is some info on it...however, these questions are now javascript
 and not php...

That's only if you're going between frames, if the whole form (as usual) is
on one frame it works fine.



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



Re: [PHP] PHP should know my data!

2003-07-25 Thread Comex
[EMAIL PROTECTED]
Manoj Nahar:
 and much needed function

 debug_and_test_all_my_code();

Which is the most likely of all the functions here.



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



[PHP] Re: html and php in the same document

2003-07-25 Thread Comex
[EMAIL PROTECTED]
Bill Pilgrim:
 If php and html are to be included in the same document, does the
 document extension always have to be .php  ?
No, but /why/ do you want to change it?



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



[PHP] Re: Reading a file from another server

2003-07-25 Thread Comex
[EMAIL PROTECTED]
Thomas:
 Hi Everyone.

 I'm having problems creating code to read a file from another server.

 1.  Is this even possible?  with a secure server aswell?
 2.  I have tried using fopen()but this always gives me an
 error:

 Warning: stat failed for http://www.domain.com/test.txt (errno=2 - No
 such file or directory) in
 /home/domain/public_html/php/testphp/test.php on line 4

 this is my code:
 ?php
 $filename = http://www.domain.com/test.txt;;
 $handle = fopen ($filename, r);
 $content = fread($handle, filesize ($filename));
 fclose($handle);

 echo $content;



 can anyone help me.   I need to put this on my server, and read this
 other file form a game serverbut I can't seem to do it.

 Cheers for any help

Quote:
If PHP has decided that filename specifies a registered protocol, and that
protocol is registered as a network URL, PHP will check to make sure that
allow_url_fopen is enabled. If it is switched off, PHP will emit a warning
and the fopen call will fail.

But then again, that's not the error it gave...



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



[PHP] Re: php5 + php4 on same server

2003-07-25 Thread Comex
[EMAIL PROTECTED]
Thomas Hochstetter:
 Hi guys.

 Sorry, i know that was discussed earlier this month ... i just looked
 for the posting again in the archives ... i could only find the
 question post ... but there was an answer.

 So, how do you setup the server again to have php4 run on the :80
 port and php5 on :8080 (apache server). Does it collide?

 Thanks
 Thomas

I've done it... but you have to run one as CGI, one can be module or CGI.
To run one as CGI and one as module:

LoadModule php5_module /path/to/php4apache.dll
ScriptAlias /php/ /path/to/php4/folder/
AddType application/x-httpd-php .php5
AddType application/x-httpd-php4 .php4
Action application/x-httpd-php4 /php/php.exe (I'm using windows)

Or to run both as CGI:
ScriptAlias /php4/ /path/to/php4/folder
ScriptAlias /php5/ /path/to/php5/folder
AddType application/x-httpd-php .php5
AddType application/x-httpd-php4 .php4
Action application/x-httpd-php4 /php4/php.exe
Action application/x-httpd-php /php5/php.exe



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



Re: [PHP] Re: php5 + php4 on same server

2003-07-25 Thread Comex
[EMAIL PROTECTED]
Comex:
 [EMAIL PROTECTED]
 Thomas Hochstetter:
 Hi guys.

 Sorry, i know that was discussed earlier this month ... i just looked
 for the posting again in the archives ... i could only find the
 question post ... but there was an answer.

 So, how do you setup the server again to have php4 run on the :80
 port and php5 on :8080 (apache server). Does it collide?

 Thanks
 Thomas

 I've done it... but you have to run one as CGI, one can be module or
 CGI. To run one as CGI and one as module:

 LoadModule php5_module /path/to/php4apache.dll
 ScriptAlias /php/ /path/to/php4/folder/
 AddType application/x-httpd-php .php5
 AddType application/x-httpd-php4 .php4
 Action application/x-httpd-php4 /php/php.exe (I'm using windows)

 Or to run both as CGI:
 ScriptAlias /php4/ /path/to/php4/folder
 ScriptAlias /php5/ /path/to/php5/folder
 AddType application/x-httpd-php .php5
 AddType application/x-httpd-php4 .php4
 Action application/x-httpd-php4 /php4/php.exe
 Action application/x-httpd-php /php5/php.exe

Oh, I'm stupid!  That is how you have .php5 as php5 and .php4 as php4...  if
you're using virtual hosts, you just replace:
AddType application/x-httpd-php4 .php4
with:
AddType application/x-httpd-php4 .php

and put the AddType in the VirtualHost.



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



Re: [PHP] how to make a global scope array

2003-07-25 Thread Comex
[EMAIL PROTECTED]
Jack Lee:
 //I have an array a[] like this:

 ?php
 $a[]=0;

 //How to define and use it in a function like this?

 function myfunc(something)
 {
 echo $a[0];  //got error here Notice: Undefined variable:

 }


 //Thanks for any help.!!!

global $a;



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



  1   2   >