[PHP] include question

2003-01-15 Thread Ryan
Hello all,

I'm have a PHP script that works in a folder.. for the sake of clarity we'll
call it c:\project

In c:\project\htmls there are several HTML documents which refer to images
in the project\htmls directory with tags like 

In my PHP script in c:\project I include "htmls/file.html" and the HTML file
renders alright from the script, but the image's path is c:\project\file.gif
when the page is rendered, not c:\project\htmls\file.gif like it should be.
Is there any way to change the "working directory" so when I include a file
images are on the page, too?

Thanks in advance!

--
Ryan Cassin
[EMAIL PROTECTED]



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




[PHP] wonder why php as apache module can work with virtual host

2002-08-02 Thread Ryan

I dunno why some webhosting company can do virtual host by php as apache
module. That means they seem to work fine with the virtual host uid/gid
permission when using php. But they use php as apache modulehow do
to that ??

Thx all !!


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




[PHP] Re: value submit button

2002-08-02 Thread Ryan

ug

Florian SchäFer wrote:
> Hallo out there,
> 
> i hava an document, with one form and two Submit buttons.
> How can i check in the target document wich button is pressed?
> tried something like   if ($submit == 'xxx') .
> anyone has a hint?
> 
> 


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




[PHP] test

2002-08-02 Thread Ryan

test


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




[PHP] Re: Using PHP to reboot the linux server

2002-08-02 Thread Ryan

Is it `reboot -n` ??

Harpreet Kaur wrote:
> I am using the below command in the php page to reboot the linux server. 
> But nothing happens . Where am i wrong or do i have to give a path or 
> nething . Please help.
> 
> 
> $output = shell_exec(`reboot`);
> echo $output;
> 
> 
> 
> _
> Join the world’s largest e-mail service with MSN Hotmail. 
> http://www.hotmail.com
> 


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




[PHP] virtual hosting using php as apache module

2002-08-03 Thread Ryan

Hi everybody,
   I would like to know how to make the directive user/group in
 working with php. I prefer to use php as modules but not
cgi, as it is more handy and easy for upgrade. How to do that ?
Thx !


Regards,
Ryan


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




[PHP] which function can do so ?

2002-08-03 Thread Ryan

I am exactly a beginner of php. This question may be easy.
I have a php program which want to achieve the url from browser.
e.g. webmail.xxx.com

then how the index.php is able to know it is xxx.com ??
which function in php can do so??


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




[PHP] error message when run /usr/share/pear

2002-08-16 Thread Ryan

What's wrong ? I am using RH7.3. I manually compile the php and install
it before. But later I install using the rpm.

Thx for reply !


Content-type: text/html

PHP Warning:  imap: Unable to initialize module
Module compiled with module API=20010901, debug=0, thread-safety=0
PHPcompiled with module API=20020429, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_connect in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_pconnect in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_close in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_select_db in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_create_db in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_drop_db in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_query in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_unbuffered_query in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_db_query in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_list_dbs in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_list_tables in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_list_fields in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_error in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_errno in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_affected_rows in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_insert_id in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_result in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_num_rows in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_num_fields in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fetch_row in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fetch_array in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fetch_assoc in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fetch_object in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_data_seek in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fetch_lengths in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fetch_field in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_field_seek in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_free_result in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_field_name in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_field_table in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_field_len in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_field_type in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_field_flags in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_escape_string in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_get_client_info in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_get_host_info in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_get_proto_info in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_get_server_info in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql in
Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fieldname in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fieldtable in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fieldlen in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fieldtype in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fieldflags in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_selectdb in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_createdb in Unknown on line 0
PHP Warning:  Function re

Re: [PHP] error message when run /usr/share/pear

2002-08-16 Thread Ryan

Yes, I do use --with-mysql

now i am using the rpm version of php.

Adam Williams wrote:
> when running the ./configure for PHP did you use --with-mysql
> 
>   Adam
> 
> On Fri, 16 Aug 2002, Ryan wrote:
> 
> 
>>What's wrong ? I am using RH7.3. I manually compile the php and install
>>it before. But later I install using the rpm.
>>
>>Thx for reply !
>>
>>
>>Content-type: text/html
>>
>>PHP Warning:  imap: Unable to initialize module
>>Module compiled with module API=20010901, debug=0, thread-safety=0
>>PHPcompiled with module API=20020429, debug=0, thread-safety=0
>>These options need to match
>> in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_connect in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_pconnect in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_close in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_select_db in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_create_db in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_drop_db in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_query in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_unbuffered_query in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_db_query in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_list_dbs in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_list_tables in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_list_fields in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_error in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_errno in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_affected_rows in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_insert_id in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_result in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_num_rows in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_num_fields in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_fetch_row in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_fetch_array in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_fetch_assoc in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_fetch_object in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_data_seek in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_fetch_lengths in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_fetch_field in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_field_seek in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_free_result in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_field_name in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_field_table in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_field_len in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_field_type in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_field_flags in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_escape_string in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_get_client_info in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>>mysql_get_host_info in Unknown on line 0
>>PHP Warning:  Function registration failed - duplicate name -
>&

[PHP] Re: sessions don't work

2002-08-16 Thread Ryan

May be the session is diable in the php.ini

Félix garcía renedo wrote:
> Hello,
> I have a problem with php sessions. 
> I have a php file like:
> 
>  session_start();
> session_register('pagina');
> ?>
> 
> 
> ...
> 
> 
>  include('file');
> ?>
> ...
> 
> 
> I have done diferent proofs and I have seen that the problem is that when I put 
>include don't work sessions and if I left session it works. When I put all together 
>it prints in the browser the code from "" to "reload the page it works properly. But I haven't found the way to do it automaticaly.
> 
> Are there somebody who knows how to fix it?
> 
> 
> Thanks.
> 
> 
> 
> Un saludo.
> 


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




[PHP] Format 24 hr time to 12 hr time

2002-07-17 Thread Ryan

How do you format this for example: 13:58:00 into 1:58 PM

Thanks



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




[PHP] last update

2002-03-05 Thread Ryan

Hi, I'm trying to figure out how to have a time stamp at the bottom of
every page that shows when the page was last updated in the format
below.  Thanks.

Last updated: Tue Mar 5 15:48:50 2002 CST

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




[PHP] help with date formatting

2002-03-06 Thread Ryan

Hi, I'm trying to create an events page, where it shows the posted
events.  I enter data using phpmyadmin.  Currently, the ouput is like
this:


Conference in New York
2002-03-06

There is going to be a conference in New York next week.


I'm having trouble with the formatting of the date.  I'm using the type
date with the function now, so it shows the current date when I post an
event.  Here is what I would like:


Conference in New York
Wednesday, March 5th, 2002

There is going to be a conference in New York next week.


Thanks for any help.

-- 
Ryan Spangler
428 N Harmony Ln, Apt. 3
Whitewater, WI 53190
(262) 473-8392
[EMAIL PROTECTED]

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




[PHP] help with date formatting

2002-03-18 Thread Ryan

Hi, I'm trying to create an events page, where it shows the posted
events.  I enter data using phpmyadmin.  Currently, the ouput is like
this:


Conference in New York
2002-03-06

There is going to be a conference in New York next week.


I'm having trouble with the formatting of the date.  I'm using the type
date with the function now, so it shows the current date when I post an
event.  Here is what I would like:


Conference in New York
Wednesday, March 5th, 2002

There is going to be a conference in New York next week.


Thanks for any help.

-- 
Ryan Spangler
428 N Harmony Ln, Apt. 3
Whitewater, WI 53190
(262) 473-8392
[EMAIL PROTECTED]

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




[PHP] Re: help with date formatting

2002-03-18 Thread Ryan

On Mon, 18 Mar 2002 11:51:07 -0600
Ryan <[EMAIL PROTECTED]> wrote:

By, the way I'm getting the date from a MySQL database.  The posted date
variable is stored as the date type in the MySQL database so it comes
out like this 2002-03-06.  Should I convert the date into a time stamp
or how should I do this.  Let me know what would be the most efficient
and best way to do this.  Thanks.



> Hi, I'm trying to create an events page, where it shows the posted
> events.  I enter data using phpmyadmin.  Currently, the ouput is like
> this:
> 
> 
> Conference in New York
> 2002-03-06
> 
> There is going to be a conference in New York next week.
> 
> 
> I'm having trouble with the formatting of the date.  I'm using the
> type date with the function now, so it shows the current date when I
> post an event.  Here is what I would like:
> 
> 
> Conference in New York
> Wednesday, March 5th, 2002
> 
> There is going to be a conference in New York next week.
> ----
> 
> Thanks for any help.
> 
> -- 
> Ryan Spangler
> 428 N Harmony Ln, Apt. 3
> Whitewater, WI 53190
> (262) 473-8392
> [EMAIL PROTECTED]


-- 
Ryan Spangler
428 N Harmony Ln, Apt. 3
Whitewater, WI 53190
(262) 473-8392
[EMAIL PROTECTED]

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




[PHP] HTTP_RAW_POST_DATA / Content-type

2001-10-22 Thread Ryan

Hello,

I'm running into a problem accessing $HTTP_RAW_POST_DATA in my scripts.  I
am interfacing with an external system that is doing a HTTP POST to my php
script (I'm running 4.0.6).  The variable $HTTP_RAW_POST_DATA is always
blank even though the external system is sending me data.  The problem is
that the external system is not passing me a Content-type; they are
including Content-length and the various other headers, but not
Content-type.  There is a known bug for this
(http://bugs.php.net/bug.php?id=12208), and it seems that it is resolved in
4.0.7.

Does anyone know of a patch for 4.0.6 that would resolve this bug?  I
wouldn't mind re-compiling 4.0.6 after patching the code, but I would rather
not install 4.0.7 since it is still in the release candidate stage and the
server in question is a production server.

Thanks,
Ryan


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




[PHP] apache+php chroot

2001-07-01 Thread Ryan

I have chrooted apache+php but am having simple problems like not being able to exec 
uptime.
uptime has been moved to /usr/serv/apache/usr/bin/uptime..
Well anyways heres my lil php line im tring to get running


I get no errors from php, just doesnt show anything..  I realize it needs a shell to 
execute so /usr/serv/apache/bin/bash
and /usr/serv/apache/usr/etc/shells is setup correctly.  Would there be something that 
im missing? Im frustruated right now..
Its something to do with the chroot env.  What am i missing??
Everything else seems to work fine if theres any more info you need me to give let me 
know.


thanks
Ryan
[EMAIL PROTECTED]




Re: [PHP] Security of PHP code

2001-07-04 Thread Ryan

You guys wouldnt have to worry if you chroot apache and php..
;]
then you cant access anything outside the jail, it works great!

Ryan



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




[PHP] getting authentication information from apache

2007-02-23 Thread Ryan

Hello,

I'm new to php and I have am running php on apache. I already have ldap
authentication set up in apache would rather not create a separate system
for php. What would be ideal would be to get the current authenticated user
from the apache environment. At this point I'm grabbing at straws, but so
far I've tried

$ret = apache_getenv("LDAP_USER");
echo $ret;
echo $_SERVER['REMOTE_USER'];
echo $_SERVER['PHP_AUTH_DIGEST'];
$ret = apache_getenv('PHP_AUTH_DIGEST');

None of these work. Has anyone done this??

Thanks,
Ryan


[PHP] getting authentication information from apache

2007-02-23 Thread Ryan

Hello,

I'm new to php and I have am running php on apache. I already have ldap
authentication set up in apache would rather not create a separate system
for php. What would be ideal would be to get the current authenticated user
from the apache environment. At this point I'm grabbing at straws, but so
far I've tried

$ret = apache_getenv("LDAP_USER");
echo $ret;
echo $_SERVER['PHP_AUTH_DIGEST'];
$ret = apache_getenv('PHP_AUTH_DIGEST');
echo $HTTP_SERVER_VARS['PHP_AUTH_USER'];
echo $_SERVER['REMOTE_USER'];

None of these work (all of the variables are empty). Has anyone done this??

Thanks,
Ryan


Re: [PHP] getting authentication information from apache

2007-02-23 Thread Ryan

Jochem,

Hmm, not sure what I'm looking for, but from what I've read, the
REMOTE_USER should contain this informaion, mine seems to be empty.
array(30) {
   .
   .
   .
 ["REMOTE_USER"]=>
 string(0) ""
.
   .

Thanks,
Ryan

On 2/23/07, Jochem Maas <[EMAIL PROTECTED]> wrote:

Ryan wrote:
> Hello,
>
> I'm new to php and I have am running php on apache. I already have ldap
> authentication set up in apache would rather not create a separate system
> for php. What would be ideal would be to get the current authenticated user
> from the apache environment. At this point I'm grabbing at straws, but so
> far I've tried
>
> $ret = apache_getenv("LDAP_USER");
> echo $ret;
> echo $_SERVER['REMOTE_USER'];
> echo $_SERVER['PHP_AUTH_DIGEST'];
> $ret = apache_getenv('PHP_AUTH_DIGEST');

does this offer any clue?:

var_dump($_ENV, $_SERVER);

>
> None of these work. Has anyone done this??
>
> Thanks,
> Ryan
>




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



Re: [PHP] getting authentication information from apache

2007-02-23 Thread Ryan

Jochem,

Hmm, not sure what I'm looking for, but from what I've read, the
REMOTE_USER should contain this informaion, mine seems to be empty.
array(30) {
  .
  .
  .
["REMOTE_USER"]=>
string(0) ""
   .
  .

Thanks,
Ryan

On 2/23/07, Jochem Maas <[EMAIL PROTECTED]> wrote:

Ryan wrote:
> Hello,
>
> I'm new to php and I have am running php on apache. I already have ldap
> authentication set up in apache would rather not create a separate system
> for php. What would be ideal would be to get the current authenticated user
> from the apache environment. At this point I'm grabbing at straws, but so
> far I've tried
>
> $ret = apache_getenv("LDAP_USER");
> echo $ret;
> echo $_SERVER['REMOTE_USER'];
> echo $_SERVER['PHP_AUTH_DIGEST'];
> $ret = apache_getenv('PHP_AUTH_DIGEST');

does this offer any clue?:

var_dump($_ENV, $_SERVER);

>
> None of these work. Has anyone done this??
>
> Thanks,
> Ryan
>




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



Re: [PHP] getting authentication information from apache

2007-02-23 Thread Ryan

Richard,

I looked at phpinfo() as you said, same thing...

_SERVER["REMOTE_USER"]no value

You may be right, this may not be available, but I don't want to keep
throwing a login screen in front of users for no apparent reason.

Thanks,
Ryan




On 2/23/07, Richard Lynch <[EMAIL PROTECTED]> wrote:

On Wed, February 21, 2007 1:01 pm, Ryan wrote:
> I'm new to php and I have am running php on apache. I already have
> ldap
> authentication set up in apache would rather not create a separate
> system
> for php. What would be ideal would be to get the current authenticated
> user
> from the apache environment. At this point I'm grabbing at straws, but
> so
> far I've tried
>
> $ret = apache_getenv("LDAP_USER");
> echo $ret;
> echo $_SERVER['REMOTE_USER'];
> echo $_SERVER['PHP_AUTH_DIGEST'];
> $ret = apache_getenv('PHP_AUTH_DIGEST');
>
> None of these work. Has anyone done this??

If the answer you are seeking isn't available in:

run on the page where you are trying to do this, then you probably
can't get the answer you want.

Running http://php.net/ldap to re-connect and re-authenticate will
probably be fairly cheap, since LDAP is supposed to be pretty dang
fast in the first place, and whatever caching is going on for the LDAP
or OS calls behind LDAP virtually guarantees that the data you want is
in RAM.

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?




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



Re: [PHP] getting authentication information from apache

2007-02-26 Thread Ryan

Tried that ($PHP_AUTH_USER) and it is also empty.

On 2/24/07, dave <[EMAIL PROTECTED]> wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

try echo $PHP_AUTH_USER;

Ryan wrote:
> Richard,
>
> I looked at phpinfo() as you said, same thing...
>
> _SERVER["REMOTE_USER"]no value
>
> You may be right, this may not be available, but I don't want to keep
> throwing a login screen in front of users for no apparent reason.
>
> Thanks,
> Ryan
>
>
>
>
> On 2/23/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
>> On Wed, February 21, 2007 1:01 pm, Ryan wrote:
>> > I'm new to php and I have am running php on apache. I already have
>> > ldap
>> > authentication set up in apache would rather not create a separate
>> > system
>> > for php. What would be ideal would be to get the current authenticated
>> > user
>> > from the apache environment. At this point I'm grabbing at straws, but
>> > so
>> > far I've tried
>> >
>> > $ret = apache_getenv("LDAP_USER");
>> > echo $ret;
>> > echo $_SERVER['REMOTE_USER'];
>> > echo $_SERVER['PHP_AUTH_DIGEST'];
>> > $ret = apache_getenv('PHP_AUTH_DIGEST');
>> >
>> > None of these work. Has anyone done this??
>>
>> If the answer you are seeking isn't available in:
>> 
>> run on the page where you are trying to do this, then you probably
>> can't get the answer you want.
>>
>> Running http://php.net/ldap to re-connect and re-authenticate will
>> probably be fairly cheap, since LDAP is supposed to be pretty dang
>> fast in the first place, and whatever caching is going on for the LDAP
>> or OS calls behind LDAP virtually guarantees that the data you want is
>> in RAM.
>>
>> --
>> Some people have a "gift" link here.
>> Know what I want?
>> I want you to buy a CD from some starving artist.
>> http://cdbaby.com/browse/from/lynch
>> Yeah, I get a buck. So?
>>
>>
>
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF4AgsGPhC6XW20oARAmruAJ9zpCz5q6mN6rwlRHkyXgtox9ZvWACgnrXa
TFy3y3YOWfFPaFctYAFbDFo=
=6tjM
-END PGP SIGNATURE-



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



Re: [PHP] getting authentication information from apache

2007-02-27 Thread Ryan

Richard et al.,

You are right, the variable was not being provided for the apache
server. Essentially I found the answer here

http://httpd.apache.org/docs/1.3/misc/FAQ-F.html#remote-user-var

The document has to be protected in order for apache create the
REMOTE_USER variable. This was an apache subtlety I didn't know about.
As soon as I protected it with an .htaccess file, it worked fine and
the user showed up in this variable.

$_SERVER['REMOTE_USER']

Thanks,
Ryan


On 2/27/07, Richard Lynch <[EMAIL PROTECTED]> wrote:

Use  and see what *IS* there.

If what you want isn't there, then the web server didn't provide it.

If the web server didn't provide it, PHP can't be blamed for not
passing it on to you, which is *ALL* PHP does here.

So what you have is a web-server configuration issue in that case.


On Mon, February 26, 2007 11:18 am, Ryan wrote:
> Tried that ($PHP_AUTH_USER) and it is also empty.
>
> On 2/24/07, dave <[EMAIL PROTECTED]> wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> try echo $PHP_AUTH_USER;
>>
>> Ryan wrote:
>> > Richard,
>> >
>> > I looked at phpinfo() as you said, same thing...
>> >
>> > _SERVER["REMOTE_USER"]no value
>> >
>> > You may be right, this may not be available, but I don't want to
>> keep
>> > throwing a login screen in front of users for no apparent reason.
>> >
>> > Thanks,
>> > Ryan
>> >
>> >
>> >
>> >
>> > On 2/23/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
>> >> On Wed, February 21, 2007 1:01 pm, Ryan wrote:
>> >> > I'm new to php and I have am running php on apache. I already
>> have
>> >> > ldap
>> >> > authentication set up in apache would rather not create a
>> separate
>> >> > system
>> >> > for php. What would be ideal would be to get the current
>> authenticated
>> >> > user
>> >> > from the apache environment. At this point I'm grabbing at
>> straws, but
>> >> > so
>> >> > far I've tried
>> >> >
>> >> > $ret = apache_getenv("LDAP_USER");
>> >> > echo $ret;
>> >> > echo $_SERVER['REMOTE_USER'];
>> >> > echo $_SERVER['PHP_AUTH_DIGEST'];
>> >> > $ret = apache_getenv('PHP_AUTH_DIGEST');
>> >> >
>> >> > None of these work. Has anyone done this??
>> >>
>> >> If the answer you are seeking isn't available in:
>> >> 
>> >> run on the page where you are trying to do this, then you
>> probably
>> >> can't get the answer you want.
>> >>
>> >> Running http://php.net/ldap to re-connect and re-authenticate
>> will
>> >> probably be fairly cheap, since LDAP is supposed to be pretty
>> dang
>> >> fast in the first place, and whatever caching is going on for the
>> LDAP
>> >> or OS calls behind LDAP virtually guarantees that the data you
>> want is
>> >> in RAM.
>> >>
>> >> --
>> >> Some people have a "gift" link here.
>> >> Know what I want?
>> >> I want you to buy a CD from some starving artist.
>> >> http://cdbaby.com/browse/from/lynch
>> >> Yeah, I get a buck. So?
>> >>
>> >>
>> >
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG v1.4.1 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFF4AgsGPhC6XW20oARAmruAJ9zpCz5q6mN6rwlRHkyXgtox9ZvWACgnrXa
>> TFy3y3YOWfFPaFctYAFbDFo=
>> =6tjM
>> -END PGP SIGNATURE-
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?




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



Re: [PHP] string concatenation with fgets

2009-11-24 Thread ryan

Is this what you want

$file = fopen("test.txt", "r");
while (!feof($file)) {
   $line = trim(fgets($file));
   print $line."sometext\n";
   }
fclose($file);

outputs
asometext
bsometext
csometext

Ref to http://us3.php.net/manual/en/function.fgets.php. "Reading ends 
when /length/ - 1 bytes have been read, on a newline (which is included 
in the return value), or on EOF (whichever comes first). If no length is 
specified, it will keep reading from the stream until it reaches the end 
of the line. "



aurfal...@gmail.com wrote:

Hi all,

I'm trying to append some text to what I read from a file.

My code;

$file = fopen("foo.txt", "r");
while (!feof($file)) {
$line = fgets($file);
print $line."sometext";
}
fclose($file);

foo,txt;
a
b
c
d
e
f
g

And when I run the script, it looks like;
a
sometextb
sometextc
sometextd
...


Any ideas?

Thanks in advance,
- aurf




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



Re: [PHP] exception throw from __autoload could not be catched on php 5.3.1

2010-01-28 Thread Ryan
于 2010-1-29 13:19, Ashley Sheridan 写道:
> On Fri, 2010-01-29 at 13:02 +0800, Eric Lee wrote:
>
>   
>> Hi php-dev pros,
>>
>> I got an issue about catching exception throw from __autoload on php 5.3.1.
>>
>> The manual state that exception throw from __autoload could be catched with
>> try.. catch statement same as the normal flow.
>>
>> But I'can archive that even I have copied the same sample code from the
>> manual.
>>
>> Here are the code segment.
>>
>> [[[
>> function __autoload($name) {
>> echo "Want to load $name.\n";
>> throw new Exception("Unable to load $name.");
>> }
>>
>> try {
>> $obj = new NonLoadableClass();
>> } catch (Exception $e) {
>> echo $e->getMessage(), "\n";
>> }
>>
>> ]]]
>>
>> Are there anyone experienced this or not ?
>>
>> Thanks in advance !
>>
>> Regards,
>> Eric,
>> 
>
> Sorry, ignore that, I see you're running 5.3.1, which should be fine for
> running the example. I do notice that you've got [[[ and ]]] in-place of
> , was that intentional?
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
>   
Do you have any other autoload implamentaions? try testing that code
segment in a single php file and dump phpinfo() to make sure you are on
php 5.3.1

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



Re: [PHP] is there a static constructor?

2011-03-30 Thread Ryan
There is such thing, but its not called static constructor, its called 
singleton pattern

class SingletonA
{
  public static instance;
  public SingletonA(){}
  public static function getInstancce()
  {
if(self::instance != null)
{
  return self::instanc;
}
return new SingletonA();
  }
}

On 3/31/2011 12:56 AM, D. Dante Lorenso wrote:

All,

I want to build a config file class that gets called statically.  Is 
there such a thing as a static constructor?  Example:


class Daz_Config {
  public static function load() {
...
  }
  public static function get($key) {
self :: load();
...
  }
}

Daz_Config :: get('myvalue');

I want to call the load function when the class is used for the first 
time.  If no code ever calls "Daz_Config :: get(...)" then I never 
want to invoke load() but if it does get called, I only want to call 
load() once before the class is used further.


Anyone know how to do this with calling load() at the top of all the 
other functions and writing a load() function that exits early if 
already loaded?


-- Dante




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



[PHP] Date handling

2004-11-15 Thread Ryan
Hello,

I would like to find out the 'official' way to handle dates in PHP.  I am 
aware of the limits on a Unix timestamp, but I am writing a financial 
application that needs to deal with dates both before 1970 and after 2038 
and of course have run into problems when trying to format those dates using 
the date() and strftime() functions.  This of course then also impacts 
Smarty as Smarty's date_format modifier is just a wrapper around strftime().

I am looking at the PEAR Date module and that seems to resolve these issues, 
but I would like to know if that is the standard/official way to handle 
dates in PHP applications as in my application, I would like to have one 
handler for dates, rather than separate code for dates within the Unix 
timestamp range and for dates outside - so if I switch to PEAR Date, I will 
use it everywhere in my code since I cannot take any chance of using date() 
or strftime() and possibly getting invalid data.

Additionally, are there any plans to make an official PHP date extension 
that handles dates outside a Unix timestamp range as something built into 
the language itself rather than as a '3rd party extension' which the PEAR 
Date module appears to be since it's not in the core PHP language?

Thanks,
Ryan

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



Re: [PHP] Date handling

2004-11-15 Thread Ryan
Hi Justin,

Thanks for your reply.  Actually the main issue that I'm running into is
that I cannot get Unix timestamps before 1970.  I'm running on Red Hat
Enterprise Linux (kernel 2.4.21-20.EL).  If I run:




the script outputs "-1", which then of course translates to 1969-12-31.
According to http://us2.php.net/strtotime, it says "... dates prior to Jan
1, 1970 will not work on Windows, some Linux distributions, and a few other
operating systems".

I'm guessing Red Hat Enterprise or at least the kernel I'm using (which is
the latest RH kernel) qualifies under the Linux category above.  Also, with
the application I'm writing, I need to deal with dates after 2038 too.  So
that is why I'm investigating alternatives - just because I'd like something
that would definitely work on any platform and is 'official' as much as
possible - rather than have my date handling be OS-specific.

Thanks,
Ryan


"Justin French" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 16/11/2004, at 7:05 AM, Ryan wrote:
>
> > I would like to find out the 'official' way to handle dates in PHP.  I
> > am
> > aware of the limits on a Unix timestamp, but I am writing a financial
> > application that needs to deal with dates both before 1970 and after
> > 2038
> > and of course have run into problems when trying to format those dates
> > using
> > the date() and strftime() functions.  This of course then also impacts
> > Smarty as Smarty's date_format modifier is just a wrapper around
> > strftime().
>
> End of the day, you need to choose something which works for you.
> There's no right answer, but there's some good answers :)
>
> I store everything in GMT.  If I need to know more about the timezone
> of the object, I'll either store the local time, or the offset from
> GMT.  I choose to store everything as a MySQL DATETIME (-MM-DD
> HH:II:SS), because it's human readable, easy to convert to a unix
> stamp, and more portable across platforms (eg Windows), although it
> does use a few extra bytes.
>
> It's also important to note that (at least for Unix) Unix timestamps do
> work pre-1970... they are just a negative integer, so you need to allow
> for signed integers in your database if that's the format you choose to
> use.
>
> I've spent a lot of time working with dates and times, trying to
> understand it all and come up with a solid process.  You need to really
> read the manuals and understand what you're storing, and what you're
> doing with functions like date() which assumes a GMT stamp, but outputs
> a TZ-corrected date.
>
> > I am looking at the PEAR Date module and that seems to resolve these
> > issues,
> > but I would like to know if that is the standard/official way to handle
> > dates in PHP applications as in my application, I would like to have
> > one
> > handler for dates, rather than separate code for dates within the Unix
> > timestamp range and for dates outside - so if I switch to PEAR Date, I
> > will
> > use it everywhere in my code since I cannot take any chance of using
> > date()
> > or strftime() and possibly getting invalid data.
>
>
> I've never worked with the PEAR modules, but my recommendation is this:
>
> - store everything as GMT, and store an offset if needed, and
> understand what it is you're storing
> - transport your dates in your scripts as GMT as long as possible (this
> is what date() and strftime() expect anyway)
> - understand when you want to use date(), and when you really want
> gmdate()
> - write some wrapper functions which you understand implicitly, so that
> you can deal with your data in a way which makes sense to you
>
>
> The catch here is if you use Windows for either development or
> production.  I have zero experience with this platform, and don't know
> how much of my knowledge applies in that situation.
>
>
> Feel free to ask a detailed question to get a detailed answer :)
>
>
> Justin

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



Re: [PHP] Date handling

2004-11-16 Thread Ryan
Hi Robert,

Storing the date in my database isn't the issue I'm running into.  The 
problem I'm having is that if I have a date "1950-01-01", how can I display 
it in my PHP script as "Jan 1, 1950".  Or if I have "2040-04-01", how to get 
it to display as "Apr 1, 2040".  I can't see a way to do that right now in 
the core PHP code using the built-in date functions.

Thanks,
Ryan


"Robert Sossomon" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> 
>> > echo strtotime('1950-01-01');
>> ?>
>> I'm guessing Red Hat Enterprise or at least the kernel I'm using (which 
>> is
>> the latest RH kernel) qualifies under the Linux category above.  Also, 
>> with
>> the application I'm writing, I need to deal with dates after 2038 too. 
>> So
>> that is why I'm investigating alternatives - just because I'd like 
>> something
>> that would definitely work on any platform and is 'official' as much as
>> possible - rather than have my date handling be OS-specific.
> 
>
> How are you entering the date into the Table?  Could you not just rewrite 
> the page so that the date information is entered differently, then format 
> it in the correct way and dump it into the table?  I would think that it 
> would work to solve your problem in dealing with dates, but that is just a 
> guess here.
>
> HTH,
> Robert 

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



Re: [PHP] Date handling

2004-11-16 Thread Ryan
Yes, but time() returns a Unix timestamp which has a limit of 2038.  For 
example, what if I would like to calculate the date of 40 years from today? 
I can't do that with the normal PHP date functions.  I would have to use 
PEAR Date or something similar, which is my original question - of what is 
the 'official' PHP way to handle this as calculations with dates is a common 
thing to do.

Thanks,
Ryan


"Mike" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Ryan,
>
> I had those problems in the past and to simply avoid the matter 
> altogether,
> when I store dates I just do so with the time() function.
>
> $cur_date = time();
>
> That way, when I poll the DB, I have a timestamp that I can then use 
> date()
> to format in whatever manner I wish.
>
> I haven't run into any problems doing it this way.
>
> About your specific question, if you want to use your preexisting date
> format you'll have to do some string manipulation to pull apart the month,
> date and year and then format it how you want to. You'll likely have to 
> use
> a switch to swap the month from the numeric representation to the text
> abbreviation.
>
> But no matter what you do, if you want some flexibility, you'll have to
> either change the format in the DB or just do it all on the fly in your
> script because the date() function expects you to pass it a timestamp.
>
> You may be able to come up with something clever using strtotime() 
> however.
> http://us2.php.net/manual/en/function.strtotime.php
>
> -M
>
> -Original Message-
> From: Ryan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 16, 2004 9:23 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Date handling
>
> Hi Robert,
>
> Storing the date in my database isn't the issue I'm running into.  The
> problem I'm having is that if I have a date "1950-01-01", how can I 
> display
> it in my PHP script as "Jan 1, 1950".  Or if I have "2040-04-01", how to 
> get
>
> it to display as "Apr 1, 2040".  I can't see a way to do that right now in
> the core PHP code using the built-in date functions.
>
> Thanks,
> Ryan
>
>
> "Robert Sossomon" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> 
>>> >> echo strtotime('1950-01-01');
>>> ?>
>>> I'm guessing Red Hat Enterprise or at least the kernel I'm using (which
>>> is
>>> the latest RH kernel) qualifies under the Linux category above.  Also,
>>> with
>>> the application I'm writing, I need to deal with dates after 2038 too.
>>> So
>>> that is why I'm investigating alternatives - just because I'd like
>>> something
>>> that would definitely work on any platform and is 'official' as much as
>>> possible - rather than have my date handling be OS-specific.
>> 
>>
>> How are you entering the date into the Table?  Could you not just rewrite
>> the page so that the date information is entered differently, then format
>> it in the correct way and dump it into the table?  I would think that it
>> would work to solve your problem in dealing with dates, but that is just 
>> a
>
>> guess here.
>>
>> HTH,
>> Robert
>
> -- 
> 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] Getting the script path of a commandline script

2002-11-26 Thread Ryan Grove
Anyone know how to get the script path (not the current working directory,
but the actual path of the executing script) of a commandline script?

I've dug through the docs and can't find this anywhere. None of the
typical $_SERVER variables return the script path (although several of
them return the filename, hooray for redundancy). The docs say several
times that getcwd() will NOT return the path of the executing script, but
they don't mention how to get it.

Help.

-- 
Ryan Grove
[EMAIL PROTECTED]
http://wonko.com/

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




[PHP] Triggering a PHP Script

2002-12-02 Thread Ryan Bates
My Problem:
I've got a PHP script (running on Apache) that can take several hours 
to complete. The script sends out a newsletter to those who have 
requested it. When calling this script from a web browser, the browser 
hangs until the script has fully executed. If the user hits "Stop" 
while the script is running, it will terminate the script.

My Questions:
What is the best way to trigger this script? Is there a way to do it 
without using a CGI script? I am basically wondering if there is a way 
to create a "trigger this php page" script that will run the script on 
Apache and not hang the browser. Also, are there any problems calling 
MySQL from a PHP CGI script?

Thanks,

Ryan Bates


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



Re: [PHP] Triggering a PHP Script

2002-12-02 Thread Ryan Bates
Don't worry. The newsletter is only sent to those who have requested it 
in their registration, and the user can easily unsubscribe at any time.

Anyway, it looks like I will have to go with a CGI Script. Thanks for 
your reply. If anyone has any alternative methods please let me know.

Ryan Bates



On Monday, December 2, 2002, at 09:37  AM, DL Neil wrote:

Ryan,


My Problem:
I've got a PHP script (running on Apache) that can take several hours
to complete. The script sends out a newsletter to those who have
requested it. When calling this script from a web browser, the browser
hangs until the script has fully executed. If the user hits "Stop"
while the script is running, it will terminate the script.

My Questions:
What is the best way to trigger this script? Is there a way to do it
without using a CGI script? I am basically wondering if there is a way
to create a "trigger this php page" script that will run the script on
Apache and not hang the browser. Also, are there any problems calling
MySQL from a PHP CGI script?



First: trust that you are only sending to opted-in clients!?
(we're kind of sensitive about spammers around here!)

The manual is your friend: Chapter 23. Using PHP from the command 
line. Add
code to prevent PHP from timing-out (see another current thread) and 
that
takes care of your program. It will now run, outside the browser, in 
the
background, and you/your user can carry on using the browser...

As far as "trigger" goes, you can type the command into the command 
line, or
run some sort of 'job', or set it up to run off a scheduler, eg CRON or
AT/Scheduled Tasks.

Regards,
=dn



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




[PHP] PDF Help Please

2002-12-02 Thread Ryan Smaglik
I need to figure out by tonight how to:
1. open a .pdf file using php.
2. add text to certain parts of it.
3. save it and output to browser.
4. Then delete the temp file so the process can be done over again.

I have PDFlib but not the $1000 PDI addition

Please help,

Ryan



[PHP] nl2br ( ) and forms

2002-12-02 Thread Ryan Smaglik
When I call  data from a form,  How do I integrate nl2br to it so that it
displays with linebreaks?

Example code:




Thanks in advance,

Ryan



[PHP] Help with conditionals

2002-12-02 Thread Ryan Smaglik
  I am calling data from 3 checkboxes in a form,  I can do that with the
$_POST stuff.
But I want to also do the following:

1. If check box ³x² is checked, then also display data from form field ³y²
with a  after it. (like this:  X  Y)

I am new at php so I don¹t know conditionals yet...  Can someone please
help?

Thanks.



[PHP] PHP and the PDFlib

2002-12-02 Thread Ryan Smaglik
Has anyone found any other means of opening an existing pdf file and adding
text to it?  The only thing I could find is the  PDI + PDFlib commercial
combo which I do not have the $1000 to dish out right now...

Any Ideas? 



Re: [PHP] PHP Sessions

2002-12-04 Thread Ryan Gibson
May be a silly question but are u using a global statement in the include
files, just a thought


on 4/12/02 1:11 pm, Andy Kirk at [EMAIL PROTECTED] wrote:

> Can anyone tell me if session variables should be available to scripts that
> are included into the main script?
> 
> It appears to me that they are not unless I am really missing the point.
> 
> 
> 


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




[PHP] Photoshop 6.0 & later + IPTC functions?

2002-12-11 Thread Ryan Gallagher
Does anyone know if there is a workable method currently for writing IPTC tags
to JPG & TIFF files using PHP 4.2.3 specifically with the intent to read these
written tags with photoshop 6.0 and later??  

Currently we can set and read tags in PHP, but photoshop only sees any tags that
it originally created.  I have seen articles mentioning photoshop somehow
breaking the standard recently, is this issue resolved/resolveable?

Tips, points, and code snippets appreciated!

-- 
Ryan T. Gallagher



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




[PHP] GD Library script help please.

2002-12-13 Thread Ryan Smaglik
I got a generic ³text to png on the fly² script which works fine but I want
to change it so that the image has the same hight and width as the text
string (so the text has no border around it) For and example of what I want
to do check out: http://www.spoono.com/font/?string=This is what i want to
do&.png
I have the script:


The text for the image is called from a url like
www.xelerix.com/font/font.php?text=Hi

Thanks!





[PHP] GD Library script help please.

2002-12-13 Thread Ryan Smaglik
I got a generic ³text to png on the fly² script which works fine but I want
to change it so that the image only the size of the text. (so the text has
no border, or padding around it) For and example of what I want to do check
out: http://www.spoono.com/font/?string=This is what i want to do&.png
I have the script:


The text for the image is called from a url like
www.xelerix.com/font/font.php?text=Hi

Thanks!





[PHP] script help please.

2002-12-13 Thread Ryan Smaglik
I got a generic ³text to png on the fly² script which works fine but I want
to change it so that the image only the size of the text. (so the text has
no border, or padding around it) For and example of what I want to do check
out: http://www.spoono.com/font/?string=This is what i want to do&.png
I have the script:


The text for the image is called from a url like
www.xelerix.com/font/font.php?text=Hi

Thanks!





[PHP] Hey, If anyone can help me with this at all, I would reallyappreciate it...

2002-12-14 Thread Ryan Smaglik
I got a generic ³text to png on the fly² script which works fine but I want
to change it so that the image only the size of the text. (so the text has
no border, or padding around it) For and example of what I want to do check
out: http://www.spoono.com/font/?string=This is what i want to do&.png
I have the script:


The text for the image is called from a url like
www.xelerix.com/font/font.php?text=Hi

Thanks!





RE: [PHP] include question

2003-01-15 Thread Ryan Cassin
No unfortunately something like that isn't possible... The HTML files
are generated by a closed-source application.

-Original Message-
From: Brad Bonkoski [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 15, 2003 5:04 PM
To: Ryan
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] include question


It would probably be best to include the absolute path to the images. so
instead of:  use:  Is something like that possible?
Otherwise at the very least you should use: 
HTH -Brad Ryan wrote:

> Hello all,
>
> I'm have a PHP script that works in a folder.. for the sake of clarity

> we'll call it c:\project
>
> In c:\project\htmls there are several HTML documents which refer to 
> images in the project\htmls directory with tags like  src="file.gif">
>
> In my PHP script in c:\project I include "htmls/file.html" and the 
> HTML file renders alright from the script, but the image's path is 
> c:\project\file.gif when the page is rendered, not 
> c:\project\htmls\file.gif like it should be. Is there any way to 
> change the "working directory" so when I include a file images are on 
> the page, too?
>
> Thanks in advance!
>
> --
> Ryan Cassin
> [EMAIL PROTECTED]
>
> --
> 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] convert .asp page .php

2003-03-05 Thread Ryan Gibson
On 5/3/03 1:42 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> Subscription.asp

The page u sent is just a form (it will work on any server), the dirty work
is done by "Subscription.asp"


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



[PHP] save to file

2003-03-08 Thread Ryan Holowaychuk
I am trying to save to a text file.  And I have managed to do that part
now, but what happens is when I save to the file, all the lines get put
into one big line in the file.
 
I am creating a roster input that I adding to our website:  No, name
grade .
 
The roster will contain 15 players
 
So right now the implode puts everything on one line in the text file!!!
 
So I am no sure if anybody can shed some light on this one.
 
Thanks again
Ryan
 

 
 
 



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



[PHP] Advise needed - rateing/voteing system

2003-07-07 Thread Ryan A
Hey Guys,
I need a little help coz I dont know if i have missed anything in my
"design"

1)
I want to make "rateing/voteing system" (something like the one that is
being used at hotscripts) that will take around 5 parameters via radio
buttons and make sure that the person cant rate/vote more than once, what i
plan to do is first
check sessions
if session is not set
check cookie
if cookie is not set
checkip
if ip is not set
do a reverse ip check
if that too comes clean then allow the person a vote

as you can see i am trying my best to make sure that the visitor only votes
once, if he/she changes machines this wont work of course but as far as i
can see this should take care of around 99% of the visitors and allow a fair
voteing system...
If i have missed anything in the above or my logic is not good I am totally
open to suggestions/advise because as far as i know there is nothing out
there that is so secure...or am i wrong?

2)
Rather than starting from scratch if any of you guys could recomend a
voteing system which i could tear its guts out and tailor to my needs, it
would be appreciated. I have already checked at hotscripts/scriptsSearch and
google and found quite a few but dont know which is good and have had no
experience with any of them..

3)
(OT) sorry for the off topic bit here but i'm wondering if any of you guys
had this problem, suddenly my internet explorer (ver 5.5) is displaying
large fonts and something like 640x480 when my screen is on 800x600, this
problem is only with IE, the funny thing is it used to work fine before.

Thanks in advance,
-Ryan


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



Re: [PHP] Spammer! Re: [PHP] ANNOUNCING: Rekall V2.0.0 for Linux/UNIX....

2003-07-07 Thread Ryan A
IntrestingI have created 4 products that sell and a few scripts for free
(which helped me learn php) plus I co-webmaster for 2 sites that sell
scripts, around 40 of them totallycan i advertise for each of them here
one by one or do i have to do it by website or all 44 at once??

I know the above question is really stupid as its totally unacceptable but
in my opinion I think a person should be able to come here and announce
his/her product/site if its beneficial to a lot of ppl...
eg:
the php classes site (excellient site)
a php resource site
a fantastic new editor, hopefully free (no offense ZEND  :-) )

announcing something like "Rekall" to me does not qualify...but thats my
opinion i am sure a lot of you will disagree with the way i see things..

just my two cents.

Cheers,
-Ryan


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



Re: [PHP] Zend extensions license

2003-07-08 Thread Ryan Gibson
It depends on the number of options, if you only have a small number of
options you could just hold them in a VARCHAR, then rebuild the options
array from that

Say you had four on/off options, you could store them in a VARCHAR(4) as
"yyny" then rebuild the array with a simple for loop or just build a
function to get the appropriate value etc.

Ryan Gibson
---
[EMAIL PROTECTED]

On 8/7/03 12:28 pm, "Sævar Öfjörð" <[EMAIL PROTECTED]> wrote:

> Hi. I’m coding a poll system which stores information in MySQL.
> 
> When a new poll is created a new row is inserted in the table ‘polls’.
> There I keep basic information such as the question, id etc. But should
> I keep the poll options in one field also? Then I would create an array
> from the poll options the user specifies, serialize it and then
> base64_encode it.
> 
> Is this a good way of storing an array or should I make a database table
> named for example: ‘polls_options’?
> 
> Any opinions and thougts on this appreciated.
> 


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



[PHP] NEW SPAMMER -> [PHP] New Krysalis version released

2003-07-08 Thread Ryan A
Didnt we just have a thread about spamming like this on the list?



- Original Message -
From: "Alexandru COSTIN" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, July 08, 2003 9:22 PM
Subject: [PHP] New Krysalis version released


> Hello,
> For the ones interested in XML/XSL publishing with PHP, we've just
> released the Krysalis 2.4.1 version.
>
> Includes a lot of features, fixes and performance improvements.
> Check http://www.interakt.ro/index_news_162.html for more details.
>
> Our XML-schema support is being worked right now for inclusion in
PEAR -
> contact us if you want to contribute - we still need some PEARyfication
> help.
>
> Alexandru
>
> --
> Alexandru COSTIN
> Chief Operating Officer
> http://www.interakt.ro/
> +4021 312 5312
>
>
>
> --
> 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] Alex,Joe - >Re: [PHP] New Krysalis version released

2003-07-08 Thread Ryan A
Hi,
I never said that it isnt a good product, heck it sounds like its a great
product...
I myself am a newbie here (a few months) pretty new to php compared to a lot
of guys here but have created some commercial scripts...imagine the old
fossils :-) here who have created loads of good scripts?
I just think that if someone asks for something _then_ recomend your product
in your reply.
In this case if someone said "hey, am new to xml/xsl in php can anybody
help" then someone could have said "read blah and blah and heres a great
product from Alenandru at  check it out..." or something to that
effect
It just seems to be a pain in the  when everytime someone has written
something we get an announcement, everyone has ideas and there is a hell of
a lot of good stuff out there...but...

When i start looking into XML/XSL I will give that a look see and probably
ask this list for advise but till then I think this is kind of "passive
spamming" or atleast an overload of (as of now) unwanted info, I am sure it
will be useful and of great value if its free or not but till someone asks
for the info

-Ryan


- Original Message -
From: "Alexandru COSTIN" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, July 08, 2003 9:22 PM
Subject: [PHP] New Krysalis version released


> Hello,
> For the ones interested in XML/XSL publishing with PHP, we've just
> released the Krysalis 2.4.1 version.
>
> Includes a lot of features, fixes and performance improvements.
> Check http://www.interakt.ro/index_news_162.html for more details.
>
> Our XML-schema support is being worked right now for inclusion in
PEAR -
> contact us if you want to contribute - we still need some PEARyfication
> help.
>
> Alexandru
>
> --
> Alexandru COSTIN
> Chief Operating Officer
> http://www.interakt.ro/
> +4021 312 5312
>
>
>
> --
> 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] Steve - > Re: [PHP] Re: NEW SPAMMER -> [PHP] New Krysalis version released

2003-07-09 Thread Ryan A
Hey,
Cool, I guess it boils down to a matter of opinion then, but if you feel all
PHP related products are not spam (commercial or not) everytime the 3 sites
I am in touch with releases a new php product will be sure to let you know!
I hope you dont have any complaints.

Cheers,
-Ryan

- Original Message -
From: "Steve Magruder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 3:08 PM
Subject: [PHP] Re: NEW SPAMMER -> [PHP] New Krysalis version released


> Ryan A wrote:
> > Didnt we just have a thread about spamming like this on the list?
>
> If it's a PHP-related product being announced, it isn't spam to me (and in
> fact, it's rather valuable), unless the announcement posts become
> repetitive.
>
> Steve
> --
>
> Steve Magruder Consulting - http://consulting.stevemagruder.com
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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



Re: [PHP] How to get "executed php result" in variable

2003-07-14 Thread Ryan Gibson
Hi,

Put a return statement at the end of file
'get_executed_php_file_contents.php' that returns the value you need, then
use:




On 14/7/03 10:31 am, "Tariq Murtaza" <[EMAIL PROTECTED]> wrote:

> Dear All,
> 
> I need to get results like this.
> 
>$result  = get_executed_php_file_contents.php
> ?>
> 
> Looking for some  solutions
> TM
> 

Ryan Gibson
---
[EMAIL PROTECTED]


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



Re: [PHP] Please dirrect me -- headers ????

2003-07-14 Thread Ryan Gibson
Hi,

Headers have nothing to do with the  tag, the headers are sent before
the html page, ie they are not part of the html document, but something sent
by the web server before the page is sent to the user


Try:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

And

http://www.cs.tut.fi/~jkorpela/http.html

As for question 2, if you want to redirect the user to the other website use
the location header to redirect them to the other site (otherwise you'll
have to redirect them to the other site, then use frames to open the content
on the original site)


On 14/7/03 5:16 pm, "Anthony" <[EMAIL PROTECTED]> wrote:

> This isn't necessarily PHP specific, but I'm looking for more information on
> HTTP headers.  I'd like to know what headers I should send and why.  I want
> my code to send out w3c compliant HTML.  I'm confused on exactly what
> headers do, and the difference between HTTP headers and information
> contained within the  tag.  Multiple google searches have gotten me
> only more confused.  Someone please send me in the right direction :)
> 
> on an a possible similar note, I have a domain name www.mydom1.com  and when
> the user goes to it, I want it so say www.mydom.com in the browser address
> bar.  Can I do this by sending certain headers? (I have both domains
> pointing to the same server) ... should/could I do something like this
> through PHP or is there something I can set in Apache to do the same thing?
> 
> Simply confused,
> - Anthony
> 
> 

Ryan Gibson
---
[EMAIL PROTECTED]


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



Re: [PHP] headers already sent and cookie problem

2003-07-15 Thread Ryan Gibson
You cannot send any page information before you send headers (ie setting a
cookie), that means there should be no html before the php that sets the
cookie, also any function that are called before you set the cookie cannot
output to the browser.

Ry


On 15/7/03 9:45 am, "frederik feys" <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> 
> 
> This is what i get:
> 
> ³Warning: Cannot add header information - headers already sent by (output
> started at /home/u/r/html/store/cart.php:188) in
> /home/u/r/html/store/includes/functions/get_cartID.php on line 14²
> 
> 
> 
> I know that the problem is the reading of the cookie and then after some
> sripting outputting page HTML.
> 
> 
> 
> I started my code
> 
> ob_start()
> 
> and do an ob_flush() within a function(show_cart) (?might that be a problem?)
> 
> 
> 
> Can anyone shed some light on this?
> 
> 
> 
> Thanks!
> 
> Fred
> 
> 
> 
> 


Ryan Gibson
---
[EMAIL PROTECTED]


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



[PHP] reading from dir and displaying thumbs

2003-07-16 Thread Ryan A
Hi guys,
I want to convert my old java greetings programs into php scripts but am
stuck on one little thing.
I have a bunch of thumbnails in a 3 directories, the problem is the number
of thumbnails in each directory is differient...how do i first make the
script look into the directory, display (maybe 15 per page?) thumbnails with
a link to the main program which will take one parameter depending on the
thumbnail name.
eg:
thumbnail name is 1.jpg so that thumbnail should have a link such as 

Anybody have any ideas or links please tell me.
Cheers!
-Ryan


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



[PHP] Anyone for cookies and milk? :-)

2003-07-16 Thread Ryan A
Hey,
Am just getting into PHP cookies and have gotten a problem...(surprise
surprise)

Am trying to set a basic cookie to see exactly how things work before I
start using it in my apps, heres the code i am using:
(SetCookieEx.php)


This is the output I am getting:
**
Warning: setcookie() expects parameter 3 to be long, string given in
/bestweb/public_html/testing/SetCookieEx.php on line 2

Warning: setcookie() expects parameter 3 to be long, string given in
/bestweb/public_html/testing/SetCookieEx.php on line 3
done

This is how I am trying to read the cookies: (ReadCookieEx.php)



This is the output i am getting:
***
wrong1wrong2



Anybody have any ideas?

Cheers,
-Ryan


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



[PHP] deleting one cookie is deleting both..why? (tiny scripts)

2003-07-17 Thread Ryan A
Hi again,
I am setting 2 cookies like so:(setCookie.php)



then I am trying to delete the second cookie like so:(delCookie.php)


http://bestwebhosters.com/testing/ReadCookieEx.php>Read

When I check ReadCookie it shows me that both hav been deletedwhy?
How can i delete just one of the two cookies?

***
(for those of you intrested heres my ReadCookie file)



Kindly reply.

Cheers,
-Ryan


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



Re: [PHP] deleting one cookie is deleting both..why? (tiny scripts)

2003-07-17 Thread Ryan A
Hey,
Thanks for replying.
As you might have guessed, i'm new to using cookiesso how do i make sure
that the cookie will work for http://best and www.best... and
blah.bestweb etc? because thats what I thought I was doing by using
.bestwebhosters.com

Thanks,
-Ryan



> --- Ryan A <[EMAIL PROTECTED]> wrote:
> > I am setting 2 cookies like so:(setCookie.php)
> ...
> > setcookie("name1","1","0","",".bestwebhosters.com");
> > setcookie("name2","1","0","",".bestwebhosters.com");
> ...
> > then I am trying to delete the second cookie like so:(delCookie.php)
> ...
> > setcookie("name2","1","-3600","",".bestwebhosters.com");
> ...
> > http://bestwebhosters.com/testing/ReadCookieEx.php>Read
> >
> > When I check ReadCookie it shows me that both hav been deletedwhy?
>
> Don't delete the cookie, and you'll still find that both are "deleted".
The
> truth is that neither would be deleted, but they will only be sent to
domains
> within .bestwebhosters.com, which http://bestwebhosters.com is not.
>
> Hope that helps.
>
> Chris
>
> =
> Become a better Web developer with the HTTP Developer's Handbook
> http://httphandbook.org/
>

- Original Message -
From: "Chris Shiflett" <[EMAIL PROTECTED]>
To: "Ryan A" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, July 17, 2003 5:34 PM
Subject: Re: [PHP] deleting one cookie is deleting both..why? (tiny scripts)


> --- Ryan A <[EMAIL PROTECTED]> wrote:
> > I am setting 2 cookies like so:(setCookie.php)
> ...
> > setcookie("name1","1","0","",".bestwebhosters.com");
> > setcookie("name2","1","0","",".bestwebhosters.com");
> ...
> > then I am trying to delete the second cookie like so:(delCookie.php)
> ...
> > setcookie("name2","1","-3600","",".bestwebhosters.com");
> ...
> > http://bestwebhosters.com/testing/ReadCookieEx.php>Read
> >
> > When I check ReadCookie it shows me that both hav been deletedwhy?
>
> Don't delete the cookie, and you'll still find that both are "deleted".
The
> truth is that neither would be deleted, but they will only be sent to
domains
> within .bestwebhosters.com, which http://bestwebhosters.com is not.
>
> Hope that helps.
>
> Chris
>
> =
> Become a better Web developer with the HTTP Developer's Handbook
> http://httphandbook.org/
>


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



[PHP] Shiflett=>Re: [PHP] deleting one cookie is deleting both..why? (tiny scripts)

2003-07-17 Thread Ryan A
Hey,
Thanks dude, will give it a go.
Cheers,
-Ryan

- Original Message -
From: "Chris Shiflett" <[EMAIL PROTECTED]>
To: "Ryan A" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, July 17, 2003 5:34 PM
Subject: Re: [PHP] deleting one cookie is deleting both..why? (tiny scripts)


> --- Ryan A <[EMAIL PROTECTED]> wrote:
> > I am setting 2 cookies like so:(setCookie.php)
> ...
> > setcookie("name1","1","0","",".bestwebhosters.com");
> > setcookie("name2","1","0","",".bestwebhosters.com");
> ...
> > then I am trying to delete the second cookie like so:(delCookie.php)
> ...
> > setcookie("name2","1","-3600","",".bestwebhosters.com");
> ...
> > http://bestwebhosters.com/testing/ReadCookieEx.php>Read
> >
> > When I check ReadCookie it shows me that both hav been deletedwhy?
>
> Don't delete the cookie, and you'll still find that both are "deleted".
The
> truth is that neither would be deleted, but they will only be sent to
domains
> within .bestwebhosters.com, which http://bestwebhosters.com is not.
>
> Hope that helps.
>
> Chris
>
> =
> Become a better Web developer with the HTTP Developer's Handbook
> http://httphandbook.org/
>


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



Re: [PHP] Need to use META tag with variable attached

2003-07-18 Thread Ryan Gibson
Hi,

Try:



On 18/7/03 10:51 am, "Ron Allen" <[EMAIL PROTECTED]>
wrote:

> This is what I have
> 
> 
> What I would like is for this to carry a variable with it.  I have tried
> several different variations and they don't work obviously
> 
>  URL=./ticket_admin.php?ID=".'$ID."  '>   Does someone have an idea for this?
> 
> 

Ryan Gibson
---
[EMAIL PROTECTED]


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



[PHP] eShox

2003-07-18 Thread Ryan A
Hi,
I have just been browsing the list and I see a recomendation for eShox
rather than OSCommerce, I did a search on google and found these 2 main
sites:
http://www.versiontracker.com/dyn/moreinfo/macos/17609
http://www.tenon.com/products/eshox/
and a lot others.

Most of the sites are selling the software, is this commercial software or
are these "companies" just swindling people?
If its the latter can you tell me where to download the free version please?
I would like to test it out being a fan of OSCommerce.

Thanks,
-Ryan


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



[PHP] locking to domain

2003-07-18 Thread Ryan A
Hi,
I want to make sure my scripts can be executed on only one domain (or
localhost/ 127.0.0.1)...it should not matter if its
http://somesite.com/myscript.php
 or http://somesite.com/~blah/myscript.php
 or http://blah.somesite.commyscript.php
 or http://somesite.com/1/2/asdf/234/myscript.php

It should only work on "somsite.com"

Any ideas on how i can do this? I've seen this done on some old perl scripts
but how in php?

Kindly help.

Thanks,
-Ryan



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



Re: [PHP] Re: classes v. functions

2003-07-19 Thread Ryan A
Hi,
I myself never really create classes to use in my projects, if I ever use
classes its only because they come from someone else (eg phpclasses.org), I
find using the non OO approach much easier to understand.
Just my 2 cents.
Cheers,
-Ryan


- Original Message -
From: "Sam Baum" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 19, 2003 11:59 AM
Subject: [PHP] Re: classes v. functions


> Hi,
>
> am Friday 18 July 2003 23:08 schrieb Andu:
>
> > This may show my ignorance or my refusal to take for granted something I
> > don't fully understand but I have a hard time figuring out the advantage
> > of using classes as opposed to just functions. I am certainly new to php
> > and at first sight classes seemed to cut a lot of corners but so do
> > functions (with which I have more experience). The more I read about
> > classes the deeper the confusion. Anyone can enlighten me?
>
> Im programming for a few years now in PHP. After trying to use classes i
> dont see their point either. In most cases if i need a class-like
structure
> i do something like this:
>
> function thing_new() {
> return ++$GLOBALS['thing_resource'];
> }
>
> function thing_put($stuff, $res=NULL) {
> if (is_null($res)) $res = $GLOBALS['thing_resource'];
> $GLOBALS['thing_stuff'][$res] = $stuff;
> }
>
> function thing_get($stuff, $res=NULL) {
> if (is_null($res)) $res = $GLOBALS['thing_resource'];
> return $GLOBALS['thing_stuff'][$res];
> }
>
> Because there is no constraint to be more OO like in Java it doesnt makes
> sense. And this way you are more flexible.
>
>
> bg
>
> Sam
>
> --
> 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] affiliate program

2003-07-19 Thread Ryan A
Hi,
Can anyone recomend a good affiliate program please?
I have found a couple at hotscripts/scriptSearch and google but I dont know
which one is really good (and free :-D ) depending on your
experience...which one would you recomend?
The program is for sites selling software and memberships (non porn)
Thanks in advance.
-Ryan


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



Re: [PHP] Help?

2003-07-21 Thread Ryan Gibson
See archive posts about register_globals which came in php 4.1 (I think) if
you don't want to change your scripts you can turn off register_globals in
the .htaccess or php.ini files

On 21/7/03 10:34 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> I installed apache1.3.12 as the web server and php5 beta version,I write a
> test.html and test.php like this:
> //test.htm
> 
> 
> Name:
> 
> 
> //test.php
>  echo "Hello!".$name ;
> ?>
> the same source works well with php4 and apache 1.3.27
> but it doesn't work well in my new enviroment, until I modified test.php
> like this
> //new test.php
>  echo "Hello!".$_POST['name'] ;
> ?>
> 
> who can tell me which one cause this problem,Is the version php5 not
> satisfy or the apache 1.3.12?
> 

Ryan Gibson
---
[EMAIL PROTECTED]


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



Re: [PHP] http://poker.club66.ro

2003-07-23 Thread Ryan A
SPAM!
Will someone kick this jerk off the list please?

-Ryan

- Original Message - 
From: "Rausch Alexandru" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 23, 2003 6:05 AM
Subject: [PHP] http://poker.club66.ro




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



[PHP] reading from dir and displaying thumbs

2003-07-23 Thread Ryan A
Hi guys,
I want to convert my old java greetings programs into php scripts but am
stuck on one little thing.
I have a bunch of thumbnails in a 3 directories, the problem is the number
of thumbnails in each directory is differient...how do i first make the
script look into the directory, display (maybe 15 per page?) thumbnails with
a link to the main program which will take one parameter depending on the
thumbnail name.
eg:
thumbnail name is 1.jpg so that thumbnail should have a link such as 

Anybody have any ideas or links please tell me.
Cheers!
-Ryan


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



Re: [PHP] reading from dir and displaying thumbs

2003-07-24 Thread Ryan A
oops sorry,
I guess I deleted that one accidently. Its kind of hard to keep track as
suddenly the volume of the list has gotten higher it seems. Will look into
that.
Cheers,
-Ryan


- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 24, 2003 5:23 AM
Subject: Re: [PHP] reading from dir and displaying thumbs


> On Thursday 24 July 2003 07:41, Ryan A wrote:
>
> > I want to convert my old java greetings programs into php scripts but am
> > stuck on one little thing.
> > I have a bunch of thumbnails in a 3 directories, the problem is the
number
> > of thumbnails in each directory is differient...how do i first make the
> > script look into the directory, display (maybe 15 per page?) thumbnails
> > with a link to the main program which will take one parameter depending
on
> > the thumbnail name.
> > eg:
> > thumbnail name is 1.jpg so that thumbnail should have a link such as  > href /somescript.php?name=1>
>
> If this post looks suspiciously familiar its probably because of:
>
>   http://marc.theaimsgroup.com/?l=php-general&m=105842231927001&w=2
>
> > Anybody have any ideas or links please tell me.
>
> Frisk the usual suspects for ready made code:
>
> freshmeat.net
> sourceforge.net
> www.phpclasses.org
> www.zend.com
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> The moon is a planet just like the Earth, only it is even deader.
> */
>
>
> --
> 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] creating search

2003-07-24 Thread Ryan A
Hi everyone,
I think i have read about this on the list before...or someone i'm sure must
have had the same problem.
I have a couple of tables, some with pretty large amount of fields (48 or
more) is there anyway to automatically create search forms after looking at
the database? or anyone have any ideas?

Cheers,
-Ryan


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



[PHP] funny output

2003-07-25 Thread Ryan A
Hi everyone,
I am having some funny output and funny things happening to my scripts since
I changed hosts...
my login scripts were working fine before but now they dont seem to
work...also there is a hidden text box appearing in the
code that i didnt write...this is it:


Also notice that it ends with a slash that I didnt have anything to do with.
Any ideas on why this is happening? you can have a look at the php info for
this site at:
http://bestwebhosters.com/phpinfo.php

Kindly reply,
-Ryan





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



Re: [PHP] funny output

2003-07-25 Thread Ryan A
Hey,
Thanks for replying.

So how do i get my scripts working again? the authentication part was
working perfectly but now it just kicks me back to the login page...

plus it looks like I am unable to set sessions properly, and i suspect thats
why i am getting kicked back to the login page.

Kindly reply,
-Ryan


- Original Message -
From: "Chris Shiflett" <[EMAIL PROTECTED]>
To: "Ryan A" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, July 26, 2003 2:44 AM
Subject: Re: [PHP] funny output


> --- Ryan A <[EMAIL PROTECTED]> wrote:
> > I am having some funny output and funny things happening to my
> > scripts since I changed hosts...
> ...
> > there is a hidden text box appearing in the code that i didnt
> > write...this is it:
> >  > value="ad2e5a31727b2b4eb28b2d0c2d6ee67e" />
> >
> > Also notice that it ends with a slash that I didnt have anything
> > to do with.
>
> Your new host has session.use_trans_sid enabled, and perhaps your old one
did
> not.
>
> The slash at the end is XHTML compliant, which is how PHP tries to add
code (in
> case you care about XHTML compliance).
>
> Hope that helps.
>
> Chris
>
> =
> Become a better Web developer with the HTTP Developer's Handbook
> http://httphandbook.org/
>


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



Re: [PHP] funny output

2003-07-26 Thread Ryan A
Hi,
The first thing I checked was register_globals.they are on.
(http://www.bestwebhosters.com/phpinfo.php)

Any other ideas/suggestions?

Please help as I am hitting a total blank trying to find out where the
problem is.

Thanks,
-Ryan

- Original Message -
From: "Comex" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 26, 2003 8:22 AM
Subject: Re: [PHP] funny output


> Chris Shiflett wrote:
> > --- Ryan A <[EMAIL PROTECTED]> wrote:
> >
> >>So how do i get my scripts working again? the authentication part
> >>was working perfectly but now it just kicks me back to the login
> >>page...
> >>
> >>plus it looks like I am unable to set sessions properly, and i
> >>suspect thats why i am getting kicked back to the login page.
> >
> >
> > You're probably right.
> >
> > This is a wild guess, but I bet register_globals is disabled on your new
host.
> > Check the archives for lots of good information about what this means,
what you
> > need to do, etc. This question comes up weekly, so there should be
plenty of
> > information.
> >
> > Hope that helps.
> >
> > Chris
> >
> > =
> > Become a better Web developer with the HTTP Developer's Handbook
> > http://httphandbook.org/
> It's actually ENabled, from the link that he sent us.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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



Re: [PHP] funny output

2003-07-26 Thread Ryan A
Hi,
thanks for replying.
No, its looking for get, and globals is on.
This is my code:
*Start code*
5)
{include("my.top.php");
Print("Error: Plans not saved.You have not either not chosen a plan to
add to your MyList account or you have tried to add more than 5 plans at
a time to your MyList account.Please press your back button to correct
the problem.");
 include("my.bottom.php");
exit;
}

$connected=mysql_connect ("$hostt", "$userr", "$passs") or die ('I cannot
connect to the database because: ' . mysql_error());
mysql_select_db ("$db");


$my_user=$_SESSION['my_user'];
$my_ccno=$_SESSION['my_ccno'];


/* the below lines take the string (nname) from between the [] of the id[]
and the the value of the id[] (eg id[]=23 where 23 is the value) then
inserts it into the db thanks to John Holmes.
*/
foreach($id as $nname => $pppno)
{
$q="insert into mylist_slave
values('','$pppno','$nname','$type','$my_user',$my_ccno)";
  if(!($rs = mysql_query($q)))
  { echo "Query failed for ID: $r"; exit; }
}

   include("my.top.php");
   print("Data has been successfully entered.");
   include("my.bottom.php");
   exit;

?>

End Code*

This was working fineI just cant understand it.

Kindly reply,
-Ryan.



- Original Message -
From: "Curt Zirzow" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 26, 2003 4:05 PM
Subject: Re: [PHP] funny output


> * Thus wrote Ryan A ([EMAIL PROTECTED]):
> > Hi everyone,
> > I am having some funny output and funny things happening to my scripts
since
> > I changed hosts...
> > my login scripts were working fine before but now they dont seem to
> > work...also there is a hidden text box appearing in the
> > code that i didnt write...this is it:
> >  > value="ad2e5a31727b2b4eb28b2d0c2d6ee67e" />
>
> The login script is looking in the $_POST var correct?
>
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."
>
> --
> 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] Settings problem?

2003-07-26 Thread Ryan A
Hi,
below is my script which was working fine before and i have looked at the
code for the past 2 hours but still get this error:
"Parse error: parse error, unexpected $end in
c:\phpdev\www\bwh\project\my.details.php on line 84"

I am on localhost, win2k machine,PHP Version 4.3.1.

As you can see below it really a pretty simple script and line 84 is the
last line AFTER php terminates, Please help.
heres my code:

 Welcome, this is your "MyList" control panel.
  You may add/save all your favourite plans here for later comparision.
  You can add upto 5 plans at a time and edit, delete them as and when you
so
  wish.


 
Your
current list of saved plans are:
  
 
Shared:

  
  
Dedicated:

  
  
Reseller

  
  
CoLocation:

  
  
FreeHosting:

  
  
You have totally  plans saved. 

  


  If you have any questions use the "contact us" link at the side and we
will
  get back to you ASAP.
  
  Cheers,
  -The BWH team.




// This is line 84


What do you think is there problem? some settings in php.ini or something?

Cheers,
-Ryan


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



[PHP] Half solved...............what the @#%# is PHPSESSID?

2003-07-26 Thread Ryan A
Hi,
Ok, have half solved why my scripts all of a sudden stopped working.

This is how my scripts are setup:
There is a form(login.php) where the user puts in his user/pass, then this
is authenticated(auth.php) by the database and a few other sessions are
created (email,cust_number) and also username,password sessions are created.
Then i am using a header("Location") to send it to details.php,
details.php will check and make sure that the following sessions have been
created username,password,email,cust_number, if any are not valid it will
kick ther person back to login.php...this was working before but not now.

I went to my forms source and checked where it was sending my submitted form
and found a hidden text box there with this data:


so i took that "PHPSESSID" and its value and added it to my
header("Location") like so:
header("Location:details.php?PHPSESSID=46081aa70da693f5edeecc069ed8a627")

and every damn thing is working again...

can ANYBODY please tell me what the @#%# is that PHPSESSID, how it got into
my login page and how do i work with it?
because now I have manually put it in my file, do i need to always put it?
how do i get it as a variable and finally how can i take it out of my
computer and jump on it for causing me 5 hours of pain and suffering.any
ways of killing it slowly too is appreciated.

Even if you cant answer the first questions the last two will do, the
[EMAIL PROTECTED]@#%@ [EMAIL PROTECTED]@# PHPSESSID

Thanks in advance,
-Ryan


  -- No, I dont just sound
crazyI AM crazy. --


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



Re: [PHP] Half solved...............what the @#%# is PHPSESSID?

2003-07-26 Thread Ryan A
Hey,
Thanks for replying.

I know you can manipulate the php.ini file via htaccess or by putting some
instructions in the include file...is there any way to turn on cookies again
and turn off session.use_trans_sid so i can go back to the old way it was?
because I have a lot of header("location:") statements in a lot of
files.
This just seems a giant PITA.

Cheers,
-Ryan



> You have cookies disabled and session.use_trans_sid is enabled in
> php.ini. So the session module parses your html output and adds
> PHPSESSID to all internal links, forms and everything else that is
> needed. However it does not add session id to Location header, it is
> your responsibility. Use header('Location: details.php?'.SID); SID is a
> magic constant that contains '&'.session_name().'='.session_id() (thus
> you need ? after details.php).
>
> PHPSESSID is here so session module knows which session file to use. If
> you look into your /tmp (or whatever is set up) directory, a file named
> sess_46081aa70da693f5edeecc069ed8a627 will be sitting there with all
> session variables.
>
> Ryan A wrote:
>
> > Hi,
> > Ok, have half solved why my scripts all of a sudden stopped working.
> >
> > This is how my scripts are setup:
> > There is a form(login.php) where the user puts in his user/pass, then
this
> > is authenticated(auth.php) by the database and a few other sessions are
> > created (email,cust_number) and also username,password sessions are
created.
> > Then i am using a header("Location") to send it to details.php,
> > details.php will check and make sure that the following sessions have
been
> > created username,password,email,cust_number, if any are not valid it
will
> > kick ther person back to login.php...this was working before but not
now.
> >
> > I went to my forms source and checked where it was sending my submitted
form
> > and found a hidden text box there with this data:
> >  > value="46081aa70da693f5edeecc069ed8a627" />
> >
> > so i took that "PHPSESSID" and its value and added it to my
> > header("Location") like so:
> >
header("Location:details.php?PHPSESSID=46081aa70da693f5edeecc069ed8a627")
> >
> > and every damn thing is working again...
> >
> > can ANYBODY please tell me what the @#%# is that PHPSESSID, how it got
into
> > my login page and how do i work with it?
> > because now I have manually put it in my file, do i need to always put
it?
> > how do i get it as a variable and finally how can i take it out of my
> > computer and jump on it for causing me 5 hours of pain and suffering.any
> > ways of killing it slowly too is appreciated.
> >
> > Even if you cant answer the first questions the last two will do, the
> > [EMAIL PROTECTED]@#%@ [EMAIL PROTECTED]@# PHPSESSID
> >
> > Thanks in advance,
> > -Ryan
> >
> >
> >   -- No, I dont just
sound
> > crazyI AM crazy. --
> >
> >
>


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



Re: [PHP] Half solved...............what the @#%# is PHPSESSID?

2003-07-26 Thread Ryan A
Hey John,
I dont think its the browser because I have tried this with opera 6,opera 7,
IE and NN with the same results...
But when i checked the phpinfo() it says that cookies are enabledDo you
think its worth it to search and replace each Location header with .SID?

Thanks,
-Ryan



- Original Message -
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "Ryan A" <[EMAIL PROTECTED]>
Cc: "Marek Kilimajer" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, July 26, 2003 9:15 PM
Subject: Re: [PHP] Half solved...what the @#%# is PHPSESSID?


> Ryan A wrote:
>
> > I know you can manipulate the php.ini file via htaccess or by putting
some
> > instructions in the include file...is there any way to turn on cookies
again
> > and turn off session.use_trans_sid so i can go back to the old way it
was?
> > because I have a lot of header("location:") statements in a lot of
> > files.
>
> Your browser is not accepting the cookies... Or, your session module has
> been told not to use cookies. To enable cookies for the session module,
use:
>
> php.ini:
> session.use_cookies = 1
>
> .htaccess:
> php_value session.use_cookies 1
>
> If the value is already 1 or ON, then it's your browser causing the
> trouble.
>
> --
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> PHP|Architect: A magazine for PHP Professionals – www.phparch.com
>
>
>
>


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



[PHP] small request

2003-07-27 Thread Ryan A
Hi,
I want to find out if this is my browsers fault or the settings in my
php.ini, can you goto http://bestwebhosters.com/my.login.php then look at
the page source and tell me if there is a hidden variable after the form tag
with the name "PHPSESSID"

Thanks for helping.

Cheers,
-Ryan


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



Re: [PHP] Re: small request (done)

2003-07-27 Thread Ryan A
Hi,
Just wanted to say thank you to all those who tested and replied.
Thank you.

Cheers,
-Ryan

- Original Message -
From: "Shaunak Kashyap" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 27, 2003 4:35 PM
Subject: [PHP] Re: small request


> > I want to find out if this is my browsers fault or the settings in my
> > php.ini, can you goto http://bestwebhosters.com/my.login.php then look
at
> > the page source and tell me if there is a hidden variable after the form
> tag
> > with the name "PHPSESSID"
> >
>
> Yes.
>
> Shaunak
>
>
>
> --
> 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] Half solved......(conclusion)

2003-07-27 Thread Ryan A
Hi everyone,
Just in case you or anybody in the future (maybe reading the archive) come
accross the same problem here is how i have solved it and made all my
scripts run perfectly again as they were before.

I just created a .htaccess file and added these 2 lines since i dont have
direct access to the php.ini file:

php_value session.use_cookies 1
php_value session.use_trans_sid 0




(Based on John Holmes reply)

This will only affect the directory which you put this in of course.

I found that even though session.use_cookies was on the
session.use_trans_sid  was overriding it, I added the "php_value
session.use_cookies 1" just to make sure. I dont know if the overriding is
normal for everyone so check it out for youself if you have problems.

Below is my first message for this thread in case you are intrested.
Thank you everyone who replied.

Cheers,
-Ryan






> Hi,
> Ok, have half solved why my scripts all of a sudden stopped working.
>
> This is how my scripts are setup:
> There is a form(login.php) where the user puts in his user/pass, then this
> is authenticated(auth.php) by the database and a few other sessions are
> created (email,cust_number) and also username,password sessions are
created.
> Then i am using a header("Location") to send it to details.php,
> details.php will check and make sure that the following sessions have been
> created username,password,email,cust_number, if any are not valid it will
> kick ther person back to login.php...this was working before but not now.
>
> I went to my forms source and checked where it was sending my submitted
form
> and found a hidden text box there with this data:
>  value="46081aa70da693f5edeecc069ed8a627" />
>
> so i took that "PHPSESSID" and its value and added it to my
> header("Location") like so:
> header("Location:details.php?PHPSESSID=46081aa70da693f5edeecc069ed8a627")
>
> and every damn thing is working again...
>
> can ANYBODY please tell me what the @#%# is that PHPSESSID, how it got
into
> my login page and how do i work with it?
> because now I have manually put it in my file, do i need to always put it?
> how do i get it as a variable and finally how can i take it out of my
> computer and jump on it for causing me 5 hours of pain and suffering.any
> ways of killing it slowly too is appreciated.
>
> Even if you cant answer the first questions the last two will do, the
> [EMAIL PROTECTED]@#%@ [EMAIL PROTECTED]@# PHPSESSID
>
> Thanks in advance,
> -Ryan


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



[PHP] How is this possible?

2003-07-27 Thread Ryan A
Hi,
I am trying to get my data into a very similar layout as this:
http://hostfilter.com/ComparePlan.asp?IntVal1=389&IntVal2=546&IntVal3=605
see the table with the plans...how is he getting that in one table? what
kind of logic is that? the best I can do is for each column I have to use
another table (nested tables) but he has somehow managed to get all in
one... is this a special ASP thing?

This is my implemption of it:
http://bestwebhosters.com/compare.php?id%5B%5D=1&id%5B%5D=2&id%5B%5D=4&id%5B
%5D=5&id%5B%5D=13&type=1

Its much slower, because it uses more tables and nested tables...but its in
php :-)


I just cant understand it...any ideas?

Cheers,
-Ryan


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



Re: [PHP] How is this possible?

2003-07-27 Thread Ryan A
Hi,
Thanks for replying.

You say: Nothing special html wise.
then can you tell me how its done?

The content is dynamic being pulled from the database..how do i get it in
one table in that layout?

> There are different ways you can do this it could help to know what
> kind of data structure you have.

Heres the link again, you can see the datastructure (hopefully)
http://bestwebhosters.com/compare.php?id%5B%5D=1&id%5B%5D=2&id%5B%5D=4&id%5B
%5D=5&id%5B%5D=13&type=1

Kindly reply,
-Ryan


> * Thus wrote Ryan A ([EMAIL PROTECTED]):
> > Hi,
> > I am trying to get my data into a very similar layout as this:
> >
http://hostfilter.com/ComparePlan.asp?IntVal1=389&IntVal2=546&IntVal3=605
> > see the table with the plans...how is he getting that in one table? what
> > kind of logic is that? the best I can do is for each column I have to
use
> > another table (nested tables) but he has somehow managed to get all in
> > one... is this a special ASP thing?
>
> Nothing special html wise.
>
> >
> > This is my implemption of it:
> >
http://bestwebhosters.com/compare.php?id%5B%5D=1&id%5B%5D=2&id%5B%5D=4&id%5B
> > %5D=5&id%5B%5D=13&type=1
> I get an notice and and  error when I go there:
> Notice: Undefined variable: p5 in
> /home/bestweb/public_html/compare.php on line 65
>
> Query failed, ryan queryYou have an error in your SQL syntax. Check
> the manual that corresponds to your MySQL server version for the
> right syntax to use near 'order by plan_id' at line 1
>
> >
> > I just cant understand it...any ideas?
>
> There are different ways you can do this it could help to know what
> kind of data structure you have.
>
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."
>
> --
> 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] How is this possible?

2003-07-27 Thread Ryan A
Hey,
Thanks again.

It should take me around an hour or two just to figure out what you
wrote...:-D
I guess i have to hit the manual quite a bit.

Thanks,
-Ryan

> > Hi,
> > Thanks for replying.
>
> no probs...
>
> >
> > I have not worked with arrays much other than simple arrays like the
$_get
> > or $_post and the database ones...can you give me a another emample on
how
> > to do this please?
> > like how to put my db into an array and then call each part
> >
>
> sorry, i'm probably not the best person to give a full working example. my
> code works for me, but it's a little sloppy. check the php manual. look-up
> associative arrays.
>
> lets see if i can't give you a quick example tho...
>
> 
> $n = 0;
> $result = mysql_query( "SELECT id, title, text, date FROM news ORDER BY
date
> DESC" );
> while ($rows = mysql_fetch_array($result)) {
>   if( $rows == "" ){
>continue;
>   }
>   extract( $rows );   ///extract our result into variables named after our
> fields
>   $content[id][$n] = $id;
>   $content[title][$n] = $title;
>   $content[text][$n] = $text;
>   $content[date][$n] = $date;
>   $n++; //increment our number for next time...
>  }
>
> //this next bit is sloppy coz i'm just gonna make it up for an example
>
> print ""
> for( $c=0; $c<4; $c++ )   //4 coz there's 4 key fields
> {
> //print the id's
> print "";
> print "ID";
> for( $i=0; $i<$n; $i++ )
> print "".$content[id][$i]."";
> print "";
> //print the titles
> print "";
> print "TITLE";
> for( $i=0; $i<$n; $i++ )
> print "".$content[title][$i]."";
> print "";
> //print the text
> print "";
> print "TEXT";
> for( $i=0; $i<$n; $i++ )
> print "".$content[text][$i]."";
> print "";
> //print the date
> print "";
> print "DATE";
> for( $i=0; $i<$n; $i++ )
> print "".$content[date][$i]."";
> print "";
> }
> print "";
>
> ?>
>
> like i said, this isn't the most glamorous way of doing it, and you really
> should look this all up in the manual before trying it out. but if you run
> this code (and you have a db to back it up) you should get a table with
the
> format i think your after...
>
>
> >
> > Thanks,
> > -Ryan
> >
>
> no probs, hope my sloppy code helps you a little ;)
>
> -skate-
>
>


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



[PHP] Array help

2003-07-27 Thread Ryan A
Hi,
After asking for help on the list Skate gave me the following code as an
example:
**
$n = 0;
$result = mysql_query( "SELECT id, title, text, date FROM news ORDER BY date
DESC" );
while ($rows = mysql_fetch_array($result)) {
  if( $rows == "" ){  continue;  }
  extract( $rows );   ///extract our result into variables named after our
fields
  $content[id][$n] = $id;
  $content[title][$n] = $title;
  $content[text][$n] = $text;
  $content[date][$n] = $date;
  $n++; //increment our number for next time...
 }
**
My question is: is there anyway I can use a "select * from" to do the
same thing and then dump as usual to
$content[id][$n] = $id; $content[title][$n] = $title; instead of a "select
id, title, text, date" because in reality I don't have just these 4 fields
but 43 fields in one table that have to be taken. "Select *..." seems a much
easier way to get it

Am a newbie at associative arrays so kindly excuse.

Any suggestions/comments welcome or even links...I don't mind reading for
the next 2 hours or so to get this working.

Thanks,
-Ryan


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



[PHP] Jason Wong->Array help

2003-07-28 Thread Ryan A
Hey Jason,
Thanks for that bit of code, it was exactly what i was looking for.

For those of you curious or face the same problem:
After dumping the data into the array I am calling each part that i need via
 where "pname" in this case is the field
name and the 1 is for the second value.
(Damn, i love php, never worked with these kinds of arrays before and its
still a snap.)

one last question:
According to the script I am calling an include file...
eg:
if(r=2){include "blah1.php";}
elseif (r=3){include "blah2.php";}
and so on

now blah1,2,3 etc are mostly html code files with php in them.will this
slow down performance a lot and be much of a strain? the calling files are
not large...maybe around 12k each...The reason I choose to go this way of
course is for easier readibilty ,handleing and space management. Whats your
experience with this? good or bad?

Cheers,
-Ryan





- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 28, 2003 4:46 AM
Subject: Re: [PHP] Array help


> On Monday 28 July 2003 10:19, Ryan A wrote:
>
> > After asking for help on the list Skate gave me the following code as an
> > example:
> > **
> > $n = 0;
> > $result = mysql_query( "SELECT id, title, text, date FROM news ORDER BY
> > date DESC" );
> > while ($rows = mysql_fetch_array($result)) {
> >   if( $rows == "" ){  continue;  }
> >   extract( $rows );   ///extract our result into variables named after
our
> > fields
> >   $content[id][$n] = $id;
> >   $content[title][$n] = $title;
> >   $content[text][$n] = $text;
> >   $content[date][$n] = $date;
> >   $n++; //increment our number for next time...
> >  }
> > **
> > My question is: is there anyway I can use a "select * from" to do
the
> > same thing and then dump as usual to
> > $content[id][$n] = $id; $content[title][$n] = $title; instead of a
"select
> > id, title, text, date" because in reality I don't have just these 4
fields
> > but 43 fields in one table that have to be taken. "Select *..." seems a
> > much easier way to get it
>
> *** Untried and untested ***
>
>   $query = "SELECT * FROM table";
>   $result = mysql_query($query) or die("Query failed");
>   $n = 0;
>   while ($line = mysql_fetch_assoc($result)) {
> foreach ($line as $field => $value) {
>   $data[$field][$n] = $value;
> }
> $n++;
>   }
>   print_r($data);
>
> Season to taste.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> What one believes to be true either is true or becomes true.
> -- John Lilly
> */
>
>
> --
> 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] List Problems

2003-07-28 Thread Ryan A
Nope, I too have gotten a few of those and its a pain in the @ss.


- Original Message - 
From: "Curt Zirzow" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 28, 2003 7:26 PM
Subject: [PHP] List Problems


> Any body else getting a message back with subject like:
>  [ERR] Re: [PHP] subject of message.
> 
> With contents:
> 
> Transmit Report:
> 
>  To: [EMAIL PROTECTED], 402 Local User Inbox Full ([EMAIL PROTECTED])
> 
> 
> I tried contacting the list admin and posted a message here ealier
> this weekend about fixing this (ie unsubing him.)
> 
> Or am I the only one getting these bounced mail messages, meanwhile
> I'll just filter all the mail to /dev/null
> 
> Curt
> -- 
> :0
> * Return-Path: [EMAIL PROTECTED]
> /dev/null
> 
> -- 
> 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] Script Execution Time

2003-07-28 Thread Ryan A
Hi Radek,
This has been posted before...around once every 2 weeks I guess :-)...check
the archive or you will/may get flamed.
Cheers,
-Ryan


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



[PHP] wheres the problem?

2003-07-29 Thread Ryan A
Hi everyone,
Am confused about what the @#%# is happening to my scripts because this was
working yesterday, now i restarted my localhost machine and its not working
now moreand its real simple stuff as you see.

if(isset($id))
 {
 $result = count ($id);
echo $result;
echo $id[0]." ".$id[1]." ".$id[2]." ".$id[3]." ".$id[4];
 exit;
 }

then i am passing 2 id[]'s like so:
http://localhost/BWH/Project/compareTesting.php?PHPSESSID=431984b7b39946fd74
bf0b45b9771b54&id%5B2efwaf2%5D=20&id%5B2efwaf3%5D=21&type=1

/* ***
html code something like this:


* */

The output i am getting is:

2
Notice: Undefined offset: 0 in c:\phpdev\www\bwh\project\comparetesting.php
on line 39
Notice: Undefined offset: 1 in c:\phpdev\www\bwh\project\comparetesting.php
on line 39
Notice: Undefined offset: 2 in c:\phpdev\www\bwh\project\comparetesting.php
on line 39
Notice: Undefined offset: 3 in c:\phpdev\www\bwh\project\comparetesting.php
on line 39
Notice: Undefined offset: 4 in c:\phpdev\www\bwh\project\comparetesting.php
on line 39

Which is really strange as count is showing that id[] has 2 values

Wheres the problem?

one funny think i did notice (i dont know if its related) is that i am
calling
compareTesting.php  but it is giving me the notice/error for
comparetesting.php (note the upper case "T" in the first one)


-Ryan




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



[PHP] Sven->Re: [PHP] Re: wheres the problem?

2003-07-29 Thread Ryan A
Hi Sven,
Thanks for replying.

The problem is I need the values to be placed in seperate variables because
i am doing something like this:

if(isset($id[0]))
{$ppp1="plan_id=".$id[0];}
if(isset($id[1]))
{$ppp2="plan_id=".$id[1];}
if(isset($id[2]))
{$ppp3="plan_id=".$id[2];}
if(isset($id[3]))
{$ppp4="plan_id=".$id[3];}
if(isset($id[4]))
{$ppp5="plan_id=".$id[4];}

Any ideas?

thanks,
-Ryan




> Ryan A wrote:
> > Hi everyone,
> > Am confused about what the @#%# is happening to my scripts because
> > this was working yesterday, now i restarted my localhost machine and
> > its not working now moreand its real simple stuff as you see.
> >
> > if(isset($id))
> >  {
> >  $result = count ($id);
> > echo $result;
> > echo $id[0]." ".$id[1]." ".$id[2]." ".$id[3]." ".$id[4];
> >  exit;
> >  }
> >
> > then i am passing 2 id[]'s like so:
> >
>
http://localhost/BWH/Project/compareTesting.php?PHPSESSID=431984b7b39946fd74
> > bf0b45b9771b54&id%5B2efwaf2%5D=20&id%5B2efwaf3%5D=21&type=1
> >
> > /* ***
> > html code something like this:
> > 
> > 
> > * */
>
> hi ryan,
>
> from your html-form you get:
> $id = array(
> 'sh1' => '3',
> 'sh2' => '4',
> );
> (or something similar.)
>
> so there is no $id[0] and so on, but $id['sh1'].
>
> my suggestion:
> if(isset($id))
> {
> $result = count($id);
> echo $result;
> echo implode(' ', $id);
> exit;
> }
>
> hth SVEN
>
>
>
>
> --
> 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] Simple Array question

2003-07-29 Thread Ryan A
Hi,
If i am posting something like this from a form:
 
 

How do i get the value of id[]?
eg:
I dont want the "sh1" and "sh2", i just want the "3" and "4"

The reason i dont wan the sh1 and sh2 is those are dynamic and will be
changing, I just need the values (in this case 3 and 4) to do some
comparasion and assignment operations

Kindly reply.

Thank,
-Ryan


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



Re: [PHP] Re: Simple Array question

2003-07-29 Thread Ryan A
Hi,
Thanks for replying.
I tried that and have 2 numbers like so:




and tried to echo it like so:

Echo of one is  and echo of two is: 
Echo of one is  and echo of two is: 

the output i got was:
**
32563Echo of one is 5 and echo of two is: 6

Echo of one is and echo of two is:
*


AS you can see its totally wrong.Any other ideas?

cheers,
-Ryan


> Normally array values start at 0 (zero), but let's say sh1=1 and sh2=2.
then
> you could echo the values out like this: echo "ID 1: $id[1]ID 2:
> $id[2]";
>
> Irvin.





> > Hi,
> > If i am posting something like this from a form:
> >  
> >  
> >
> > How do i get the value of id[]?
> > eg:
> > I dont want the "sh1" and "sh2", i just want the "3" and "4"
> >
> > The reason i dont wan the sh1 and sh2 is those are dynamic and will be
> > changing, I just need the values (in this case 3 and 4) to do some
> > comparasion and assignment operations
> >
> > Kindly reply.
> >
> > Thank,
> > -Ryan
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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



[PHP] Re: Simple Array question (conclusion)

2003-07-29 Thread Ryan A
I GOT IT

this is where the data was coming from:
 
  

and this is where i take the values and dump it into an array/variables that
i can call when and where i please:

 $pppno)
{$asdf[$nn]=$pppno;
 $nn++;  }
?>




I just took out some of the breaks so it will take less space but you get
the idea.

Thank you to everyone who tried to help, but maybe i didnt explain the
problem well enough that you didnt get the answer or just didnt want to :-D

Cheers,
-Ryan



- Original Message -
From: "Irvin Amoraal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 29, 2003 11:59 PM
Subject: [PHP] Re: Simple Array question


> Normally array values start at 0 (zero), but let's say sh1=1 and sh2=2.
then
> you could echo the values out like this: echo "ID 1: $id[1]ID 2:
> $id[2]";
>
> Irvin.
> _
>
> "Ryan A" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi,
> > If i am posting something like this from a form:
> >  
> >  
> >
> > How do i get the value of id[]?
> > eg:
> > I dont want the "sh1" and "sh2", i just want the "3" and "4"
> >
> > The reason i dont wan the sh1 and sh2 is those are dynamic and will be
> > changing, I just need the values (in this case 3 and 4) to do some
> > comparasion and assignment operations
> >
> > Kindly reply.
> >
> > Thank,
> > -Ryan
> >
>
>
>
> --
> 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] John->Re: [PHP] Re: Simple Array question (conclusion)

2003-07-29 Thread Ryan A
Hey John,
I guess you are right, I do rely on this list quite a bit but am not the
only one.
Am learning by my mistakes though and finding solutions...they may not be
the best solutions but they still work, everyone has to learn.
Thanks for replying to the question though. And i didnt know about the
"array_values" thingsee? the more you reply to me the more i learn :-D
Cheers,
-Ryan



> Ryan A wrote:
>
> > I GOT IT
> >
> > this is where the data was coming from:
> >  
> >   
> >
> > and this is where i take the values and dump it into an array/variables
that
> > i can call when and where i please:
> >
> >  > $nn=0;
> > foreach($id as $nname => $pppno)
> > {$asdf[$nn]=$pppno;
> >  $nn++;  }
> > ?>
> > 
> > 
> >
> >
> > I just took out some of the breaks so it will take less space but you
get
> > the idea.
> >
> > Thank you to everyone who tried to help, but maybe i didnt explain the
> > problem well enough that you didnt get the answer or just didnt want to
:-D
>
> Seriously?
>
> You could just replace the above with:
>
> $asdf = array_values($_POST['id']);
>
> I think you need to be cut off from the list for a while. Trial by fire,
> I say!!
>
> --
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> PHP|Architect: A magazine for PHP Professionals – www.phparch.com
>
>
>
>


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



[PHP] Deleteing one session

2003-07-30 Thread Ryan A
Hi,
have around 20 sessions setup and want to delete one of them...
eg:
I have the following sessions:
one
two
three
four
five
etc
I want to delete "four", what should i use? am puzzled by the manual which
offers these two options:

unset($four);
session_unregister($four);

which is better? I am starting my sessions with this kind of statement:
$_SESSION['blah'] = $_GET['blah'];

Also any idea how many sessions I can have "on" at one time? or is there no
limit? I couldnt find anything on that in the manual.

Thanks,
-Ryan


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



[PHP] foreach help

2003-07-30 Thread Ryan A
Hi,
I have a set of checkboxes (around 38) which will be sent to me via a
post(eg: http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Where am i screwing up?

2003-07-31 Thread Ryan A
Hi,
I am just screwing around and getting used to arrays with a "foreach" thanks
to Michael,Jan and Evan from this list and have run into problems.

My requirment is pretty simple (code is below too)
1)unset all the sessions that might have been set with reference to the
hardcoded array ($vars)
2)if any checkboxes have been set from the previous form then set that
session
needless to say, its not working, am too new at this to know where my fault
is so any help is greatly appreciated.

I have even added a few comments as to what i was thinkingtell me if i
was wrong.

**Start code


End code

Thanks in advance,
-Ryan


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



[PHP] session not carrying...why?

2003-07-31 Thread Ryan A
Hi,
I seem to be setting the session properly but its not showing on the next
page...any idea why?
I am sending data to save.session.php via checkboxes like so:
..";
print_r($not_checked); //working
print_r("".$_SESSION['hide']['noPlatform']); //this prints 1
echo "".$_SESSION['hide']['noPrice']; //this prints 1

if (isset($_SESSION['hide']['noPlatform']))
{ echo "blah blah"; } // this is printing
else {echo "You are doing something wrong";}
?>

then in another page I have:




BestWebHosters.com - Compare 




.

and this gives me:
Notice: Undefined index: hide in
c:\phpdev\www\bwh\project\customize.shared.php on line 14
the value is:


What am i doing wrong?
I checked all my includes every last one of the have a session_start etc...

Please help.

Cheers,
-Ryan





We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com



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



  1   2   3   4   5   6   7   8   9   10   >