RE: [PHP] array_filter function

2008-03-28 Thread Bagus Nugroho
Thanks You,
 
rgds, bnug



From: Robin Vickery [mailto:[EMAIL PROTECTED]
Sent: Jumat 28-Mar-2008 21:45
To: Bagus Nugroho
Cc: php-general@lists.php.net
Subject: Re: [PHP] array_filter function



On 28/03/2008, Bagus Nugroho <[EMAIL PROTECTED]> wrote:
> Hello,
>
>  If I have an array like this
>  $dataArray = array(0=>array('type'=>'da'), 1=>array('type'=>'wb'), 
> 2=>array('type'=>'da');
>
>  How I can filtering to get only 'da' only, like this
>
>  $newDataArray = array(0=>array('type'=>'da'),2=>array('type'=>'da'))

$newDataArray = array_filter($dataArray, create_function('$a','return
$a["type"] == "da";'));





[PHP] array_filter function

2008-03-28 Thread Bagus Nugroho
Hello,

If I have an array like this
$dataArray = array(0=>array('type'=>'da'), 1=>array('type'=>'wb'), 
2=>array('type'=>'da');

How I can filtering to get only 'da' only, like this 

$newDataArray = array(0=>array('type'=>'da'),2=>array('type'=>'da'))

Thanks in advance

bnug

 

 





[PHP] Embedded Image from Database

2007-05-23 Thread Bagus Nugroho
I was trying to put embedded image on HTML Mail using PHP Mailer, my problem is 
my image does not located on filesystem but located within MySQL Server.

How I can put image from database into HTML Mail.

 

Thanks in advance, bgs

 



[PHP] "register_argc_argv" directive

2007-04-18 Thread Bagus Nugroho
Hi All,

I'm confuse about usage of php.ini directive "register_argc_argv".
Is used for command line purpose only?

Thanks in adavance
bn


[PHP] PHP Eclipse on Linux

2007-04-12 Thread Bagus Nugroho
Hi All,
 
When I'm trying to use eclipse on Linux, using command "java -startup.jar", it 
was show an error like this
"Could not create Java Virtual Machine"
 
Is my command wrong.
Java already installed and eclipse was put on /opt
 
Thanks in advance
bn 
 


[PHP] Error after add php_apc.dll

2007-04-06 Thread Bagus Nugroho
Hi All,
I'm just add php_apc.dll in my module, but when I'm restart apache there error 
as :
"
The instruction at "0x097f2e5e" referenced memory at "0x0019". The memory 
could not be "read".
"
 
Is this cause of the module or apache itself?
 
Thanks in advance
bn


RE: [PHP] Install PECL

2007-04-04 Thread Bagus Nugroho
Ok, thanks
 
Best Regards
bn



From: Jochem Maas [mailto:[EMAIL PROTECTED]
Sent: Wed 04-Apr-2007 23:45
To: Bagus Nugroho
Cc: php-general@lists.php.net
Subject: Re: [PHP] Install PECL



Bagus Nugroho wrote:
> Hi All,
> I'm trying to install PECL package as install PEAR package, but there's error 
> as :
> ---
> C:\PHP>pear install http://localhost/pear/APC-3.0.13.tgz 
> <http://localhost/pear/APC-3.0.13.tgz>
> downloading APC-3.0.13.tgz ...
> Starting to download APC-3.0.13.tgz (105,042 bytes)
> done: 105,042 bytes
> 40 source files, building
> ERROR: The DSP APC.dsp does not exist.
> 
> Is my install method wrong?

you downloaded the APC src for *nix rather than windows,
in fact I don't think there areready to roll PECL src packages
(at least not for APC).

did you read this page? : http://php.net/apc

did you find this link: http://pecl4win.php.net/

> Or it was PECL install is different with PEAR install

IIRC 'pear install' is simply a wrapper for 'pecl install'
as far as pecl packages are concerned.

> 
> Thanks in advance
> bn
>





[PHP] Install PECL

2007-04-04 Thread Bagus Nugroho
Hi All,
I'm trying to install PECL package as install PEAR package, but there's error 
as :
---
C:\PHP>pear install http://localhost/pear/APC-3.0.13.tgz 
 
downloading APC-3.0.13.tgz ...
Starting to download APC-3.0.13.tgz (105,042 bytes)
done: 105,042 bytes
40 source files, building
ERROR: The DSP APC.dsp does not exist.

Is my install method wrong?
Or it was PECL install is different with PEAR install
 
Thanks in advance
bn


RE: [PHP] Read file on file system

2007-02-04 Thread Bagus Nugroho
in simple like this

$filename = "d:\\test.csv";
$openfile = fopen($filename,'r');
$readfile = fread($openfile,filesize($filename);

echo $readfile


or like this
.

echo file_get_contents($openfile);

.
echo fgetcsv($openfile);



Thxs and rgds
bn



-Original Message-
From: Stut [mailto:[EMAIL PROTECTED]
Sent: Sun 04-Feb-2007 21:14
To: Bagus Nugroho
Cc: php-general@lists.php.net
Subject: Re: [PHP] Read file on file system
 
Bagus Nugroho wrote:
> If I have file on[windows] c:\test.csv.
> How I can read the entire contents of this file?
> 
> I have try file_get_contents, fgetcsv and etc but didn't work.
> May I'm mis-understanding about using those function.

Well, from examining the code you included in your post, and reading the 
output you're seeing, I have determined that... ahh, hang on a second, 
I've started seeing code where no code exists. Is that a bad thing? 
Should I see someone?

-Stut





[PHP] Read file on file system

2007-02-04 Thread Bagus Nugroho
Hi All,

If I have file on[windows] c:\test.csv.
How I can read the entire contents of this file?

I have try file_get_contents, fgetcsv and etc but didn't work.
May I'm mis-understanding about using those function.

Thanks in advance
Regards,
bn


[PHP] Embeded image on mail()

2007-01-22 Thread Bagus Nugroho
Hi All,
 
It was possible to send embeded image on mail() function.
Curently, I'm using linked image to send image on mail.
 
Thanks in advance
bn








[PHP] regex

2006-10-19 Thread Bagus Nugroho
Hi All,

If we have variable like :

$var1 = 'abcde 12';
$var2 = 'abcdefghi 34';
$var3 = 'abc 20 def';

Then we want output like :
$var1 = 'abcde';
$var2 = 'abcdefghi';
$var3 = 'abc def';

How regex can help us?.

Thanks in advance.
bgs

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



[PHP] Starting week number of year to Sunday

2006-09-11 Thread Bagus Nugroho
 
Hi All,

Is anyway to change starting week number of year on Sunday, instead
Monday as default?

Thanks in advance,
bn

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



RE: [PHP] php_mysql.dll

2006-07-09 Thread Bagus Nugroho
if windows, you may add php directory to the PATH of Windows [Environment 
Variables].
 
 



From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED]
Sent: Mon 10-Jul-2006 09:08
To: php-general@lists.php.net
Subject: Re: [PHP] php_mysql.dll



Yes. I thik it's because windows set all folders by default as read only and
i can't change that.

"Chris" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> João Cândido de Souza Neto wrote:
>> Excuse me.
>>
>> PHP Warning: PHP Startup: Unable to load dynamic library
>> './ext/php_mysql.dll' - The especified module was not found. in Unknown
>> on line 0
>
> Thanks for the translation..
>
> Does the php_mysql.dll file exist in the php/ext folder?
>
> Note that mysql isn't enabled by default with php5. Read
> http://www.php.net/mysql for information on how to set this up.
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/

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






[PHP] Recall: [PHP] Parse error: syntax error, unexpected '}'

2006-06-02 Thread Bagus Nugroho
Bagus Nugroho would like to recall the message, "[PHP] Parse error: syntax 
error, unexpected '}'".


RE: [PHP] Parse error: syntax error, unexpected '}'

2006-06-02 Thread Bagus Nugroho
how about like this
---
$insert = "INSERT INTO age (age_label) VALUES ('$age')";
---

 


From: Mark Sargent [mailto:[EMAIL PROTECTED]
Sent: Sat 03-Jun-2006 10:02
To: PHP List
Subject: [PHP] Parse error: syntax error, unexpected '}'



Hi All,

can anone see what's wrong with the below code? I get this error,


*Parse error*: syntax error, unexpected '}' in
*/usr/local/apache2/htdocs/moviedata2.php* on line *18

*
$age=1;
while($age<=100) {
$insert = "INSERT INTO age (age_label) VALUES ($age)";
$results = mysql_query($insert) or die(mysql_error());
$age++
}



Cheers.

Mark Sargent.

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






RE: [PHP] MS SQL extension not loading

2006-04-14 Thread Bagus Nugroho
I have experience with loading mysql.dll and other module which unable
to load, even the module is exist on the path.
In my problem, it was solved by put php directory (c:/php) on windows
system variables (Environment Variables), please check Instalation
FAQ(5.14) of PHP Manual.
It look like, required re-start the computer too.
 
Just try it, hopefully it will help

-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 12, 2006 4:24 AM
To: Laszlo Nagy
Cc: php-general@lists.php.net
Subject: Re: [PHP] MS SQL extension not loading

On Tue, April 11, 2006 11:45 am, Laszlo Nagy wrote:
> I have a problem with a Win2003 server, IIS6 and PHP 5.1.2. I have 
> Microsoft SQL Server tools installed. C:\PHP is on the path. Extension

> dirs are configured correctly. The php_mssql.dll is present there.
> Everything looks okay, except that the server does not load the 
> extension. If I do
>
> var_dump(get_loaded_extensions())
>
> then I get this:
>
> array(23) { [0]=> string(6) "bcmath" [1]=> string(8) "calendar" [2]=>
> string(10) "com_dotnet" [3]=> string(5) "ctype" [4]=> string(4) "date"
> [5]=> string(3) "ftp" [6]=> string(5) "iconv" [7]=> string(4) "odbc"
> [8]=> string(4) "pcre" [9]=> string(10) "Reflection" [10]=> string(7) 
> "session" [11]=> string(6) "libxml" [12]=> string(8) "standard" [13]=>
> string(9) "tokenizer" [14]=> string(4) "zlib" [15]=> string(9) 
> "SimpleXML" [16]=> string(3) "dom" [17]=> string(3) "SPL" [18]=>
> string(4) "wddx" [19]=> string(3) "xml" [20]=> string(9) "xmlreader"
> [21]=> string(9) "xmlwriter" [22]=> string(5) "ISAPI" }
>
> What am I doing wrong? Please help me. I was trying for a week and 
> nobody could help me on the hungarian PHP list. I'm lost.

Step #1:
Create and surf to a phpinfo() file:


Check the "php.ini" setting in the top portion to see where php.ini MUST
BE for it to be read.

This directory was set at compile-time, by whomever happened to compile
the php.exe (and dll) that day.

You can't change it ; You have to live with it.
[Actually, in recent Apache versions, you can use an httpd.conf setting
to alter it, but let's not confuse things that are version-specific]

Step #2:
Find your php.ini file, and MOVE it to where phpinfo() wants it to be.

If you have no php.ini file, find the php.ini-dist file, copy it, and
rename it.

Step #3
In php.ini look at the "extensions_dir" setting.
Fix it.


One thing is clear from your output:  You've GOT a lot of extensions
working, so you probably already have all of this correct.

Nevertheless, you follow the first 3 steps because that's just the way
you make SURE you have things set up like you think you have them set
up, even if it all "looks good"...

Step #4.
Compare version numbers of your mssql_php.dll and the version of PHP you
are running.  You CANNOT mix-n-match old DLLs with new PHP and vice
versa.  It will sometimes "work" until you happen to use the one
function that CHANGED between versions.

If you just went out and found some random mssql_php.dll to throw in the
directory, it is NOT going to work.

In recent PHP versions, I think it won't even let you screw this up, as
each module is, I think, tagged with an internal version reference
number and  PHP will reject invalid DLLs.  I think...  But in the old
days, it was a common mistake for folks to install mis-matched DLL
versions and have all kinds of trouble.

Step #4a
Check your log files.  I'm assuming ISS actually HAS logfiles...  It
must have, right?  Might be in system events log.  Might be in an
"error_log" file next to your IIS web traffic logs.  Knowing Microsoft,
it might be *ANYWHERE*...  But, wherever it is, find it, and read it.
If all else fails, you can surf to PHP, and then use Explorer to search
for files changed in the past five minutes.  Or, at least, I think it
will let you search in the past five minutes. 
Yesterday I went looking to do that and could only find files changed in
the past day.  Ugh.
I'm guessing that you might find an error message about the
mssql_php.dll being the wrong version...

Step #5.
Switch to a superior web server: Apache
:-)

Step #6.
Switch to a superior OS like Linux or FreeBSD
:-) :-) :-)

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



[PHP] Limitation on PEAR : Spreadsheet_Excel_Writer

2006-02-09 Thread Bagus Nugroho
Hello Everyone,
 
I'm succesfully generate report from mysql table using PEAR :
Spreadsheet_Excel_Writer, but I have problem to generate from table
which contain long text, the text is not download completely.
such as  blablabla.
it only contain  blab
 
How can manipulate PEAR, to get full text on excel sheet.
 
Thanks in advance
Bgs


RE: [PHP] Problem on Instalation ~ several module failed to load

2006-01-04 Thread Bagus Nugroho
I was trying used php 5.1, but it still same problem appear, several
modules succesfully load 
(mbstring, bz2, dba, dbase, exif, filepro, gd2, gettext, imap, ldap,
mime_magic, ming, pgsql, shmop, snmp, socket, tidy, xmlrpc, xsl.)
 
and several others are failed to load :
(curl, fdf, ifx, interbase, mcrypt, mhash, mssql, mysql, mysqli, oci8,
openssl, sybase_ct).
 
Also, I was re-install my apache(2.0)
 
Is this problem related with php or apache or my OS(XPSP2)?
 
Hopefully, someone can help me to solve my problem.
 
Thanks & Regards
 
 



From: Bagus Nugroho 
Sent: Friday, December 09, 2005 10:31 PM
To: php-general@lists.php.net
Subject: RE: [PHP] Problem on Instalation ~ several module unable to
download


here is my last list of module which bale to load and unable to load
excerpt php.ini

extension=php_mbstring.dll
;extension=php_bz2.dll
extension=php_cpdf.dll
;extension=php_curl.dll
extension=php_dba.dll
extension=php_dbase.dll
extension=php_dbx.dll
;extension=php_exif.dll
;extension=php_fdf.dll
extension=php_filepro.dll
extension=php_gd2.dll
extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
extension=php_mime_magic.dll
extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
;extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
extension=php_pgsql.dll
extension=php_shmop.dll
extension=php_snmp.dll
extension=php_sockets.dll
;extension=php_sybase_ct.dll
extension=php_tidy.dll
;extension=php_w32api.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll
;extension=php_yaz.dll
;extension=php_zip.dll
--
 
I was re-check that php_mysql.dll, php_mysqli.dll etc is on c:\php\ext
as others.
 
Any idea how come
 
Thanks
 



From: Bagus Nugroho [mailto:[EMAIL PROTECTED]
Sent: Fri 09-Dec-2005 21:06
To: php-general@lists.php.net
Subject: [PHP] Problem on Instalation ~ several module unable to
download



Hi All,

Previously I always succed to instalation PHP, but currently I have
strange problem as several module is unable to download(i.e :
php_mysql.dll, php_mysqli.dll), while several other are succesfully
download(i.e : mbstring, gd).

I have re-installed or copy PHP folder from my succeded instalation, but
it is not work.

I'm used WindowsXP, Apache2.0, PHP5

May be someone out there could help me to solve it.

Thanks in advance

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






[PHP] mysqli module in php 4

2005-12-27 Thread Bagus Nugroho
Hi All,

Is mysqli module enable by default on php 4 as mysql module.

If not enable by default, where I can get this module(hopefully  a direct link 
to download)

Thanks in advance

 



RE: [PHP] Problem on Instalation ~ several module unable to downl oad

2005-12-17 Thread Bagus Nugroho
Sorry, just reply it..
 
I was tring to put php.ini on c:\php or c:\windows, still fail to load several 
modules.
 
Then, I'm check to load module by module and notified almost all of database 
module(mysql, mysqli,oracle,sybase,oci) unable to load when php start_up.(only 
postgreSQL is able to load).
Meanwhile, other database module such as (mbstring, gd etc) is able to load.
 
Anyone have experience like this?
 
Thanks in advance
 
Note :
System configuration :
PHP : PHP5.05
OS  : XP SP2
Server : Apache 2.0
Database : MySQL4 and MySQL5



From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: Sat 10-Dec-2005 04:14
To: Bagus Nugroho; php-general@lists.php.net
Subject: RE: [PHP] Problem on Instalation ~ several module unable to downl oad



[snip]
Yes,
all requested module is put on same folder which module which succesfully
load.

But, I don't understand why they say the module is not found?

What operating system are you using?
{/snip]

Sorry, found the original post. Can you send the snippet for the php.ini
where you set the extensions directory?





RE: [PHP] Problem on Instalation ~ several module unable to download

2005-12-09 Thread Bagus Nugroho
Yes, 
all requested module is put on same folder which module which succesfully load.
 
But, I don't understand why they say the module is not found?
 
I hope, you can help me
 
Thanks
 
 
 
 



From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: Fri 09-Dec-2005 23:06
To: Bagus Nugroho; Jay Blanchard; php-general@lists.php.net
Subject: RE: [PHP] Problem on Instalation ~ several module unable to download



[snip]
It's done ...
But it was create errror like this PHP Startup: unable to load dynamic
library 'c:\php\ext\php_mysqli.dll' - The specified module could not found.

I was re-check to ensure php_mysqli.dll is on c:\php\ext and used from same
source...
[/snip]

Any of the modules that you want to load should be in that directory and the
php.ini should point to it.





RE: [PHP] Problem on Instalation ~ several module unable to download

2005-12-09 Thread Bagus Nugroho
It's done ...
But it was create errror like this PHP Startup: unable to load dynamic library 
'c:\php\ext\php_mysqli.dll' - The specified module could not found.
 
I was re-check to ensure php_mysqli.dll is on c:\php\ext and used from same 
source...
 
Thanks



From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: Fri 09-Dec-2005 22:36
To: Bagus Nugroho; php-general@lists.php.net
Subject: RE: [PHP] Problem on Instalation ~ several module unable to download



[snip]
here is my last list of module which bale to load and unable to load
excerpt php.ini

extension=php_mbstring.dll
;extension=php_bz2.dll
extension=php_cpdf.dll
;extension=php_curl.dll
extension=php_dba.dll
extension=php_dbase.dll
extension=php_dbx.dll
;extension=php_exif.dll
;extension=php_fdf.dll
extension=php_filepro.dll
extension=php_gd2.dll
extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
extension=php_mime_magic.dll
extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
;extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
extension=php_pgsql.dll
extension=php_shmop.dll
extension=php_snmp.dll
extension=php_sockets.dll
;extension=php_sybase_ct.dll
extension=php_tidy.dll
;extension=php_w32api.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll
;extension=php_yaz.dll
;extension=php_zip.dll
--

I was re-check that php_mysql.dll, php_mysqli.dll etc is on c:\php\ext as
others.

Any idea how come
[/snip]

Remove the semi-colons from in front of the ones you wish to load and then
restart. They should load then.

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






RE: [PHP] Problem on Instalation ~ several module unable to download

2005-12-09 Thread Bagus Nugroho
here is my last list of module which bale to load and unable to load
excerpt php.ini

extension=php_mbstring.dll
;extension=php_bz2.dll
extension=php_cpdf.dll
;extension=php_curl.dll
extension=php_dba.dll
extension=php_dbase.dll
extension=php_dbx.dll
;extension=php_exif.dll
;extension=php_fdf.dll
extension=php_filepro.dll
extension=php_gd2.dll
extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
extension=php_mime_magic.dll
extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
;extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
extension=php_pgsql.dll
extension=php_shmop.dll
extension=php_snmp.dll
extension=php_sockets.dll
;extension=php_sybase_ct.dll
extension=php_tidy.dll
;extension=php_w32api.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll
;extension=php_yaz.dll
;extension=php_zip.dll
--
 
I was re-check that php_mysql.dll, php_mysqli.dll etc is on c:\php\ext as 
others.
 
Any idea how come
 
Thanks
 



From: Bagus Nugroho [mailto:[EMAIL PROTECTED]
Sent: Fri 09-Dec-2005 21:06
To: php-general@lists.php.net
Subject: [PHP] Problem on Instalation ~ several module unable to download



Hi All,

Previously I always succed to instalation PHP, but currently I have
strange problem as several module is unable to download(i.e :
php_mysql.dll, php_mysqli.dll), while several other are succesfully
download(i.e : mbstring, gd).

I have re-installed or copy PHP folder from my succeded instalation, but
it is not work.

I'm used WindowsXP, Apache2.0, PHP5

May be someone out there could help me to solve it.

Thanks in advance

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






[PHP] Problem on Instalation ~ several module unable to download

2005-12-09 Thread Bagus Nugroho
Hi All,

Previously I always succed to instalation PHP, but currently I have
strange problem as several module is unable to download(i.e :
php_mysql.dll, php_mysqli.dll), while several other are succesfully
download(i.e : mbstring, gd).

I have re-installed or copy PHP folder from my succeded instalation, but
it is not work.

I'm used WindowsXP, Apache2.0, PHP5

May be someone out there could help me to solve it.

Thanks in advance

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



RE: [PHP] Question about session

2005-11-11 Thread Bagus Nugroho
poblem was solved by add
session_register function
 
before $_SESSION["blablabla"];
 



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sat 12-Nov-2005 09:50
To: Bagus Nugroho; php-general@lists.php.net
Subject: Re: [PHP] Question about session


There's no code. You need to put your code in the Email so we can see it...


[PHP] Question about session

2005-11-11 Thread Bagus Nugroho

I have session code which written WindowsXP and It wotk properly as expected, 
but when I'm used in Windows 2K, it got error as;
Notice: Undefined index: loginMessage in C:\CentralData\forms\mainForm.php on 
line 65
I'am used Apache 2.0 and PHP 5.0.4.
Is  php.ini setting on W2K different with XP

Thxs in advance
bgs




[PHP] Picture loaded but not shown

2005-10-11 Thread Bagus Nugroho
Hi,
 
I have problem with picture again.
My picture is loaded, but not shown. It look like if show pictures on internet 
setting is disable.
I was re-install both Apache, mysql and PHP, but can not solved.
 
If anyone have this problem previously, please share
 
Thanks in advance;
regards


RE: [PHP] PHP MySql Extension No Loading

2005-08-27 Thread Bagus Nugroho
ensure you have php_mysql.dll on c:\PHP\ext
 
and don't forget to check php.ini location, it must comply with httpd.conf ( 
see PHPIniDir ".") and restart apache after editing both of files.
 
 



From: Glen Zimmerman [mailto:[EMAIL PROTECTED]
Sent: Sat 27-Aug-2005 01:08
To: php-general@lists.php.net
Subject: [PHP] PHP MySql Extension No Loading


I am setting up Apache 2.0.54 with PHP 5.0.4 on a Windows 2000 work station 
running MySQL 4.1.12a-nt.  
When I start Apache, I receive the error message, 
"PHP Startup:  Unable to load dynamic library 'C:\PHP\ext\php_mysql.dll'.
 
I have C:\PHP set in the environment variable path.
 
In the php.ini file I have the following set(I have tried it with both the 
final "\" included and excluded):
extension_dir = "C:\PHP\ext\"
 
I do not get an error when I try to load the php_oci8.dll.  Just for 
php_mysql.dll.
 
What am I missing?
 
 
 

DISCLAIMER:  The information in this email is confidential and proprietary.  If 
you are not the intended recipient, please do not read, copy, use, or disclose 
the contents of this communication.  Please permanently delete this e-mail and 
all copies that you may have.  This information may be subject to privilege or 
may otherwise be protected by legal rules.




[PHP] Recall: [PHP] PHP without php.ini

2005-08-25 Thread Bagus Nugroho
Bagus Nugroho would like to recall the message, "[PHP] PHP without php.ini".

DISCLAIMER:  The information in this email is confidential and proprietary.  If 
you are not the intended recipient, please do not read, copy, use, or disclose 
the contents of this communication.  Please permanently delete this e-mail and 
all copies that you may have.  This information may be subject to privilege or 
may otherwise be protected by legal rules.




RE: [PHP] PHP without php.ini

2005-08-13 Thread Bagus Nugroho
I was uncomment php_mysql.dll and added php_mysqli.dll, put edited php.ini as 
recommended, also added libmysql.dll on c:\winnt\system32. But it still doesn't 
work, it still generate "cannot load mysql extension, ...".

Previously, I was edit system variables(edit Path variable by add 
;c:\php;c:\php\ext and add PHPRC > value c:\php), also edit Registry as the 
following :
[HKLM\SOFTWARE\PHP]
"IniFilePath"="C:\PHP"

PHP installed on C:\PHP
Apache 2.0 on C:\Program Files\Apache Group\ ...
MySQL on C:\Program Files\MySQL

I hope, someone can help me to solve the problem before I'm return back to PHP4.

Thanks and Thanks




-Original Message-
From: Lester Caine [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 14, 2005 4:46 AM
To: Bagus Nugroho
Subject: Re: [PHP] PHP without php.ini




Bagus Nugroho wrote:

> Actually, my problem is when used phpmyadmin it was generate error "cannot 
> load mysql extension". Then I'm trying to resolve as refer 
> php-manual(included edit system environment), googling but the result is none.
>  
> I'm give up, and remove all php.ini to ensure is the problem on php.ini or 
> others. 
>  
> Any idea, what is wrong?

As you have already found, the default location for php.ini on windows 
is the windows directory ( c:\winnt\ on W2k )
PHP5 does not now load MySQL be default since the licence restrictions 
changed, and you now need to select the correct version of extension to 
match the version of MySQL.
So you need to 'uncomment' extension=php_mysql.dll or 
extension=php_mysqli.dll for pre or post Version 4 MySQL

-- 
Lester Caine
-
L.S.Caine Electronic Services

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



RE: [PHP] PHP without php.ini

2005-08-13 Thread Bagus Nugroho
Actually, my problem is when used phpmyadmin it was generate error "cannot load 
mysql extension". Then I'm trying to resolve as refer php-manual(included edit 
system environment), googling but the result is none.
 
I'm give up, and remove all php.ini to ensure is the problem on php.ini or 
others. 
 
Any idea, what is wrong?



From: Jochem Maas [mailto:[EMAIL PROTECTED]
Sent: Sun 14-Aug-2005 03:44
To: Bagus Nugroho
Subject: Re: [PHP] PHP without php.ini





Bagus Nugroho wrote:
> Hi All,
>
> As my previous mail about fail on PHP5-MySQL, then I removed all of php.ini 
> (included -recomended and -dist).
> Then used phpinfo(), I found there is php still work and found and informed 
> "Configuration File(php.ini) Path = C:\WINNT".
>

if there is no php.ini php defaults to whatever is the default for all settings.
and your on windows - php (IIRC) looks for a php.ini in the windows dir if it 
can't
find on elsewhere (sometimes it live there too)

> How can this be happenned?
> (I believe, this will answer why cannnot load MySQL extension problem on my 
> Win2000)

possibly or php can't find the extension or it a case of that you need to be 
using the mysqli
extension (and load that) instead mysql.

>
> Thanks in advance for your answer.
>






[PHP] PHP without php.ini

2005-08-13 Thread Bagus Nugroho
Hi All,

As my previous mail about fail on PHP5-MySQL, then I removed all of php.ini 
(included -recomended and -dist). 
Then used phpinfo(), I found there is php still work and found and informed 
"Configuration File(php.ini) Path = C:\WINNT".

How can this be happenned?
(I believe, this will answer why cannnot load MySQL extension problem on my 
Win2000)

Thanks in advance for your answer.


[PHP] Migrating to PHP 5 - Cannot Load mySQL

2005-08-12 Thread Bagus Nugroho
Hello,

I have problem 'cannot load mysql' with MySQL on PHP5( recently migrating grom 
PHP4 to PHP5).
I was do the following actions to resolve the problem, but failed .
1. uncommented > extension=php_mysql.dll
2. put php_mysql.dll on c:/php/ext
3. put libmysql.dll both on c:/winnt and c:/winnt/system32 (Windows 2000)
4. edit > extension_dir = "c:/php/ext"
5. restart apache server(2.0).

Any missing of my act?

Thanks in advance
Rgds




[PHP] Searching and Count within array

2005-07-25 Thread Bagus Nugroho
Hi Master,
 
I have an array as : 
$myArray = 
array('four','four','four','four','one,,'three','three','three','two','two'); 
 
Then I want output like this, 
//==
four is 4 times
three is 3 times
two is 2 times
one is 1 times //(it 's better if one is 1 time).
//===
 
How can I search and count the array? Or better search and count directly using 
MySQL API?
 
Note : array was generated from MySQL DB
//==

//=
 
Thanks in advance
 


RE: [PHP] RE: Display picture from MySQL

2005-07-08 Thread Bagus Nugroho
Here is my situation
I have 3 record data as (lotID is char and Picture is longblob type)
LotId |Picture 
---
123   |Picture1
124   |Picture2
125   |Picture3

then I would like to display like this
>>>>>>>>>>>
Lot ID : 123
Picture: Picture1

Lot ID : 124
Picture: Picture2

Lot ID : 125
Picture: Picture3
>>>>>>>>>>>
Or maybe thumbnail view.
How I can do this?

Thanks

-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Friday, July 08, 2005 3:58 AM
To: Bagus Nugroho
Cc: [EMAIL PROTECTED]; php-general@lists.php.net
Subject: RE: [PHP] RE: Display picture from MySQL


On Thu, July 7, 2005 12:32 pm, Bagus Nugroho said:
> How about, if we need several pictures from several record?

You can create a page of HTML that has IMG tags, and each IMG tag can call
ANOTHER php script that sends out one, and only one, image.

You'll never ever get two images crammed into a single HTTP request/response.

You also cannot smush the HTML and the IMG itself all into one file/script.

HTML with IMG tag is one script.
Actual image output (JPEG, GIF, etc) is another.

* Actually, they can be the same "script" if enough code is shared, but
it's got to have an "if" in there and only output the HTML for the .htm
request, and only output the JPEG for the .jpg request, but that's for
another day, after you get it working in separate scripts.

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



RE: [PHP] RE: Display picture from MySQL

2005-07-07 Thread Bagus Nugroho
How about, if we need several pictures from several record?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Thursday, July 07, 2005 8:19 PM
To: Bagus Nugroho
Subject: Re: [PHP] RE: Display picture from MySQL


you're trying to set your content-type header every time you loop
through your result set -- so if you have more than one result you'll
try to set your headers multiple times. you can't do that -- that's
what's causing the "cannot modify header information" message.

you need to change your code so that you only send the headers once.
e.g., test that you have items in your result set, if so, set the
content-type header (for image/gif), otherwise don't (so that you can
send a text message).



 Original Message 
> Date: Thursday, July 07, 2005 08:09:38 PM +0700
> From: Bagus Nugroho <[EMAIL PROTECTED]>
> To: php-general@lists.php.net
> Subject: [PHP] RE: Display picture from MySQL
> 
> Hi,
> Firstly, thanks for your advise.
> But, it doesn't work if combine with text or if we need display more
> than one record. Here's my code :
>  
>  mysql_connect("localhost","root","password") or Die ("Failed to
> connect"); mysql_select_db("intdata") or Die ("Failed to select
> databse"); $res=mysql_query("SELECT * FROM main") or die("error
> again");
> 
>while ($line = mysql_fetch_array($res)){
> echo "Lot Info : $line[lotID]";
> /*Send headers*/
> header("content-type: image/gif");
> echo $line[picture];
> echo "\n";
>}
> ?>
>  
> It was displayed several record from $line[lotID], the followed
> information like this : Cannot modify header information - headers
> already sent by 
> and a picture if opened with notepad.
>  
> What's wrong
>  
> Agian, thanks in advance
> 
>  

-- End Original Message --

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



[PHP] RE: Display picture from MySQL

2005-07-07 Thread Bagus Nugroho
Hi,
Firstly, thanks for your advise.
But, it doesn't work if combine with text or if we need display more than one 
record.
Here's my code :
 

 
It was displayed several record from $line[lotID], the followed information 
like this :
Cannot modify header information - headers already sent by 
and a picture if opened with notepad.
 
What's wrong
 
Agian, thanks in advance

 


[PHP] Upload and Read pdf file

2005-06-30 Thread Bagus Nugroho
Hi All,
 
is possible to upload pdf file into MySQL database, then read in web browser 
using php?
And how?
 
Thanks for help
rgds


[PHP] Display picture from MySQL

2005-06-27 Thread Bagus Nugroho
Hi All,

I'm looking for tutorial/template/code, how to display a picture on web pages 
which the picture is stored on MySQl database.


Thanks in advance,
regards

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



RE: [PHP] phpMyAdmin authentication error

2005-05-13 Thread Bagus Nugroho
I have experience with this on windows, and solved by change my root password 
on mySQL.
I don't know, if this wil work on your OS X

rgds

-Original Message-
From: Sam Smith [mailto:[EMAIL PROTECTED]
Sent: Saturday, May 14, 2005 5:57 AM
To: PHP
Subject: [PHP] phpMyAdmin authentication error



On OS X 10.3 I installed the latest MySQL from dev.mysql.com for OS X 10.3.
It was a Apple style installer package with a binary of the server and the
client.

The docs weren't exactly written for OS X but I survived the set up and am
able to login as the root  MySQL user with the command line MySQL client.

>From version tracker I got phpMyAdmin-2.6.2-pl1.tar.bz2 which is just a .tar
of a bunch of files you drop into the web server path.

But phpMyAdmin gives the error, "Client does not support authentication
protocol requested by server; consider upgrading MySQL client." I don't see
a way to change the auth protocol in the phpMyAdmin conf file:
config.inc.php.

If I create a MySQL user with no password phpMyAdmin works.

Because the install was from mysql.com I don't want to believe the client is
out of date. I also don't know how to install another client.

Any one have any ideas?

Thanks

-- 
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] Parse Error on mysql_query

2005-04-16 Thread Bagus Nugroho
Hi,

I'm beginning to learn PHP/MySQL, i have problem 'parse error' when using 
'mysql_query' although it was simple code, like this :

=
1