Re: [PHP] PHP Help

2009-06-02 Thread Bastien Koert
On Tue, Jun 2, 2009 at 12:33 AM, tRace DOliveira married...@yahoo.com wrote:

 I think that PHP is the best scripting language ever created...I'm currently 
 doing a study of PHP and I want to know how APC can be used to improve PHP 
 performance and how it can be implemented and also if there is some  other 
 alternative other than APC of improving PHP performance ? The problem that I 
 face is that as many requests are made the server is placed under alot of 
 pressure and cannot deal with it
 Thank you,
 Leonard D'Oliveira




memchaced
eAccelerator

custom caching scripts

opcode caching to cache bytecode

stfw
eAccelerator

--

Bastien

Cat, the other other white meat

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



Re: [PHP] PHP Help

2009-06-02 Thread Topbit
On Tue, Jun 2, 2009 at 5:33 AM, tRace DOliveira married...@yahoo.com wrote:
 I think that PHP is the best scripting language ever created...I'm currently 
 doing a study of PHP and I want to know how APC can be used to improve PHP 
 performance and how it can be implemented and also if there is some  other 
 alternative other than APC of improving PHP performance ? The problem that I 
 face is that as many requests are made the server is placed under alot of 
 pressure and cannot deal with it

A large part of the reason PHP is so good at what it does is that
scaling it up on a single, and then to multi-machine sites and from
there to even millions of users is a well understood path.

For APC, if you are running your own server and running a PHP site on
there, if you're not already running APC or a similar caching system
on there, you are just wasting CPU effort.

There are a number of websites already out there that demonstrate the
sort of caching and optimisations that can be performed on a LAMP
stack, both within PHP code (but the various micro-optimisations of
changing quotes and using one kind of array handling over another is
only useful at the most extreme end of optimisations - and if you
wonder if you need them - then you don't).  I'll be writing on the
topic of scaling on my blog soon as well, so it might be useful to
keep an eye on the in the next few weeks as well.

For now, http://google.com/search?q=scaling+PHP will give you a lot of
food for thought.

Topbit
http://topbit.co.uk/

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



Re: [PHP] PHP Help

2009-06-02 Thread Eddie Drapkin
There's a few things about your post I'd like to comment on.  One, if you're
not using APC, I definitely agree with the fact that you're just wasting
resources.  However, you mention micro-optimizations and say that they're
hardly useful, but in some cases it's a huge difference. ' vs.  is like a
0.1% speed difference or something equally negligible, but using
isset($foo['bar']) instead of in_array($foo, 'bar') is almost an exponential
speedup (it approaches that level of difference as the array size gets
larger and larger), so there are some definite good practices with common
fundamental structures that are worth paying attention to.  And finally, you
mention optimizing the LAMP stack, when the fact of the matter is the best
way to optimize that stack is to get rid of it.  Apache is huge and slow and
there are very fast and viable replacements for it (I use nginx, but a lot
of people are satisfied with lighttpd) and using either spawn-fcgi or fpm,
php concurrency can increase by as much as 50%.  And regarding MySQL,
installing XtraDB, Percona's enhanced InnoDB build with a whole boatload of
patches, is the easiest way to squeeze more performance out of MySQL.

To the OP, though, the point is that there is a definite scalability path
with regards to PHP and it's not something to really fret over, as there are
tons of documentation, talks, presentations, blog posts, strategies, etc to
achieve the most with PHP.  Although, in the end, PHP itself is rarely your
bottleneck, but instead the way you have your webserver setup bottlenecks
your clientele and the way you have your queries written bottlenecks your
server.  I don't want to say that PHP speed is negligible, but if you write
the world's worst PHP, but have an opcode cache and a fast DB implementation
(and a 100 ySlow score) no one is ever going to notice how bad your code is,
whereas someone else could write great code on a poorly performing site and
wind up in a much worse situation.

On Tue, Jun 2, 2009 at 10:20 AM, Topbit top...@gmail.com wrote:

 On Tue, Jun 2, 2009 at 5:33 AM, tRace DOliveira married...@yahoo.com
 wrote:
  I think that PHP is the best scripting language ever created...I'm
 currently doing a study of PHP and I want to know how APC can be used to
 improve PHP performance and how it can be implemented and also if there is
 some  other alternative other than APC of improving PHP performance ? The
 problem that I face is that as many requests are made the server is placed
 under alot of pressure and cannot deal with it

 A large part of the reason PHP is so good at what it does is that
 scaling it up on a single, and then to multi-machine sites and from
 there to even millions of users is a well understood path.

 For APC, if you are running your own server and running a PHP site on
 there, if you're not already running APC or a similar caching system
 on there, you are just wasting CPU effort.

 There are a number of websites already out there that demonstrate the
 sort of caching and optimisations that can be performed on a LAMP
 stack, both within PHP code (but the various micro-optimisations of
 changing quotes and using one kind of array handling over another is
 only useful at the most extreme end of optimisations - and if you
 wonder if you need them - then you don't).  I'll be writing on the
 topic of scaling on my blog soon as well, so it might be useful to
 keep an eye on the in the next few weeks as well.

 For now, http://google.com/search?q=scaling+PHP will give you a lot of
 food for thought.

 Topbit
 http://topbit.co.uk/

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




Re: [PHP] PHP Help Needed

2008-12-27 Thread Ashley Sheridan
On Sat, 2008-12-27 at 07:47 -0800, Ayemowa Toyin wrote:
 Hi,
 
 I am new to PHP and require your help regarding a PHP Script.  Below is what 
 I am tryin to achieve
 
 1.  I have created a FILE UPLOAD page that lets users Upload a FIle to the 
 site.  This and other details regarding the file stored in a MySQL Database.
 
 2.  I need to create a FILE DOWNLOAD page that will read details from the 
 MYSQL database for users to dwnload already uploaded files.  
 
 Your help will be most appricated.
 
 Thanks
 
 Toyin AYemowa
 UK
 
 
   
RTFM

http://www.php.net



Ash
www.ashleysheridan.co.uk


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



Re: [PHP] PHP Help Needed

2008-12-27 Thread Dotan Cohen
2008/12/27 Ashley Sheridan a...@ashleysheridan.co.uk:
 RTFM

 http://www.php.net


Or STFW
http://justfuckinggoogleit.com/search?q=php%20mysql%20file%20download%20script

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


Re: [PHP] PHP Help Needed

2008-12-27 Thread Daniel Brown
On Sat, Dec 27, 2008 at 10:47, Ayemowa Toyin ayemowa_to...@yahoo.co.uk wrote:
 Hi,

 I am new to PHP and require your help regarding a PHP Script.  Below is what 
 I am tryin to achieve

You require an RTFM and STFW session.
* http://php.net/
* http://google.com/

 1.  I have created a FILE UPLOAD page that lets users Upload a FIle to the 
 site.  This and other details regarding the file stored in a MySQL Database.

 2.  I need to create a FILE DOWNLOAD page that will read details from the 
 MYSQL database for users to dwnload already uploaded files.

If you've already created the UPLOAD page, then the more difficult
of the two tasks is done.  Chances are, you (or whomever wrote the
code for you) should know how to do #2 if you (or another) already did
#1, but if not:

http://www.google.com/search?q=php+mysql+file+download+script
http://www.joeclipart.com/blog/images/2007/06/20070628crack.jpg
http://www.phpbuilder.com/tips/item.php?id=5

-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!

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



Re: [PHP] PHP Help Needed

2008-12-27 Thread Dotan Cohen
2008/12/27 Daniel Brown danbr...@php.net:
If you've already created the UPLOAD page, then the more difficult
 of the two tasks is done.  Chances are, you (or whomever wrote the
 code for you) should know how to do #2 if you (or another) already did
 #1, but if not:

http://www.google.com/search?q=php+mysql+file+download+script
http://www.joeclipart.com/blog/images/2007/06/20070628crack.jpg
http://www.phpbuilder.com/tips/item.php?id=5


That was subtle :)

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


Re: [PHP] PHP Help Needed

2008-12-27 Thread John Corry
lol, Ashley!

Ayemowa,
http://www.google.com/search?q=becoming+a+programmerie=utf-8oe=utf-8aq=trls=org.mozilla:en-US:officialclient=firefox-a

You need to take your 2 steps below and break them down into smaller
steps...and smaller steps...and still smaller steps.

What PHP files will your application require?
Will there be forms?
What will the user interface look like?

Don't start with a 'PHP script'.

Start by defining in excruciating detail what your application is
going to do, how it will do it and then describe every little part
(variables, functions, models, views, controllers...whatever) that
will make it work.

Once you have that description, you can start to think about the code
by writing it's documentation.

Then, once you have the documentation, you can write code based on the
documentation...revising the docs as necessary.

It's a lengthy, complicated process that is going to demand a little
more of you than just reducing your app to 2 steps and asking a
mailing list how to do it.

Good luck, let us know how it goes and how we can help you take (much
smaller) steps.

John Corry

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



Re: [PHP] php help.

2008-07-20 Thread Jochem Maas

Jim Lucas schreef:

Belinda wrote:

Good morning

I have just been browsing the web for help with a php problem that is
driving me mad. I didn't want to post to the site so hope that this email
may get a response. I thank you in advance.

I am learning php myself(self-learning) but just can get me head 
around this

error.(lack of knowledge L)

 

With regard to [function.file-get-contents] can anyone explain this 
error to

me...please :-)

 


Warning:
file_get_contents(http://www.ecofriendz.com/groups/orca/?action=group_last_t 


opicsforum=Bea-Tropicaltrans=1) [function.file-get-contents]: failed to
open stream: Connection refused in
/home/sites/ecofriendz.com/public_html/inc/classes/BxDolGroups.php on 
line

419.

 


I cannot resolve this issue. any help will be gratefully appreciated.

 


With Kindest Regards

 


Belinda Marsh




sounds like you are not allowed to access URL on the internet.


this is indeed more likely than having missed quotes around the
URL (someone else mentioned that possibility).

chances are that Belinda's using shared hosting and that
allow_url_fopen is turned off server wide ... I'll bet money
the sys admins won't turn it on for her.

now the real question! why is code that blatantly belongs to
ecofriendz.com trying to grab output from a 'page script' that
exists in the same site ... it's just plain wrong to have site
screen scraping it's own output, the underlying data should be
retrieved from the datasource directly.

maybe you'd care to explain what it is your trying to achieve?




There is a setting within PHP that either allows or denies you the 
ability to access remote URLs like the one in your example.


You will need to make sure that in your php.ini configuration file that 
you have allow_url_fopen set to '1' and that it is not diabled.


Here is the page that references these settings:
http://us2.php.net/manual/en/ini.php#ini.list

It is the second one in the big list of things.  I noticed that they 
also added a new one as of v5.2.0   It is for the allow_url_include  You 
might need to do something with this also.  Not sure.


But, I would start with making sure that the allow_url_fopen is set to 
'1'. If you need to change the value, make sure that you restart your 
web server so the settings will take effect.


Hope this helps.




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



Re: [PHP] php help.

2008-07-19 Thread Venky K Shankar
On Saturday 19 July 2008 01:11:38 pm Belinda wrote:
 Good morning

 I have just been browsing the web for help with a php problem that is
 driving me mad. I didn't want to post to the site so hope that this email
 may get a response. I thank you in advance.

 I am learning php myself(self-learning) but just can get me head around
 this error.(lack of knowledge L)



 With regard to [function.file-get-contents] can anyone explain this error
 to me...please :-)



 Warning:
 file_get_contents(http://www.ecofriendz.com/groups/orca/?action=group_last_
t opicsforum=Bea-Tropicaltrans=1) [function.file-get-contents]: failed to
 open stream: Connection refused in
 /home/sites/ecofriendz.com/public_html/inc/classes/BxDolGroups.php on line
 419.

 i think you are missing   in the function :
 see below :
[EMAIL PROTECTED]:~/py php -r ' 
file_get_contents(http://www.ecofriendz.com/groups/orca/?action=group_last_t;);
 '
[EMAIL PROTECTED]:~/py

 the URL must be inside  





 I cannot resolve this issue. any help will be gratefully appreciated.



 With Kindest Regards



 Belinda Marsh




Re: [PHP] php help.

2008-07-19 Thread Jim Lucas

Belinda wrote:

Good morning

I have just been browsing the web for help with a php problem that is
driving me mad. I didn't want to post to the site so hope that this email
may get a response. I thank you in advance.

I am learning php myself(self-learning) but just can get me head around this
error.(lack of knowledge L)

 


With regard to [function.file-get-contents] can anyone explain this error to
me...please :-)

 


Warning:
file_get_contents(http://www.ecofriendz.com/groups/orca/?action=group_last_t
opicsforum=Bea-Tropicaltrans=1) [function.file-get-contents]: failed to
open stream: Connection refused in
/home/sites/ecofriendz.com/public_html/inc/classes/BxDolGroups.php on line
419.

 


I cannot resolve this issue. any help will be gratefully appreciated.

 


With Kindest Regards

 


Belinda Marsh




sounds like you are not allowed to access URL on the internet.

There is a setting within PHP that either allows or denies you the ability to 
access remote URLs like the one in your example.


You will need to make sure that in your php.ini configuration file that you 
have allow_url_fopen set to '1' and that it is not diabled.


Here is the page that references these settings:
http://us2.php.net/manual/en/ini.php#ini.list

It is the second one in the big list of things.  I noticed that they also 
added a new one as of v5.2.0   It is for the allow_url_include  You might need 
to do something with this also.  Not sure.


But, I would start with making sure that the allow_url_fopen is set to '1'. 
If you need to change the value, make sure that you restart your web server so 
the settings will take effect.


Hope this helps.

--
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare


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



RE: [PHP] PHP help Quotations, Quotations, Quotations

2005-03-11 Thread stg
Thanks a lot for that, I am really grateful, now it sends along the link
properly, which is great, however it is now having trouble converting spaces
to %20 and it does it for some and not others, eg

It does this:
http://localhost/knewsl/NewsletterName.pdf

When it should be:
http://localhost/knewsl/Newsletter%20Name.pdf

Cheers,
Simon


-Original Message-
From: Stephen Johnson [mailto:[EMAIL PROTECTED] 
Sent: Friday, 11 March 2005 1:32 PM
To: stg
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP help Quotations, Quotations, Quotations

http://www.php.net/stripslashes


On Mar 10, 2005, at 9:17 PM, stg wrote:

 Hello,



 I am having a small issue with posting from forms;



 It goes like such:



 I have a form in which a user can type in a message and in a hidden 
 text
 field a link is sent, then in the page the form goes to it sends and 
 email
 to a mailing list with the message and a link underneath bottom.



 However when I submit a hyperlink in a form like

 input type=hidden name=link value=a
 href=http://localhost/knewsl/?php echo $row_Recordset1['path']; ? 



 It is received in the next page with a \ before everyfor 
 example:

 a href=\http://localhost/knewsl/file.pdf\;Click here to view
 newsletter/a -  Which obviously doesn't work.



 I would be most grateful if anyone could help.



 Cheers,

 Simon


*
Stephen Johnson
[EMAIL PROTECTED]
http://www.thelonecoder.com

--continuing the struggle against bad code--
*

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

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



Re: [PHP] PHP help Quotations, Quotations, Quotations

2005-03-11 Thread Jason Barnett
Stg wrote:
 Thanks a lot for that, I am really grateful, now it sends along the link
 properly, which is great, however it is now having trouble converting spaces
 to %20 and it does it for some and not others, eg

 It does this:
 http://localhost/knewsl/NewsletterName.pdf

 When it should be:
 http://localhost/knewsl/Newsletter%20Name.pdf

...

urlencode()

http://php.net/manual/en/function.urlencode.php

--
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins


signature.asc
Description: OpenPGP digital signature


Re: [PHP] PHP help Quotations, Quotations, Quotations

2005-03-10 Thread Stephen Johnson
http://www.php.net/stripslashes
On Mar 10, 2005, at 9:17 PM, stg wrote:
Hello,

I am having a small issue with posting from forms;

It goes like such:

I have a form in which a user can type in a message and in a hidden 
text
field a link is sent, then in the page the form goes to it sends and 
email
to a mailing list with the message and a link underneath bottom.


However when I submit a hyperlink in a form like
input type=hidden name=link value=a
href=http://localhost/knewsl/?php echo $row_Recordset1['path']; ? 

It is received in the next page with a \ before everyfor 
example:

a href=\http://localhost/knewsl/file.pdf\;Click here to view
newsletter/a -  Which obviously doesn't work.

I would be most grateful if anyone could help.

Cheers,
Simon

*
Stephen Johnson
[EMAIL PROTECTED]
http://www.thelonecoder.com
--continuing the struggle against bad code--
*
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] php-help

2005-03-09 Thread Lars B. Jensen
The manual to the rescue
http://jp2.php.net/stripslashes
There is alot of good information in the manual, think it would benefit you 
alot going through some of it, especially the central chapters

--
Lars B. Jensen, Internet Architect
CareerCross Japan
Japan's premier online career resource for english speaking professionals
http://www.careercross.com
- Original Message - 
From: K Karthik [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Thursday, March 10, 2005 4:01 PM
Subject: [PHP] php-help


sir,
i'll explain my problem.and if anyone could help me i'll be thankful.
i am displaying a content read from a file into a text area of a form.
when i make changes andretrieve back in the text area, i encounter a 
problem..
i.e., when i enter text=please enter
i have an outputas text= / please enter/
thanks,
kkarthik

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

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


Re: [PHP] php-help

2005-03-08 Thread Frank Arensmeier
Hi,
MySQL is capable of doing very complex queries. You could boil down 
your query into just one single line:

'SELECT * FROM table1, table2 WHERE table2.field2 = table1.field1'
A good starting point would be the MySQL manual.
I would also strongly recommend you to take a look at the PHP manual 
for information about connecting to a MySQL database from PHP, gaining 
results and processing these results.

If you could post some PHP code to this list, I am sure members of this 
list will gladly help you with debugging the code.

Regards,
Frank
2005-03-08 kl. 11.26 skrev K Karthik:
sir,
iam new to php i'll explain my problem .if u could help i'll be very 
thankful...
in my mysql database i have two tables  i.e., table1  and table2.
 i have an array of result from one query  select feild1 from table1 
i have to use this result in another query.
select field2 from table 2 where field1 = (array of first query 
iterated)
can u help me doing this in php.
thanks,
karthik


Frank Arensmeier
Marketing Support
NIKE HYDRAULICS AB
Box 1107
631 80 Eskilstuna
Sweden
tel +46 16 82 34
fax +46 16 13 93 16
email: [EMAIL PROTECTED]
www.nikehydraulics.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] php-help

2005-03-08 Thread John Nichel
K Karthik wrote:
sir,
iam new to php i'll explain my problem .if u could help i'll be very 
thankful...
in my mysql database i have two tables  i.e., table1  and table2.
 i have an array of result from one query  select feild1 from table1 
i have to use this result in another query.
select field2 from table 2 where field1 = (array of first query iterated)
can u help me doing this in php.
thanks,
karthik

This isn't PHP.  Check the MySQL manual.  You can construct your query 
to select from both tables at the same time, so chances are you don't 
need to get data from one table just so you can use that to retrieve 
data from another table.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] php-help

2005-03-08 Thread Lars B. Jensen
The following should be pretty selfexplanatory
* 0 * * * /usr/local/bin/php /usr/local/www/cron/sync.php
--
Lars B. Jensen, Internet Architect
CareerCross Japan
Japan's premier online career resource for english speaking professionals
http://www.careercross.com
- Original Message - 
From: K Karthik [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Wednesday, March 09, 2005 3:48 PM
Subject: [PHP] php-help


hello sir,
i am so happy about the immiediate response for any of my question.
i would like to create a static html page.
using cronjob regenerate it every 24 hours.
how can i do it using php.
thanks,
kkarthik
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

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


Re: [PHP] php-help

2005-03-01 Thread Burhan Khalid
K Karthik wrote:
dear friends,
can u help me to find the current directory where my php files are..  
using php.
echo dirname($_SERVER['PHP_SELF']);
Please, read the manual and search the archives.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] [php] -help me

2005-02-18 Thread Tyler Replogle
$str_array = explode(/, /home/karthik/welcome.php/view.php);
// $str_array[4] shoud be view.php
From: K Karthik [EMAIL PROTECTED]
To: php-general@lists.php.net
Subject: [PHP] [php] -help me
Date: Fri, 18 Feb 2005 11:20:29 +0530
MIME-Version: 1.0
Received: from lists.php.net ([216.92.131.4]) by MC8-F21.hotmail.com with 
Microsoft SMTPSVC(6.0.3790.211); Thu, 17 Feb 2005 21:49:59 -0800
Received: from ([216.92.131.4:8115] helo=lists.php.net)by pb1.pair.com 
(ecelerity 1.2 (r4437)) with SMTPid CA/4E-28819-70285124 for 
[EMAIL PROTECTED]; Fri, 18 Feb 2005 00:49:59 -0500
Received: (qmail 87241 invoked by uid 1010); 18 Feb 2005 05:49:25 -
Received: (qmail 87119 invoked by uid 1010); 18 Feb 2005 05:49:22 -
X-Message-Info: JGTYoYF78jHVyuGSbP1BO8du3qnIwzSNq7BOh4Qcf90=
Return-Path: [EMAIL PROTECTED]
X-Host-Fingerprint: 216.92.131.4 lists.php.net  Mailing-List: contact 
[EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: mailto:[EMAIL PROTECTED]
list-unsubscribe: mailto:[EMAIL PROTECTED]
list-post: mailto:php-general@lists.php.net
Delivered-To: mailing list php-general@lists.php.net
Delivered-To: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
X-Host-Fingerprint: 203.193.155.110 alps.manageengine.org Linux 2.4/2.6
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) 
Gecko/20040913
X-Accept-Language: en-us, en
X-OriginalArrivalTime: 18 Feb 2005 05:50:00.0026 (UTC) 
FILETIME=[AEF42BA0:01C5157D]

i have got string as /home/karthik/welcome.php/view.php
i just need view.php how shall i remove rest of the string.
please do help me.i am new to php.
-thanks,
karthik
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] [php] -help me

2005-02-18 Thread M. Sokolewicz
Tyler Replogle wrote:
$str_array = explode(/, /home/karthik/welcome.php/view.php);
// $str_array[4] shoud be view.php
From: K Karthik [EMAIL PROTECTED]
To: php-general@lists.php.net
Subject: [PHP] [php] -help me
Date: Fri, 18 Feb 2005 11:20:29 +0530
MIME-Version: 1.0
Received: from lists.php.net ([216.92.131.4]) by MC8-F21.hotmail.com 
with Microsoft SMTPSVC(6.0.3790.211); Thu, 17 Feb 2005 21:49:59 -0800
Received: from ([216.92.131.4:8115] helo=lists.php.net)by pb1.pair.com 
(ecelerity 1.2 (r4437)) with SMTPid CA/4E-28819-70285124 for 
[EMAIL PROTECTED]; Fri, 18 Feb 2005 00:49:59 -0500
Received: (qmail 87241 invoked by uid 1010); 18 Feb 2005 05:49:25 -
Received: (qmail 87119 invoked by uid 1010); 18 Feb 2005 05:49:22 -
X-Message-Info: JGTYoYF78jHVyuGSbP1BO8du3qnIwzSNq7BOh4Qcf90=
Return-Path: [EMAIL PROTECTED]
X-Host-Fingerprint: 216.92.131.4 lists.php.net  Mailing-List: contact 
[EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: mailto:[EMAIL PROTECTED]
list-unsubscribe: mailto:[EMAIL PROTECTED]
list-post: mailto:php-general@lists.php.net
Delivered-To: mailing list php-general@lists.php.net
Delivered-To: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
X-Host-Fingerprint: 203.193.155.110 alps.manageengine.org Linux 2.4/2.6
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) 
Gecko/20040913
X-Accept-Language: en-us, en
X-OriginalArrivalTime: 18 Feb 2005 05:50:00.0026 (UTC) 
FILETIME=[AEF42BA0:01C5157D]

i have got string as /home/karthik/welcome.php/view.php
i just need view.php how shall i remove rest of the string.
please do help me.i am new to php.
-thanks,
karthik
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
or use basename()
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] [php] -help me

2005-02-17 Thread Bret Hughes
On Thu, 2005-02-17 at 23:50, K Karthik wrote:
 i have got string as /home/karthik/welcome.php/view.php
 i just need view.php how shall i remove rest of the string.
 please do help me.i am new to php.
 -thanks,
 karthik
 

Lets see if you can learn to fish.

Since you are new you should learn that one of the greatest resources in
all of opensource software is the php.net documentation.

try entering php.net/searchterm in the browser
ie: php.net/filename

hmm looks like there is a function called basename you might want to
look at.

The manual has all functions arranged by functional area ( eg
filesystem)

I can't tell you enough what a powerful resource this was to me a a
beginning php programmer and remains so to this day.

Bret

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



Re: [PHP] PHP Help

2005-01-08 Thread tr
TonyC  wrote / napísal (a):
I have used Dreamweaver 4.0 for editing my html files and love its 
'design view; so I know exactly what the file looks like before I 
upload to the server. We currently now are incorporating a shopping 
cart into our site and the files are in 'php' format. When I open a 
'php' file in Dreamweaver in 'design mode' it looks nothing like the 
page does on the web. How do I view it so it looks the way an 'html' 
file does in 'design mode'.  Or, another program that can do what I 
need is fine too.  Thanks.

Deb Curiale

Probably cause php is interpreted by the php interpreter
and try not to think of it like about html.
Try to look in the browser  through the webserver like 
http://localhost/dir/some.php

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


Re: [PHP] php help for project!!

2002-11-05 Thread Khalid El-Kary
hi,

check the PHP Manual about MySQL functions:

http://www.php.net/manual/en/ref.mysql.php

you can also check for HTML forms (including checkboxes) here:

http://www.w3schools.com/html/html_forms.asp

and tables (for the reports):

http://www.w3schools.com/html/html_tables.asp

if you face a particular problem, send here again

khalid



_
Unlimited Internet access for only $21.95/month.  Try MSN! 
http://resourcecenter.msn.com/access/plans/2monthsfree.asp


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



Re: [PHP] PHP --help

2002-05-01 Thread 1LT John W. Holmes

Use $_GET[fn] and $_GET[ln], or $_POST[], depending on your action.

Does anybody read the release notes for a product before you download and
install it? I'm just going to save a standard message that covers this
because I see questions like this continuing until everybody upgrades.

---John Holmes...

- Original Message -
From: Pelillo, Mark [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 30, 2002 6:13 PM
Subject: [PHP] PHP --help


 I have two linux boxes running Apache 2.0.35 with PHP 4.2.0RC4.  Sunday I
 did a bunch work from home on one system, moved to the second system and
 everything was working on both systems..  This morning I modifed one
section
 of code on the second system work and now I don't seem to get anything to
 work.  I went back to the old stuff that was working and nothing.  I have
 check the old code and the updated  code on system one and it is still
 working.

 So I went back to the basics.  I can execute phpinfo() without a
 problem, but if I try to use a simple form to pass variable from an html
 page to the php script, I don't get anything from the php script.

 Here is the simple html file:
 form action=scripts/insert-user.php method=GET
   table border=1 frame=box width=740 height=30
 tr
   td*First Name:
 input type=text name=fn size=40
   /td
   td*Last Name:
 input type=text name=ln size=40
   /td
 /tr
   /table
 input type=submit value=Submit
 /form

 The php script has the following lines
 ?php
 echo $fn;
 echo $ln;
 ?


 I have tried using both POST and GET.  At least with GET I see the url as
 insert-user.php?fn=markln=pelillo.  But the echo statements output
 nothing.


 Any thoughts??

 Mark Pelillo




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




Re: [PHP] PHP --help

2002-05-01 Thread CC Zona

In article 002b01c1f115$7ae52790$2f7e3393@TB447CCO3,
 [EMAIL PROTECTED] (1lt John W. Holmes) wrote:

 Use $_GET[fn] and $_GET[ln], or $_POST[], depending on your action.
 
 Does anybody read the release notes for a product before you download and
 install it? I'm just going to save a standard message that covers this
 because I see questions like this continuing until everybody upgrades.

Since there are still people using PHP3, that could be a very looong 
time.

-- 
CC

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




Re: [PHP] PHP Help

2002-03-02 Thread Greg Donald

On Sat, 2 Mar 2002, Josiah Wallingford wrote:

I do not know very much about MySql or PHP but need to build a pretty
complex database and script I need a program like (I hate to say this)
Front Page or UltraDev that will allow me to do it visually I am on a
Mac but can run the software on a PC I hate Front Page so I hope nobody
says that Anybody know of anything like that? I have the whole project
in my head and can explain it in detail if I need to If this program is
written in php that would be awsome!
Thanks

Are you looking to hire someone?

PHP is a scripting language, and as such you'll have a hard time finding a
gui editor that can do everything you need done  Everytime I see or
hear about a new PHP editor, I go check it out  And in every case
so far, after a few hours or less, I find myself uninstalling it and going
back to using vim and editplus

Learn the code or hire someone, not much way around it else

-- 
---
Greg Donald - http://destineycom/
http://phpratedcom/ | http://phplinksorg/ | http://phptopsitescom/
---



-- 
PHP General Mailing List (http://wwwphpnet/)
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP] PHP Help

2002-03-02 Thread Keith

You aren't going to be able to build a php application with frontpage or
any other WYSIWYG HTML editor. You are going to have to type it out, the
PHP that is. If this is something that you need done right away, I suggest
you hire an experienced PHP programmer. If you don't know much about MySQL
or PHP you aren't going to be able to build anything worthwhile, at least
not in the next 3 months.

 On Sat, 2 Mar 2002, Josiah Wallingford wrote:

 I do not know very much about MySql or PHP but need to build a pretty
 complex database and script. I need a program like (I hate to say this)
 Front Page or UltraDev that will allow me to do it visually. I am on a
 Mac but can run the software on a PC. I hate Front Page so I hope nobody
 says that. Anybody know of anything like that? I have the whole project
 in my head and can explain it in detail if I need to. If this program is
 written in php that would be awsome!
 Thanks.




-- 
K E I T H  V A N C E
Software Programmer
http://www.vanceconsulting.net
[EMAIL PROTECTED]


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




Re: [PHP] PHP Help Requested

2002-02-16 Thread Greg Donald

 I have a template stored in a database which contains variables.  Then,
 in a separate file, I have the variables set, and I call the template and
run
 it through eval().  Unfortunately, it only is parsing a few of them.
Could
 somebody take a look and give me some input?

Here's what my template table looks like:

CREATE TABLE templates (
  id tinyint(4) unsigned NOT NULL auto_increment,
  name varchar(16) NOT NULL default '',
  template text NOT NULL,
  PRIMARY KEY  (id),
  UNIQUE KEY name (name)
)

Then here is my template function that preps the data for use with eval():

function template($name, $set=main){
global $tb_templates;
$sql = 
 select
  *
 from
  $tb_templates
 where
  name = '$name'
;
if($query = sql_query($sql)){
 if(sql_num_rows($query)==1){
  $array = sql_fetch_array($query);
  $template = str_replace(\\',',addslashes($array[template]));
 } else {
  $template = $name .  template not found.;
 }
}
return $template;
}

Then here is how to use eval() properly:

$template_name = template(template_name);
eval(\$template_name = \$template_name\;);

This will parse all your $vars you store in the templates.



Greg Donald - http://destiney.com/
http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/





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




Re: [PHP] php help needed, is there a bright spark out there!

2002-02-06 Thread DL Neil

Hello hamish,
[msg converted from HTML to simple-text format]

I have been asked to do a project that seems to be baffling me. It's not really the 
php which is the hard part,
but the mathematical problem behind the project that is causing me to have a headache! 
...


=This reminds me of the test-problems we were given at Uni - in fact one of my 
contracts (was self-supporting
not a scholarship student) was to support a post-grad student doing exactly this sort 
of thing - the routing of
milk tankers around farm pick ups and delivering to a network of factories.

=Sadly I have difficulty remembering that far back... What is my name again?

=The issues of least-path, network analysis or even linear programming are discussed 
(big time) in Operations
Research text books. Factory layout is a fairly 'standard' problem. A visit to a 
decent Uni/mgmt/technical
library should give you a bunch of models and formulae to play with!

=Regards,
=dn



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




Re: [PHP] PHP Help required

2001-12-04 Thread Dan McCullough

I can help, send me an email.
For some reason I cant send directly to you from my account.


--- MrBaseball34 [EMAIL PROTECTED] wrote:
 I would like to know if someone could help create:
 
 (All mySQL Tables already created)
 1. A Registration page. Needed fields:
 UID
 UserName
 UserPwd
 UserLevel
 EmailAddr
 TeamName (select box loaded from a TeamNames Table)
 
 2. A login page whereby a user enters UserName and UserPwd
 and gets redirected to form to fill in scores for baseball games.
 
 3. Will select game from games list (loaded from Games Table) 
ordered by user's teamname. Scores page (already done) to be stored 
in Games table.  

Games Table Fields:
  GameID
  GameNum
  GameDate
  HomeTeam
  HomeScore
  VisitorTeam
  VistorScore
  Field
  Division
 
 4. Then when the score is entered for the game that was selected, 
we will then update the standings (Standings Table), depending 
upon who won the game.

Standings Table Fields:
  ID
  TeamName
  Wins
  Losses
  Ties
  Points (3 points for win and 1 point for tie) {we allow ties}
  Division
 
 The Standings table will already be populated with 0 wins, 0 losses, 
  0 ties and 0 points
 The Games Table will already be populated with the season schedule.
 The Teams Table will already be populated with the TeamNames and 
  Divisions.
 I already have the Scores page HTML done. I am beginning to work on 
 the Storing of the scores to the Games Table and updating the Standings. 
 I just need help with the Registration and Login pages.
 
 I am also currently modifying XMBForum to use on our site, listed below, 
 to replace an EZBoard. It is a very good opportunity to learn PHP, too.
 
 Mind you, that I am a somewhat new PHP user but I have done programming 
 before in Clipper, VB, Delphi, ColdFusion and several others. This project 
 will have to go online by 3/31. Our season usually starts the first 
 weekend of April. I will need some testing time to test and debug anything 
 that is written.
 
 What would you require to participate in this project?
 
 Regards,
 Eddie Shipman (MrBaseball34 on XMBForum.com forums)
 Austin Metro Baseball League
 http://www.austinmetrobaseball.com
 
 -- 
 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]
 


=
dan mccullough

Theres no such thing as a problem unless the servers are on fire!


__
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

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




Re: [PHP] php help probably basic (used stripslashes but probably not the right way to do it)

2001-09-10 Thread David Robley

On Tue, 11 Sep 2001 14:20, Lance Rochelle wrote:
 I am having the following problem.
 I have a database that is setup as follows

 CREATE TABLE test (
   id tinyint(4) NOT NULL auto_increment,
   text text NOT NULL ,
   PRIMARY KEY  (id)
 ) TYPE=MyISAM;

 I have a page after a form that confirms all data to be entered the
 html is as follows

 text=\test \'ve\
 id=1
 form action=./commitcard.php 
 input type=hidden name=text value=\test I\'ve\

If this isn't in an echo statement you shouldn't be escaping the double 
quotes here. That should look more like

input type=hidden name=text value=test I\'ve

other wise what is seen is
input type=hidden name=text value=\

 input type=hidden name=id value=1
 input type=submit name=submit value=Commit to database!
 /form

 however in the next page I am doing a print of the insert statement for
 testing and all I get is the following
 insert into test (id,text) values ('1','\')

 I have tried the following
 $test = stripslashes($test);

  but it just gets worse any ideas would be helpful

 I am using php 4.0.6, apache 1.3.20, mysql 3.23.42, and Linux kernel
 2.4.3


 Lance Rochelle
 [EMAIL PROTECTED]
 http://ulands.idlegames.com
 (607) 775-2681
 ---
 Being a Systems Administrator is like
 hitting yourself in the bead with a brick.
 After a while you don't feel the pain.
 

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Not a real tagline, but an incredible soy substitute.

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