[PHP-WIN] Postnuke, PHP and Windows ISA servers

2002-06-05 Thread Mike

I am a secondary student who runs VBulletin forum from my house. I am the
administrator and everytime I connect to it from school, the schools ISA
server caches my username and password. I was wondering if there was a PHP
fix to this type of situation. People in my school who use the forums are
being able to post stuff under my name from around the campus. Any insight
appreciated.

Thanks!

Mike T.
www.fvforces.net




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




[PHP-WIN] Implement Javascript into vB code

2002-06-24 Thread Mike

How would I implement Javascript into a vB code?



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




[PHP-WIN] Re: Implement Javascript into vB code

2002-06-24 Thread Mike

Sorry guys, let me rephrase my question.

I want to insert some javascript code into the code for my forum (vB) not as
a post, but as a forum post, but as code within the php file.

Sorry about the confusion


"Mike" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How would I implement Javascript into a vB code?
>
>



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




[PHP-WIN] Tons of notices and warnings...for what reason?

2002-07-01 Thread Mike

I've installed IIS, MySQL, and PHP on my computer...When I a bulletin board
(PHP), I get around 50 errors...I went to the company that makes the board,
and they said to turn register_globals on...and nothing changed...Here's the
list of errors:

Notice: Undefined variable: nocache in c:\inetpub\wwwroot\global.php on line
23

Notice: Undefined variable: query_id in
c:\inetpub\wwwroot\admin\db_mysql.php on line 99

Notice: Undefined property: in c:\inetpub\wwwroot\admin\db_mysql.php on line
99

Notice: Use of undefined constant template - assumed 'template' in
c:\inetpub\wwwroot\global.php on line 54

Warning: Cannot add header information - headers already sent by (output
started at c:\inetpub\wwwroot\global.php:23) in
c:\inetpub\wwwroot\global.php on line 319

Warning: Cannot add header information - headers already sent by (output
started at c:\inetpub\wwwroot\global.php:23) in
c:\inetpub\wwwroot\global.php on line 322

Notice: Use of undefined constant template - assumed 'template' in
c:\inetpub\wwwroot\global.php on line 335

Notice: Use of undefined constant template - assumed 'template' in
c:\inetpub\wwwroot\global.php on line 335

Notice: Use of undefined constant template - assumed 'template' in
c:\inetpub\wwwroot\global.php on line 335

Notice: Use of undefined constant template - assumed 'template' in
c:\inetpub\wwwroot\global.php on line 335

Notice: Use of undefined constant template - assumed 'template' in
c:\inetpub\wwwroot\global.php on line 335

Notice: Use of undefined constant template - assumed 'template' in
c:\inetpub\wwwroot\global.php on line 335

Notice: Undefined variable: query_id in
c:\inetpub\wwwroot\admin\db_mysql.php on line 99

Notice: Undefined property: in c:\inetpub\wwwroot\admin\db_mysql.php on line
99

Notice: Use of undefined constant template - assumed 'template' in
c:\inetpub\wwwroot\global.php on line 180

Notice: Undefined variable: url in c:\inetpub\wwwroot\global.php on line 354

Notice: Undefined variable: bbtimezoneoffset in
c:\inetpub\wwwroot\global.php on line 360

Notice: Undefined variable: bbusername in c:\inetpub\wwwroot\index.php on
line 24

Notice: Use of undefined constant lastpost - assumed 'lastpost' in
c:\inetpub\wwwroot\index.php on line 37

Notice: Use of undefined constant allowposting - assumed 'allowposting' in
c:\inetpub\wwwroot\index.php on line 44

Notice: Use of undefined constant forumid - assumed 'forumid' in
c:\inetpub\wwwroot\index.php on line 49

Notice: Use of undefined constant title - assumed 'title' in
c:\inetpub\wwwroot\index.php on line 50

Notice: Use of undefined constant description - assumed 'description' in
c:\inetpub\wwwroot\index.php on line 53

Notice: Use of undefined constant replycount - assumed 'replycount' in
c:\inetpub\wwwroot\index.php on line 57

Notice: Use of undefined constant threadcount - assumed 'threadcount' in
c:\inetpub\wwwroot\index.php on line 58

Notice: Use of undefined constant lastpost - assumed 'lastpost' in
c:\inetpub\wwwroot\index.php on line 61

Notice: Use of undefined constant lastpost - assumed 'lastpost' in
c:\inetpub\wwwroot\index.php on line 62

Notice: Use of undefined constant lastpost - assumed 'lastpost' in
c:\inetpub\wwwroot\index.php on line 63

Notice: Undefined index: forumhomebit in c:\inetpub\wwwroot\global.php on
line 176

Notice: Undefined variable: query_id in
c:\inetpub\wwwroot\admin\db_mysql.php on line 99

Notice: Undefined property: in c:\inetpub\wwwroot\admin\db_mysql.php on line
99

Notice: Use of undefined constant template - assumed 'template' in
c:\inetpub\wwwroot\global.php on line 180

Notice: Undefined variable: forumbits in c:\inetpub\wwwroot\index.php(69) :
eval()'d code on line 1

Notice: Undefined index: forumhome in c:\inetpub\wwwroot\global.php on line
176

Notice: Undefined variable: query_id in
c:\inetpub\wwwroot\admin\db_mysql.php on line 99

Notice: Undefined property: in c:\inetpub\wwwroot\admin\db_mysql.php on line
99

Notice: Use of undefined constant template - assumed 'template' in
c:\inetpub\wwwroot\global.php on line 180

Notice: Undefined variable: newposts in c:\inetpub\wwwroot\index.php(72) :
eval()'d code on line 16

Notice: Use of undefined constant findword - assumed 'findword' in
c:\inetpub\wwwroot\global.php on line 70

Notice: Use of undefined constant replaceword - assumed 'replaceword' in
c:\inetpub\wwwroot\global.php on line 70

Notice: Use of undefined constant findword - assumed 'findword' in
c:\inetpub\wwwroot\global.php on line 70

Notice: Use of undefined constant replaceword - assumed 'replaceword' in
c:\inetpub\wwwroot\global.php on line 70

Notice: Use of undefined constant findword - assumed 'findword' in
c:\inetpub\wwwroot\global.php on line 70

Notice: Use of undefined constant replaceword - assumed 'replaceword' in
c:\inetpub\wwwroot\global.php on line 70

Notice: Use of undefined constant findword - assumed 'findword' in
c:\inetpub\wwwroot\global.php on line 70

Notice: Use of undefined constant replaceword - assumed 'replace

[PHP-WIN] PHP and Soap

2001-07-29 Thread Mike

Where can I find examples of PHP SOAP at.


Cheers

M;)



-- 
PHP Windows 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-WIN] 4.0.6 mssql.dll Extension load failure

2001-10-25 Thread Mike

We have PHP installed as an ISAP module on our W2K IIS5 server and
its operational with no problems - phpinfo() runs just fine.

But - When I uncomment the php_mssql.dll extension in php.ini I get an error
when PHP starts up saying it cannot find the .dll file.

The extension directory is correctly set to, c:\php\extensions
and the actual file itself is in that directory as wells as
c:\winnt\system32 and MSSQL client libraries are loaded and operational.

Cant think of anything else I need to do - does the .dll file need
be registered with regsrvr or something ??

 Can anybody give me some pointers please ?

 Thanks & rgds

Mike
[EMAIL PROTECTED]




-- 
PHP Windows 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-WIN] COM /DCOM

2001-09-29 Thread Mike

Hi All
Where is some good info on useing COM or DCOM with PHP?

Both of my scripts bellow fail and I cannot seem to find why.


or
Version}\n";
$word->Visible = 1;
$word->Documents->Add();
$word->Selection->TypeText("This is a test...");
$word->Documents[1]->SaveAs("Useless test.doc");
$word->Quit();
?>

Running on Win2K PHP 4.0.6



-- 
PHP Windows 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-WIN] Re: Problems setting up a DSN

2001-09-27 Thread Mike

Daniel,

If you are accessing an Access 2k database, I would use OLEDB rather than
ODBC. With this you would not require a DSN, and the speed is greater.

ex.

$conn = new COM("ADODB.Connection");
$connString = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=F:\someMDB.MDB;User Id=Foo;Password=Bar';
$conn->Open($connString);
$rs = $conn->Execute("SomeSQL");
$conn->Close();




"Daniel Parsons" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I'm running PHP 4.0 on WinNT 4 with IIS and attempting to use an Access
> 2000 database. When I use this is a script:
>
>   $logdb = odbc_connect("uptime", "user", "password");
>
> it gives the following error :
>
>   Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name
>   not found and no default driver specified, SQL state IM002 in
>   SQLConnect in D:\Inetpub\wwwroot\daniel\showuptime.php on line 20
>
> I have set up a System DSN with the name 'uptime' in the ODBC
> connections on the server and just can't figure out why it isn't finding
> it. I haven't rebooted the server since adding the DSN but it is running
> some other stuff that means rebooting is really a last resort thing.
>
> Can anyone enlighten me to the really small obvious thing that I have
> probably overlooked?
>
> Cheers,
> Daniel
>



-- 
PHP Windows 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-WIN] current page

2001-09-27 Thread Mike

The easiest way to find out these kind of constant variables is to create
this page and view it:





"John Asendorf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I believe you can call:
>
> $thisepage = $PHP_SELF;
>
> you'll need to look it up though
>
> -
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Nullum magnum ingenium sine mixtura dementiae fuit
>
>
> > -Original Message-
> > From: Stanley Cheung [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, September 27, 2001 10:32 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] current page
> >
> >
> > Hi all,
> >
> > anyone can tell me the parameter for name of current page?
> > e.g:
> > www.abc.com/hello.php
> >
> > how can retrieve the value (hello.php)?
> >
> > pls advise. thx!
> >
> > Stanley
> >
> >
> >
> > --
> > PHP Windows 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 Windows 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-WIN] Re: PHP-> JavaScript

2001-09-27 Thread Mike

I'm not sure which way you are trying to go, but here is a function I use
all the time:









"Sichta Daniel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi !!
>
> Is there any way to parse variable from JavaScript to PHP ? Something
like:
> function xxx (id) {
>  id;
> }
>
> DAN
>



-- 
PHP Windows 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-WIN] php4 and interbase

2001-09-27 Thread Mike

Yes, but do you have the php_interbase.dll in your extensions directory.

And I assume you have a line similar to this in your INI:

extension_dir = "f:\apache\php\extensions"


"SebastiáN" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> yes, interbase server is runing on my machine ... and the required dll's
> (dg32 or something) are present too ...
>
>
>
> "Chen Wei" <[EMAIL PROTECTED]> escribió en el mensaje
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi Sebastián,
> >
> > Do you have the Interbase drivers installed in the computer? I had that
> > problem before because I don't have the database drivers installed so
the
> > DLL can't be loaded.
> >
> >
> > --
> > regards,
> > chen wei (http://www.cw213.net)
> > ===
> > Solutions Developer of Earth9.com
> > ===
> >
> >
> > Wednesday, September 26, 2001, 5:02:56 AM, you wrote:
> >
> > S> When I edit php.ini file and try to use the Interbase extension,
> everytime I
> > S> try to open a php on my Browser it display the following warning
> >
> > S> "Unable to load dynamic library
'c:\php\extensions/php_interbase.dll' -
> in
> > S> Unknown on line 0"
> >
> >
> > S> Help me please 
> >
>
>



-- 
PHP Windows 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-WIN] 4.0.6 mssql.dll Extension load failure

2001-11-01 Thread Mike

Finally realised what was wrong - You need to manually copy ALL the SQL
Server client network files from the sqlServer box into the system32
directory on the PHP/IIS server box. - then magically the module loads and
works - Using a regular SQL client install some of the files tha PHP needs
dont get installed.

This was NOT straightforward to fix.

On researching this problem - there are lots and lots of people who have had
this error - how do we get the fix posted to an FAQ for php/IIS/SQLServer
configs ?

Thanks to all those who helped out on this.

Rgds

Mike


"Dl Neil" <[EMAIL PROTECTED]> wrote in message
news:0f9701c162f7$f7170650$a516100a@jrbrown...
> Mike,
>
> > We have PHP installed as an ISAP module on our W2K IIS5 server and
> > its operational with no problems - phpinfo() runs just fine.
> >
> > But - When I uncomment the php_mssql.dll extension in php.ini I get an
error
> > when PHP starts up saying it cannot find the .dll file.
> >
> > The extension directory is correctly set to, c:\php\extensions
> > and the actual file itself is in that directory as wells as
> > c:\winnt\system32 and MSSQL client libraries are loaded and operational.
>
> I found that PHP was adding the slash between the dir name and the
extension's filename, and that caused a
> problem such as you have described - so did adding a slash as the final
character. Here is the code that works
> on my WinNT4.0/Apache set up (watch the dir diff):
>
> extension_dir = C:/program files/php/extensions
>
> > Cant think of anything else I need to do - does the .dll file need
> > be registered with regsrvr or something ??
>
> =no
>
> >  Can anybody give me some pointers please this problem is driving me
nuts -
> > I even tried reversing the slashes to the UNIX way !
>
> =um, don't like the sound of that...
> =dn
>
>



-- 
PHP Windows 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-WIN] 4.0.6 mssql.dll Extension load failure

2001-11-01 Thread Mike

We have PHP installed as an ISAP module on our W2K IIS5 server and
its operational with no problems - phpinfo() runs just fine.

But - When I uncomment the php_mssql.dll extension in php.ini I get an error
when PHP starts up saying it cannot find the .dll file.

The extension directory is correctly set to, c:\php\extensions
and the actual file itself is in that directory as wells as
c:\winnt\system32 and MSSQL client libraries are loaded and operational.

Cant think of anything else I need to do - does the .dll file need
be registered with regsrvr or something ??

 Can anybody give me some pointers please this problem is driving me nuts -
I even tried reversing the slashes to the UNIX way !

 Thanks & rgds

Mike
[EMAIL PROTECTED]




-- 
PHP Windows 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-WIN] PHP and IIS

2001-11-30 Thread Mike

When setting up vBulletin board with PHP i am unable to send emails to my
members and so on. I have specifed in my php.ini file what the IP is of my
SMTP server. I also know that my SMTP server works with my ASP scripts. If
you could help me out on this, that would be great.



-- 
PHP Windows 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-WIN] Re: De su interes/Publi enseñanza

2001-12-04 Thread Mike

no hablo espanol.
"Universt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> PUBLI/ENSEÑANZA
>
>
Learning
> University
>
Area
> Master-Doctoral
>
> 
>
>
>
> Distinguido Sr./Señora:
>
>
> Gratamente nos dirigimos a vd.para informales sobre la posibilidad de
> realizar unos Masters, Doctorados, a distancia desde cualquier parte del
> mundo.Y LA POSIBILIDAD DE CONVALIDAR SU EXPERIENCIA
> LABORAL, ESTUDIOS ANTERIORES,PARA  PODER CERTIFICARLE
> DIPLOMATURAS EN DIFERENTES AREAS.
> La enseñanza es a distancia y pueden seguirlo cómodamente en
> cualquier parte del mundo tanto el material de estudio como él envió de
> examen y la entrega de diplomas se efectúa a distancia.
> Certificamos la experiencia a fin.
>
>
> Areas de estudio enormemente practicas:
>
> Area Economía:
>
>  Marketing y Dirección de Empresas
> Comunicación Social y Relaciones Publicas
> MBA. Master Business Administraccion
> Psicología Social y Empresa
> Ecología y Medio Ambiente
> PNL y Psicología Social
> Promoción del Turismo
>  Gestión Inmobiliaria y Inversiones
> Internet y Nuevas Tecnologías
>  (Otros como enseñanzas convalidables, nuevas profesiones)
>  ---
>
> Area Terapias Alternativas:
>
> Medicina Naturista Integral
> Estética y Belleza
> Fijo-Homeopatía
> Medicina Ayuverdica
> Terapias Manuales
> Medicina China
> Psicoterapia
> Psicología Social y Humanista
>  (Otros como enseñanzas convalidables,nuevas profesiones)
>
> MAS DE 300.DIPLOMATURAS POR CONVALIDACION DE
> EXPERIENCIA LABORAL Y EDUCATIVA AFIN.
> Envíenos un e-mail a [EMAIL PROTECTED]  y le informaremos con la
> mayor brevedad sobre fecha de inicio, módulos de estudio, costes y
> condiciones generales, posibilidades.etc.
>
>  Sin otra que la de quedar de vds.
>
>
>  Atentamente:
>
>
>
>  Luis Rendell Bustos
>  Area Broker-Learning University
>  University Technology International
>  Alicante
>  e-Mail:
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> ---
>
>  Si desea ser borrado enviar e-mail a:
> [EMAIL PROTECTED]



-- 
PHP Windows 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-WIN] DNS

2001-12-10 Thread Mike

This is kinda question relating to PHP and windows. I have setup my site
with IIS 5.0 and PHP. Everything works fine. Now that I have my site ready I
want to know if I have set my DNS zones up correctly. I have specifed the
proper zones as in foreward and reverse, and I want to know if I am ready to
tell the website to point to that DNS server. Have i done everything
correctly?

--
-Mike Taekema
Microsoft Certified Professional
www.fvforces.net




-- 
PHP Windows 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-WIN] Re: PHP software tool

2001-12-22 Thread Mike

TextPad is another good text editor for all types of programming languages.
Unforuntatly it is not free but the demo my work for you.
http://www.textpad.com

It supports multiple languages like PHP, JAVA and HTML


-Mike

"Laserjetter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Does anybody know of or can recommend any freeware text editing tools for
> editing PHP code in Win32?
> I can manage with Windows' Notepad but something with code highlighting
etc
> and of a similar footprint to notepad would be useful.
>
>



-- 
PHP Windows 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-WIN] Need Advice

2002-01-24 Thread Mike

Ok, I have looked for the past 2 days searching for an answer to my problem.
It's not PHP related but quite similar to it.

I run a web/FTP server from my house. My problem is that my download rates
to my place is super fast yet my u/l rates really suck. I mean I can't push
anything faster then 15 kb/s and I am on a 1.5 MB connection with a 765KBs
up stream. Whats going on? i have tried 2 nics and that don't seem to be the
problem. That and the other computers that are on same network that i'm on
are lagged to crap. Its been happening for 4 months now and it is really
making me mad.
Any ideas?? here are the specs:

AMD 1.4 GHz
512MB PC-133 RAM
D-Link 530+TX 10/100
SMC 10

Is there something in the registry that i can change? Maybe its a registry
setting for an up down ratio?

--
-Mike Taekema
Microsoft Certified Professional
www.fvforces.net




-- 
PHP Windows 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-WIN] Form submit action type.

2002-02-11 Thread Mike

I am creating a page with a form on it. I want it so that when people click
submit, I want the information from the form to be emailed to me. Is there a
way I can do this with normal JavaScripting or even plain HTML or would I
have to use something like PHP.

Thanks



--
-Mike Taekema
Microsoft Certified Professional
www.fvforces.net




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




[PHP-WIN] Re: Form submit action type.

2002-02-12 Thread Mike

What server side script should I use, I was visiting hotscripts and they
don't really have anything that will work for me.



"Mike" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am creating a page with a form on it. I want it so that when people
click
> submit, I want the information from the form to be emailed to me. Is there
a
> way I can do this with normal JavaScripting or even plain HTML or would I
> have to use something like PHP.
>
> Thanks
>
>
>
> --
> -Mike Taekema
> Microsoft Certified Professional
> www.fvforces.net
>
>
>



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




[PHP-WIN] WMI in PHP

2003-02-20 Thread Mike
I am looking for any help for using any WMI in php.  Looking through the
Platform SDK yesterday there were several examples of implementing it with
different scripting languages.  As far as loading it in PHP what do I need
to do?  (If you cant tell i'm new to the windows server side of things).

--
Mike



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




[PHP-WIN] $GLOBALS

2003-06-11 Thread Mike
When running the following code:

foreach($GLOBALS['photo'] as $photo)

I get:

Warning: Invalid argument supplied for foreach() on line 63

Would register globals have to be on for this code to work?  Am I using the
$GLOBALS clause wrong?  It would seem to me that this should work since you
can use post in the same fashion.
ie: foreach($_POST['photo'] as $photo)

~ Mike



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



[PHP-WIN] mtx.exe....acts like cookie monster...

2001-04-11 Thread Mike

We are running a windows nt4.0 box, informix 9.21 php4.04 and datadirector
for web (informix webblade)
Connecting to the database using ifx_connect() causes mtx.exe to steal
memory and not releasing this memory.
We are not using any ODBC so imho mtx.exe should not start at all.
PHP source of the script:



Can anyone tell me where this might go wrong?

M!ke



-- 
PHP Windows 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-WIN] mtx.exe....acts like cookie monster...

2001-04-11 Thread Mike

We are running a windows nt4.0 box, informix 9.21 php4.04 and datadirector
for web (informix webblade)
Connecting to the database using ifx_connect() causes mtx.exe to steal
memory and not releasing this memory.
We are not using any ODBC so imho mtx.exe should not start at all.
PHP source of the script:



Can anyone tell me where this might go wrong?

M!ke



-- 
PHP Windows 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-WIN] HTML-Forms with the method POST

2001-04-11 Thread Mike

I think u have to read thru ur PhP.ini file..

There is a setting there about global vars.that should do it...

Greetz

M!ke
"Monello" <[EMAIL PROTECTED]> schreef in bericht
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have a strange problem with HTML-Forms with the method POST.
>
> When I work local on my computer with the localhost, all data tipped into
> the form can be read from the HTTP_POST_VARS-system array.
>
> But when I trie to use the form from a other computer connected to the
> internet, all the formdata are lost, the HTTP_POST_VAR-array is empty.
>
> What happens hear ? What did I wrong ?
>
> Thanks for your help.
> Philipp
>
> --
> PHP Windows 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 Windows 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-WIN] ID drscsn... thanks

2004-02-17 Thread mike
Yours ID axytvjnkif
--
Thank 

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

[PHP-WIN] teehing troubles with PHP

2004-03-02 Thread Mike
I'm studying Information systems at university, and I've been set an
assignment to create a simple website using PHP and MySQL. I'm installed
them on my comp at home running Win XP with IIS as my web server. I've
successfully run ASP pages on this set-up but when I try to run a simple
test PHP script - echo ('Hello World'); - all I get is a blank page. But if
I view the source of this page it appears to be fine. I've tried saving the
source of this 'blank' page as HTML and opening it directly in my browser
(IE) but I still get a blank, however if I open this HTML page in FrontPage
and preview it, it's fine. Can anyone suggest anything?

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



[PHP-WIN] Re: teehing troubles with PHP

2004-03-02 Thread Mike
excuse the date on previous post - should be correct on this one

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



[PHP-WIN] Re: teehing troubles with PHP

2004-03-02 Thread Mike
you can ignore this it's working now. the problem was with my
typing/spelling not my software

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



RE: [PHP-WIN] checking file is mounted at the end of a url

2004-10-20 Thread Mike
If you know what the local file name and path are supposed to be, then you
should be able to use file_exists() for that task. 

http://us2.php.net/manual/en/function.file-exists.php

-M

-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 20, 2004 6:47 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] checking file is mounted at the end of a url

Hi,

I'm building a site where among other things, the user (librarian) can see
if a file has been mounted on a local webserver for students to download. I
could provide a link so they can see if the file (pdf) can be downloaded,
but I'd rather just say 'yes' or 'no'.

This requires the page doing some sort of url test and reporting yes/no
depending on the code being sent back. I found something called linkchecker
at Hotscripts.com but when the file doesn't exist, it tries to download
itself instead.

The user will be accessing my server but will be checking something at their
location. I'm sure this must be possible - can anyone point me in the right
direction?

Cheers

George

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

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



RE: [PHP-WIN] checking file is mounted at the end of a url

2004-10-20 Thread Mike
In that case, try using fopen()
http://us2.php.net/manual/en/function.fopen.php

You should be able to check the file handle and check for success or failure
and simply close it after the check is complete. 

Just have to have allow_url_fopen enabled in PHP to do so.

-M

-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 20, 2004 10:28 AM
To: Mike; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] checking file is mounted at the end of a url

Mike,

Thanks, but it's not a local file. I host my service, but the file being
cked is (not) mounted on the users' own university website. So I thnk its
more a case or url-checking.

I've tested file_exists using the url and that doesn't work.

Cheers

George

> -Original Message-
> From: Mike [mailto:[EMAIL PROTECTED]
> Sent: 20 October 2004 3:24 pm
> To: 'George Pitcher'; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] checking file is mounted at the end of a url
>
>
> If you know what the local file name and path are supposed to be, then you
> should be able to use file_exists() for that task.
>
> http://us2.php.net/manual/en/function.file-exists.php
>
> -M
>
> -Original Message-
> From: George Pitcher [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 20, 2004 6:47 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] checking file is mounted at the end of a url
>
> Hi,
>
> I'm building a site where among other things, the user (librarian) can see
> if a file has been mounted on a local webserver for students to
> download. I
> could provide a link so they can see if the file (pdf) can be downloaded,
> but I'd rather just say 'yes' or 'no'.
>
> This requires the page doing some sort of url test and reporting yes/no
> depending on the code being sent back. I found something called
> linkchecker
> at Hotscripts.com but when the file doesn't exist, it tries to download
> itself instead.
>
> The user will be accessing my server but will be checking
> something at their
> location. I'm sure this must be possible - can anyone point me in
> the right
> direction?
>
> Cheers
>
> George
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



RE: [PHP-WIN] Re: running an exe

2004-11-08 Thread Mike
I would have to agree with the blurb below your message.

Unless those files are *huge*, there shouldn't be a problem copying them
locally and running them from there. If you're writing the .exe's, you may
even want to have a small one that gets downloaded, gets ran and it goes to
the web address and downloads the files it needs automatically. (depending
how fancy you want to get)

The other option is to make one big file that gets run and doesn't look for
other files. That'd do without the dependency.

The two factors to consider are these:

1) LAN speed. If the local intranet is all on the LAN, then any of those
options should be fine. 100baseT should be able to handle that. If some are
across the WAM, that'd be something to consider.

2) If you're only doing the install once, you might want to sacrifice speed
for reliability. Better to get it done right than to muck it up. But if this
will be a frequently ran process from the web location, speed may be
optimal.

-M

-Original Message-
From: Jason Barnett [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 08, 2004 1:19 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: running an exe

Please send all responses to the list, not to me personally.  Thanks.

*** Begin e-mail message ***

This is only for use on local intranet!!

The problem is I want to install the software which comprises of 4 files
(setup.exe,setup.w02,setup.w03,setup.w04) from a link on the intrAnet.
It works fine on the local machine, but as soon as I try across the network,
it obviously wont find the second file to install. Ie. Access the link from
a remote machine, and install locally on that remote machine.

Is the best way to copy the files locally, or is there a better method?

 > yes, I would just copy the files locally unless you have a *lot* of
updates to
 > do (either often or just a lot of machines).  Just not worth the risk
IMO...
 > even if it's only an intranet right now, this would be very easy to
forget
 > about if / when you start making outside connections.



-Original Message-
From: Jason Barnett [mailto:[EMAIL PROTECTED]
Sent: 05 November 2004 09:40 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: running an exe

Why would you want to do this?  Blindly installing applications from web
links
is *a bad idea* and dialog boxes are there to help protect users.  Heck from
the
way you asked your question I'm not even sure - are you the user or the
provider?  Give us a little more than this to go on and we'll see if we
can't
help you out more.

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

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

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



RE: [PHP-WIN] cannot delete libmysql.dll

2004-11-08 Thread Mike
Worse case, reboot and try then and if that doesn't work, just boot into
safe mode - should be more than easy to kill it at that point.

-M

-Original Message-
From: MW [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 08, 2004 6:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] cannot delete libmysql.dll

I am trying to upgrade my php installation, but cannot overwrite the 
libmysql.dll fine - it seems to be in use

I have already stopped the iis admin service, anybody have any other 
suggestions as to which process is using the file?

MW

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

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



RE: [PHP-WIN] GD Image Resizing on the fly.

2004-11-19 Thread Mike
This following bit of code will create a thumbnail of size $thumb_width x
$thumb_height based off of the initial file $file_location. Current GD
libraries don't work on GIFs, so that's not an option. You can use the
relative PNG functions in place of the jpeg functions, however.


// Create New Image
$full_img = imagecreatefromjpeg("$file_location");
$thumb_img = imagecreatetruecolor($thumb_width,$thumb_height);
 
imagecopyresized($thumb_img,$full_img,0,0,0,0,$thumb_width,$thumb_height,$wi
dth,$height);
imagedestroy($full_img);
imagejpeg($thumb_img,"$path_to_save\\$thumb_name");
imagedestroy($thumb_img);

print "";
// Might Need To Change Paths Pending How Script Is Called


The best thing to do, however, is to spend time reading all of the image
functions in the manual http://us2.php.net/manual/en/ref.image.php . There's
a lot in there and you can do some very impressive things with images if you
spend some time reading.

-M


-Original Message-
From: Tony Devlin [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 19, 2004 9:41 AM
To: Php-Windows
Subject: [PHP-WIN] GD Image Resizing on the fly.

Hello Everyone,

I am looking for a script or guidance in where to look to figure out how
to create a php script that resizes an image on the fly when it is called
with some variables.  To further detail, I have a shopping cart I am
creating for a client -- the client has the ability to upload images,
instead of creating a very complex script when he uploads the file, I
figured on the shopping cart page I could grab the original file and then
resize it to display a thumbnail based on 2 variables being sent W,H (Width,
Height).  The products are stored in a database along with the image path.
I need it to display in the middle of a page so a "header( 'Content-type:
image/jpeg' );" won't work for obvious reasons (header already sent).  Also
it will have to distinquish between Gif and Jpeg (not a problem, just
preg-match the extension).  I know the exact sizes that we want the shopping
cart images to be.  Anyone have any ideas?  If you need more information
just ask.

Thanks everyone -- this is such a great community!

Tony Devlin

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



RE: [PHP-WIN] image cache

2004-11-24 Thread Mike
Here's a little trick that works for me 

$cur_time = time();
print "";

Since each time you load the page the image name will be different (since
$cur_time will always change) the browser thinks the files are always
different since the name changes - and thus you force a reload of the image.

I do this on scripts that I make changes to images in PHP and need to see
the new image after the page reloads instead of seeing the pre-processed
image.

(I also do something similar with JavaScript for webcam images to prevent
caching)

-M

> i have an image upload script that uses fixed image names... 
> when i update an image, that image will be replaced at the 
> server using the same name as the old image... now, my 
> browser doesn't check for the new image but checkes it cache 
> instead and ofcourse finds the old image... how can i fix this? 
> i've allready added headers for not letting the page cache; 
> (   HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">)
> 
> 

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



RE: [PHP-WIN] HI! can u help me?

2004-11-26 Thread Mike
Take a look at 

opendir() http://us2.php.net/manual/en/function.opendir.php

and 

readdir() http://us2.php.net/manual/en/function.readdir.php

Everything that you need is there.

-M

> -Original Message-
> From: Kurlic [mailto:[EMAIL PROTECTED] 
> Sent: Friday, November 26, 2004 4:14 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] HI! can u help me?
> 
> Hi all!
> 
> Can i ask u a question?
> 
> Using PHP:
> How can i count the files in a folder and obtain their names?
> (i want to produce a script that count the images in a folder 
> and make a list of them...)
> 
> please help me... ^_^
> 
> Thank you by Kurlic
> 
> [EMAIL PROTECTED]
> 
> 
> --
> PHP Windows Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 

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



RE: [PHP-WIN] Cannot load mysqli extension error or login prompt

2004-11-27 Thread Mike
Having your extensions dir in your path is less important than having your
php.ini file set up properly.

Take a look for this section:

; Directory in which the loadable extensions (modules) reside.
extension_dir = "C:\php\extensions"

This happens to be where my extensions are kept on my machine... and that
dir isn't in the PATH. I don't even having C:\php in my PATH and I can run
scripts and phpMyAdmin just fine. 

I'm not sure about question #2 - I just set up phpMyAdmin step-by-step and
it worked fine. It's just been a long time since I set it up.

-M

> -Original Message-
> From: kutuu [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, November 27, 2004 2:47 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Cannot load mysqli extension error or login prompt
> 
> 
> Hello everybody,
> 
> Question1.
> 
> I have my "c:/program files/php/extensions/" directory in my path.
> And the required php_mysqli.dll & libmysqli.dll files in it.
> 
> But I cant get phpmyadmin to load properly.
> 
> It gives me this error:
> 
> cannot load mysqli extension,
> please check PHP Configuration
> Documentation
> 
> -
> 
> Question2.
> 
> If I revert to the regular libmysql.dll & php_mysql.dll files 
> then I keep getting my login prompt over & over again.
> 
> I have read that I need to set some control user but how am I 
> going to do that since I cant use phpmyadmin to do it?
> 
> Anyone who knows  what I am talking about please help me as I 
> have been working on this problem for some time now and It 
> simply does not work.
> 
> Gün.
> 
> The following code does not work too.. It only says "sarting 
> test". Root has password pass
> 
>  echo "starting test";
> $mySQL = @mysql_connect("127.0.0.1", "root", "pass") or 
> exit(); echo "point2"; ?>
> 
> --
> PHP Windows Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 

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



RE: [PHP-WIN] CHMOD function issue.

2004-11-29 Thread Mike
I just want to make sure of something...

What OS is the machine this is happening on? This is the PHP-Windows list
and CHMOD really doesn't work on Windows - it's a Unix command. 

But if you're having problems on a unix system, check to see if there is a
umask value set that would be causing this.

-M

> -Original Message-
> From: Kuldeep [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 29, 2004 3:16 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] CHMOD function issue.
> 
> Hello All,
> 
> I have made a admin area on my site where it allows the admin 
> to change the pagelayout, I.E : font color, table color, font 
> size, background color.
> the Folder permission is set to 755 and the file permissions 
> are set to 644. I used the CHMOD funtion to change the 
> permission to 666 before making the changes ti file and then 
> change it back to 644 after the change is done.
> But it does not work the way I want it to, the permission 
> remains the same.
> 
> Anywho with a solution???
> 
> --
> PHP Windows Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 

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



RE: [PHP-WIN] cannot send mail via localhost

2004-11-29 Thread Mike
This is going to require a lot more information from your end if you want
help.

Show some code, explain your mail server setup, explain any errors you
receive.

Also, can you telnet to port 25 on localhost? Does anything (e.g., the mail
server) respond? What's the result of a HELO?

-M 

> I am trying to test my form locally, however it doesn't get 
> picked up  my mailbox.
> 
> The form is fine and I even set the access in IIS to 
> 127.0.0.1 so the relay error is not a porblem anymore. This 
> must be a setup problem.

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



RE: [PHP-WIN] cannot send mail via localhost

2004-11-29 Thread Mike
Please respond to the list.

You do realize that port 23 is the telnet port and not the SMTP port, right?
Why is your mail server responding on 23 and not 25?

What happens when you 

telnet localhost 25

And I'll repeat my request for some code...

-M


The mail is a standar mailform. I jsut use IIS thought a mail server is in
place when Iinstalled it.

I get no errors. Telnet is working on port 23 "microsofts esmtp service
ready..."

Ross
- Original Message -----
From: "Mike" <[EMAIL PROTECTED]>
Newsgroups: php.windows
To: "'Ross Hulford'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, November 30, 2004 2:14 AM
Subject: RE: [PHP-WIN] cannot send mail via localhost


> This is going to require a lot more information from your end if you want
> help.
>
> Show some code, explain your mail server setup, explain any errors you
> receive.
>
> Also, can you telnet to port 25 on localhost? Does anything (e.g., the 
> mail
> server) respond? What's the result of a HELO?
>
> -M
>
>> I am trying to test my form locally, however it doesn't get
>> picked up  my mailbox.
>>
>> The form is fine and I even set the access in IIS to
>> 127.0.0.1 so the relay error is not a porblem anymore. This
>> must be a setup problem.  

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



RE: [PHP-WIN] problem to open dir

2004-11-29 Thread Mike
When you set the $dir variable, try doing so with single quotes - the \
character is used to escape things and might be causing some problems.

If that makes no sense, it's because I'm falling asleep.

Good luck.

-M 

> -Original Message-
> From: Pravin-Kumar [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, November 30, 2004 12:37 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] problem to open dir
> 
> hi all
> i am getting some unexpected error while try to read a local dir..
> it is working on the pc where apache is running ..but same 
> code not working while trying from other pcs in lan..
> here is code..
> $dir="C:\Documents and Settings\pravin\Desktop\abcd2"; if 
> (is_dir($dir)) {
> if ($dh = opendir($dir)) {
>while (($file = readdir($dh)) !== false) {
>   echo "filename: $file : filetype: " . filetype($dir 
> . $file) ."\n";
>}
>closedir($dh);
>}
>   }
> 
> $dir = dir($source);
> 
> 
> giving error:
> Warning: dir(C:\Documents and Settings\pravin\Desktop\cdac2): 
> failed to open dir: Invalid argument in 
> G:\Vyapar\AdvMgmt\addadvt3.php on line
> 69
> 
> Fatal error: Call to a member function on a non-object in 
> G:\Vyapar\AdvMgmt\addadvt3.php on line 70
>  
> 
> 
> 
> -
> Experience is what you get when you didn't get what you wanted.
> -
> Regards
> Pravin Kumar
> Technical Associate, CDAC, 68, E-City, Bangalore, 560100.
> Registered Linux user #365056; Ph. +91 80 28523300 Extn:2103
> http://geocities.com/pravin_suman/
> http://pravindeo.blogspot.com
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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



RE: [PHP-WIN] problem to open dir

2004-11-30 Thread Mike
Definitely use the is_dir() function as Rafael suggests. Also, make sure
that the user that PHP will be running as has permissions to read from that
location. I had some troubles a while back reading, writing and deleting
from some locations that the user IIS was running as did not have the proper
permissions in that location.

So if is_dir() returns true for you but you're still having those issues,
try explicitly adding the user that apache is running as to that directory
with some good permissions.

Oh - and about the slashes, only use the \\ when you're using double quotes
and only use \ with single quotes. Double quotes tells PHP to try to
evaulate the contents of the string (replace varables with their value,
interperate \[character] with their proper escaped value, etc.) while single
quotes tells PHP that "treat this value as exactly what's entered - don't
try to evaulate anything".

-M

> -Original Message-
> From: Rafael Soares [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, November 30, 2004 6:11 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RES: [PHP-WIN] problem to open dir
> 
> Hello!
> 
> The sintax I use is this:
> 
> $dir = 'C:\\dir\\subdir\\';
> 
> But I haven't tried to access windows dirs like Documents and Settings
> 
> The only way to be sure is using the is_dir(); function.
> 
> See you.
> 
> Rafael Soares - AgênciaM
> Fone:  +55 11 4616-1394
>  
> -Mensagem original-
> De: Luis Moreira [mailto:[EMAIL PROTECTED]
> Enviada em: terça-feira, 30 de novembro de 2004 08:04
> Para: Pravin-Kumar
> Cc: [EMAIL PROTECTED]
> Assunto: Re: [PHP-WIN] problem to open dir
> 
> Remove the double quotes.
> 
>  $dh = opendir('F:/vyapar-2/test/cdaci');
> 
> 
> Pravin-Kumar wrote:
> 
> >hi list!
> > 
> > $dest='F:/vyapar-2/test/cdaci'; or
> > $dest='F:\vyapar-2\test\cdaci'; or
> > $dest='F:\\vyapar-2\\test\\cdaci'; or
> > $dh = opendir($dest);
> > $a=dir($dest);
> >
> >the above code giving following problem on apache 1.3  on windows
> >
> >Warning: opendir(F:/vyapar-2/test/cdaci): failed to open 
> dir: Invalid 
> >argument in G:\Vyapar-2.0\test\1.php on line 10
> >
> >Warning: dir(F:/vyapar-2/test/cdaci): failed to open dir: Invalid 
> >argument in G:\Vyapar-2.0\test\1.php on line 11
> >
> >--
> >Nothing is working i had tried \\ , /, "double quot", 'single quot'
> >
> >-
> >Regards
> >Pravin Kumar
> >
> >On Tue, 30 Nov 2004, Mike wrote:
> >
> >  
> >
> >>When you set the $dir variable, try doing so with single 
> quotes - the 
> >>\ character is used to escape things and might be causing 
> some problems.
> >>
> >>If that makes no sense, it's because I'm falling asleep.
> >>
> >>Good luck.
> >>
> >>-M
> >>
> >>
> >>
> >>>-Original Message-
> >>>From: Pravin-Kumar [mailto:[EMAIL PROTECTED]
> >>>Sent: Tuesday, November 30, 2004 12:37 AM
> >>>To: [EMAIL PROTECTED]
> >>>Subject: [PHP-WIN] problem to open dir
> >>>
> >>>hi all
> >>>i am getting some unexpected error while try to read a local dir..
> >>>it is working on the pc where apache is running ..but same 
> code not 
> >>>working while trying from other pcs in lan..
> >>>here is code..
> >>>$dir="C:\Documents and Settings\pravin\Desktop\abcd2"; if
> >>>(is_dir($dir)) {
> >>>if ($dh = opendir($dir)) {
> >>>   while (($file = readdir($dh)) !== false) {
> >>>  echo "filename: $file : filetype: " . filetype($dir . 
> >>>$file) ."\n";
> >>>   }
> >>>   closedir($dh);
> >>>}
> >>>   }
> >>>
> >>>$dir = dir($source);
> >>>
> >>>
> >>>giving error:
> >>>Warning: dir(C:\Documents and Settings\pravin\Desktop\cdac2): 
> >>>failed to open dir: Invalid argument in 
> >>>G:\Vyapar\AdvMgmt\addadvt3.php on line
> >>>69
> >>>
> >>>Fatal error: Call to a member function on a non-object in 
> >>>G:\Vyapar\AdvMgmt\addadvt3.php on line 70
> >>> 
> >>>
> >>>
> >>>
> >>>-
> >>>Experience is what you get when you didn't get what you wanted.
> >>>-
> >>>Regards
> >>>Pravin Kumar
> >>>Technical Associate, CDAC, 68, E-City, Bangalore, 560100.
> >>>Registered Linux user #365056; Ph. +91 80 28523300 Extn:2103 
> >>>http://geocities.com/pravin_suman/
> >>>http://pravindeo.blogspot.com
> >>>
> >>>--
> >>>PHP Windows Mailing List (http://www.php.net/) To 
> unsubscribe, visit: 
> >>>http://www.php.net/unsub.php
> >>>
> >>>  
> >>>
> >
> >  
> >
> 
> --
> PHP Windows Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 

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



RE: [PHP-WIN] Timer in Safe Mode

2004-12-17 Thread Mike
In your php.ini file there's a directive called max_execution_time (in
seconds) - so you don't have to worry about any "forever-running" scripts -
PHP will kill them if they go on past that point anyhow.

Check out the phpinfo() output if you don't have direct access to your
php.ini file - this should be sufficient.

-M 

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of MikeA
> Sent: Friday, December 17, 2004 9:51 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Timer in Safe Mode
> 
> WinXP SP2
> PHP 4.3.9
> Apache 2.0.52
> 
> I have a script which sets a timeout for a script execution 
> so it does not go on forever in a loop or whatever. I keep 
> getting a message that I cannot set a timer in safe-mode.  
> How else can I do this?  Is there a way to simulate a timer function?
> 
> Thanks.
> 
> Mike
> 
> --
> PHP Windows Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 

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



RE: [PHP-WIN] Really Super Dumb MSSQL (NOTE: Microsoft SQL) Question

2005-01-19 Thread Mike

>From the php.net page for the mssql_query function:

Returns: A positive MS SQL result identifier on success, TRUE if no rows
were returned, or FALSE on error.  

You should be able to wrap the function itself in an if statement easily
enough.

-M

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 19, 2005 10:20 AM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] Really Super Dumb MSSQL (NOTE: Microsoft 
> SQL) Question
> 
> 
> I feel stupid asking this but I did a quick search and 
> couldn't find an answer.
> 
> When I write a simple query to query MSSQL...is there a 
> simple way to know if the query executed without error?  I'm 
> looking to do a simple if then statment to inform the user if 
> the database information was added successfully to the database.
> 
> if I do an:
> 
> echo $result = mssql_query($query);
> 
> I get a resource ID... is it safe to assume that if a 
> resourceID is returned that I can print a success message?
> 
> Ron
> 
> 
> 
> 
> 
> 

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



RE: [PHP-WIN] $subject = "form results " causing problem

2005-02-02 Thread Mike
Looks like you may be using the wrong format for the mail() function.

bool mail ( string to, string subject, string message [, string
additional_headers [, string additional_parameters]] )

http://us4.php.net/manual/en/function.mail.php

 Reference the form you should be passing params and notice that the subject
should be the second param.

-M

> -Original Message-
> From: Patrick Roane [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, February 02, 2005 6:08 PM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] $subject = "form results " causing problem
> 
> I was wondering why when I insert the $subject = "form 
> results", I get the ...echo "Message failed to send";
> 
> error.
> 
> But when I comment this out, everything works fine.
> Please see below.
> 
>} else {
>error_reporting(0);
>   // initialize a array to 
>   //hold any errors we encounter
>   $errors = array();
> 
>   // test to see if the form was actually 
>   // posted from our form
>   // In testing, if you get an Inavlid referer error
>   // comment out or remove the next three lines
>   $page =
> $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
>   if (!ereg($page, $_SERVER['HTTP_REFERER']))
>  $errors[] = "Invalid referer";
> 
>   // check to see if a name was entered
>   if (!$_POST['from'])
>  $errors[] = "Name is required";
> // check to see if email was entered
> if (!$_POST['email'])
>  $errors[] = "a valid e-mail address is required";
>   // if there are any errors, display them
>   if (count($errors)>0) {
>  foreach($errors as $err)
> echo "$err\n";
>  echo "Please use your browser's Back button to fix.";
>   } else {
>  // no errors, so we build our message
>   $subject = "form results";
>   $recipient = '[EMAIL PROTECTED]';
>   $phone = stripslashes($_POST['phone']);
>   $from = stripslashes($_POST['from']);
> $mail = stripslashes($_POST['email']);
>   $comments = "Comments from:
> $from\n\n".stripslashes($_POST['comments']);
>   if (mail($recipient, $comments, $phone, $mail, $subject)){
>

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



RE: [PHP-WIN] File upload maximum execution time error

2005-02-07 Thread Mike
Remember that when you're working in Windows that PHP has a timeout but so
doesn't IIS - so if you don't raise the IIS timeout then you run the risk of
hitting that limit as well.

I don't think it's difficult to find the timeout location in IIS, but I
don't have it installed on this machine to test right now.

-M 

> -Original Message-
> From: Vladimir Iahnenco [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 08, 2005 12:37 AM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] File upload maximum execution time error
> 
> Hi All,
> We have web IIS5 (web+ftp)+php4 installed on the same server. 
> It takes about
> 5-6 min to upload 20MB file to our ftp server. But we cannot 
> upload it through http php upload. I set parameters == 
> upload_max_filesize =40M post_max_size=40M 
> max_execution_time=920 and then set it to zero == but anyway 
> got that error. In some cases explorer displayed me a timeout error.
> Is there any workaround for this case?
> FYI, My script handles the upload, creates an html with a
> body-onLoad-self:close() and a hidden form which posts upload 
> results to a CGI application, which generates all html.
> 
> Thanks in advance
> 
> Vladimir
> 
> --
> PHP Windows Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 

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



RE: [PHP-WIN] Validation of Primary Key Datetime variable

2005-02-28 Thread Mike
I know that your form currently has just an input field that displays the
date in the format that you're interested in, but have you thought of using
a form SELECT object so that the user can only pull down the month, date and
year?

You'd have to do more processing in the form to "assemble" the date and to
"disassemble" it if you wanted to display it, but then you'd know without a
doubt that someone didn't put letters or a date that's out of your range.

Just a thought.

-M

> -Original Message-
> From: S.D.Price [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 28, 2005 9:17 AM
> To: php-windows
> Subject: RE: [PHP-WIN] Validation of Primary Key Datetime variable
> 
> Thanks for this George. I am populating the datetime field 
> from user input, and users can change the date if they need to.
> 
> The problem I have is with validation. I think I will need to 
> use some kind of regular expression to check that the date 
> has been entered in the correct format, but I am not sure what.
> 
> Steven
> 
> -Original Message-
> From: George Pitcher [mailto:[EMAIL PROTECTED]
> Sent: 28 February 2005 13:31
> To: S.D.Price
> Subject: RE: [PHP-WIN] Validation of Primary Key Datetime variable
> 
> 
> Simon,
> 
> Why not use a varchar datatype and populate it yourself. It 
> can then be
> modified, but the data can still be displayed in the way you want, by
> being a bit more creative with the code.
> 
> I don't store dates as date datatype but as integers, that 
> way I could,
> if required, move my code to a different db with no extra work.
> 
> George
> > -Original Message-
> > From: S.D.Price [mailto:[EMAIL PROTECTED]
> > Sent: 28 February 2005 12:38 pm
> > To: php-windows
> > Subject: [PHP-WIN] Validation of Primary Key Datetime variable
> >
> >
> > Hi, I wonder if anyone can help.
> >
> > I have designed a newsblog which uses PHP and MySQL. Each 
> news story 
> > has a primary key which is the current date. The datatype used in 
> > MySQL is "datetime". When stories are extracted from the 
> database the 
> > user can then navigate based on date order.
> >
> > When a user adds a news story to the database the current 
> days date is
> 
> > shown in the form using
> >
> > 
> >  > ?>  > id="publish_date" value=""/>
> >
> >
> > This is the date added to the DB by default.
> >
> > However, the user must be able to change the date so that 
> they can set
> 
> > a date sometime in the future when they want the story to be 
> > published. The only stories shown in the archive (and 
> pulled through 
> > to the home
> > page) are those which are before or on today's date.
> >
> > My problem is that I am not sure how to validate any 
> changes made to 
> > the $publish_date so that it will conform to the required datetime 
> > range in MySQL and not give the useless answer :00:00 00:00:00.
> >
> > Does anyone know how to do this?
> > Thanks
> >
> > Steven Price
> >
> >
> >
> >
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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



RE: [PHP-WIN] File not found

2005-03-05 Thread Mike
> I've installed PHP 5.03 (the full package, not the installer) 
> in Windows
> 2003 / IIS.
> I've folloewd all instrctions very carefully in ISAPI mode.
> Nothing is misconfigured so long as the install.txt says.
> 
> Now, i've put a very simple script in C:\Inetpyb\wwwroot and 
> i get "404 File Not Found".
> 

And if you rename the file to a .htm or .html it's returned without issue? 

Sounds like a mime type problem that IIS 6 introduces since it's so much
more "secure" than previous versions.

Go into IIS and check out the Web Service Extensions. Make sure that you've
added an item for PHP pages and that it's turned on. I believe that the
instructions talk about this, but it's pretty straight forward. But whenever
IIS 6 is saying that it can't return a page that you know for a fact is
there and other pages of a different type that are right next to it are
returned without issue it usually indicates this sort of mime or web
services problem.

For a quick test, you may wish to 'Allow' the "All unknown CGI Extensions"
and "All unknown ISAPI Extensions" just to check.

Good luck.

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



RE: [PHP-WIN] Session Variables

2005-03-07 Thread Mike
You need to make sure that in your second page that you're starting the
session - if you don't do this then that second page will never have access
to those session variables.

-M 

> -Original Message-
> From: Richard Duval [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 07, 2005 7:05 PM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] Session Variables
> 
> Newbie question, sorry but I've searched everywhere and can't 
> seem to find the answer...
> 
> Session variables...should be able to define in one page, 
> call the next page and have it available there as well right?
> 
> I can print out the session varialble in the page it was 
> created, no problem Then I call the next page, try to echo 
> the variable and I get:
> 
> Notice: Undefined variable: HTTP_SESSION_VARS in 
> C:\vhome\nl4x4\admin\sendmail\prep_mail.php on line 17
> 
> Is there something else I have to do to get these variables 
> carried to the next page?
> 
> The code I'm using is simply:  $HTTP_SESSION_VARS['count_ind_members']; ?>
> 
> Thanks
> 
> 
> "Imagination is more important than Knowledge"  --Albert Einstein--
> 

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



RE: [PHP-WIN] unlink problem

2005-03-08 Thread Mike
That bit of code really doesn't help us at all, but my guess is that the
user PHP is running as doesn't have permissions to delete from the D:\
drive.

To work around it give that user permissions to delete from that location.

It might also be helpful to give us the contents of del.php.

-M 

> -Original Message-
> From: Joakim Ling [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 08, 2005 9:40 AM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] unlink problem
> 
> Hi
> 
>  
> 
> When I'm trying to delete a file in a Dialog I receive this 
> strange error "HTTP does not allow unlinking in "d:\del.php 
> on line 20". Can I work around this?
> 
>  
> 
> showModalDialog('del.php?file=foo.txt',null,'dialogHei
> ght:250px;
> dialogWidth:366px; resizable:no; status:no');
> 
>  
> 
> thanks
> 
> 

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



RE: [PHP-WIN] date function works, font color?

2005-03-25 Thread Mike
> I am using:  print date("D dS M,Y h:i a");
> ?>
> in my html code which displays the following in black:
> Fri 25th Mar,2005 08:24 pm
> 
> How can I change this to white and center it in a table cell?

print "".date("D dS M,Y h:i
a")."";


Just print out the HTML that you need. That simple.

> Thanks in advance.

n/p

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



RE: [PHP-WIN] Custom 404 Error Messages in PHP

2005-04-07 Thread Mike
> This is my first post to ANY newsgroup ever, so forgive me if 
> I do anything wrong. I have a delemia, I would like to use a 
> custom 404 error on my website to make it look more user 
> friendly than "No input file specified" 
> when the file on the server is not found or a link is broken. 
> I am fairly new to PHP, so I am pretty hopeless. I am running 
> a Win 2K3 server with PHP 4.xxx (can't remember the last 
> digits) and My SQL all installed and functioning properly. 
> Please help! 
> 

This actually has nothing to do with PHP but everything to do with your
webserver.

If you're running IIS, you can go to the properties of the website in
question and change it in there.

-M

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



RE: [PHP-WIN] How do I get php to repeat and action every day?

2005-04-21 Thread Mike
> Hello,
> 
> I wish to have a php file repeat every day at a certain time, 
> is there any way to do this?
> 
Yes and no.

PHP by itself can't do this. But you can easily set up a crontab
(http://www.google.com/search?hl=en&lr=&q=crontab&btnG=Search) or a windows
scheduled task pending on your server.

Then just call 

php page.php

to execute it. Most hosts let you set up at least a few crontabs as long as
they're not running every minute or two.

-M

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



RE: [PHP-WIN] Re: How do I get php to repeat and action every day?

2005-04-23 Thread Mike
> I have gotten a good idea about how contrabs work and task 
> schedlar. Enough to know that task schedular does only permit 
> one schedualed task at a time.
> If, say, I had an entire folder of files that just kept 
> growing, it would take allot of manual intervention to get 
> the entire folder to execute with task schedular, however, is 
> there any way to do this in a contrab?

In all honesty, if I had a folder of scripts that I needed to execute at a
given time, I'd probably cheat and make one "control" script that was
responsible for calling all of the other scripts. 

So 

master_script.php

would look vaguely like:



That way as needs change you can just make changes to the one
master_script.php instead of having to edit your cron jobs or risk creating
stupidly large amounts of windows scheduled tasks.

Granted that this requires you to have scripts that all will run at the same
time and don't demand different execution times. The other things to keep in
mind is that the initial instance of PHP that runs that master_script.php
will need to be running for the entire length of time that it will take all
of the other files to execute - so be careful of PHP timeouts and modify
your php.ini file if needed/if safe.

The other option, of course, is to get more fancy and read the contents of a
file, build an array and then build a for loop that'd exec() each of the
array elements in turn. This would make the process a lot more hands-off
than the above-mentioned hard-coded master_script.php file (though a bit
longer to impliment and with the same inherent time-out issue as noted above
plus a bit more time for the script itself to execute).

Either way, there's a few options that may spawn some better ideas from
others on the list :)

> Thanks!

Not a problem!

-M

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



RE: [PHP-WIN] Unlink and UNC names

2005-04-24 Thread Mike
> Hi,
> 
> Has anyone managed to get unlink to work with UNC names under windows?
> Can't seem to get it to work with PHP4 at all.
> 
> Thanks,
> 

I haven't tried it myself, but remember that you tend to run into some
lovely permissions issues if you're running the script via a web server. And
even if you're executing a script from the command line, I'd check to ensure
that the user you're running the script as has -explicit- full control on
that share (in both the sharing and security sections) and try it again.

-M

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



RE: [PHP-WIN] Just a question, answer appreciated

2005-05-08 Thread Mike
> Hi list,
>  
> How do you increase to a counter without refreshing the whole 
> page. For example if you check site www.gmail.com 
>   under "Don't throw anything away." 
> heading there is counter which is increasing (could be 
> javascript magic) but other example is www.neopets.com 
>   where time (seconds) is changing 
> without refreshing the whole page ( it is php script )
>  
> Any link or hint or code will be welcome ( even comments ) ;) 
> Thanks in advance.
> salim
> 

This is all done through JavaScript/DHTML/CSS.

When you look at the Gmail site, view source and search for "Don't". You'll
come to the line that has the growing MB amount.

Over 2000 megabytes (and counting) 

So then if you search for "quota" you'll see a number of references to it
and other JavaScript functions that modify it in real time. 

I don't have any specific links to things, but there are tons of JavaScript
copy and paste type sites that give you code snippets to use. 

I didn't see anything like that on Neopets, but it could simply not work in
Firefox (and I admit I only spent about 30 seconds looking for it). 

But it's all JavaScript and such. 

Basic rule, if the page isn't refreshing at all, then it's probably all done
on the client-side. If it's done on the client-side, then it's not PHP since
that's all server-side. E.g., since nothing is being submitted to PHP, PHP
is completely ignorant to the fact that this is going on.

Hope that helps.

-M

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



RE: [PHP-WIN] How to setup the mail server so that I can use mail() function

2005-05-09 Thread Mike
As a point of warning - be sure that you know what you're doing before you
simply enable an SMTP server that is externally routable. If you're not sure
how SMTP servers work then you could be creating an open relay that people
will quickly find and use to spam other people. 

When you turn on the IIS SMTP server it is initially enabled as an open
relay. Be sure you spend some time learning how to lock it down so that your
machine can't be used by spammers. And trust me, they'll probably find you
within a matter of hours if you do have an externally routable IP.

-M

> -Original Message-
> From: Wu, Jin Yong [mailto:[EMAIL PROTECTED] 
> Sent: Monday, May 09, 2005 1:56 AM
> To: php-windows@lists.php.net
> Subject: RE: [PHP-WIN] How to setup the mail server so that I 
> can use mail() function
> 
> 
> enable SMTP Server in IIS and have a try.  Otherwise you 
> should install another third-party software.
> 
> -Original Message-
> From: ST Ooi [mailto:[EMAIL PROTECTED]
> Sent: Sunday, May 08, 2005 00:22 AM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] How to setup the mail server so that I can 
> use mail() function
> 
> 
> Hi,
> 
> How can I setup my mail server so that I can use mail() 
> function in PHP? 
> I'm running WindowsXP Pro.
> 
> Thanks
> 
> ST Ooi

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



RE: [PHP-WIN] Windows System Tray

2005-05-19 Thread Mike
> Can you tell me what I need to know so I can build an IE plug 
> in thingy like this:
> 
> http://www.phplivesupport.com/winapp.php
> 
> My experience so far is mostly PHP on Unix so am a bit of a 
> noob when it comes to Microsoft programing.
> 
> I'm very keen though and would very much appreciate a point 
> in the right direction.
> 

There's no way that this is written in PHP. This just isn't what PHP does.
And even if you were able to get PHP to work in this manner, the app would
likely be inefficient and slow. There's countless other languages better
suited to win32 programming than PHP.

When you look at the requirements, it lists .Net - which is a good
indication to what it's written in.

Unfortunately, the direction you'd be headed in is away from PHP.

-M

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



RE: [PHP-WIN] pop3 emailer

2005-05-28 Thread Mike
Without using someone else's code or a pre-existing class, take a read
through this: http://us3.php.net/manual/en/ref.imap.php

-M
 
> Hi
> 
> What is the easist way to read an email account from php?
> 
> Thanks
> 
> Mike
> 
> --
> PHP Windows Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 

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



RE: [PHP-WIN] unable to load php-gd2.dll

2005-06-14 Thread Mike
 Try using single-quotes.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 14, 2005 11:25 PM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] unable to load php-gd2.dll
> 
> Okay I at loss.  I have tried but i can seem to get the 
> php_gd2.dll to work properly.  Any help this is what i have
> done so far.   
> 
> I have in my php.ini file, 
> 
> ; Directory in which the loadable extensions (modules) reside.
> extension_dir = "C:\PHP\extensions"
> 
> I have also uncommented the 
> 
> extension = php_gd2.dll
> 
> I have in the c:\php\extension folder the php_gd2.dll 
> 
> I have restarted IIS but still nothing
> 
> I am using Window XP $ 2000 with IIS 5.0 but still nothing
> 
> Please help
> Disieyi

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



Re: [PHP-WIN] Re: Run a program

2005-07-27 Thread Mike

YOu will need put the .DLL´s into php CLI folder.

Mike


Jacob Waller said the following on 27-07-2005 08:22:

Hi!

Jon wrote:
"Jacob,
echo your command and make sure that it is calling shell_exec(); correctly"

Ehm... I'm not sure if I get what you mean, Jon. Could you please explain 
this further?


Yong wrote:
"just run D:/usr/bin/php.exe -q script.php arg1 arg2 in the command window.
It's no need using shell."

I'm not sure, but I think I do have to run it through bash, because the 
program (fontforge) isn't  really made for Windows, so it uses Cygwin (some 
kind of Linux-like environment) to be able to run on Windows. This is why I 
have to (I think) use the Cygwin bash to be able to run it.


I've discovered something curious - the command doesn't not only work when I 
run it from the Run-dialog, but also when I run it from the PHP CLI! 
However, when I run exactly the same script with the PHP CGI it does NOT 
work. How is that possible? I hope you're able to help me, 'cause my poor 
brain isn't capable of taking it anymore ;)

/Jacob



- Original Message -
From: ""Jacob Waller"" <[EMAIL PROTECTED]>
Newsgroups: php.windows
To: 
Sent: Monday, July 25, 2005 6:11 PM
Subject: Run a program


Hi!
I'd like to be able to run a program from a php-script. I've tried running
the following command, and it works when I run it from the Run-dialog:
D:\Cygwin\bin\bash.exe --login -i script.sh arg1 arg2
(the shell script runs another program (fontforge) which too runs a script)

However, when I try to run the same command from a php-script nothing
happens. Or rather, bash starts, but it doesn't do what it does when i run
the same command from the Run-dialog. I'm not even sure if I'm using the
right php-command and syntax. Could you please tell me how to do?
I'm on Win XP Home if that matters...
Thanks in advance! /Jacob





=
Este Sistema executa REVERSE DNS LOOKUP em HELO/EHLO DOMAIN.
Esteja certo de enviar email via Dominio Real.


==

Listas via WEB/Email simultâneamente 
"Poemas - Poesias - De bem com a vida" - Gosta de romantismo ?

"Firefox" - Tudo a respeito deste excelente browser
"Thunderbird" - Melhor que tudo. Melhor que o Outlook
"Estórias interativas" - Crie sua estória e os outros continuam
"Tudo sobre Sexo - Amor - Dúvidas - Dicas em relacionamentos"
http://www.netforum.com.br/gust/index.php


Está procurando / Ofertando emprego ?
Envie email para [EMAIL PROTECTED]
No assunto ponha: SUBSCRIBE VAGAS
Siga as instruções, e após isto para enviar mensagem
para a lista envie para: [EMAIL PROTECTED]

Este email passou por www.netforum.com.br e submetido
a rigoroso teste de anti-virus e é 100% livre de SPAM.

Se você está procurando relacionamentos, não deixe de
visitar: http://www.netforum.com.br
Quem sabe você encontra um bom relacionamento.

Quer ter seu FotoBlog Pessoal ? Crie seu Álbum Público
ou Privativo. Deixe os outros verem e comentarem.
Igual a este você nunca viu !!
http://www.netforum.com.br http://www.marulo.net


Gosta de imagens? Visite a galeria de imagens
em 3D. Você pode enviar postais, comentar, votar e fazer
downloads.

http://www.netforum.com.br

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



RE: [PHP-WIN] Question about directory & file operations

2006-01-29 Thread Mike
> If it is called with the right parameters or the "Previous Directory"
> link is clicked too many times, the browser will be outside 
> of the paths that I want them to be in...
> 
> I would like to be able to lock the browser down to a 
> particular set of directories and thier subs.
> 

What you may want to do is set up a bit of parsing in your script so that
the script is passed the relative portion of the directory and the script
appends the parent folders to that. 

For example, say the user is browsing directory C:\users\tom\images\vacation
and you want to lock everything to the \users directory.

Have the script expect
http://localhost/script.php?path=users\tom\images\vacation instead of the
full path. You can then do some basic string parsing to determine the first
folder (in this case "users") and ensure that that matches a defined set of
acceptable folders.

So 

if($first_dir != "users"){
  echo "this is an invalid directory";
}

Etc.

Also, if someone tries to pass "C:\" into $path, it'd end up getting parsed
as "C:\C:\", which will obviously be an invalid directory.

This would allow the user from doing something like 

http://localhost/script.php?path=windows\system32 since "windows" isn't in
the approved folders list.

I'm sure there's a bunch of other ways of doing this, but it's the first
that popped into my head.

-M

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



RE: [PHP-WIN] Latest obsession (controlling Winamp with PHP)

2002-02-18 Thread Mike Flynn

At 04:56 PM 2/18/2002 +0100, Svensson, B.A.T. (HKG) wrote:

>Question: What prevents you from implement the system based on a Linux
>server just as the other "web stations"?
>
>If there is nothing that prevents this, why not go for a much secure and
>stable network platform like Linux?

Is this really a worthwhile let alone useful reply at all for a listserv 
devoted to running PHP on the Windows platform?  He said he's doing it on a 
Windows machine, and he'd like a Windows solution for it.  Since he pointed 
out that he'd heard of it being done on Linux, he was of course aware that 
that was an option.  But the reason he posted the question to the 
php-windows list, I think, was because he wanted a Windows solution.

Unfortunately I have no idea, but I thought I should point this stuff out :)

-Mike


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




[PHP-WIN] Extensions and php and dll problem on win2k whit php 4.1.1

2002-02-21 Thread Mike Schmid

Hi NG

Help needed, i have make a new istallation of php 4.1.1 (with the
installer). I configured everyhing like iis php.ini. registry and permission
on th ntfs partition. I coppy all the dll`s from php (not the extensions
dll´s) to system32. I downloded to the win32 package with the extensions
pack and copy the stuff to php.

The problem now is if i run info.php i got some errors like "unable to load
dynamic link libary
´c:\php\extensions/php_ifx.dll´,´c:\php\extensions/php_ingres.dll´.
If i run info.php whitout the php.ini file in winnt it works fine but i dont
have any extensions...

The output of the command promt if i run php.exe -i is, the dynamik link
libary isqlt09a.dll could not be found in the specified path c:\blahblah,
blah

where i can get the dlls... of somone can help me whit this problem

thanks Mike



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




Re: [PHP-WIN] Extensions and php and dll problem on win2k whit php 4.1.1

2002-02-21 Thread Mike Schmid

Hi Scott,
 yes your are right, after i istall the php 4.1.1 whit the installer , i
download the cgi package , and configure itlike you
can read in my first post...

"Scott" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have to check, but I thought the only real support you got with the
> installer was MySQL and you had to download the CGI version to get all the
> addtional DLL's, like MS-Sql, etc.
>
>
>
>
> On Thu, 21 Feb 2002, Mike Schmid wrote:
>
> > Hi NG
> >
> > Help needed, i have make a new istallation of php 4.1.1 (with the
> > installer). I configured everyhing like iis php.ini. registry and
permission
> > on th ntfs partition. I coppy all the dll`s from php (not the extensions
> > dll´s) to system32. I downloded to the win32 package with the extensions
> > pack and copy the stuff to php.
> >
> > The problem now is if i run info.php i got some errors like "unable to
load
> > dynamic link libary
> > ´c:\php\extensions/php_ifx.dll´,´c:\php\extensions/php_ingres.dll´.
> > If i run info.php whitout the php.ini file in winnt it works fine but i
dont
> > have any extensions...
> >
> > The output of the command promt if i run php.exe -i is, the dynamik link
> > libary isqlt09a.dll could not be found in the specified path
c:\blahblah,
> > blah
> >
> > where i can get the dlls... of somone can help me whit this problem
> >
> > thanks Mike
> >
> >
> >
> >
>
> --
>
>



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




Re: [PHP-WIN] Extensions and php and dll problem on win2k whit php 4.1.1

2002-02-21 Thread Mike Schmid

Roy sorry but it dosetn work i try it the same error output...

"Ray Hunter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
What I do is add all the dlls to the same directory as your php.exe file.  I
then edit the php.ini file to load the extension_dir from that directory...

Example:
extension_dir = ./

Then this allows php to look in the same directory as php.exe for the dll's.
I used the installer to set up the directory.  Then add all the extra stuff
to that directory.

This should work for you.




Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-Original Message-
From: Mike Schmid [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 8:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Extensions and php and dll problem on win2k whit php
4.1.1


Hi NG

Help needed, i have make a new istallation of php 4.1.1 (with the
installer). I configured everyhing like iis php.ini. registry and permission
on th ntfs partition. I coppy all the dll`s from php (not the extensions
dll´s) to system32. I downloded to the win32 package with the extensions
pack and copy the stuff to php.

The problem now is if i run info.php i got some errors like "unable to load
dynamic link libary
´c:\php\extensions/php_ifx.dll´,´c:\php\extensions/php_ingres.dll=B



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




Re: [PHP-WIN] Extensions and php and dll problem on win2k whit php 4.1.1

2002-02-21 Thread Mike Schmid

I copy the php.ini file from cgi package original php.ini-dist

"Ray Hunter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Did you copy over the php.ini file from the chi package.  The php.ini file
from the installer has nothing really in it...

Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-Original Message-
From: Mike Schmid [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 9:40 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Extensions and php and dll problem on win2k whit php
4.1.1


Roy sorry but it dosetn work i try it the same error output...

"Ray Hunter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
What I do is add all the dlls to the same directory as your php.exe file.  I
then edit the php.ini file to load the extension_dir from that directory...

Example:
extension_dir = ./

Then this allows php to look in the same directory as php.exe for the dll's.
I used the installer to set up the directory.  Then add all the extra stuff
to that directory.

This should work for you.




Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-Original Message-
From: Mike Schmid [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 8:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Extensions and php and dll problem on win2k whit php
4.1.1


Hi NG

Help needed, i have make a new istallation of php 4.1.1 (with the
installer). I configured everyhing like iis php.ini. registry and permission
on th ntfs partition. I coppy all the dll`s from php (not the extensions
dll´s) to system32. I downloded to the win32 package with the extensions
pack and copy the stuff to php.

The problem now is if i run info.php i got some errors like "unable to load
dynamic link libary
´c:\php\extensions/php_ifx.dll´,´c:\php\extensions/php_ingres.dll=B



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




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




Re: [PHP-WIN] passthru() on Win98 ??

2002-02-26 Thread Mike Flynn

Yes, this has been documented extensively on the web.  The fix is to put a 
pdf extension at the end of the url call to your script that is returning 
the pdf file.  You can use an arbitrary filename ending in .pdf, or you can 
use the actual filename of the .pdf file, which would be preferable so that 
if the user tries to save the .pdf file, the default filename is 
correct.  So what this means is that the script that is linking to your 
.pdf-returning script needs to know the filename/that it is a .pdf file, 
ahead of time.  So you want to do something like this:

Here's the PDF\n";
?>

-Mike

At 03:09 PM 2/26/2002 +0100, Sviss Cobazor wrote:
>However, sigh, IE seems to have a bug so that Acrobat Reader is only loaded
>when the URL ends with ".pdf" aka IE doesn't give a rats about the header
>sent to it.
>Using Telnet I can see that the pdf page is returned correctly but when
>using IE I still get a blank page due to the fact that no (pre-generated)
>pdf document is sent to it and therefore the URL doesn't contain a
>"whatever.pdf" ind the end and therefore doesn't load Acrobat Reader.
>Look at this example:
>
>header("Content-Type: application/pdf");
>flush();
>passthru("C:\htmldoc -t pdf14 --quiet --jpeg size A4 --webpage
>\"http://localhost/whatever.html\"";);
>
>This works fine with Telnet (where output is nonsense),
>but doesn't with IE (where the output would make sense).
>
>Does anyone have a solution to this?
>How to get IE to understand that the data sent to it is to be handled as a
>pdf document (as in load Acrobat Reader)?
>
>
>
>"Sviss Cobazor" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > It seemed that it was Putty itself that wouldn't work for me (don't ask me
> > why).
> > So I used Telnet and it worked.
> > After having my advicor (this is a education project) visiting me we found
> > out why that passthru() function didn't work.
> > It's very simple really, passthru() doesn't allow spaces in paths so
> > "C:\program files\etc." becomes "C:\program" => false path.
> > Removing the application (htmldoc.exe) to "C:\" instead did the job.
> >
> > For anyone else having same problems this is the correct way to type it
>(my
> > example):
> >
> >  > function topdf($filename, $options = "") {
> > header("Content-Type: application/pdf");
> > flush();
> > passthru("C:\htmldoc -t pdf14 --quiet --jpeg size A4 --webpage
>$options
> > \"$filename\"");
> > }
> > ?>
> >
> > This function now works and sends the result pdf directly to the browser.
> >
> > Thanks for your time Court, I wouldn't have thought of using Telnet myself
> > :)
> >
> > ~ Sviss
> >
> > "Court Shrock" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > To explain the 400 bad request, you most likely had a typo when you
>typed
> > in
> > > the HTTP request.  The request is case-sensitive and very particular.
> > Most
> > > likely, the "Host: localhost" portion of the request messed up somehow.
> > >
> > > When you get a "HTTP/1.1 200 OK" response, that means that the webserver
> > > accepted the request and will process your request.  In order to test
> > > whether or not the passthru function is doing things properly, you are
> > > verifying what is being sent to the browser by simulating what the
>browser
> > > would send to your webserver and then what the browser is getting in
> > > response.  It will all start to make sense when you start seeing your
> > files
> > > output--of course, in the request that I had you type, I assumed the
>file
> > > that returns the pdf is named "index.php" or whatever file your
>webserver
> > > will retrieve when it gets a root "/" request.  If this is not the case,
> > you
> > > need to replace the "GET / HTTP/1.1" line with "GET /yourfile.php
> > HTTP/1.1"
> > > or even "GET /yourfile.php?var1=whatever__yougettheidea HTTP/1.1".
> > >
> > > passthru is working properly if you see something like:
> > > HTTP/1.1 200 OK
> > > Date: Mon, 25 Feb 2002 23:20:35 GMT
> > > Server: Apache/1.3.20 (Unix) PHP/4.0.6 mod_ssl/2.8.4 OpenSSL/0.9.6
> > > X-Powered-By: PHP/4.0.6
> > > Transfer-Encoding: chunked
> > >

Re: [PHP-WIN] passthru() on Win98 ??

2002-02-26 Thread Mike Flynn

Use a slash and then the filename.pdf.  So 
http://whatever/stuff.php?options/desired_filename.pdf would do it.  It's 
ok that you aren't linking to a real file, it doesn't matter.  Just the 
file that you want the .pdf document to be known as to the user's browser.

At 05:07 PM 2/26/2002 +0100, Sviss Cobazor wrote:
>Hmm in my case there is no file to link to. The pdf document doesn't exist,
>it's generated on-the-fly. Take this example:
>
>test.php contains:
>
>function topdf($file, $options = "") {
> header("Content-Type: application/pdf");
> flush();
>  passthru("C:\htmldoc -t pdf14 --quiet --jpeg size A4 --webpage $options
>\"$file\"");
>}
>
>$url = "http://localhost/whatever.html";;
>
>topdf($url);
>?>
>
>So the idea was to write the address "http://localhost/test.php"; and the
>browser would load Acrobat Reader and show the pdf document generated from
>"whatever.html".
>
>So how do I get the ".pdf" added?
>By typing the address "http://localhost/test.php?.pdf"; ? Doesn't seem to
>work.
>
>"Mike Flynn" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Yes, this has been documented extensively on the web.  The fix is to put a
> > pdf extension at the end of the url call to your script that is returning
> > the pdf file.  You can use an arbitrary filename ending in .pdf, or you
>can
> > use the actual filename of the .pdf file, which would be preferable so
>that
> > if the user tries to save the .pdf file, the default filename is
> > correct.  So what this means is that the script that is linking to your
> > .pdf-returning script needs to know the filename/that it is a .pdf file,
> > ahead of time.  So you want to do something like this:
> >
> >  > $query  = 'SELECT strFileFilename FROM tblFiles ';
> > $query .= "WHERE intFileID=$id";
> > $filename = mysql_result(mysql_query($query), 0);
> > print "Here's the
>PDF\n";
> > ?>
> >
> > -Mike
> >
> > At 03:09 PM 2/26/2002 +0100, Sviss Cobazor wrote:
> > >However, sigh, IE seems to have a bug so that Acrobat Reader is only
>loaded
> > >when the URL ends with ".pdf" aka IE doesn't give a rats about the header
> > >sent to it.
> > >Using Telnet I can see that the pdf page is returned correctly but when
> > >using IE I still get a blank page due to the fact that no (pre-generated)
> > >pdf document is sent to it and therefore the URL doesn't contain a
> > >"whatever.pdf" ind the end and therefore doesn't load Acrobat Reader.
> > >Look at this example:
> > >
> > >header("Content-Type: application/pdf");
> > >flush();
> > >passthru("C:\htmldoc -t pdf14 --quiet --jpeg size A4 --webpage
> > >\"http://localhost/whatever.html\"";);
> > >
> > >This works fine with Telnet (where output is nonsense),
> > >but doesn't with IE (where the output would make sense).
> > >
> > >Does anyone have a solution to this?
> > >How to get IE to understand that the data sent to it is to be handled as
>a
> > >pdf document (as in load Acrobat Reader)?
> > >
> > >
> > >
> > >"Sviss Cobazor" <[EMAIL PROTECTED]> wrote in message
> > >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > It seemed that it was Putty itself that wouldn't work for me (don't
>ask me
> > > > why).
> > > > So I used Telnet and it worked.
> > > > After having my advicor (this is a education project) visiting me we
>found
> > > > out why that passthru() function didn't work.
> > > > It's very simple really, passthru() doesn't allow spaces in paths so
> > > > "C:\program files\etc." becomes "C:\program" => false path.
> > > > Removing the application (htmldoc.exe) to "C:\" instead did the job.
> > > >
> > > > For anyone else having same problems this is the correct way to type
>it
> > >(my
> > > > example):
> > > >
> > > >  > > > function topdf($filename, $options = "") {
> > > > header("Content-Type: application/pdf");
> > > > flush();
> > > > passthru("C:\htmldoc -t pdf14 --quiet --jpeg size A4 --webpage
> > >$options
> > > > \"$f

RE: [PHP-WIN] CHMOD

2002-02-26 Thread Mike Eynon

Remember that the php chmod call requires an octel number for the
permissions flag.  You can do this by putting a zero ('0') infront of the
parm.

ex. chmod("foofile",0777);


// Mike Eynon
// www.MikeEynon.com
// 1366 Bulb Ave.
// Santa Cruz, CA  95062
// 831.588.2388

-Original Message-
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 26, 2002 8:40 AM
To: '[EMAIL PROTECTED]'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] CHMOD


>i was reading a php book and it says on UNIX machines i must change the
CHMOD
>to 666 or 777, how do i do this? i never heard of the CHMOD. thanks.

Nobody wants in general to chomd a file 777!!!

Let me explain why:

chmod is an abbreviation of CHange MODe. The mode, or more specify the
access mode of the file is what is intended to be changed with chmod - so
don't change these flags unless you kmnow what you are doing!

Access right under unix is divided in three access groups. 1) Owner, 2)
Group and 3) Everybody. These groups has three flags for Read, Write and
Execute. These three flags could be set individually for each of the three
groups.

There is two ways to manipulate the Access flags under an unix environment:

a) absolute and b) relative.

The absolute method uses number to manipulates the access rights. The access
right for each group are represented by three bits like this: 111

The first bit is the access right for Read, the second for Write, and the
third for execute. These three bits fits into an octal number (range 0-7),
and the chomd actually uses octal numbers. The first octal number is for the
owner access, the second for group, and the first, you got it, everybody.

So if all bits are set to one for an access group, that access group will
have Read, Write and eXecute right, in short RWX access.

The most significant bit is the left on, and hence its value becomes 4, the
second bit has the value 2 and the first bit 1. If we add the value of these
three bits together, we get the number 7. Seven hence means that we will
give RWX access to a file. This might be oki for the owner, and even for the
group, but do we wants to do this for everybody?

In most case the answer to this question is: NO

For the access right RX we have the bit pattern 101 (= 4 + 0 + 1 = 5), which
is the most common value to set for the access groups Group and Everybody -
if they need to be able to execute the file. If execute rights is not
needed, it is sufficient to give the access right R only ( 100 = 4 + 0 + 0 =
4), so if you need to read only a file, the proper chmod should be: 744 and
if execute is needed to: 755. Actually you don't need the R flag set under
unix to execute a file, so for execute 711 will be sufficient. Setting the
access right to 711, means that the user can execute the file, but not
display its contents.

However. Access rights are set for directories two, and then they are
interpreted a little bit different. Access right X for a directory means
that a user can do a CD into it. To be able to display the contents of a
directory both RX are needed for a directory, since you both need to be able
to access it and read it.

X access for a directory could be used as a
"pass-through-but-not-display-content-of" directory. Could be useful if you
don't want everybody to know how the tree structure really looks like.


For more information about chmod check the online page by typing '% man
chmod'

/Anders


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


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




Re: [PHP-WIN] passthru() on Win98 ??

2002-02-26 Thread Mike Flynn

It goes into a link to whatever PHP file you're using to return the 
contents of the .PDF.  It would work in the address field in the browser, 
too.  I don't see why you're typing http://localhost/test.php/whatever.pdf 
into the address field since that isn't the URL I told you to use.  I said:

http://whatever/stuff.php?options/desired_filename.pdf

As you can see, instead of stuff.php put the name of the php file that has 
your code to return the binary contents of the .pdf file.  You can follow 
it with whatever optional parameters you want in the query string (i/e 
after the '?' question mark), either way, make sure at the very end of the 
address is a slash '/' followed by the desired filename you want to use, 
ending in .pdf.

-Mike

At 05:58 PM 2/26/02 +0100, you wrote:
>Is the example below meant to go into a link ()?
>Or is it meant for the address field on the browser?
>If I type "http://localhost/test.php/whatever.pdf"; in the address field I
>get a server error which I was also expecting to be hornest. I don't see how
>that should work.
>
>
>"Mike Flynn" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Use a slash and then the filename.pdf.  So
> > http://whatever/stuff.php?options/desired_filename.pdf would do it.  It's
> > ok that you aren't linking to a real file, it doesn't matter.  Just the
> > file that you want the .pdf document to be known as to the user's browser.
> >
> > At 05:07 PM 2/26/2002 +0100, Sviss Cobazor wrote:
> > >Hmm in my case there is no file to link to. The pdf document doesn't
>exist,
> > >it's generated on-the-fly. Take this example:
> > >
> > >test.php contains:
> > >
> > > > >function topdf($file, $options = "") {
> > > header("Content-Type: application/pdf");
> > > flush();
> > >  passthru("C:\htmldoc -t pdf14 --quiet --jpeg size A4 --webpage $options
> > >\"$file\"");
> > >}
> > >
> > >$url = "http://localhost/whatever.html";;
> > >
> > >topdf($url);
> > >?>
> > >
> > >So the idea was to write the address "http://localhost/test.php"; and the
> > >browser would load Acrobat Reader and show the pdf document generated
>from
> > >"whatever.html".
> > >
> > >So how do I get the ".pdf" added?
> > >By typing the address "http://localhost/test.php?.pdf"; ? Doesn't seem to
> > >work.
> > >
> > >"Mike Flynn" <[EMAIL PROTECTED]> wrote in message
> > >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > Yes, this has been documented extensively on the web.  The fix is to
>put a
> > > > pdf extension at the end of the url call to your script that is
>returning
> > > > the pdf file.  You can use an arbitrary filename ending in .pdf, or
>you
> > >can
> > > > use the actual filename of the .pdf file, which would be preferable so
> > >that
> > > > if the user tries to save the .pdf file, the default filename is
> > > > correct.  So what this means is that the script that is linking to
>your
> > > > .pdf-returning script needs to know the filename/that it is a .pdf
>file,
> > > > ahead of time.  So you want to do something like this:
> > > >
> > > >  > > > $query  = 'SELECT strFileFilename FROM tblFiles ';
> > > > $query .= "WHERE intFileID=$id";
> > > > $filename = mysql_result(mysql_query($query), 0);
> > > > print "Here's the
> > >PDF\n";
> > > > ?>
> > > >
> > > > -Mike
> > > >
> > > > At 03:09 PM 2/26/2002 +0100, Sviss Cobazor wrote:
> > > > >However, sigh, IE seems to have a bug so that Acrobat Reader is only
> > >loaded
> > > > >when the URL ends with ".pdf" aka IE doesn't give a rats about the
>header
> > > > >sent to it.
> > > > >Using Telnet I can see that the pdf page is returned correctly but
>when
> > > > >using IE I still get a blank page due to the fact that no
>(pre-generated)
> > > > >pdf document is sent to it and therefore the URL doesn't contain a
> > > > >"whatever.pdf" ind the end and therefore doesn't load Acrobat Reader.
> > > > >Look at this example:
> > > > >
> > > &g

RE: [PHP-WIN] mail() function EXTREMELY slow

2002-02-27 Thread Mike Eynon

I have to agree.  I am using php mail() on my local net without any
problems.  The only thing I am doing differently is using a LINUX box for my
mail server.  My php mail() calls happen almost instantaneously.

Mike.


// Mike Eynon
// www.MikeEynon.com
// 1366 Bulb Ave.
// Santa Cruz, CA  95062
// 831.588.2388

-Original Message-
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 5:23 AM
To: 'Matt Hillebrand'
Cc: php-windows
Subject: RE: [PHP-WIN] mail() function EXTREMELY slow


Hand on your heart: Do you really believe that this is due to a slowness in
the mail() function of php?

It might, and is probably, related to your own network. For example: have
you check the ICMP traffic, to see if your network traffic is routed
correctly? You might have a router in the routing list that is a "wacko"
router, and that might causes sporadic network hangs, and disconnection's.

/Anders


>-Original Message-
>From: Matt Hillebrand [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, February 27, 2002 12:27 AM
>To: [EMAIL PROTECTED]; php-windows
>Subject: RE: [PHP-WIN] mail() function EXTREMELY slow
>
>
>Yeah, I know about the max time variable, but it would be unacceptable to
>take over a minute or two to send a handful of emails!
>
>I read an article that said you could use your ISP's SMTP
>server for the
>mail() function, but that didn't seem to work.
>
>
>
>Matt Hillebrand
>Web Developer
>[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
>
>-Original Message-
>From: Ross Fleming [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, February 26, 2002 3:28 PM
>To: Matt Hillebrand; php-windows
>Subject: RE: [PHP-WIN] mail() function EXTREMELY slow
>
>
>I hope you're not spamming... ;)
>
>In php.ini:
>
>max_execution_time=30 ; Maximum execution time of each script, in
>seconds
>
>Change it to what you need.  The speed is pretty much
>dependent on your SMTP
>server though.
>
>Ross
>
>-Original Message-
>From: Matt Hillebrand [mailto:[EMAIL PROTECTED]]
>Sent: 26 February 2002 23:13
>To: php-windows
>Subject: [PHP-WIN] mail() function EXTREMELY slow
>
>
>I'm using the SMTP server that my company owns, but it takes
>forever just to
>send one email message. Trying to send a batch of emails with
>PHP's mail()
>function takes so long, that the script expires and I get an
>error message.
>
>I tried searching the archives of this list, but that search
>page seems to
>be broken.
>
>Thanks!
>
>
>Matt Hillebrand
>[EMAIL PROTECTED]
>
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>

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


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




RE: [PHP-WIN] Warning: Undefined variable

2002-03-03 Thread Mike Flynn

Duh, just let him know the proper setting:

error_reporting  =  E_ALL & ~E_NOTICE

That will keep everything but minor warnings.  That's what most people use.

-Mike

At 07:40 PM 3/2/02 -0800, alain samoun wrote:
>Crizz:
>Obviously you don't want to do that at this point - No error reporting for a
>novice - can be challenging...
>Show us your script and we may be able to help. (Sorry I did not see your
>previous post(s)...)
>A+
>Alain


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




[PHP-WIN] Mail with php and w2k

2002-03-04 Thread Mike Schmid

Hi NG

how you have configured your php.ini (mail point) and your windws to mail?

Thanks



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




RE: [PHP-WIN] Output of PHP ist truncated

2002-03-05 Thread Mike Eynon

I have also seen this happen.  After playing with a few things... I finally
got the problem to go away by adding in a bunch of line feeds.  The problem
I saw seemed to be a buffering problem of some kind.  When I made sure that
the html being generated had line lengths of no more than 120 chars in
width, everything just started working.

As well, this seems to be a Win32 thing only.  I did not have this problem
in Linux running the exact same script.

// Mike Eynon
// www.MikeEynon.com
// 1366 Bulb Ave.
// Santa Cruz, CA  95062
// 831.588.2388

-Original Message-
From: Rolf [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 11:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Output of PHP ist truncated


Hello,

im trying to use PHP on W2k ADV Server with phprojekt.
Everytime i call an php script the output is truncated on the screen.
i just see some input fields, but no text.

Can anybody help me?
Rolf



--
bis die mails
Rolf  mailto:[EMAIL PROTECTED]

- ---o<-o<-o<-o<-o<-o<-o<-o<-o<--
 /°\   --- MACH MIT!!! ---
 \ /  ASCII ribbon campaign -
  Xgegen HTML
 / \in Mail und News
- ---o<-o<-o<-o<-o<-o<-o<-o<-o<--



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


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




Re: [PHP-WIN] sprintf

2002-03-06 Thread Mike Flynn

One option is to use substr():

$thestring = 'scott';
$thestring = substr($thestring, 0, 3);

At 03:02 PM 3/6/02 -0500, Scott St. John wrote:
>I am trying to create a file in which each line is exactly 255 characters
>long, some of the data I am importing is longer than the field allows.
>Does anyone know of a way to strip that data off at x character?  Example,
>I have a 3 character field and the value being inserted into it is scott,
>I would only display sco
>
>Thanks,
>
>-Scott


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




Re: [PHP-WIN] sessions Problem Followup concerning IE6

2002-03-08 Thread Mike Flynn

Sessions won't depend on the browser version.  If you are using cookies for 
the sessions, it will just depend on whether their browser has cookies 
blocked or not.  If you are not using cookies, and have the "transparent 
SID" option turned on in the PHP.INI file, then the ?SID=xxx will get 
appended onto links on the server-side before it ever even gets to the 
user's browser, so the browser version will have nothing to do with whether 
the SID gets added to the url or not.  The SID will only get added 
automatically if you have the "transparent SID" option turned on in the 
php.ini file.

Also, the SID won't get added for things like JavaScript redirects, META 
'refresh' tag redirects, header('Location: ...') redirects and all forms, 
as far as I know, so you'll have to add it manually for these.

Hope that helps.

-Mike

At 02:44 PM 3/8/02 -0500, Dale Heil wrote:
>I am using IE6.  I got someone with IE5.5 and my code works.
>
>So, I just went into IE6>Tools>Internet Options>Privacy>Web Sites>Edit
>and added my domain with Allow All and it works.
>
>I thought that php would still add the SID automatically even if a
>user had cookies blocked.
>
>Any explanations, work arounds beside having users change their settings when
>migrating to IE6?  Disabled in IE5.5 and before is definitely different
>than blocked in IE6.  It probably makes sense for security.  Maybe that was
>one of the holes MS fixed?
>
>TIA, Dale.


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




[PHP-WIN] XSLT encoding error

2002-03-08 Thread Mike Eynon

Howdy all.

I am trying to use the new XSLT translation stuff in 4.1.1 with Win2k and
IIS running ISAPI.

When I try to run even the simplest example, I get the following error:

>>>>>>>>>>>>>
unknown encoding ''
62
<<<<<<<<<<<<<

I have tried specifying the encoding in both the XML and XSL files, and even
tried both "UTF-8" and "ISO-8859-1".

Has anyone seen this?  I am pretty much stuck and in need of at least a
suggestion.

Below are the following xml, xsl, and php source files I am using.

t1.xml >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>




Mike


[EMAIL PROTECTED]




>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

t1.xsl >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


http://www.w3.org/1999/XSL/Transform";>






Mike's php xml test

















>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

t1.php >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

\n");
}
if(is_file($xslf)){
print("XSL Exists\n");
}

$result = xslt_process($xsl_parser,$xmlf,$xslf,$outf);

if ($result)
{
echo "$result";
}
else
{
$err1 = xslt_error($xsl_parser);
$err2 = xslt_errno($xsl_parser);
echo "Bummer. ";
echo "$err1 ";
echo "$err2 ";
}

xslt_free($xsl_parser);
?>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

I robbed some of my test code from the example Christian posted
a couple days ago.  Thanks Christian.


// Mike Eynon
// www.MikeEynon.com
// 1366 Bulb Ave
// Santa Cruz, CA  95062
// [EMAIL PROTECTED]
// 831.588.2388 (cell)





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




Re: [PHP-WIN] Re: strings with $ sign

2002-03-10 Thread Mike Flynn

$result_html = ' ... html code<-- " FOOTER CENTER $LOGOIMAGE footer.jpg 
" !--> ... more html code';

Use SINGLE quotes to enclose DOUBLE quotes or $ dollar signs.

-Mike

At 11:51 AM 3/10/02 +0100, you wrote:
>The thing is that the result html code is to be parsed by HTMLDOC (pdf
>generator) to create pdf from the webpage. By inserting <-- "some string"
>!--> into the html, HTMLDOC can catch these strings and act from them.
>
>example:
>
>$result_html = " ... html code<-- " FOOTER CENTER $LOGOIMAGE footer.jpg
>" !--> ... more html code";
>
>result_html is the page contens for HTMLDOC to parse and through that catch
>the footer code and insert footer.jpg as the footer on the pdf pages.
>
>the problem is that php converts $LOGOIMAGE to a php variable. \$LOGOIMAGE
>doesn't seem to work.
>
>"Robert Janeczek" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > I just wanted to know how to use strings with $ sign.
> > >
> > > If a word starts with a dollar sign php will think it's a variable, how
> > can
> > > I make
> > > " $bla bla  and bla $bla " to stay that way?
> > > Will this work? " \$bla bla  and bla \$bla "
> >
> > don`t use "" - use ''. php doesn`t parse variables in such kind of
>strings.
> > ' $bla bla  and bla $bla '
> >
> > " \$bla bla  and bla \$bla " - this should work too, but i haven`t
>checked.
> >
> > rash
> >
> >
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- Mike Flynn --
mike @ mikeflynn . net
home => work => home => shop => home [adbusters]


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




Re: [PHP-WIN] new window with set size via php ?

2002-03-10 Thread Mike Flynn

Argh, how many times must it be reiterated that PHP is a *SERVER SIDE 
PROGRAMMING LANGUAGE*.  What this means is that by itself it cannot do 
ANYTHING on the client's side ONCE THE PAGE HAS LOADED.  You can have PHP 
generate some JavaScript and dHTML to do such things, but PHP by itself 
only executes BEFORE the user gets the page.  NOT on the user's computer.

-Mike

At 05:55 PM 3/10/02 +0100, Wolfgang Schneider wrote:
>Hi everyone,
>
>does anyone know if one can open a browser window with a specific
>size from within a php script ?  I mean achieve something like what
>javascript can do via including the following
>
>
>onclick="window.open('testpage.html','test','width=480,height=400');"
>
>in an format" ...
>Would anyone have some suggestions ?
>God bless you with His grace and peace
>Wolfgang


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




Re: [PHP-WIN] new window with set size via php ?

2002-03-10 Thread Mike Flynn

Good point.  I assumed that Wolfgang meant for normal client-side pages.

-Mike

At 10:33 AM 3/10/02 -0800, alain wrote:
>Mike:
>You are right and you are wrong ;) It depends on the way that you are using
>php, if it's on a web site you are right, but you can also use php as a
>standalone application, that way you can use it, as you would use - God
>forbides - VB. And with the PHP COM connection, you can probably find an
>object that will resize the browser's window.
>A+
>Alain


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




Re: [PHP-WIN] new window with set size via php ?

2002-03-11 Thread Mike Flynn

At 08:00 AM 3/11/2002 +0100, Wolfgang Schneider wrote:
>Actually, I was thinking of some "normal server side pages"  ... :-)
>I've seen things people did with asp pages where I thought they sized
>pop windows or resized already open windows via the server side
>language, now I may simply be mistaken and be "dreaming" when in
>reality these effects were achieved by embedded javascript code ?

As far as I know, all client-side manipulations must be done via a script, 
whose support is entirely dependent on the user's browser.  JavaScript is 
of course the most prevalent.

>Now, my newbie question came about as I was wondering how I could at
>least fix it so that these links open the new "_study" window with
>the same size and look as the one which is opened via the javascript
>function ? then I thoght of my experience with those pages from
>another website and wondered if they did such things with asp ... and
>if it could be done with php as well ...

It's always a good idea to link some link to a target window even if you're 
using a javascript popup script.  That way, if the user isn't using 
javascript the window will pop open.  The way to do this and not have TWO 
windows pop up is something like the following:
<!--//
   var winPage;
   function popPage(id) {
 winPage = window.open('thepage.php?id='+id, 'winPage', '...params...');
 winPage.window.focus();
   }
//-->
...
link

You see the return false; after the call to pop open the new window.  That 
way it gives a priority to using javascript to pop open the new window.  If 
the user has javascript turned on and it pops open the new window, then by 
returning false it ignores the href=".." part of the link.  If the user 
doesn't have javascript then the link will open manually via the href and 
target parts into another window.  If you didn't have the return false 
after the javascript, then the window would open twice: once by the 
javascript, once by the normal href= property.

That's how I do all my javascript window poppers, just to be safe.

So, returning to your question, I don't think it's possible at all to 
control where a new window opens, how big it is, and what properties 
are/aren't displayed via a normal  link.  Only in JavaScript.

However, what you CAN do is dynamically generate these kinds of properties 
when the page is generated for each link, if, say, you wanted each popup to 
have a different size/etc for each individual link.  Something like this:

<!--//
   var winPage;
   function popPage(id, width, height) {
 winPage = window.open('thepage.php?id='+id, 'winPage', 
'width='+width',height='+height+',...');
 winPage.window.focus();
   }
//-->
link\n";
   }
?>

>Sorry for the confusion ... my concern also is how to still be able
>to somewhat "server side influence" the size and look of a window
>when people have turned their "javascript" off in the browser ... any
>ideas?

Earth bless you as well. :)

-Mike


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




Re: [PHP-WIN] Include ()

2002-03-14 Thread Mike Flynn

Check your PHP.INI file for settings related to automatic escaping of 
characters.  And, uh, you say it's a forward slash like '/', but are you 
sure they aren't backslashes like '\'?  I've never heard of forward slashes 
getting added.  Are you positive that the text files don't have the 
slashes?  If not, then it has something to do with magic quotes, perhaps 
magic_quotes_runtime.

-Mike

At 11:57 PM 3/13/2002 -0500, you wrote:
>When i use the Include() command for a text file it always puts a slash, / ,
>in front of any qotations in the text file. anyone know why? my example is
>http://www.notchmetal.com/bio/
>
>thanks
>
>  -Sean-


Mike Flynn - Burlington, VT
http://www.mikeflynn.net/ - [EMAIL PROTECTED]
home=>work=>home=>store=>home


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




Re: [PHP-WIN] Session-trouble bigtime

2002-03-18 Thread Mike Flynn

At 03:58 PM 3/18/2002 +0100, Martin wrote:
>Hmm I have registred the Session $Namn
>by the following snippet:
>
><< File1 >>
>session_register("Namn");
>$Namn = "sweden";
>echo"ett litet test med sessioner";
>?>

Should there be a session_start() here?  You have session.auto_start set to 
0 in your PHP.INI, so I'm not sure if this will actually start the session.

>And when I goes to:
><< File2 >>
>session_start() ;
>session_register("Namn");
>echo"Hejsan $Namn !";
>?>

You don't register the variable again once you've started the session.  You 
can get rid of the 'session_register("Namn");' here.

-Mike


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




RE: [PHP-WIN] issue with PHP_XSLT?

2002-03-21 Thread Mike Eynon

Not sure if this will help you or not, but here are a few words of wisdom
that helped me get past problems in the Sablotron extension.

If you wish to use files that are not in your php root, you have to add the
string: "file://" before each of your filenames.  This will keep Sablotron
happy in both LINUX and Windows.

// Mike Eynon
// www.MikeEynon.com
// 1366 Bulb Ave
// Santa Cruz, CA  95062
// [EMAIL PROTECTED]
// 831.588.2388 (cell)




-Original Message-
From: Phillip Fox [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 12:56 PM
To: Ben
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] issue with PHP_XSLT?



On Thu, 21 Mar 2002, Ben wrote:

> why does php_xslt.dll expect the files to be in PHP root? how can i change
> this to be able to pick up files from the document root itself?
>

It sounds to me like you have a diffirent problem than the one that I had on
my
server, but I think that the same solution will work for you too. Check out
the
code and comments on this page:

http://bugs.php.net/bug.php?id=14965

The page has details on the proper format for paths to pass to the
processor and code to read files and pass their content to the processor
as arguments.


HTH!


--> Phillip Fox -- [EMAIL PROTECTED]
  405.773.WORX -- 1.888.772.WORX  --  http://www.TheWorxCo.Net/




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


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




Re: [PHP-WIN] Is there anyway to save a file into Mysql database

2002-03-25 Thread Mike Flynn

Yes, you can store "files" in a MySQL database.  You store them in some 
type of BLOB field, and just insert the binary data right into it.  One 
thing to watch out for is slashes.  I forget if you need to addslashes 
before putting the data into the database, but I think you need to 
stripslashes after retrieving it, so it's not corrupt.  I could tell you 
for sure but I don't have any of my code in front of me right now :)

So basically you can create a table for files like this:
tblFiles:
  int intFileID (for primary key purposes)
  tinytext strFileFilename (you'll probably want this)
  tinytext strFileType (if you're storing different kinds of file formats, 
you'll need this or some other way to identify the file {MIME} type)
  int intFileSize (optional)
  tinytext strFileDescription (optional)
  mediumblob blbFileData

Then you can store the file binary data into the blbFileData field and 
retrieve it later.  You can do this for any file formats.. including 
images.  There are many tutorials showing how to do this with images on the 
web.

-Mike

At 02:14 PM 3/25/2002 +0800, you wrote:
>Dear all
>Can someone pls tell me is php will be able to grep text from MS Word and
>then save that word file into MYSQL database? Which means is MYSQL will be
>able to store files into it's table?
>
>Thx a lot
>jack
>[EMAIL PROTECTED]
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


Mike Flynn - Burlington, VT
http://www.mikeflynn.net/ - [EMAIL PROTECTED]
home=>work=>home=>store=>home


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




Re: [PHP-WIN] Parse error when using Javascript & php?

2002-03-29 Thread Mike Flynn

Anything outside of the  tags doesn't affect PHP one way or the 
other, as long as it doesn't contain any of the strings like  etc 
that turn PHP parsing on and off.  So I don't think the JavaScript or 
IFrames would affect it.

-Mike

At 12:31 PM 3/29/2002 -0600, Todd WIlliamsen wrote:
>Parse error line 117... there is no line 117..hehe!!  I am thinking that PHP
>doesn't like IFrames, or Javascript, or maybe just me?
>
>Here is the code:
>
>"$dbuser", "$dbpass") or die("Couldn't connect to database"); $db = 
>@mysql_select_db($dbname, $connection) or die("Could not select 
>datababse"); $sql = "SELECT id, news FROM $editortable ORDER BY id"; 
>$result = @mysql_query($sql,$connection) or die("Could not execute 
>query"); while ($row = mysql_fetch_array($result)) { $id = $row['id']; 
>$news = $row['news']; echo "$news"; ?>


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




RE: [PHP-WIN] Parse error when using Javascript & php?

2002-03-29 Thread Mike Flynn

IFrames don't use the 'value' property, so your second approach was right 
-- putting the content between the iframe tags.  Now, do you know that 
IFrames are only supported by Internet Explorer and not Netscape 
Navigator?  They are used on almost *no* sites.. so you may want to 
consider that before using them in your own.  They aren't an accepted standard.

At any rate, putting , or more preferably, , between the  and  tags will work, assuming you 
are using a browser that supports them.

Have you tried looking at the source code that is generated by the 
page?  That is something everyone should probably do before posting a 
question to the list.

-Mike

At 02:17 PM 3/29/2002 -0600, Todd Williamsen wrote:

>DOH!!  Thanks ross
>
>Umm... Now I cannot get the value of $news to display in the IFRAME... I
>used value=", that didn't work
>
>Then I put
>
>  between the  tags, that didn't work either
>
>Any suggestions?


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




Re: [PHP-WIN] Passing Javascript Variables to PHP

2002-04-02 Thread Mike Flynn

I have answered variations on this question at least 3 times.  Please check 
the archives.  JavaScript is client-side, PHP is server-side.  The only way 
to go from JavaScript to PHP (in that direction) is by going to a new page 
-- 1. Reloading the current page, with the relevant data in the query 
string; 2. Loading a new page, with the relevant data in the query string; 
3. Submitting a form, with the relevant data in hidden or other kinds of 
fields.

-Mike

At 07:09 PM 4/2/02 +0100, Wayne Hinch wrote:
>Hi all,
>
>Does anyone know if it is possible to pass variables from JavaScript to
>PHP?
>
>Any help will be much appreciated
>
>Many Thanks



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




RE: [PHP-WIN] Passing Javascript Variables to PHP

2002-04-02 Thread Mike Flynn

At 02:37 PM 4/2/02 -0700, Robin Bolton wrote:
>Another way to pass data from JavaScript <-> PHP is with cookies.

Good point!

-Mike


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




Re: [PHP-WIN] Bounces

2002-04-04 Thread Mike Flynn

At 09:19 AM 4/4/2002 +, you wrote:
>I can't figure out how to get email bounces to come back so that I can 
>remove them from my lists. Is there some way to do this? I am using the 
>mail function.
>
>Troy

If you mean remove them automatically, then I don't think there would be 
any way to do this other than setting the From: and Reply-To: headers to 
the address you want outgoing messages bounced to, then having PHP check 
that e-mail account's e-mail and detect bounced ones by parsing the 
messages.  That, or running your own mail server software.

If you mean manually, then you could just set the From: and Reply-To: 
headers to your e-mail address and all bounces would come back to that.

-Mike


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




Re: [PHP-WIN] New to PHP Need Help

2002-04-04 Thread Mike Flynn

mysql_fetch_row() returns an associative array containing all columns 
retrieved from the database.  You can't echo an array directly.  In the 
associative array, the keys are the column names from the table, the values 
are the values you retrieved in that row.

So you could do this to see what you have:

...all the same code...
$Location_Info = mysql_fetch_row($result);
foreach($Location_Info as $key => $value) {
   echo "$key: $value\n";
}

That would display the row.  There's tons of tutorials on basic PHP<->MySQL 
stuff like this out on the web.  I recommend checking webmonkey.com, 
zend.com, phpbuilder.com, devshed.com.

Also, it's not great etiquette to send your message to multiple listservs 
at once.

-Mike

At 09:29 AM 4/4/2002 -0600, Jason Tobias wrote:
>I am trying to define variables through an anchor tag to retrive data from
>MySQL,  When the script runs it displays Array.  I am running WIN2K and IIS
>5
>
>echo "Camp Street Cafe";
>
>Here is the script that is called.
>
>
>$db = mysql_connect("localhost", "", "")
>  or die ("Could not connect to Localhost");
>mysql_select_db ("ETM", $db)
>  or die ("Could not connect to the Database");
>
>$table = "locations";
>$location = ($_REQUEST["location"]);
>$query = "Select * from $table where Location_ID = $location";
>$result= mysql_query($query);
>$Location_Info = mysql_fetch_row($result);
>
>echo "$Location_Info";
>
>?>
>
>
>
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


Mike Flynn - Burlington, VT
http://www.mikeflynn.net/ - [EMAIL PROTECTED]
home=>work=>home=>store=>home [repeat daily]


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




RE: [PHP-WIN] update?'

2002-04-05 Thread Mike Flynn

I doubt there is any way to do this without using an intermediate step.  I 
would grab all the data you need from whichever tables you are grabbing 
from, into a temporary array in PHP, including whatever keys you are using 
to place them into the other table where they are being placed.  Then go 
back through that array, running one or more UPDATE query for each row, 
putting the data where it belongs.

-Mike

At 12:36 PM 4/5/02 +0100, Sandeep Murphy wrote:
>hi,
>
>sorry for missing out on the database type.. am using Mysql 3.23... am
>trying to execute this query in query analyzer (Mascon) directly...


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




Re: [PHP-WIN] Newbie Question

2002-04-08 Thread Mike Flynn

Give this a shot...

");
 print("$vignette");
 print("");
 print("$marque");
 print("$nom");
 print("$pdfproduit");
 print("$commprod");
 print("");
   }
?>


At 08:54 AM 4/8/2002 +0200, Hubert DAUL wrote:
>Hi ,
>
>Here's my problem :
>
>I read a data file (no sql file) which contains 8 lines, and in each line, 8
>datas
>
>(ex: name1;picture1;title1;anything1;everything1;nothing1)
>
>and when i run it I see only one picture(the second data) and not all of
>them
>
>If someone could help me
>
>TYA
>
>Here the code :
>
>($fp, 1000, ";")) { $num = count ($data); $row++; if (isset($vignette)) { 
>print("
>"); print("$vignette"); // I think it's wrong here but I dont know why ==> 
>print("10e834.jpg"); print("$marque"); print("$nom"); 
>print("$pdfproduit"); print("$commprod"); print("
>"); } for ($c=0; $c<$num; $c++) switch ($c) { case 0 : { $vignette = 
>$data[$c]; break; } case 1 : { $photo= $data[$c]; break; } case 2 : { 
>$marque= $data[$c]; break; } case 3 : { $nom = $data[$c]; break; } case 4 
>: { $pdfproduit= $data[$c]; break; } case 5 : { $commprod = $data[$c]; 
>break; } } } ?>
>
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


Mike Flynn - Burlington, VT
http://www.mikeflynn.net/ - [EMAIL PROTECTED]
home=>work=>home=>store=>home [repeat daily]



Re: [PHP-WIN] Newbie Question

2002-04-08 Thread Mike Flynn

At 03:31 PM 4/8/2002 +0200, Alberto. Sartori wrote:
>You should do the cicle and get the datas until you reach the end of file 
>aka feof($fp) or better, try to use fread()

Yup, good point.  Here's the modified code.. not using fread() though.  For 
non-binary data I think this should work ok though.

");
 print("$vignette");
 print("");
 print("$marque");
 print("$nom");
 print("$pdfproduit");
 print("$commprod");
 print("");
   }
   fclose($fp);
?>



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




RE: [PHP-WIN] Rounding

2002-04-08 Thread Mike Flynn

At 09:43 PM 4/8/02 +0100, Ross Fleming wrote:
>Multiply by 100, take the absolute value and divide by 100 again

That will round down to 2 decimal places.  To round to the nearest 2 
decimal places, to what Ross said but instead of getting the absolute 
value, just round it normally.

>Hi all,
>
>Is it possible to round to 2 decimal places in PHP without having to
>push the data into mysql and out again?
>
>Cheers,
>
>Wayne


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




Re: [PHP-WIN] mail() with attachments

2002-04-08 Thread Mike Flynn

Hmm?  The article explains exactly how to do it.  You can make a multipart 
MIME e-mail where the first part is the message, and the 2nd part is the 
file attachment (and more parts for additional files).  The file data is 
encoded using base64 encoding in this example.  You just need to create the 
message body as it shows in the tutorial and then use PHP's mail() function 
to send it.

-Mike

At 08:45 AM 4/8/02 +0100, George Pitcher wrote:
>Darvin Andrioli suggested, on 20020328:
>
> > http://www.zend.com/zend/spotlight/sendmimeemailpart1.php
>
>Sorry, I was none the wiser after reading this article, as to how to get php
>to send an attachment with an email message. The attachment in this case is
>being generated from db output and saved as a 'csv' file.
>
>George


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




RE: [PHP-WIN] Rounding

2002-04-09 Thread Mike Flynn

Well, I suppose rounding by the dictionary's definition can mean any kind 
of approximation to a number of less significant digits, so I see your 
point.  But by the popular vernacular and by the default precision for any 
programming language's "round" function that I've encountered (including 
PHP's), the default precision is to round to the nearest integer.  Thus, by 
both of these modest leaps of assumption, normal rounding to me is rounding 
to the nearest integer.

-Mike

At 11:50 AM 4/9/2002 +0200, Svensson, B.A.T. (HKG) wrote:
> > That will round down to 2 decimal places.  To round to the nearest 2
> > decimal places, to what Ross said but instead of getting the absolute
> > value, just round it normally.
>
>What's "normal" rounding??


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




RE: [PHP-WIN] Rounding

2002-04-09 Thread Mike Flynn

At 05:49 PM 4/9/02 +0200, Svensson, B.A.T. (HKG) wrote:
>The number '2' I now have, was it - to be extreme - it '1,1' (a sealing
>function) or was it '2,9' (a floor function) before? You can never really
>tell...

If it was by the rule we've settled on below, then if you have 2, then the 
number you previously had was >=1.5 and < 2.5. :)

>Which integer is "nearest" for 1,5? 1 or 2? To round a decimal number is not
>as straight forward as it might appear in the first case.

1.5 is the only special case.

>In the bitter end this choice is up to the API writers own whim, but in most
>case I guess (s)he ignore this case, and I would guess that most rounding
>function then perform a floor function in the case of ==5 ().

As far as I know, .5 always gets rounded up, not down.  In school we were 
taught, "Four to the floor, Five to the sky". :)

>Because of this I believe it a bit ambiguous to say "normal" since it hardly
>can't exist a "normal" way to perform a rounding. Or??

I guess.  The dictionary defines normal, though, as "Conforming with, 
adhering to, or constituting a norm, standard, pattern, level, or type; 
typical".  So if there is a standard, typical, etc. way that rounding is 
done, then you can certainly make a case that there is a normal kind of 
rounding.  In ALL of my experiences, rounding has been defined as going to 
the nearest integer, and rounding UP on .5.  And, like I said, all 
programming languages I have encountered perform a standard rounding the 
same way.  That's why we as societies settle on norms -- so we can 
communicate without having to resort to academic analyses of every term we 
use. :)  There's no need to feel the need to one-up everything I say. :)

>Secondly, because of this "phenomena" some programmers might frequently find
>them self having to answers question from customer like:
>
>"Why does we miss $ in this last summary report?".

Hehe.. brings to mind the movie "Office Space".

-Mike


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




Re: [PHP-WIN] Another Newbie Question

2002-04-10 Thread Mike Flynn

I recommend using mysql_error() to see what the problem is.  I/e:

mysql_connect('nik', '', '') or
   die('Could not connect: '.mysql_error());
mysql_select_db_('guestbook') or
   die('Could not select: '.mysql_error());

Something like that..

At 12:56 PM 4/10/02 -0300, Nik Alleyne wrote:
>Good evening everyone,
>I am new (very new) to php. I was doing some research on the net and learn
>of this packaged and after reading just a couple of pages, i figure i should
>learn this instead of ASP. It looks so easy. Anyhow here is my problem.
>
>I am trying to connect to the database (MySQL) however, I can't I am
>connecting to the server, but I cannot connect to my sample database.
>
>Here is my script?
>mysql_connect("nik", "", "") or
>   die("could not connect to the database");
>mysql_select_db("guestbook") or
>die ("could not connect to the specified database");
>?>
>I'm getting the "could not connect to the specified database" message.
>P.S. The database exists.
>
>Please Help
>Thx
>Nik
>
>
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- Mike Flynn --
mike @ mikeflynn . net
home => work => home => shop => home [adbusters]


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




  1   2   3   >