Re: [PHP] changing php ini location

2005-05-15 Thread emre
/*
Why aren't you?  Apache 2.0 is your best bet.  It really is the best
one available!
*/
Ive bad,  real bad memories with apache 2.0 :)
/*
It sure sounds like you are out of luck.  Your only option is to get
Apache 2.0 and use that directive.  Can I ask why in the world you are
doing this?  Are you aware you can change almost any option in php.ini
in your script with the ini_set function?
http://www.php.net/ini_set
*/
yes i aware of php ini set, but there is no logic using that command for
global changes that you use each time. if you want to change global php.ini 
settings for a spesific
script than its useful, but to change global settings for each script, thats 
smt like overkill :)

eg. you can use phpiniset to increase a script max execution time,
espesiaclly for upload or image manipulation process purposes. but for 
global execution time setting
must be set via php.ini. thats what that file is for.

anyway after my research, I couldnt find a way to change php.ini location on
this system: windows XP, apache 1.3, php5.
it sounds  a little bit weird. why cant we use phpinidir at apache 1.3?
since its supported by apache 2.0, it must also be supported by 1.3.
how hard can it be anyway? most people (like me) still use
and trust old good apache 1.3.XX
its time to mail bomb apache dev team I think. All php users with apache
1.3, unite !
:)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] changing php ini location

2005-05-14 Thread emre
i am not using apache 2.0
as i mentioned before i am using apache 1.3 which means that i dont have the 
oppurtunity to use phpnidir config parameter. since apache 1.3 doesnt 
support that.

i cannot compile php neither,  since i m using a php precompiled windows 
edition.

- Original Message - 
From: Burhan Khalid [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Faith Emre YILMAZ [EMAIL PROTECTED]; php-general@lists.php.net
Sent: Saturday, May 14, 2005 1:21 PM
Subject: Re: [PHP] changing php ini location


Richard Lynch wrote:
On Fri, May 13, 2005 12:20 pm, Faith Emre YILMAZ said:
anyone knows how to change php ini location?
I m using php5, apache 1.3 on  windows xp.

Re-compile.
Since that's not practical for most users, you just have to use whatever
phpinfo says is the right directory.
Add :
# configure the path to php.ini
PHPIniDir C:/php
Change the above path in your httpd.conf file, save it, then restart 
Apache.

From : http://www.php.net/manual/en/install.windows.apache2.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] changing php ini location

2005-05-13 Thread Faith Emre YILMAZ
anyone knows how to change php ini location?
I m using php5, apache 1.3 on  windows xp. 

thx in adv. 

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


[PHP] ImageMagick Versus GD

2005-04-05 Thread emre
which one is better ImageMagick or GD?
infact I am much more curious about their image processing speed and server 
load. especially resizing large imagefiles.

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


Re: [PHP] Set session variable if link is clicked, do not want to use GET

2005-04-04 Thread emre
you can use POST with some javascript tricks.

lets assume that you are going to you an image file to submit, then just add
a function andd call that function to handle submitting data.

here is an example:

form name=TestForm action=test.php method=post
input type=hidden name=op value=5
IMG src=a.gif onclick=SubmitMyForm();'
/form

then define the javascript function named as SubmitMyForm
script language=javascript
document.TestForm.submit();
/script

your form will be subbmitted just fine by this method.


- Original Message - 
From: Kent [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Tuesday, April 05, 2005 3:21 AM
Subject: [PHP] Set session variable if link is clicked, do not want to use
GET


 Hi!

 I am writing a simple shopping cart system which uses sessions and PHP.

 I would like a normal link that says Add to cart which the user can
 click and the item is added to the cart.

 However, i do not want to use GET for this as it could introduce
 unwanted features if the user bookmarks the page just after clicking
 Add to cart. So i don't want an URL like:
 http://thisistheurl.com?buy=10 and therefore prefer if this could be
 done using POST.

 It would have been easy if i would have used a normal FORM and would
 have had a button called Add to cart. But i would like it to be in
 url-style or using some img .. which i understand that the BUTTON item
 does not support (or am i wrong?).

 Any advice would be greatly appreciated.

 Best regards, Kent

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




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



Re: [PHP] Set session variable if link is clicked, do not want to use GET

2005-04-04 Thread emre
lol, sorry for mess,  I was in a bit hurry. 

here is the right one: 

form name=TestForm action=test.php method=post
input type=hidden name=op value=5
IMG src=a.gif onclick=SubmitMyForm();'
!--or a text mabe? --
span onclick='SubmitMyForm();'brSubmit/span
/form

then define the javascript function named as SubmitMyForm:

script language=javascript
function SubmitMyForm()
{
document.TestForm.submit();
}
/script

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



[PHP] eregi problem

2005-04-03 Thread emre
I m trying to check $GP[sifre] variable, $GP[sifre] must consist of alpha
numeric chars only. here, how I check the variable:

if((eregi([^a-zA-Z0-9],$GP[sifre])
echo 'true';
else
echo 'false';

It works if variable starts with alphabetic chars only.
for example this returns 'ok'
$GP[sifre]='blabla234243';
but this does not work: (if variable starts with numeric chars)
$GP[sifre]='3243242blabla';

second one returns false, couldnt figure out the problem here. any help ?

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



Re: [PHP] POST variables from a link...and popup new window

2005-04-01 Thread emre
?php
echo '
form name=FormToBeSubmitted action=targetpage.php method=post
/form
script language=javascript
   document.FormToBeSubmitted.submit();
/script
';
?
you can also set some variables to your form,
for example in the script body put this code to submit a form variable named
'testvariable'
//first define the value somewhere before the script tags,
   $stringstr=' this is gonna be submitted also'
then between script tags put this string below:
   document.getElementById('testvariable').value=$submitstr;
if you need a adynamic value to be subbmitted than just change var
hope it helps,
- Original Message - 
From: Richard Lynch [EMAIL PROTECTED]
To: james tu [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Wednesday, March 30, 2005 12:34 AM
Subject: Re: [PHP] POST variables from a link...and popup new window


On Tue, March 29, 2005 1:09 pm, james tu said:
I have a link that, when clicked on, pops up a new window.
I want to use the POST method in order to pass information. Right now
I'm appending the parameters to the URL of the link and using GET to
retrieve the name/value pairs.
form target=_blank ... 
You may be able to use onSubmit or something similar to make the new
window be the size/look you want with JavaScript.
There's no PHP involved here, though, so maybe ask on an HTML and/or
JavaScript forum for better answers.
--
Like Music?
http://l-i-e.com/artists.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

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


Re: [PHP] Easy way to grab a value out of XML?

2005-04-01 Thread emre
you can handle xml output as if a string file, then easily parse xml file 
with preg_match / preg_match_all,

smt like this can do the job:
?php
$str=xml version bla 
blapricesomevaluehere/pricepricesomevaluehere2/pricepricesomevaluehere2/priceetc;

preg_match_all(/price([^])*\/price/i, $str, $matches);
echo count($matches[0]);
for ($i=0; $i count($matches[0]); $i++) {
echo 'br + '.$matches[0][$i];
}
?
but you'd better learn to handle xml files via xml parsers.





- Original Message - 
From: Brian Dunning [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Friday, April 01, 2005 11:53 PM
Subject: [PHP] Easy way to grab a value out of XML?


I've been looking at the XML commands and am feeling a bit overwhelmed. My 
needs are simple and I'm hoping there's an easy solution that I'm just 
missing. I have a hunk of well-formed XML in a variable, $xml, and it 
contains only one instance of pricex.xx/price. I just want to get the 
$price out of $xml. What's the simplest way?

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

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


Re: [PHP] can I limit DB access

2005-04-01 Thread emre
mysql comes with 2 predefined databases,  their names are
show databases;
1. mysql
2. test
open mysql database
 use mysql;
find the table named as 'user' , there mysql users and their access 
privileges are stored.
   select Host, User, Password  from user
modify Host column as you wish to limit access to your database. also you'd 
better check other columns to understand how to grant priviliges to mysql 
users.

btw dont forget to flush privileges after you are done with the 
modification.
flush privileges;

hope this helps.
- Original Message - 
From: Dave Reinhardt [EMAIL PROTECTED]
To: PHP General-List php-general@lists.php.net
Sent: Friday, April 01, 2005 11:22 PM
Subject: [PHP] can I limit DB access


How can I limit access to my database to one computer or one domain?
I do not want it accessable from just any place on the web.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

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


[PHP] informix connection problem

2001-07-21 Thread Emre Hamit Kok

hi,
we are using informix 7.31.UC6 as our database server.
when we are trying to connect informix by dbaccess we are setting
the below environment variables are as:
export DBNLS=1;export LANG=tr_TR;export LC_COLLATE=tr_TR.ISO8859-9;export
LC_CTYPE=tr_TR.ISO8859-9

but when we are rying to vonnect informix by PHP i am using the following
commands to set those variables
__
putenv(DBNLS=1);
putenv(LANG=tr_TR);
putenv(LC_COLLATE=tr_TR.ISO8859-9);
putenv(LC_CTYPE=tr_TR.ISO8859-9);
$veri_baglan = ifx_connect(mydb@ol_srv1 ,XXX,XXX);
if (! $veri_baglan) die (Informix connection error);
__

but I am usually getting this connection error message:

Warning: ifx_connect : E [SQLSTATE=IX 000 SQLCODE=-23115] in
/home/sapphire/public_html/PHP/lib_functions/a.php on line 18
Informix connection error

and sometimes, strangely we are connecting to the database..

the informix configuration in the php.ini file is as:

ifx.allow_persistent = On
ifx.max_persistent = -1
ifx.max_links = -1
ifx.textasvarchar = 0
ifx.byteasvarchar = 0
ifx.charasvarchar = 0
ifx.blobinfile = 0
ifx.nullformat = 0

This error information is about locales,but the env. variables are set to
true values that we can connect
to database from command prompt, and sometimes by PHP.. What is the problem,
why are we sometimes connecting and sometimes not able to? What else should
I set or do?



Thank you for the answers..






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