[PHP] getting green screen

2003-01-20 Thread martin
Hi,
I'm somtimes getting a green screen after a PHP-app (green background and
backslashes in front of "'"-signes. When reloading this outputpage, the
normal lay-out without backslashes is visible.

Why does this happen? Can I prevent it?

Martin



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




[PHP] download script

2003-01-21 Thread Martin
i need a script that make downloads from files but it must support resuming
for getright and download acelerator pro.
Thanks...
I have this classic download script , but does not support resuming
   error_reporting(0);
   header("Last-Modified: " . gmdate("D, d M Y H:i:s T",
filemtime($filename)));
   header("Accept-Ranges: bytes");
   header("Content-Length: " . filesize($filename));
   header("Content-Disposition: attachment; filename=" . $download);
// header("Content-Type: application/octet-stream");
   readfile($filename);
   header("Connection: close");



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




[PHP] problem with header

2003-01-30 Thread Martin
i have an script, it send a header response:

http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Screen Size detect??

2003-02-01 Thread Martin
you can create a form with hidden fields like this

 

document.screendata.height.value=screen.height;
document.screendata.width.value=screen.width;
screendata.submit();







bye

"Nigel Powell" <[EMAIL PROTECTED]> escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> On a slight side note to this, how can you pass javascript variables to
> PHP via POST?
>
> Newbie Powell
>
> On Saturday, February 1, 2003, at 12:21 PM,
> [EMAIL PROTECTED] wrote:
>
> > From: "Sean Malloy" <[EMAIL PROTECTED]>
> > Date: Sat Feb 1, 2003  6:48:26 AM Europe/London
> > To: "Dade Register" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> > Subject: RE: [PHP] Screen Size detect??
> >
> >
> > Create index.htm;
> >
> > 
> > var width  = screen.width;
> > var height = screen.height;
> > window.location = 'index.php?width=' + width + '&height=' + height;
> > 
> >
> > and in index.php
> >
> > $width = $_GET['width'];
> > $height = $_GET['height'];
> >
> >
> > etc etc
>



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




[PHP] Problem with big files

2003-05-27 Thread Martin
we would like to upload large files to the server ( 20 MB ). We have changed
the configuration of php.ini in order to upload this files via http. We
changed the following parameters:

post_max_size  = 25M
file_uploads = On
upload_tmp_dir =/tmpupload
upload_max_filesize = 25M
memory_limit = 25M

also we set in the script that makes the upload the function
set_time_limit(0), so the script has no time out.

The problem appears when the file is larger than 6.5 MB. It shows an error
telling us that the page could not be found.
Thanks



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



[PHP] UDP socket_read() problem

2002-09-21 Thread Martin

Hello,

I created an UDP socket using $sock=socket_create(AF_INET,SOCK_DGRAM,SOL_UDP) 
successfully and then used socket_bind($sock,$address,$port), up to there, no 
problems, but when I try to $buff=socket_read($sock,3) it just stays there doing 
nothing forever.

What could be the problem?

What is the normal behaviour of socket_read() when the socket is empty?

I write to the socket (address/port) like crazy from the other side of the LAN, but 
nothing seems to be happening.

Thanks,

Martin


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




Re: [PHP] UDP socket_read() problem

2002-09-21 Thread Martin

> Try using SO_TCP.

The problem is that I'm making a server application, and all the clients were made by 
someone else and are much more difficult to modify, and are already using UDP.

> There are issues using TO_UDP with
> internet/LANs. many ppl mention
> them from time to time, however, it
> 'should' work over a LAN TCP is
> usually eaiser and a nice alternative
> if you can't resolve issues.

Ok, if I can't get it to work with UDP, I think I'll switch to TCP.

Thanks,

Martin


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




[PHP] problems with imap certificate

2002-07-22 Thread martin

I'm trying to configure a php with imap support on a RedHat 7.3 server. The 
problem is that it doesn't like the certificate (or something like that) and 
it doesn't login. 
I need this to get a webmail on the server working. 
The error says this: 
 
Jul 22 11:19:34 math httpd: PHP Warning:  Certificate failure for localhost: 
self signed certificate: 
[EMAIL PROTECTED]
 
(errflg=2) in Unknown on line 0 
 
And the imap server logs this: 
 
Jul 22 11:19:34 math imapd[31893]: imap service init from 127.0.0.1 
Jul 22 11:19:34 math imapd[31893]: Command stream end of file, while reading 
line user=??? host=UNKNOWN 
 
Any idea on how I can solve this? 
 
 
--  
Porqué usar una base de datos relacional cualquiera, 
si podés usar PostgreSQL? 
- 
Martín Marqués  |[EMAIL PROTECTED] 
Programador, Administrador, DBA |   Centro de Telematica 
   Universidad Nacional 
del Litoral 
- 
 
 
 

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




[PHP] get output in .html file

2003-12-17 Thread martin
Does somebody know how to get the output of an .php file into an .html file
(server side). This in order to cache generated pages for futur visitors.

thanks

Martin

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



[PHP] .ins file

2001-02-21 Thread Martin

Has anyone got any experience with creating windows .ins file from PHP. The
following coding appears to be working sort of, but when you first run it
wants to save the file as makeins.phtml (the same name as the file). If you
cancel, it then will save it as .ins file. It's very annoying and kinda
confusing. Any advice?

1)

{

header("Content-type: application/x-internet-signup");

header("Content-disposition: attachment; filename=vispa.ins");

echo "[Internet_Mail]\n";

echo "Default_Client=Yes\n";

echo "Domain=vispa.com\n";

echo "Email_Address=" . $firstname . "@" . $username . ".vispa.com\n";

echo "Email_Name=" . $firstname . " " . $lastname . "\n";

echo "Install_Mail=1\n";

echo "Install_Mail_16=0\n";

echo "Logon_Using_SPA=No\n";

echo "POP_Logon_Name=vis-" . $username . "\n";

echo "POP_Logon_Password=" . $password . "\n";

echo "POP_Server=pop.vispa.com\n";

echo "SMTP_Server=smtp.vispa.com\n";

echo "Logon_Using_SPA=No\n";

echo "Use_MS_Exchange=No\n";

echo "Use_IMAP=No\n";

echo "Window_Title=Outlook Express provided by Vispa Internet\n";

echo "Junk_Mail_Filtering=1\n";

echo "\n";

echo "[Branding]\n";

echo "CompanyName=Vispa Internet Limited\n";

echo "Wizard_Version=3.0.0.561\n";

echo "Custom_Key=E135056\n";

echo "Window_Title=Vispa Internet Explorer\n";

echo "\n";

echo "[Favorites]\n";

echo "Tucows.url=http://tucows.enta.net\n";

echo "\n";

echo "[Internet_News]\n";

echo "NNTP_Server=news.vispa.com\n";

echo "Logon_Required=0\n";

echo "Default_Client=Yes\n";

echo "\n";

echo "[URL]\n";

echo "Home_Page=http://www.vispa.net\n";

echo "Search_Page=http://home.microsoft.com/access/allinone.asp\n";

echo "NoWelcome=1\n";

echo "[Entry]\n";

echo "Entry_Name=Vispa Dialup\n";

echo "\n";

echo "[Phone]\n";

echo "Phone_Number=0500028\n";

echo "Area_Code=0845\n";

echo "Country_Code=44\n";

echo "Country_ID=44\n";

echo "Dial_As_Is=No\n";

echo "\n";

echo "[User]\n";

echo "Requires_Logon=Yes\n";

echo "Name=vis-$username\n";

echo "Password=$password\n";

echo "Display_Password=Yes\n";

echo "\n";

echo "[Device]\n";

echo "Type=modem\n";

echo "\n";

echo "[Server]\n";

echo "SW_Compress=Yes\n";

echo "PW_Encrypt=No\n";

echo "Network_Logon=no\n";

echo "SW_Encrypt=no\n";

echo "Type=PPP\n";

echo "Negotiate_TCP/IP=Yes\n";

echo "Negotiate_IPX/SPX=No\n";

echo "Negotiate_NetBEUI=No\n";

echo "\n";

echo "[TCP/IP]\n";

echo "Specify_Server_Address=No\n";

echo "DNS_Address=\n";

echo "DNS_Alt_Address=\n";

echo "IP_Header_Compress=Yes\n";

echo "Gateway_On_Remote=Yes\n";

echo "\n";

echo "[Outlook_Express_Global]\n";

echo "Read_Only=1\n";

echo "Hide_MSN=1\n";

} else {

?>

Generate Automatic Configuration File







Username:



Password:



Firstname:



Surname:


















-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] How to strip off all html-comments

2001-12-31 Thread Martin

Hello! How can I easily strip off all html-comments () from
a string?

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Flash and php

2002-02-24 Thread Martin

Hello!

I read that the flash-format has been published to all users (see:
http://www.macromedia.com/macromedia/proom/pr/1998/flashstandard.html).

I was wondering if there is some php-support to generate
flash-animations in general.

What I'm looking for in particulla is a simple horizontal text-scroller
done in flash, but generated with php (to show diffenrent text on
different user-inputs for example). Has someone done this before?

Martin



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




[PHP] Re: Flash and php

2002-02-24 Thread Martin

Okay, I found the Ming-Library in the documentation (I just search for
flash in the functions list and didn't find anything). I will try this.



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




Re: [PHP] Flash and php

2002-02-24 Thread Martin

Hi Mika, thanx for your answer,

> http://www.php.net/manual/en/ref.swf.php
> http://www.php.net/manual/en/ref.ming.php

which one should I prefer (using windows) ?


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




[PHP] Downloadbox

2002-03-02 Thread Martin

Hello!

I have a PDF-File, which the user should be able to download. The
problem is that the browser is showing this file when the user clicks
the link instead of displaying the box to start the download. Can I
force the browser to show the box?

Martin



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




[PHP] Dynamic update of content

2001-10-31 Thread Martin

Some time ago I asked for help regarding techniques to provide dynamic 
update of content on a PHP-page.
Someone mentioned a javascript routine which I've forgotten. Anyone here 
might have a clue? What I want to do is that 
User selects and option from a option box, and depending on what that 
selection is the page populates other option boxes.

TIA,

Martin S

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Am i crazy?

2001-11-04 Thread Martin

Did I forget everything in a few months?
if ($name='admin') {
header("Location: $MYPATH/admin.php");
}

Doesn't. That is it doesn't redirect to whatever $MYPATH/admin.php 
translates to. Doing an echo $MYPATH directly after the line shows that the 
path is interpreted correctly - and the file exists (I checked). And the 
$name is correct - echo $name gives admin. And neither does the php.net 
example work ...

if ($name='admin') {
header("Location: http://www.php.net/";);
}

doesn't redirect to php.net. 

*sigh*

Martin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Am i crazy?

2001-11-04 Thread Martin

Jack Dempsey wrote:

> you're assigning, not checking for equality...use two ='s

Still not redirecting ...

Martin S

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Am i crazy?

2001-11-04 Thread Martin

Jack Dempsey wrote:

> what happens? 

if ($name == "admin") {
echo $name;
header("Location: $MYPATH/admin.php");
}

Displays admin on the page where the redirect is from (switch.php).
Without the echo statement I just get a blank switch.php.
I'm simply not redirected anywhere. (Nothing else is supposed to happen).

> are you sure $name really equal's admin?

Ohh yes.

> if you change header to echo $MYPATH does that work?

No.


Martin S


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Am i crazy?

2001-11-04 Thread Martin

Richard Baskett wrote:

> It has to do with the $name variable, if you've fixed the code to check
> for equality instead of setting the variable:
> 
> if ($name=='admin') {
> 
> Echo $name and make sure that it is actually getting set..

Yes.

> Also make sure your header information is before html.. 

There isn't any html in the page at all. It's intended as a switchboard for 
people logging in to be redirected according to user name.

>let's see.. yeah
> that's about all I can think of.. if $name is echoing something then I
> have no clue why it's not working :(

Martin S

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: how about walking another way?

2001-11-04 Thread Martin

Galkov Vladimir wrote:

> Good time of a day!
> 
>  Very strange... the code you place here works good (if forget one '=' ).
>  I
> thinck you have to chek what you have in $name, $MYPATH,
> "$MYPATH/admin.php"... by the way what error you have? not such file?
> ...  or somth special?...
> 
>  If still not working. (vay;-)))   ) than remember than any
>  mission
> can be completed in different ways try somth like this ;-)
> 
>  if ($name == "admin")
>   {
> print '';
>   }

OK, thanks. That works. Strange ...


Martin S

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: how about walking another way?

2001-11-04 Thread Martin

Tom Carter wrote:

> One observation on this.. there is a major difference between this and the
> the header("location:...
> header happens on the server side whereas the below is clientside and
> therefore unreliable. I know that netscape, particullarly on unix, is bad
> for ignoring this. header() is the only reliable way to do it!

Yes - I read years ago that some browsers have problem honouring META 
redirects. Didn't know that still is the case ... I've tried this with 
Mozilla, Navigator 4.77 and Konqueror (in KDE 2.2.1) on Linux, all work.

Martin S

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Am i crazy? - Solved.

2001-11-04 Thread Martin

Tom Carter wrote:

> well when you were using echo $name to test then you were outputting html,
> hence no redirect... 

I've tried both w/ and w/o the echo. No difference.

>if your php is set up in such a way as to suppress
> errors then you wouldn't have been warned about it..

No, nothing is being output the page starts with check that nothing
> else is being outputted, eg a space before the first  fix it turn error reporting down to its lowest level.

But ...
error_reporting(E_ALL) ... that did it. Apparently what the problem was is 
that in an included file there were two trailing spaces after the ?>. 
Making that page end with ?> fixed the redirect.

Thanks to everyone.

Martin S

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Fulltext-Search

2001-12-24 Thread Martin

Hello! Does anybody know a good script to search the own web-server?!
Would be nice if the script could display the whole sentence where the
word was found...

Martin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Sending PDF-Doc as mail

2001-07-22 Thread Martin

Hello!

I want to send a PDF-file as a mail. The problem: I want, that the user
get's the PDF-document as soon as he clicks on the mail. That means: No
text-part of the mail, the user should not have to click on the
attachment-button of his mail-client.

I tried:
1.) Set the header to something like:
 $header =  "From: <[EMAIL PROTECTED]>\n";
 $header .= "Content-Type: application/pdf\n";
 $header .= "Content-Transfer-Encoding: base64\n";
 $header .= "Content-Desciption: My PDF-Doc";

Works in: StarOffice
Doesn't work in Netscape and M$-Outlook

2.) Use a multipart-message:
Works in: StarOffice
Doesn't work in Netscape and M$-Outlook

Any idea, how this is done?

Martin






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] rename problem...

2001-08-09 Thread Martin

Hi!
When i'm trying to run this script:


I get this error:

Warning: Rename failed (Permission denied) in
C:\Inetpub\WEBS\mysko\uploads\rename.php on line 4

The directoy has change permissions. What am i donig wrong...?

/martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] something like SSI ?

2001-08-14 Thread Martin

Ok, this may seem like a dumb newbie question...

Is there an function like ASP's Server Side Include in PHP ? Or what is best
to use instead, fread ?

/marco



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Cannot get uploaded file by PUT request vith PHP4 and Apache1.3

2001-08-22 Thread Martin

I wanted to make a script to allow publishing from Netscape Composer using 
PUT request on my Apache server with PHP4. I have tried the example from 
manual. But i can not get the uploaded file. The 
$PHP_UPLOADED_FILE_NAME is not set and the 
$PHP_PUT_FILENAME allso is not set. Vhen I send the HTTP/1.0 404 
Error header (so I could see the results)and dysplaied all the variables using 
phpinfo(INFO_VARIABLES) i found there is no variable containing any 
information about uploaded file. Now I have Apache 1.3.20 with PHP 4.0.6.
But i have tried it with the same httpd.conf and php.ini on earlier version 
(Igess 1.3.13 and 4.0.2) and it did not work as well.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] insert into problems.

2001-09-03 Thread Martin

Can someone tell me whats wrong with this...  im getting a " Syntax error in
INSERT INTO statement "... but i cant find anything wrong with the sql
code., or have i missed something..?



/martin






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Making session last

2001-09-23 Thread Martin

Hello!

The sessions-functions works really fine. But I got one Problem: How can
I make the php-session last more then a browser-session? When the users
closes the browser, the php-session is lost, but I want to save it for
some days and the user should get the thame session, when he returns.

I have no access to the php.ini-file. session_set_cookie_params (int
lifetime) didn't work.

Any ideas?

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Making variable global / accessing variable

2001-09-30 Thread Martin

Hello!

How can I make a variable, which name I give to a function, global in
this function?

I want to make something like:

function MyFunc($sVarName)
{GLOBAL [$sVarName]_error, $sVarName_ok;

}

So if $sVarName = "sHello", I want to access $sHello_error and
$sHello_ok in this function.

Any idea how I can make this variable gloabl and whats the easyst way to
access this var then?

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: fopen

2001-09-30 Thread Martin

Kmarada schrieb:

> is it possible to use fopen to open 5000 files differents simultaneous and
> edit it simultaneous ?

I think, this depends how many files your operating-system can handle.

> i have one file. if four user edit it simultaneous what happen? there is
> something to lock the file until one finish to edit?

see "flock".



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Recursion

2001-09-30 Thread Martin

Hi Andres,

Yes, PHP support "recoursion". That means, that you are calling a function
again and again, but with new start-parameters. For example, if you want to
search a harddisc for a file, you will call your
function SearchFolder($path)
with "C:\". If the function itself detects subfolder, it will call itself,
but with the parameters "C:\Subfolder1", "C:\Subfolder2" and so on. You
have to watch out then, the the function terminated correctly, if the
searched file is found.

Martin




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] is pecl.php.net down?

2007-03-24 Thread martin
Since about 7 hours now i can't get on the pecl.php.net pages. The site 
doesn't seem to be available.

Does somebody know why?

Thanks,

Martin


J'utilise la version gratuite de SPAMfighter pour utilisateurs privés.
42980 e-mails spam ont été bloqués jusqu'à maintenant.
Les utilisateurs payant n'ont pas ce message dans leurs e-mails.
Essayez SPAMfighter gratuitement maintenant!

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



[PHP] Re: is pecl.php.net down?

2007-03-24 Thread martin
thanks Greg, it's back running

Martin

"Gregory Beaver" <[EMAIL PROTECTED]> a écrit dans le message de news: 
[EMAIL PROTECTED]
> martin wrote:
>> Since about 7 hours now i can't get on the pecl.php.net pages. The site
>> doesn't seem to be available.
>>
>> Does somebody know why?
>
> Hi Martin,
>
> The entire machine that runs pear.php.net and pecl.php.net was down for
> a very long time.  It has recently come back up online, you should be
> able to use the website fully now.
>
> Thanks,
> Greg


J'utilise la version gratuite de SPAMfighter pour utilisateurs privés.
42980 e-mails spam ont été bloqués jusqu'à maintenant.
Les utilisateurs payant n'ont pas ce message dans leurs e-mails.
Essayez SPAMfighter gratuitement maintenant!

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



[PHP] Reading all headers sent

2005-03-18 Thread martin
Hi,
I wanted to know if there is some way to expose the full headers sent to 
a php page.
I found in google that for windows there is  $_SERVER['ALL_HTTP'] to 
read all the headers sent but I'm using php on linux/apache.

There is any way to get in a variable the full headers sent to a page ?
Best regards,
MARTIN
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Reading all headers sent

2005-03-18 Thread martin
Thanks for the answer,
what I'm trying to achieve is a php proxy that receives any GET/POST 
request with correspoding headers and brings back the results to the caller.

Let's say I do a google search request with curl:
// I would like all this to be sent by another page --- (header + xml)
 $data   ="soapreq.xml";
 $handle = fopen ($data, "r");
 $send   = fread ($handle, filesize($data) );
 fclose($handle);
$header[] ="MessageType:CALL";
$header[] ="Content-Type:text/xml";
// -- I don't know if what I want 
can be achieved this way, but maybe this explains better the idea.

$ch  = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://api.google.com/search/beta2";);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$send);
curl_setopt ($ch, CURLOPT_HTTPHEADER, $header);
$data = curl_exec($ch);

Best regards,
MARTIN
Jesper Goos wrote:
The $SERVER variable is an array, so try this:
";
print_r($_SERVER);
echo "";
?>
regards Jesper
martin wrote:
Hi,
I wanted to know if there is some way to expose the full headers sent 
to a php page.
I found in google that for windows there is  $_SERVER['ALL_HTTP'] to 
read all the headers sent but I'm using php on linux/apache.

There is any way to get in a variable the full headers sent to a page ?
Best regards,
MARTIN

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


Re: [PHP] Reading all headers sent

2005-03-29 Thread martin
Solved,
Just in case someone finds it usefull.
I could get the raw post with :
$send = $GLOBALS['HTTP_RAW_POST_DATA'];
And then the headers I need in the $_SERVER globals.
$header[] = "MessageType:$_SERVER[HTTP_MESSAGETYPE]";  // CALL
$header[] = "Content-Type:$_SERVER[CONTENT_TYPE]"; // text/xml
MARTIN
www.movil.be
Richard Lynch wrote:
Search php.net for "RAW HTTP"
Maybe.
On Fri, March 18, 2005 3:28 am, martin said:
Thanks for the answer,
what I'm trying to achieve is a php proxy that receives any GET/POST
request with correspoding headers and brings back the results to the
caller.
Let's say I do a google search request with curl:
// I would like all this to be sent by another page --- (header + xml)
 $data   ="soapreq.xml";
 $handle = fopen ($data, "r");
 $send   = fread ($handle, filesize($data) );
 fclose($handle);
$header[] ="MessageType:CALL";
$header[] ="Content-Type:text/xml";
// -- I don't know if what I want
can be achieved this way, but maybe this explains better the idea.
$ch  = curl_init();
curl_setopt($ch, CURLOPT_URL,
"http://api.google.com/search/beta2";);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$send);
curl_setopt ($ch, CURLOPT_HTTPHEADER, $header);
$data = curl_exec($ch);

Best regards,
MARTIN
Jesper Goos wrote:

The $SERVER variable is an array, so try this:
";
print_r($_SERVER);
echo "";
?>
regards Jesper
martin wrote:

Hi,
I wanted to know if there is some way to expose the full headers sent
to a php page.
I found in google that for windows there is  $_SERVER['ALL_HTTP'] to
read all the headers sent but I'm using php on linux/apache.
There is any way to get in a variable the full headers sent to a page ?
Best regards,
MARTIN

--
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


[PHP] Re: patched

2007-06-20 Thread martin
See the file.


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

[PHP] array, classes and values

2006-10-29 Thread martin
hello,

New to oop i'm really strugling to find a way to read a specified MYSQL 
database and tabel in order to determine the number of records, the number 
of fields in each record and convert the data into their labels and values.

Please give me some hints or code...

Thanks,

Martin 

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



[PHP] Weird question - environment data from windows

2004-02-18 Thread Martin
When you've stopped laughing - is it at all possible to pass Windows 
environment data from a Windows workstation to an PHP application 
running on a Linux server?

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


RE: [PHP] inserting preexisting image inside dynamic image

2002-11-24 Thread Martin Towell
try these: ImageCopy*()

-Original Message-
From: Eric Pierce [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 2:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] inserting preexisting image inside dynamic image


Hi there...

Just wondering... when creating a dynamic image, is
there a way/fuction to insert an existing image using
x,y coordiantes for precision?

I'm trying to make a statistical graph script using
some nice looking graphics.

Thanks for any tips!
Eric 

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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

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




[PHP] Newbie: ereg

2002-11-25 Thread Martin Johansson
I still havent found a site that shows what I need.
I dont think php.net explain how ereg works.

I only want to publish stuff from the stringvariable $text thats inside tags
looking like this

This shall be visible
or
This shall be visible too

thanks
Martin



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




[PHP] Re: Missing images

2002-11-26 Thread Martin Johansson
I had this problem when I stored my images on another webserver, and linked
the images with the whole adress like http://somewhere/image.gif";>
I solved the problem by copying the images to the same webserver that views
the
page.
The last webserver was to slow to replay that it had the pictures. Maybe
this is the
problem you have?
/Martin

> Hi all
>
> I have kind of a very strange problem... But I hope someone can help.
> Imageing a little web-based application for browsing images. Every page is
> exactly the same (from a php point of view). A user can browse through all
> the images which are displayed as thumbnails. Normally, everything works
> fine...
>
> But on some browsers (and or operating systems), suddenly, at a certain
> point, all images are turning white. No more new images are shown. Old
> images (which have already been shown earlier) are fine, but no new ones.
> They are just white. Reloading the page or reentering the URL doesn't
work.
> The only thing which does work is shutting down the browser and restarting
> the whole thing.
>
> So, why do some images turn white? These normally happens after about the
> 6th page of images (12 iamges a page). Any idea?
>
> Thanks a lot
> reto
>
>



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




Re: [PHP] store images in mysql tables

2002-11-26 Thread Martin Johansson
Yes you can store images in a mysql table. But you will have to create a new
binary database.

You can read here how it works:
http://www.phpbuilder.com/columns/florian19991014.php3
It is a easy to understand text.
/Martin



"Justin French" <[EMAIL PROTECTED]> skrev i meddelandet
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Please do a quick google search first:
>
>
http://www.google.com/search?hl=en&ie=ISO-8859-1&q=storing+images+in+mysql&b
> tnG=Google+Search
>
> Or at least TRY to find the answer by yourself.
>
>
> on 26/11/02 11:42 PM, Vivek Kedia ([EMAIL PROTECTED]) wrote:
>
> > can i store images in mysql table using php , is it
> > possible if yes then pl show me where i can read more
> > about it
>
>
> Justin French
> 
> http://Indent.com.au
> Web Development &
> Graphic Design
> 
>



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




AW: [PHP] can't pass complete URL (part of the query string) from one script to another --??

2002-11-26 Thread Martin Lucas
hi nicole,

do you have an example what your query contains ?
maybe urlencode($pageURL) or quoting will help

greetings martin

> -Ursprüngliche Nachricht-
> Von: Nicole Lallande [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 26. November 2002 15:40
> An: [EMAIL PROTECTED]
> Betreff: [PHP] can't pass complete URL (part of the query string) from
> one script to another --??
> 
> 
> Gretings:
> 
> I want to pass a URL query string to another php script.  I 
> am able to 
> pass the complete query string with all the variables I want 
> through to 
> the javascript function call but then the string gets cut in the php 
> script:
> 
> in the shopping cart:
> this page
> 
> where 'ref' is set correctly and  $pageURL is returned as 
> 'http://mydomain.com/shop.php?val1=1&val2=2&val3=3' (this 
> shows up on my 
> status bar and I can 'echo' it on the shopping cart page - so 
> Iknow it 
> is getting captured correctly -- also - I removed the 
> javascript and saw 
> it get passet in the url as a 'get' correctly.)
> 
> but in the email script  I try to display 'ref' and what I get is:
> 
> 'http://mydomain.com/shop.php?val1=1' -- everything past the 
> first '&' 
> gets cut off (ie, I lose  the '&val2=2&val3=3' portion of the query 
> string )
> 
> Any ideas?  Sorry if this is obvious - pulling an 'all nighter'...
> 
> TIA,
> 
> Nicole
> 
> -- 
> 
> Nicole Lallande
> [EMAIL PROTECTED]
> 760.753.6766
> 
> 
> 
> 
> -- 
> 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




RE: [PHP] Disable refresh?

2002-12-01 Thread Martin Towell
no, no way to disable and no variable to say a refresh happened

one way to get around it is to submit to the page that does the update, then
get that page to do a header("location...") to another page. When the user
refreshes, they'll only refresh the last page, and not the updating page.

HTH
Martin

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 12:33 PM
To: PHP List
Subject: RE: [PHP] Disable refresh?


If not, is there a variable that provides information that a refresh
occurred to load the page?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 01, 2002 8:23 PM
To: PHP List
Subject: [PHP] Disable refresh?

Anyone know of a method of preventing a user from refreshing a page.  I get
multiple updates with the same information in my database...

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




--
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

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




[PHP] How to get/wait for user-input?

2002-12-02 Thread Martin Thoma
Hello!

I'm using a PHP-script as a small console-app. Is the only way to give
parameters to it the $QUERY_STRING, or can I wait for the user to input
something (like scanf in C)? I couldn't find anything in the docs, so
perhaps this is not possible?!

Martin



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




[PHP] How to give parameters to a console php-script?

2002-12-02 Thread Martin Thoma
Hello!

I start a console app with

php myscript.php4 (just prints "ok").

How can I give parameters to it? I tried:
php myscript.php4 myparameter
php myscript.php4?myparameter
php myscript.php4?param=myparameter

But always php just returns without doing nothing (not even giving an
error or printing "Ok"!) I'm using PHP 4.2.3. on Windows2000).

Martin



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




Re: [PHP] How to give parameters to a console php-script?

2002-12-02 Thread Martin Thoma
Hi,

> What do argv and argc tell you?
> Is the php.ini file set up so that these variables are shown/valid?

"Undefined variable:  argv" - so I guess this is the problem ;-) What do I
have to change in the php.ini?

Martin


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




Re: [PHP] How to give parameters to a console php-script?

2002-12-02 Thread Martin Thoma
ll I found a
register_argc_argv = On

in my php.ini, which should work then. But I also found, that I have to use

print "Ok: ".$_SERVER["argv"][1];

instead of
print "Ok: ".$argv[1];

Martin



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




Re: [PHP] How to give parameters to a console php-script?

2002-12-02 Thread Martin Thoma
> Martin,
> Ah yes, the famous 'read the upgrade notes - gotcha'!
> Well done, you figured it out...
> =dn

Thanx for your help, it pointed me in the right direction ;-)



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




[PHP] sessions

2002-12-05 Thread Martin Hudec
Hello,

I have following problem:

i have one script (index.php) which displays information (menu items)
based on result from function check_valid_user(). This function checks
if there is session_is_registered("valid_user").

second script is for login.it saves into session
session_register("valid_user").then it reloads parent window
(index.php), which will then again check validity of user...but it
does not work.

does anyone know why?

register globals are on.

-- 
Best regards,
 Martin  mail   [EMAIL PROTECTED]
 mobile +421.907.303.393
 icq34358414
 wwwhttp://www.corwin.sk

PGP key fingerprint  21365ca05ecfd8aeb1cf19c838fff033

"In those days spirits were brave, the stakes were high, 
 men were real men, women were real women and small furry 
 creatures from Alpha Centauri were real small furry creatures 
 from Alpha Centauri."

by Douglas Adams


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




[PHP] code for my question about sessions ;) sorry

2002-12-05 Thread Martin Hudec
Hello ,

okay here's the code...sorry forgot to post it
everything works in login.phpsession is registered...but in index,
it seems that session is empty...

login.php:
";
//reloads index.php (login.php is popup from index.php
echo "window.opener.location.reload();";
echo "setTimeout('window.close()',1000)";
echo "";
?>


index.php:



forum_fns.php:
";
return true;
   }
   else
   {
echo "\$valid_user not registered!!";
return false;
   }
 }
?>



-- 
Best regards,
 Martin  mail   [EMAIL PROTECTED]
 mobile +421.907.303.393
 icq34358414
 wwwhttp://www.corwin.sk

PGP key fingerprint  21365ca05ecfd8aeb1cf19c838fff033

"In those days spirits were brave, the stakes were high, 
 men were real men, women were real women and small furry 
 creatures from Alpha Centauri were real small furry creatures 
 from Alpha Centauri."

by Douglas Adams


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




RE: [PHP] select * From ????

2002-12-15 Thread Martin Towell
can you post some more of your code? I think, if it's not too big, the
entire while loops

Martin


-Original Message-
From: Bruce Levick [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 9:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] select * From 


Hi,
Am just a newbie at this and was going great until I have hit this smell
snag.

I am connecting to mysql and all works well there. I query a table
"Illustrations" ($query = "SELECT * FROM Illustrations";), and want to
print the values of two columns ("titletext" & "img")within each row as
the request loops.

Print "$row[titletext]";
Print "$row[img]";

The code inplace seems all ok, but for some reason I am only being
returned the value of "titletext" and not also the value of "img". Am I
to be setting a new value for returning the info within "img"?? (eg
$row2).

I am sorry if this is hard to understand and also a silly Q, I am two
days into learning this stuff. All I want to do is to return these two
values from within the table. "titletext" and "img". They are both text
fields.

Cheers


  


-- 
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




RE: [PHP] select * From ????

2002-12-15 Thread Martin Towell
Looks good to me, but as Peter said, see if you really are getting something
in ['img']
try print_r($row) or var_dump($row) to make sure

-Original Message-
From: Bruce Levick [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 10:01 AM
To: Martin Towell
Subject: RE: [PHP] select * From 


Here is the display code that I started with.

Error performing query: " .
 mysql_error() . "");
exit();
  }


  // Display the text of each joke in a paragraph
  while ( $row = mysql_fetch_array($result) ) {
print"$row[titletext]";
print"$row[img]";
  }


?>

Not sure why it only displays just the titletext.

-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 16, 2002 8:47 AM
To: Bruce Levick; [EMAIL PROTECTED]
Subject: RE: [PHP] select * From 


can you post some more of your code? I think, if it's not too big, the
entire while loops

Martin


-Original Message-
From: Bruce Levick [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 9:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] select * From 


Hi,
Am just a newbie at this and was going great until I have hit this smell
snag.

I am connecting to mysql and all works well there. I query a table
"Illustrations" ($query = "SELECT * FROM Illustrations";), and want to
print the values of two columns ("titletext" & "img")within each row as
the request loops.

Print "$row[titletext]";
Print "$row[img]";

The code inplace seems all ok, but for some reason I am only being
returned the value of "titletext" and not also the value of "img". Am I
to be setting a new value for returning the info within "img"?? (eg
$row2).

I am sorry if this is hard to understand and also a silly Q, I am two
days into learning this stuff. All I want to do is to return these two
values from within the table. "titletext" and "img". They are both text
fields.

Cheers


  


-- 
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




RE: [PHP] undefined index....property.

2002-12-16 Thread Martin Towell
you didn't send the code snippet for "Undefined index"
however, I think the reason you're getting these errors at home is because
you have a different error_reporting level.

HTH a bit
Martin

[snip]

//filled out info and clicked send.

Notice: Undefined index: license in c:\inetpub\wwwroot\php\config.php on
line 51

Notice: Undefined property: num_rows in
c:\inetpub\wwwroot\php\adcjoin.php on line 67


//

[snip]

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




RE: [PHP] Plz help to solve my problem.

2002-12-16 Thread Martin Towell
>From this error

Warning: Failed to write session data (files). Please verify that the
current setting of session.save_path is correct (/tmp) in Unknown on line 0

It looks like you'll have to change php.ini to have session.save_path point
to a valid path. Maybe \temp\  ?

HTH
Martin

-Original Message-
From: Elaine Kwek [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 17, 2002 4:08 PM
To: PHP
Subject: [PHP] Plz help to solve my problem.


I am now trying to use php session control in my web application. i try to
copy a coding an test it...but it come out error. i not sure how to solve
it. Plz help me...I using Apache server.

the code sample is like this:

";

?>


And this is the result of the page:

Warning: open(/tmp\sess_c0fe7c6a4524488a979e20d90b2eebb2, O_RDWR) failed: No
such file or directory (2) in c:\Program Files\Apache
Group\Apache\htdocs\Office_Management_System\tmp\page1.php on line 3

The content of $sess_var is Hello world!

Warning: open(/tmp\sess_c0fe7c6a4524488a979e20d90b2eebb2, O_RDWR) failed: No
such file or directory (2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the
current setting of session.save_path is correct (/tmp) in Unknown on line 0


thanx to whom reply to me...

Elaine Kwek


-- 
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




RE: [PHP] php / unix functions

2002-12-17 Thread Martin Towell
the only other way I know is to use: $output = `$cmd`;  (ie, backticks)

-Original Message-
From: Greg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 1:27 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php / unix functions


Hi-
Is there a built in way, besides using exec and system, to get the output
from commands like 'uptime' and 'df' on a linux system?  Thanks!
-Greg



-- 
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




RE: [PHP] php / unix functions

2002-12-17 Thread Martin Towell
in that case, try passthru()

-Original Message-
From: Greg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 1:45 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] php / unix functions


I just want to display the output of 'uptime' and 'df' on a php page
/Greg

"Andy Turegano" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Well, what do you want them to do?
>
>
> On Wed, 18 Dec 2002, Martin Towell wrote:
>
> > the only other way I know is to use: $output = `$cmd`;  (ie, backticks)
> >
> > -Original Message-
> > From: Greg [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, December 18, 2002 1:27 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] php / unix functions
> >
> >
> > Hi-
> > Is there a built in way, besides using exec and system, to get the
output
> > from commands like 'uptime' and 'df' on a linux system?  Thanks!
> > -Greg
> >
> >
> >
> > --
> > 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
> >
>



-- 
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




RE: [PHP] Where am I?

2002-12-17 Thread Martin Towell
try doing a phpinfo() , somewhere in there it'll tell you

Martin

-Original Message-
From: Jeff [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 2:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Where am I?


I'm using PHP 4.0.6. I am developing on Win98SE, and deployed on an Apache
server.

I need to find the actual path of the root directory.

Windows: C:/Inetpub/wwwroot/
Apache: /home/dcent/public_html/

I've tried dirname(), basename(), etc. I just can't figure it out.
Help.

Jeff



-- 
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




RE: [PHP] Where am I?

2002-12-17 Thread Martin Towell
Doing a quick scan through the output of phpinfo() on my machine, I can see
any one of the following will give me the path (incl. filename of the
current script)

$HTTP_SERVER_VARS["DOCUMENT_ROOT"] . $PHP_SELF
$HTTP_SERVER_VARS["SCRIPT_FILENAME"]
$HTTP_SERVER_VARS["PATH_TRANSLATED"]

HTH
Martin

-Original Message-
From: Jeff [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 3:00 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Where am I?


No, I've been looking all day. I can get the information is I run the script
from the root, but what if I am in a sub-dir?
Jeff

"Martin Towell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> try doing a phpinfo() , somewhere in there it'll tell you
>
> Martin
>
> -Original Message-
> From: Jeff [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 18, 2002 2:34 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Where am I?
>
>
> I'm using PHP 4.0.6. I am developing on Win98SE, and deployed on an Apache
> server.
>
> I need to find the actual path of the root directory.
>
> Windows: C:/Inetpub/wwwroot/
> Apache: /home/dcent/public_html/
>
> I've tried dirname(), basename(), etc. I just can't figure it out.
> Help.
>
> Jeff
>
>
>
> --
> 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

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




RE: [PHP] test

2002-12-17 Thread Martin Towell
na! didn't work :) 

-Original Message-
From: Roger Lewis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 4:59 PM
To: Php-General
Subject: [PHP] test


This is a test. 


-- 
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




RE: [PHP] test

2002-12-17 Thread Martin Towell
actually, I get the same error. I've been putting it down to someone
subscribing and now their email is invalid.

BTW: I'm emailing to [EMAIL PROTECTED] - if that helps

-Original Message-
From: John Taylor-Johnston [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 5:12 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] test


Roger,
Are you emailing or posting to the news group?
John

Roger Lewis wrote:

> But it did!  Otherwise I wouldn't have received your comment. Why did I
get
> this message from Mailer-Daemon:
>
> Sorry. Your message could not be delivered to:
>
> php-list,emc (The name was not found at the remote site. Check that the
> name has been entered correctly.)
>
> -Original Message-
> From: Martin Towell [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 10:02 PM
> To: Php-General
> Subject: RE: [PHP] test
>
> na! didn't work :) 
>
> -Original Message-
> From: Roger Lewis [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 18, 2002 4:59 PM
> To: Php-General
> Subject: [PHP] test
>
> This is a test.


-- 
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




RE: [PHP] *OK, more eval for today

2002-12-18 Thread Martin Towell
argh! eval()
try this instead: $temp = ${"php_q3_$i"};
to get it directly from $HTTP_POST_VARS: $temp =
$HTTP_POST_VARS["php_q3_$i"];
simple

HTH
Martin

-Original Message-
From: Alexey Lysenkov [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 6:08 AM
To: [EMAIL PROTECTED]
Subject: [PHP] *OK, more eval for today


I know, it's eval = evil, but I don't see any other way I can check for 120
variables submitted via post, without making a temp variable, assigning a
value of the posted Var and checking for it (and deciding on the further run
of the script). Anyways, I took a classical eval thing and am doing fine
with it. It looks like this:

$temp = "\$php_q3_".$i; // $i is a loop index
eval ("\$temp = \"$temp\";");

works alright. Now, how do I eval directly from the $HTTP_POST_VARS?

I am trying to do this:

$tempVar1 = '\$HTTP_POST_VARS[\"q4_'.$i.'"]';
  eval("\$tempVar1=\"$tempVar1\";");

and am obviously failing. If you know any other way to validate 120-150
variables in a loop and then rewrite the values into the fields (checkboxes,
radios and selects) - should an error had been made - let me know.

Best Regards,
Alex

p.s. you do help! :)

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




[PHP] European "daylight saving" summer-time.

2002-12-29 Thread Martin Thoma
Hello!

I just want to get the actual date and time which works fine with
date(). The problem is that php doesn't give the european
daylight-saving-time in summer, so the time shown is offset by 1 hour in
summer. It seems that my internet service provider doesn't adjust the
clock of the server to this. How can I avoid this without manually
correct it every spring/autumn?

Martin



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




[PHP] function misfunction

2002-12-30 Thread Martin S
I'm trying to redo a db lookup into a function. The function is placed in a 
class called tracking and declared thus:

function setCurrentDevGroup($devID)
{
// start original routine
$query = "SELECT dev_group FROM tracking WHERE (computer = 
   

   
   
   
   
   
   
   
   
   
   
  $devID)";
$sth = $adb->prepare($query);
if($sth)
{
$res = $sth->execute();
$resulttable = $sth->fetchrow_hash();
$lookuptable = $resulttable["dev_group"];
return($lookuptable);
}
//end original routine
}

This is called from the code as:

$tracking->setCurrentDevGroup($this->ComputerID); // $this->ComputerID is 
  // known as eg 5.

In the page which relies on the value of setCurrentDevGroup I get:



 Call to a member function on a non-object in 
/www/htdocs/dev/include/irm.inc on line 2857

Line 2857 is the one starting "$tracking->" above. Obviously I'm doing 
something wrong here. What?

Cheers,

Martin S.

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




Re: [PHP] function misfunction

2002-12-30 Thread Martin S
Jason Wong wrote:

> On Monday 30 December 2002 22:07, Michael Sims wrote:
>> On Mon, 30 Dec 2002 14:48:13 +0100, you wrote:
>> >function setCurrentDevGroup($devID)
>> >{
>> >// start original routine
>> >$query = "SELECT dev_group FROM tracking WHERE (computer
>> >=
>> >  $devID)"; $sth
>> >  =
>> > $adb->prepare($query);
>>
>> [...]
>>
>> > Call to a member function on a non-object in
>> >/www/htdocs/dev/include/irm.inc on line 2857
>>
>> Just a guess, but where did $adb inside your function come from?  It
>> doesn't appear that you've instantiated it.
> 
> Specifically, if it's instantiated elsewhere in your code and it's in the
> global scope then you need to declare it as global within your function:
> 
>  function setCurrentDevGroup($devID) {
>global $adb;
>/// rest of function
>  }

Yes, that was it. And also that I had misplaced the function in my gigantic
include file. Now it does what it is supposed to do, almost.

function setCurrentDevGroup($devID)
 {
$query = "SELECT dev_group FROM tracking WHERE (computer = $devID)";
$sth = $adb->prepare($query);
if($sth)
{
$res = $sth->execute();
$resulttable = $sth->fetchrow_hash();
$lookuptable = $resulttable["dev_group"];
//I do get a value for lookuptable here, eg printers.
return($lookuptable);
}
  }
But the value of $lookuptable isn't used in


switch ($lookuptable) {
case "computers":
   $query = "SELECT name FROM computers 
WHERE (ID = $this->ComputerID)";
   break;
case "printers":
   $query = "SELECT name FROM printers 
WHERE (ID = $this->ComputerID)";
   break;

}

(And yes I suppose you could write that as
"SELECT name from $lookuptable WHERE ";

What am I missing now?

/Martin S.

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




[PHP] Function misfunction - 2

2002-12-30 Thread Martin S
NOW what am I doing wrong??

function setCurrentDevGroup($devID)
 {
$query = "SELECT dev_group FROM tracking WHERE (computer = $devID)";
$sth = $adb->prepare($query);
if($sth)
{
$res = $sth->execute();
$resulttable = $sth->fetchrow_hash();
$lookuptable = $resulttable["dev_group"];
}
echo $lookuptable; // gives e.g. printers
return $lookuptable; // will not return the value to 
  }

.
.
.
setCurrentDevGroup($this->ComputerID); // calling function
$query = "SELECT name FROM $lookuptable WHERE (ID = $this->ComputerID)";
//debug line
echo $lookuptable;   // gives an empty string.   

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




Re: [PHP] Function misfunction - 2

2002-12-31 Thread Martin S
Marek Kilimajer wrote:

> You forgot global $adb; at the beginning of your function, or use
> 
> $sth = $GLOBALS['adb']->prepare($query);

Nope sorry, I've just edited it from my post here. It is in the function.

/Martin S.

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




Re: [PHP] Function misfunction - 2

2002-12-31 Thread Martin S
Jason Wong wrote:

> On Tuesday 31 December 2002 20:02, Martin S wrote:
>> Marek Kilimajer wrote:
>> > You forgot global $adb; at the beginning of your function, or use
>> >
>> > $sth = $GLOBALS['adb']->prepare($query);
>>
>> Nope sorry, I've just edited it from my post here. It is in the function.
> 
> Hmm, whenever you post code to the list you should *always* (where
> possible) copy and paste. If the code that you post is different to that
> which you are actually running then it makes it difficult for people to
> help you.
> 
> So if you can, could you please post your complete unadulterated code?
> 
This is the function which should return e.g. "printers" for $lookuptable. 
But doesn't.

function setCurrentDevGroup($devID)
{
global $adb;
$query = "SELECT dev_group FROM tracking WHERE (computer = $devID)";
$sth = $adb->prepare($query);
if($sth)
{
$res = $sth->execute();
$resulttable = $sth->fetchrow_hash();
$lookuptable = $resulttable["dev_group"];
// DEBUG
echo $lookuptable; // this give the correct value

}
return $lookuptable;
}

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




Re: [PHP] Function misfunction - 2

2002-12-31 Thread Martin S
Jason Wong wrote:

> On Tuesday 31 December 2002 20:48, Martin S wrote:
> 
>> This is the function which should return e.g. "printers" for
>> $lookuptable. But doesn't.
>>
>> function setCurrentDevGroup($devID)
>> {
>> global $adb;
>> $query = "SELECT dev_group FROM tracking WHERE (computer =
>> $devID)"; $sth = $adb->prepare($query);
>> if($sth)
>> {
>> $res = $sth->execute();
>> $resulttable = $sth->fetchrow_hash();
>> $lookuptable = $resulttable["dev_group"];
>> // DEBUG
>> echo $lookuptable; // this give the correct value
> 
> So here $lookuptable contains the correct value (eg "printers") ??

Correct. At this point $lookuptable contains the value of dev_group.

> 
>> }
>> return $lookuptable;
>> }
> 
> But something like:
> 
>   echo setCurrentDevGroup($devID);

That gives the correct value as well. But I wanted it as a variable 
($lookuptable) ...

What I am trying to do is:

setCurrentDevGroup($this->Computer); // call function and get a device group
switch ($lookuptable) {
case "computers":
bla bla bla
case "printers":
yada yada yada
}

However, getting the inspired moment from your post, I tried

switch (setCurrentDevGroup($this->Computer)) {
case "computers":
bla bla bla
case "printers":
yada yada yada
}

And now this part works at least.
My understanding was that the function would return a value for $lookuptable 
which was useable in the code above. This is incorrect then? 

/Martin S.


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




Re: [PHP] Function misfunction - 2

2002-12-31 Thread Martin S
Jason Wong wrote:

> If you want it so that the value of $lookuptable (in the global scope) is
> changed when you call your function then you have to do something like:
> 
>function doo($dah, $dee, $etc) {
> global $lookuptable;
> $lookuptable = "Hello world";
>   }
> 
>   doo(1, 2, 3);
>   echo $lookuptable; // prints "Hello world"
> ?>
> 
> More examples in manual > Variables > Variable scope

Yes. I tried that (or rather global $adb, $lookuptable) at one point as that 
seemed the most natural remedy. It didn't work so I abandoned it. Perhaps I 
did something else stupid. I'll re-read the docs.

Thanks for your help, and Happy New Year!

Martin S. 

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




Re[2]: [PHP] Img src

2003-01-08 Thread Martin Hudec
Hello Sean,

or try to use this:
print "";
or just
print "";
  ^ ^^
^ - use \ before "
^^- no need to use both \ and " remove those two characters

or try this

your php
?>
" width=104 height=137>
http://www.corwin.sk

PGP key fingerprint  21365ca05ecfd8aeb1cf19c838fff033

"In those days spirits were brave, the stakes were high, 
 men were real men, women were real women and small furry 
 creatures from Alpha Centauri were real small furry creatures 
 from Alpha Centauri."

by Douglas Adams

Wednesday, January 8, 2003, 8:55:08 PM, you wrote:

SB> Ezequiel Sapoznik wrote:
>> I am having a parse error in the following sentence:
>> 
>>   print "";
>> 

SB> it would help if you posted the actual error message !

SB> but try this ...

SB> print '';

SB> or

SB> print "";

SB> -- 

SB> Sean


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




Re[2]: [PHP] Img src CORRECTION

2003-01-08 Thread Martin Hudec
Hello Sean,

oh i must correct myself ;)) .

or try to use this:
print "";
or just
print "";

looks like u have error here:
print "";
  ^ ^^
^ - use \ before "
^^- no need to use both \ and " remove those two characters

or try this

your php
?>
" width=104 height=137>
http://www.corwin.sk

PGP key fingerprint  21365ca05ecfd8aeb1cf19c838fff033

"In those days spirits were brave, the stakes were high, 
 men were real men, women were real women and small furry 
 creatures from Alpha Centauri were real small furry creatures 
 from Alpha Centauri."

by Douglas Adams

Wednesday, January 8, 2003, 8:55:08 PM, you wrote:

SB> Ezequiel Sapoznik wrote:
>> I am having a parse error in the following sentence:
>> 
>>   print "";
>> 

SB> it would help if you posted the actual error message !

SB> but try this ...

SB> print '';

SB> or

SB> print "";

SB> -- 

SB> Sean


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




Re: [PHP] strange problem (user poll)

2003-01-08 Thread Martin Hudec
Hello Paul,

well problem is this: you don't have defined variable $actionmaybe
you are not posting it correctly from form...what is on first 12
lines?

try to add $action="value"; on line 12...just define any suitable
value...

-- 
Best regards,
 Martin  mail   [EMAIL PROTECTED]
 mobile +421.907.303.393
 icq34358414
 wwwhttp://www.corwin.sk

PGP key fingerprint  21365ca05ecfd8aeb1cf19c838fff033

"In those days spirits were brave, the stakes were high, 
 men were real men, women were real women and small furry 
 creatures from Alpha Centauri were real small furry creatures 
 from Alpha Centauri."

by Douglas Adams

Wednesday, January 8, 2003, 11:43:12 PM, you wrote:

PF> Can anyone see a problem in this?  When i run the script i am getting this
PF> error "Notice: Undefined variable: action in
PF> C:\www\Apache2\htdocs\user_poll\2\addpoll.php on line 13"

PF>  // addpoll.php
PF> // Case Study 1: User Poll - Foundation PHP for Flash

PF> // If the form has been submitted...
PF> (line 13) if ($action == "add") {
PF> // Include config file
PF> include('common.php');

PF> // Connect to database
PF> $link = dbConnect();

PF> // Get date for new poll
PF> $posted = time();

PF> // Build query to insert new poll
PF> $query = "INSERT INTO polls (question, option1, option2, option3,
PF> posted)
PF>   VALUES('$question', '$option1', '$option2', '$option3',
PF> $posted)";

PF> // Execute query
PF> $result = @mysql_query($query);

PF> // If query failed...
PF> if (!$result) {
PF> // Display error
PF> print "Could not insert poll\n";
PF> } else {
PF> print "Poll added\n";
PF> }

PF> mysql_close($link);
PF> }
?>>
PF> please anyone


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




[PHP] output of calling grep lr

2003-01-09 Thread Martin Hudec
Hello all,

i am executing grep command from php to get listing of files
containing searched phrase
i am getting output like this:

a/x.txt a/y.txt b/z.txt

I am unable to find any way to replace spaces for \n character using
ereg_replace(), I tried to replace / instead and it replaced it in
last filepath...so i am wondering..am I getting output in one "line"?
Or what?

I was also considering PassThru() but it is not suitable for my needs,
because it generates binary data.

Can anyone help me please?

I have RedHat as webserver, so linux environment :)
source is here:




-- 
Best regards,
 Martin  mail   [EMAIL PROTECTED]
 mobile +421.907.303.393
 icq34358414
 wwwhttp://www.corwin.sk

PGP key fingerprint  21365ca05ecfd8aeb1cf19c838fff033

"In those days spirits were brave, the stakes were high, 
 men were real men, women were real women and small furry 
 creatures from Alpha Centauri were real small furry creatures 
 from Alpha Centauri."

by Douglas Adams


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




[PHP] searching for string inside document

2003-01-09 Thread Martin Hudec
Hello,

i have document in html and i want to get out string between 
tags to put it into another variable..

i am wondering if i could use eregi() herebut how? I cant figure
out any possible way... same with strchr() and strstr()

can anyone help me please?

-- 
Best regards,
 Martin  mail   [EMAIL PROTECTED]
 mobile +421.907.303.393
 icq34358414
 wwwhttp://www.corwin.sk

PGP key fingerprint  21365ca05ecfd8aeb1cf19c838fff033

"In those days spirits were brave, the stakes were high, 
 men were real men, women were real women and small furry 
 creatures from Alpha Centauri were real small furry creatures 
 from Alpha Centauri."

by Douglas Adams


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




[PHP] Which country?

2003-01-20 Thread Martin Thoma
Hello!

Is there a way to get to know from which country a user is calling the
webside with my php-script?

Martin



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




[PHP] Getting https-page

2003-01-20 Thread Martin Thoma
Hello!

You can easily get an webpage with:
 $fp = fopen("http://www.mydomain.com/";, "r");
 if ($fp) exit;
 while(!feof($fp))
 { $line .= fgets($fp, 4096);
 }
 fclose($fp);
 print $line;

But this doesn't work with https (SSL). How can I get an https-page?

Martin


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




[PHP] Re: simple date question

2003-01-20 Thread Martin Thoma
Hi Adria,

why not just using  $month=date("m")?

Martin




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




[PHP] Re: Freshmeat question

2003-01-20 Thread Martin Thoma
Well, it's quite easy: Just write a php-script and start it with php myscript.php. 
Thats all.

You could fetch a web-page with fopen:
$fp = fopen("http://www.mydomain.com/";, "r");
$line = "";
 while(!feof($fp))
 { $line .= fgets($fp, 4096);
 }
 fclose($fp);
 print $line;

If you are new in programming, I think PHP is easyier to learn than Perl.

Martin



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




RE: [PHP] getting green screen

2003-01-20 Thread Martin Towell
Hi Martin

Post some code snippets and the resultant output for us to look at

Martin (To confuse things )

> -Original Message-
> From: martin [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 21, 2003 1:43 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] getting green screen
> 
> 
> Hi,
> I'm somtimes getting a green screen after a PHP-app (green 
> background and
> backslashes in front of "'"-signes. When reloading this 
> outputpage, the
> normal lay-out without backslashes is visible.
> 
> Why does this happen? Can I prevent it?
> 
> Martin
> 
> 
> 
> -- 
> 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




[PHP] Re: Freshmeat question

2003-01-21 Thread Martin Thoma
> I am not new to programming, just to scripting languages. I have seen that Perl has 
>some high advanced sintaxes for string processing, for example, but I don't know if 
>the same level can also be achieved in PHP...?

Sorry, I don't know that. I know that Perl has some regular-expressions, but php has 
this, too.

> As for the script below, could I run it inside a (my) browser? This could be in any 
>browser?

Well, it depends ;-) Generally: Yes. But you have to let a web-browser (like apache) 
process the php-script.

Martin


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




Re: [PHP] Disable pic copy/save?

2003-01-23 Thread Martin Hudec
H it might be done by checking which mouse button is pressed using 
javascript :) but i think this works only in Iexplore ;)...i used such code 
on my webpageit shows only copyright etcanyway user does not need to 
rightclik and save if he knows where is his browser cache located.

Martin


On Thursday 23 January 2003 10:57 am, Jason Wong wrote:
> On Thursday 23 January 2003 17:52, Anthony Rodriguez wrote:
> > Hi!
> >
> > A client wants to test market two versions of an advertising but wants to
> > disable the users' ability to copy/save the ads (right click, copy/save).
> >
> > How can this be done in PHP?
>
> It can't be done, period. You need to get the data to the browser for it to
> be displayed. Once it's on the user's browser a determined user will be
> able to save whatever it is that's being displayed.


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




RE: [PHP] ? in URLS.

2003-01-23 Thread Martin Towell
if it's just the string after the ? then use $QUERY_STRING
can't remember which $_* variable it's under...
HTH

> -Original Message-
> From: Simon Angell [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 24, 2003 4:50 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] ? in URLS.
> 
> 
> Ok, ill explain my self further. the URL in the script is
> http://www.weatherzone.com.au/yourHomePage.jsp?ref=f2eeb571ed
> 
> The script uses the URL to see the page and store it locally, 
> then another
> script grabs selected data from that page. the stuff after the ? is
> essential for the data i want to be displayed, with out that part, the
> script only sees the base page without the data i need, so 
> hence it doesn't
> grab it. so how do i use the
> $_GET['var1']
> $_GET['var2']
> $_GET['var3']
> 
> or urlencode() in the script
> this is the script.
>  //Writing of local file
> 
>  $rContents = implode( "\r\n", file(
> 'http://www.weatherzone.com.au/yourHomePage.jsp?ref=f2eeb571ed' ) );
> 
> if( ($fp = fopen( 'wztest.txt', 'wb+' )) !== false )
> {
> fputs( $fp, $rContents );
> fclose( $fp );
> }
> ?>
> 
> 
> --
> 
> Cheers
> -
> Simon Angell
> Canberra, ACT
> www.canberra-wx.com
> -
> Proud member of the
> Australian Severe Weather Association.
> www.severeweather.asn.au
> --
> "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > use urlencode()
> >
> > Simon Angell wrote:
> >
> > >Hi All.
> > >I am currently playing with sripts, and have come across a 
> problem, that
> i
> > >can't slove. (i am a novice - lol).
> > >The script requires a URL to grab data from. The URL has a 
> ? in it, and
> > >testing the script it grabs the base data of the URL, but not the
> essential
> > >data i need, which is only brought up with what comes 
> after the ? in the
> > >URL. now i figure it has something to do with the ? in the 
> URL but i
> can't
> > >seem to fix it myself.
> > >
> > >Thanks
> > >
> > >--
> > >
> > >Cheers
> > >-
> > >Simon Angell
> > >Canberra, ACT
> > >www.canberra-wx.com
> > >-
> > >Proud member of the
> > >Australian Severe Weather Association.
> > >www.severeweather.asn.au
> > >--
> > >
> > >
> > >
> > >
> > >
> >
> 
> 
> 
> -- 
> 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




RE: [PHP] problems with ==?

2003-02-06 Thread Martin Towell
check for leading/trailing spaces

if (trim($view) == "vendor")

HTH
Martin

-Original Message-
From: Peter Gumbrell [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 07, 2003 3:07 PM
To: Php-General
Subject: [PHP] problems with ==?


In the following code

$view = $HTTP_GET_VARS[view];
print $view;
if ($view == "vendor")
{ code here
}

print $view produces 'vendor'

but the if statement in the next section isn't being triggered. Can anyone
see what is wrong here? I have tried double quotes, single quotes and no
quotes around 'vendor' but none of them work.

Thanks

Peter Gumbrell



-- 
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




[PHP] Beginners question

2003-02-09 Thread Martin Purdy
Hi everybody

I am totally new to PHP, and I have a problem with the Print statement.
When I send a newline using "\n" nothing happens.

I cannot get any linebreaks into my code.

The following line is copied from the PHP Manual, and is sopposed to give me
the text split into 3 lines, but they come out as one line.

echo "This spans\nmultiple lines. The newlines will be\noutput as
well.";

Can someone please tell me what I am doing wrong?

Martin Purdy



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




Re: [PHP] Beginners question

2003-02-09 Thread Martin Purdy
How do you use the output on a webpage then?

Martin




"Leif K-Brooks" <[EMAIL PROTECTED]> skrev i en meddelelse
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> My guess is that the new lines are there, but since you're (most likely)
> outputting HTML, you don't see them.  Take at look at the br HTML tag.
>
> Martin Purdy wrote:
>
>  >Hi everybody
>  >
>  >I am totally new to PHP, and I have a problem with the Print statement.
>  >When I send a newline using "\n" nothing happens.
>  >
>  >I cannot get any linebreaks into my code.
>  >
>  >The following line is copied from the PHP Manual, and is sopposed to
> give me
>  >the text split into 3 lines, but they come out as one line.
>  >
>  >echo "This spans\nmultiple lines. The newlines will be\noutput as
>  >well.";
>  >
>  >Can someone please tell me what I am doing wrong?
>  >
>  >Martin Purdy
>  >
>  >
>  >
>  >
>  >
>
> --
> The above message is encrypted with double rot13 encoding.  Any
> unauthorized attempt to decrypt it will be prosecuted to the full extent
> of the law.
>
>
>
>



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




Re: [PHP] FTP not enabled in RedHat 7.x distro

2003-02-17 Thread Martin Marques
Quoting [EMAIL PROTECTED]:

> Hi,
> 
> Installed RPM's from RedHat (latest patches) and using PHP with Apache
> under RH7.1 Linux, lots of scripts, no problems.
> 
> The hitch is that a user just tried ftp_connect(), and got the
> "unknown function" error.
> 
> Okay, so I expected this to be a missing php.so loadable module.
> However, it appears more like an option "--enable-ftp" needs to be
> specified at _compile time_ to get it working.
> 
> Is this really the case? Does RedHat _really_ not distribute with this
> feature already on? Am I even barking up the right tree?!?

Use phpinfo() to know how your PHP was compiled. If it comes as a module, you
should see a --enable-feature=shared. Don't know it ftp support can be compiled
as shared, but

Saludos... :-)


-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-
Martín Marqués  |[EMAIL PROTECTED]
Programador, Administrador, DBA |   Centro de Telematica
   Universidad Nacional
del Litoral
-


-
This mail sent through IMP: http://horde.org/imp/

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




Re: Re[2]: [PHP] FTP not enabled in RedHat 7.x distro

2003-02-17 Thread Martin Marques
Quoting [EMAIL PROTECTED]:

> Rick,
> 
> In response to your mail of Monday 17 February 2003 at 17:46:49:
> 
> 
> Thanks for your swift response!
> 
> 
> RE> I also use Redhat 7.1 and use FTP successfully. Something in your
> RE> setup?
> 
> Well, I don't think so ... it's all fairly standard (only use RPM's)
> and the "function not found" suggests the functionality just isn't
> present. Do you have an FTP extension mentioned in your PHP.ini file?
> 
> The doc's aren't clear on this point ;)

My RH 7.3 php (distributed by RH) has --enable-ftp, so it was compiled with the
ftp support.
Check yor sintax. Could have a typo somewhere.

-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-
Martín Marqués  |[EMAIL PROTECTED]
Programador, Administrador, DBA |   Centro de Telematica
   Universidad Nacional
del Litoral
-


-
This mail sent through IMP: http://horde.org/imp/

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




Re: Re[4]: [PHP] FTP not enabled in RedHat 7.x distro

2003-02-19 Thread Martin Marques
On Mar 18 Feb 2003 16:00, [EMAIL PROTECTED] wrote:
>
> Very weird - I thought RedHat would have enabled it too. I did

When I say RH, I mean RedHat. The diference seems to be that I'm on 7.3, while 
you're on 7.1.
Still, it should be compiled with ftp support.

> copy-and-paste the problem command to check I was searching for the
> right one. Here's the error, just for clarity: -
>
> Fatal error: Call to undefined function: ftp_connect() in
> /home/www/script.php on line 2
>
> ...and the line in question is like...   
>
> Anyway, maybe I should check the RH distro. Can you run the following
> on your box for me so I can compare please?

RH = RedHat! :-)

When you run phpinfo() the output gives you the configure line with which php 
was compiled, so check there if it was or wasn't compiled with ftp support.

Saludos... :-)

-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-
Martín Marqués  |[EMAIL PROTECTED]
Programador, Administrador, DBA |   Centro de Telematica
   Universidad Nacional
del Litoral
-


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




Re: Re[6]: [PHP] FTP not enabled in RedHat 7.x distro

2003-02-19 Thread Martin Marques
On Mié 19 Feb 2003 08:54, [EMAIL PROTECTED] wrote:
>
> I was wondering if you were able to check the exact RH release of your
> PHP package, to see if it matched mine?

==> rpm -q php
php-4.1.2-7.3.6

> MM> When you run phpinfo() the output gives you the configure line
> MM> with which php was compiled, so check there if it was or wasn't
> MM> compiled with ftp support.
>
> Well, I am not 100% sure. The phpinfo() reports the following:
>
> "...tem' '--with-ftp' '--with-zlib..."
>
> ...but the doc's and the people sometimes talk about "--with-ftp" and
> sometimes talk about "--enable-ftp". It's really not quite clear.

I have '--enable-ftp' on my phpinfo().

> Certainly looks like it's _behaving_ as though it has no FTP, and I'm
> increasingly getting the impression that RH released an RPM patch that
> wasn't exactly right... I'll poke them too perhaps.

Get the source of the rpm (the one that ends at src.rpm), install it, modify 
the configure line in the php.spec file and rebuild.
Also, send a bug report to bugzilla (http://bugzilla.redhat.com).

-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-
Martín Marqués  |[EMAIL PROTECTED]
Programador, Administrador, DBA |   Centro de Telematica
   Universidad Nacional
del Litoral
-


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



[PHP] WebTV vs PHP

2003-02-26 Thread Martin Mandl
Has anybody expirienced troubles with clients using some sort of WebTV?
I got a bug report saying - sbdy using WebTV has problems with our 
sites. We are using pure PHP - no JAVA, no JAVAScript ... Thus it's 
puzzling. The only thing I are sessions. However they are working also 
with cookies switched off 

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


Re: [PHP] newbie: installing gd in php4

2003-02-26 Thread Martin Mandl
just make sure, the php_gd.dll is in the directory where all your other 
php-dlls are ...

-Original Message-
Using MS Win 98 / PHP 4 and Apache.
What is the best way to install php_gd.dll so that I can make use of the
image library.


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


[PHP] Re: Too many connections - MySQL

2003-02-26 Thread Martin Mandl
don't use persitent connections ... that will solve your problem

Stephen Craton wrote:

On this site, www.roempire.com, which we host, they are having problems with too many connections. I think that someone messed with the GRANT option. How can we reverse this and allow unlimited connections per site? Or is this a problem with the script?

Thanks,
Stephen Craton
http://www.melchior.us


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


RE: [PHP] Switch Statement || Case with multiple values?

2003-03-02 Thread Martin Towell
I've been using this:

if (in_array($value, array("foo", "bar", "blah")))
{
  // do something
}

but if you want to use a switch/case, I don't know any easier way.

HTH
Martin

> -Original Message-
> From: CF High [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 03, 2003 1:41 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Switch Statement || Case with multiple values?
> 
> 
> Hey all.
> 
> In Cold Fusion I was able to do the following:
> 
> 
> 
> 
> Do Stuff
> 
> 
> 
> 
> Note the comma delimited set of values for the case.  Is 
> there a way to do
> this in php?( i.e. if any of the comma delimited case values match the
> switch expression, proceed with the specified case instructions)
> 
> It's kind of cumbersome breaking out 5 cases when in CF I can 
> combine them
> into one
> 
> Let me know.
> 
> --Noah
> 
> 
> 
> --
> 
> 
> 
> 
> -- 
> 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



RE: [PHP] heredoc problem

2003-03-02 Thread Martin Towell
when I copy/pasted directly from your email and tried to execute it, I can
an error on line 5 too

I noticed that there's a space at the end of line 5, I deleted it and it
worked fine.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 03, 2003 9:02 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] heredoc problem
> 
> 
> Can someone tell me what is wrong with the following code:
> 
> 
> Testing
> 
>  $str = << Example of string 
> spanning multiple lines 
> using heredoc syntax.
> EOD;
> ?> 
> 
> 
> 
> This is code straight out of the PHP manual. I get the error:
> Parse error: parse error, unexpected T_SL in testhere.php on line 5
> 
> I looked up T_SL and it is a token representing << so that 
> means it just
> doesn't get the <<<. Why not? I've tried all the combinations 
> of spaces and
> no space in that line that I can think of.
> 
> So, what's wrong. Undoubtedly something obvious to anyone except me.
> 
> Janet
> 
> -- 
> 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



RE: [PHP] fread problem

2003-03-02 Thread Martin Towell
you'll have to exec() the code

 $filename = "test.php";
 $handle = fopen ($filename, "r");
 $contents = fread ($handle, filesize ($filename));
 fclose ($handle);
 exec($contents);

see if that works
Martin

> -Original Message-
> From: Paul Cohen [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 03, 2003 3:46 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] fread problem
> 
> 
> Hello all,
> 
> I am trying to read a php file to a varible and then print 
> that variable.
> Unfortunately, my php file is not being parsed by the fread 
> function and I
> can't figure out why.
> 
> Here is the code in my file and was taken directly from the manual:
> 
> $filename = "test.php";
> $handle = fopen ($filename, "r");
> $contents = fread ($handle, filesize ($filename));
> fclose ($handle);
> echo $contents;
> 
> Here is test.php >>>
> 
>  echo "Hello World";
> ?>
> 
> <<< END test.php
> 
> 
> When I run this, I get a blank page with my php code as my 
> HTML source code.
> Not good.
> 
> Finally, if you respond to this, please copy me directly as I get the
> mailing list as a digest.
> 
> Thx,
> 
> Paul
> 
> 
> 
> 
> -- 
> 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



[PHP] functions and

2003-03-03 Thread Martin Johansson
Hi
I want to call a function logout() inside an  statement:

\">logout



but this doesnt work.. how shall I do it
/M



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



  1   2   3   4   5   6   7   8   9   10   >