|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 2 Dec 2003 08:58:14 -0000 Issue 2449
php-general-digest-help
lists.php.net
Date: Tue Dec 02 2003 - 02:58:14 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 2 Dec 2003 08:58:14 -0000 Issue 2449
Topics (messages 171493 through 171548):
Re: string
171493 by: Matt Matijevich
Re: replace a chunk peace of string
171494 by: Curt Zirzow
171497 by: ada
171504 by: Curt Zirzow
PHP Community Site - Volunteers Needed
171495 by: Chris Shiflett
Re: date() function doesn't seem to work right...
171496 by: Curt Zirzow
header("Location: page.php") not redirecting
171498 by: rogue
171500 by: Curt Zirzow
171502 by: Chris Shiflett
171507 by: rogue
171509 by: Chris Shiflett
171513 by: rogue
171515 by: Chris Shiflett
171516 by: Curt Zirzow
171519 by: Chris W. Parker
171526 by: Tom Rogers
171529 by: Richard Davey
question regarding subclasses, is this possible to do
171499 by: Luke
171505 by: Curt Zirzow
Error message trying to include a file
171501 by: Matthias Wulkow
171503 by: Matthias Wulkow
171506 by: Curt Zirzow
Re: dhtml/css/javascript help
171508 by: Dan McCullough
Search and Replace with WinWord and COM Objects?
171510 by: jon
Refreshing in forms using post
171511 by: Matt Grimm
171514 by: Marek Kilimajer
171530 by: Richard Davey
Re: random question generation
171512 by: Justin French
[Stats] PHP Net List: November 2003
171517 by: Bill Doerrfeld
171518 by: David T-G
171521 by: Bill Doerrfeld
Re: Does anyone have Upload meter php codes?
171520 by: Raditha Dissanayake
Re: Optimizing PHP Relevancy Ranking Algorithm
171522 by: Raditha Dissanayake
Re: HTML_Progress -- how do I actually use this now?!
171523 by: Daevid Vincent
Variable in $_FILES?
171524 by: Dimitri Marshall
171527 by: Dimitri Marshall
171532 by: Kelly Hallman
12 seconds!?!?
171525 by: Comex
Working as a PHP/database developer..
171528 by: Video Populares et Optimates
171531 by: Richard Davey
171533 by: Jason Sheets
171540 by: Justin French
171541 by: Joshua D. Drake
Picture Width and Height in $_FILES
171534 by: Dimitri Marshall
171535 by: Richard Davey
Please please help - very very urgent
171536 by: Manisha Sathe
171537 by: Robert Cummings
171538 by: Chris Shiflett
171542 by: Manisha Sathe
Re: Important notice
171539 by: David Robley
function array problems
171543 by: Steve Turner
htaccess / PHP
171544 by: Ed Lazor
171545 by: Ed Lazor
171546 by: Jason Wong
171547 by: Ashley M. Kirchner
Generate automatic list of dates
171548 by: Tommi Virtanen
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
<snip>
Name|17|5|7|12|26|8|4|0|2|0|40|12.50|3|33.30|19 it should 16 pieces.
Any
thoughts on how I can get it to cut off at the 19, one thing that I
should say
is 19 is value that can change.
</snip>
Can't you just use the explode function?
http://www.php.net/manual/en/function.explode.php
attached mail follows:
* Thus wrote ada (david_devidal
yahoo.fr):
> select hex("a
> ")
> ->
> 610D0A
> always 0D0A at the ends :(
>
> I' m on windows, and i didn't manage to destroy this peace of string :(
> trim() doesn't work ...
What do you mean trim() doesn't work?
Curt
--
If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP
attached mail follows:
> What do you mean trim() doesn't work?
trim is a basic function that remove spaces on the left and the right at the
string :
" abc "->"abc"
attached mail follows:
* Thus wrote ada (david_devidal
yahoo.fr):
> > What do you mean trim() doesn't work?
>
> trim is a basic function that remove spaces on the left and the right at the
> string :
> " abc "->"abc"
trim() removes more than spaces, please read:
http://php.net/trim
What I meant in my original post was how are you using trim() that
doesn't make it work? trim() *will* fix your problem.
Curt
--
If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP
attached mail follows:
PHP has one of the largest developer communities in the world, yet we have
no community gathering place like those you can find for other languages
(Perl has http://use.perl.org/, for example).
Want to help change this? Read on. Don't care? Click delete. :-)
I am coordinating the development of a Web site that is built by and for
the PHP community. Its features will include such things as:
1. Personal blogs for all registered users
2. Frequent community news and user comments (Slashdot style)
3. Weekly summaries of key mailing lists (such as php-general)
4. Weekly summaries of other news from related communities
5. News from various user groups (such as NYPHP)
6. Links, FAQs, articles, tutorials, and other helpful documentation
More importantly, the features will be driven by the needs of the
community and not any one person. This list is just an example of the most
common features found on other community sites.
Will this site seek to eliminate other PHP sites that offer one or more of
these features already? Absolutely not. My hope is to help bring the
community together, both the people in the community as well as all
related Web sites.
I have spoken with O'Reilly, and they have agreed to support us in this
endeavor with servers, bandwith, administration, and anything else we
need. All we have to do is provide the people to develop and maintain the
site and its content.
You don't have to be an expert to help out. I need people to fill the
following roles (multiple people can fill the same role and a single
person can fill multiple roles):
1. Site management and global vision
2. Coding standards creation and software architecture
3. Security audits and general guidance
4. Weekly summary of php-general
5. Weekly summary of php-internals
6. Weekly summary of general community news
7. News item selection and posting (users can submit suggested news)
8. Database design
9. Software development (PHP, Perl, etc.)
10. PHP user group representatives (updated news from your group)
11. Content writers (FAQs, articles, tutorials, etc.)
12. Graphic designers, user interface specialists, etc.
13. Translators
There are likely many other roles to be filled. If you think you can help
out a lot, please consider the first role, site management and global
vision. If you want to help but don't feel like you fit into any specific
role, don't worry about it (any help is very much appreciated).
There will be mailing lists, CVS, and other tools available to assist in
the creation of this site. More information about these things will be
given to those who are interested in being involved.
Please send me an email at shiflett
php.net if you are willing to help.
Mention where you are interested in helping and any information about
yourself that you think is important. This information is not intended to
determine whether anyone is "worthy" or any silliness like that, but it is
rather to help organize the contributors so that everyone is doing
something they enjoy.
Thanks for your attention.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security Handbook
Coming mid-2004
HTTP Developer's Handbook
http://httphandbook.org/
attached mail follows:
* Thus wrote Scott Fletcher (scott
abcoa.com):
> When I do this script, I didn't get a ":" and numbers in second.
> --snip--
> date("Y-m-d H:i:s");
> --snip--
>
works fine with phpversion() 4.2.2
Curt
--
If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP
attached mail follows:
Hi all,
I have this in a template:
$redirect = "viewclient.php?id={$_REQUEST['id']}&foo=bar";
header("Location: $redirect");
Only, nothing happens when this code is executed. Nothing. It gets
completely ignored.
I even tried:
$redirect = "viewclient.php?id={$_REQUEST['id']}&foo=bar";
echo $redirect;
header("Location: $redirect");
to try and throw an error, but all that happens is the value of
$redirect gets sent to the screen and then rest of the page is
displayed. I know the code block is getting executed, but I have no
idea WHY the header() function is not doing its job.
Any thoughts? Please CC me on the post since I am on the digest.
Thanks
attached mail follows:
* Thus wrote rogue (rogue
mail.rightcode.net):
>
> $redirect = "viewclient.php?id={$_REQUEST['id']}&foo=bar";
> header("Location: $redirect");
>
> Only, nothing happens when this code is executed. Nothing. It gets
> completely ignored.
>
> I even tried:
>
> $redirect = "viewclient.php?id={$_REQUEST['id']}&foo=bar";
> echo $redirect;
> header("Location: $redirect");
You're error_reporting is too low, set it to something like:
error_reporting(E_ALL);
before the header() call
Curt
--
If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP
attached mail follows:
--- rogue <rogue
mail.rightcode.net> wrote:
> $redirect = "viewclient.php?id={$_REQUEST['id']}&foo=bar";
> header("Location: $redirect");
>
> Only, nothing happens when this code is executed.
I would try two things, in this order:
1. Use a full URL. A Location header is defined in the specification as
taking a full URL as an argument. You are using a relative one, which is
incorrect.
2. Replace your header call with an echo. Basically, rather than
header("Location: $redirect") use echo "Location: $redirect" instead. This
might reveal typos or other problems that are more difficult to inspect
when in the HTTP headers instead of the content.
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security Handbook
Coming mid-2004
HTTP Developer's Handbook
http://httphandbook.org/
attached mail follows:
Okay. I reworked the code a bit, but still no go.
Here is what I have:
$redirect = "http://" . $_SERVER['HTTP_HOST'] .
"/cm/clients/viewclient.php?id={$_REQUEST['id']}&foo=bar";
error_reporting(E_ALL);
echo "Location: $redirect";
header("Location: $redirect");
I get NO errors at all :(
It was my understanding that the only thing I needed to worry about
breaking this, would be if there was some output before the header().
There is not, but there are some variables getting set etc.
Anyone else think of anything?
Thanks
On Dec 1, 2003, at 4:48 PM, Chris Shiflett wrote:
> --- rogue <rogue
mail.rightcode.net> wrote:
>> $redirect = "viewclient.php?id={$_REQUEST['id']}&foo=bar";
>> header("Location: $redirect");
>>
>> Only, nothing happens when this code is executed.
>
> I would try two things, in this order:
>
> 1. Use a full URL. A Location header is defined in the specification as
> taking a full URL as an argument. You are using a relative one, which
> is
> incorrect.
>
> 2. Replace your header call with an echo. Basically, rather than
> header("Location: $redirect") use echo "Location: $redirect" instead.
> This
> might reveal typos or other problems that are more difficult to inspect
> when in the HTTP headers instead of the content.
>
> Hope that helps.
>
> Chris
>
> =====
> Chris Shiflett - http://shiflett.org/
>
> PHP Security Handbook
> Coming mid-2004
> HTTP Developer's Handbook
> http://httphandbook.org/
attached mail follows:
--- rogue <rogue
mail.rightcode.net> wrote:
> $redirect = "http://" . $_SERVER['HTTP_HOST'] .
> "/cm/clients/viewclient.php?id={$_REQUEST['id']}&foo=bar";
> error_reporting(E_ALL);
> echo "Location: $redirect";
> header("Location: $redirect");
I meant to try using a full URL first, then use echo if it still doesn't
work. :-) This shouldn't work as it is, because you have output prior to
your header call.
But, since you already tried this, what did the echo output? Did it look
correct? Comment that out, and see what happens.
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security Handbook
Coming mid-2004
HTTP Developer's Handbook
http://httphandbook.org/
attached mail follows:
hi again,
echo looks fine (no error in the URL). I am stumped. Is there anything
besides output to the screen before header() that breaks it?
thanks
On Dec 1, 2003, at 5:13 PM, Chris Shiflett wrote:
> --- rogue <rogue
mail.rightcode.net> wrote:
>> $redirect = "http://" . $_SERVER['HTTP_HOST'] .
>> "/cm/clients/viewclient.php?id={$_REQUEST['id']}&foo=bar";
>> error_reporting(E_ALL);
>> echo "Location: $redirect";
>> header("Location: $redirect");
>
> I meant to try using a full URL first, then use echo if it still
> doesn't
> work. :-) This shouldn't work as it is, because you have output prior
> to
> your header call.
>
> But, since you already tried this, what did the echo output? Did it
> look
> correct? Comment that out, and see what happens.
>
> Hope that helps.
>
> Chris
>
> =====
> Chris Shiflett - http://shiflett.org/
>
> PHP Security Handbook
> Coming mid-2004
> HTTP Developer's Handbook
> http://httphandbook.org/
attached mail follows:
--- rogue <rogue
mail.rightcode.net> wrote:
> echo looks fine (no error in the URL). I am stumped. Is there
> anything besides output to the screen before header() that breaks
> it?
I'm sure there are lots of things, but I can't think of why your code
would not work. You did remove the echo before trying again, right? Can
you show us the exact output of the echo call?
A more reliable way to see what is going on is to view the actual HTTP
response your script is generating. Do you have a way to examine this?
There is a Mozilla plugin that can show you the HTTP, and there is also
things such as ethereal which can sniff your network traffic. This would
show you whether the proper Location header is actually being sent in the
response.
I suspect it is not, as I'm not aware of any browser that doesn't handle
this header correctly.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security Handbook
Coming mid-2004
HTTP Developer's Handbook
http://httphandbook.org/
attached mail follows:
* Thus wrote rogue (rogue
mail.rightcode.net):
> Okay. I reworked the code a bit, but still no go.
>
> Here is what I have:
>
> $redirect = "http://" . $_SERVER['HTTP_HOST'] .
> "/cm/clients/viewclient.php?id={$_REQUEST['id']}&foo=bar";
> error_reporting(E_ALL);
> echo "Location: $redirect";
> header("Location: $redirect");
hmm...
- add a ini_set('display_errors', true);
- check your logs, apache and php
That code is throwing an warning somewhere.
Curt
--
If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP
attached mail follows:
rogue <mailto:rogue
mail.rightcode.net>
on Monday, December 01, 2003 2:39 PM said:
> echo looks fine (no error in the URL). I am stumped. Is there anything
> besides output to the screen before header() that breaks it?
Create a file with only the following code and see what happens.
<?php
header("Location: http://www.google.com/");
?>
Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/
attached mail follows:
Hi,
Tuesday, December 2, 2003, 7:17:58 AM, you wrote:
r> Hi all,
r> I have this in a template:
r> $redirect = "viewclient.php?id={$_REQUEST['id']}&foo=bar";
r> header("Location: $redirect");
r> Only, nothing happens when this code is executed. Nothing. It gets
r> completely ignored.
r> I even tried:
r> $redirect = "viewclient.php?id={$_REQUEST['id']}&foo=bar";
r> echo $redirect;
r> header("Location: $redirect");
r> to try and throw an error, but all that happens is the value of
r> $redirect gets sent to the screen and then rest of the page is
r> displayed. I know the code block is getting executed, but I have no
r> idea WHY the header() function is not doing its job.
r> Any thoughts? Please CC me on the post since I am on the digest.
r> Thanks
Try adding exit; after the header call.
--
regards,
Tom
attached mail follows:
Hello rogue,
Monday, December 1, 2003, 10:39:02 PM, you wrote:
r> echo looks fine (no error in the URL). I am stumped. Is there anything
r> besides output to the screen before header() that breaks it?
Other than browser incompatibility, not usually.
You can use the following to determine if a header has been sent
without you perhaps realising it (an extra space before a PHP tag
perhaps)
<?
if (!headers_sent()) {
header ('Location: http://www.google.com/');
exit;
}
?>
Ideally you should exit after the header is finished.
--
Best regards,
Richard mailto:rich
launchcode.co.uk
attached mail follows:
Hi, i was wondering if the last line of the following code is possible
somehow (the second last works perfect) but say i wanted to automatically
get the id (or anything else for that particular window) would it be
possible? or would i have to include a new function in windows called setID
or something like that?
----------------php code-----------------------------
<?php
class house{
var $windows;
function house(){
$this->windows = new windows();
}
function getSize(){
return "Big House";
}
}
class windows{
var $id;
function windows($id = "all"){
$this->id = $id;
}
function showID(){
echo "<br>ID: " . $this->id;
}
}
$test = new house();
echo $test->getSize() . "<br>\n\n";
$test->windows->showID();
$test->windows("Window3")->showID();
?>
-------------------end php code--------------
I could always have $test->windows->setID($id) then display the properties
for that current window, but it would be sumpler if i could use
$test->windows($id)->showID() and if no var is there, show all...any ideas
on how to do this?
Thanks heaps
Luke
attached mail follows:
* Thus wrote Luke (webmaster
build3d.com.au):
>
> $test->windows->showID();
> $test->windows("Window3")->showID();
> ?>
> -------------------end php code--------------
You might want to read:
http://php.net/oop
Curt
--
If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP
attached mail follows:
Hi php-general,
I have an array filled with urls of javascript files and then I
include them one by one in a loop.
for( $i = 0 ; $i < sizeof($this->page->javascript) ; $i++ ){
include($this->page->javascript[$i]);
//This line above is line 52 shown on error warning
}
When I had only two files to include it worked. Now I added a third
and I get following error message:
Notice: Undefined offset: 2 in /usr/local/www/ViewPageClass.php on line 52
Warning: writehead() [function.writehead]:
Failed opening '' for inclusion (include_path='.:/usr/local/lib/php')
in /usr/local/www/ViewPageClass.php on line 52
I don't really know what to do,the function writehead doesn't seem to
exist... the javascript file is
http://pajhome.org.uk/crypt/md5/md5.js. I suppose it's free of
errors...
SvT
--
Who is the ennemy?
attached mail follows:
Hi php-general,
sorry for the post before, forget the sentence about the writehead
function. It means writeHead() (error Warning doesn't seem to be case
sensitive...). It's the name of my method... :-(
But it has nothing to do with the error itself...
SvT
--
Who is the ennemy?
attached mail follows:
* Thus wrote Matthias Wulkow (elektrik
gmx.net):
>
> I have an array filled with urls of javascript files and then I
> include them one by one in a loop.
>
> for( $i = 0 ; $i < sizeof($this->page->javascript) ; $i++ ){
>
> include($this->page->javascript[$i]);
> //This line above is line 52 shown on error warning
> }
what does print_r($this->page->javascript) yield?
you'd be better off with a loop like:
foreach($this->page->javascript as $file_to_include) {
include($file_to_include);
}
Curt
--
If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP
attached mail follows:
This is a bit offtopic. I need someone who is good at
javascriptt/dhtml/css to help me with a piece of a project, I'm at the end
of
my rope and hoping I dont slip.
I wont go into detail here but you can contact me at
mccul2
mccullough-net.com
The project is a small menu project with categories and subcategories.
Serious inquires only. Ive had enough of people wasting my time.
thanks
dan
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
attached mail follows:
Hey folks...
Hopefully, I'm not the only person out there trying this stuff... but I
haven't been able to find much documentation. I'm trying to do basic
search and replace with Word XP, but am not having any success...
The basics work -- I can connect via com, write some stuff, save a file,
etc... but when it comes to the actual search and replace, it gets ugly.
Here's my sample code:
<?php
$word = new COM("word.application") or die("Unable to instantiate
Word");
print "Loaded word version ($word->Version)\n";
$word->visible = true;
$word->Documents->Add();
$word->Selection->Typetext("This is a test");
$word->Selection->Typetext(" 123");
$word->Selection->Find->ClearFormatting();
$word->Selection->Find->Execute
("test","pain",True,'wdFindContinue',False,False,False,False,False,False
);
$word->Documents[1]->SaveAs("c:\wordTest\Useless test5.doc");
?>
Here's the output I get:
Loaded word version (10.0)
Warning: (null)(): Invoke() failed: Exception occurred. Source:
Unavailable Description: Unavailable in C:\Program Files\Apache
Group\Apache2\htdocs\wordFix.php on line 11
Any help would be greatly appreciated...
-- jon
-------------------
jon roig
web developer
email: jon
trafficdesigns.com
phone: 888.230.7557
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.544 / Virus Database: 338 - Release Date: 11/25/2003
attached mail follows:
Suppose I have a form. Upon submission, the metadata is posted to a
processing script (a separate PHP file), which parses it and then sends the
user back to a particular page using the header function. If said user
clicks their browser's back button, the aforementioned processing script
will re-parse that post data and create a duplicate record. How can I
prevent this? Cache control?
Thanks,
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: mgrimm
healthtvchannel.org
Web: www.healthtvchannel.org
attached mail follows:
What header are you using? If you use Location header, this should not
happen.
Matt Grimm wrote:
> Suppose I have a form. Upon submission, the metadata is posted to a
> processing script (a separate PHP file), which parses it and then sends the
> user back to a particular page using the header function. If said user
> clicks their browser's back button, the aforementioned processing script
> will re-parse that post data and create a duplicate record. How can I
> prevent this? Cache control?
>
> Thanks,
> --
> Matt Grimm
> Web Developer
> The Health TV Channel, Inc.
> (a non - profit organization)
> 3820 Lake Otis Parkway
> Anchorage, AK 99508
> 907.770.6200 ext. 686
> 907.336.6205 (fax)
> E-mail: mgrimm
healthtvchannel.org
> Web: www.healthtvchannel.org
>
attached mail follows:
Hello Matt,
Monday, December 1, 2003, 10:31:23 PM, you wrote:
MG> Suppose I have a form. Upon submission, the metadata is posted to a
MG> processing script (a separate PHP file), which parses it and then sends the
MG> user back to a particular page using the header function. If said user
MG> clicks their browser's back button, the aforementioned processing script
MG> will re-parse that post data and create a duplicate record. How can I
MG> prevent this? Cache control?
There is no 100% reliable method of controlling the cache of any
browser. Why not, in your processing script, set a flag or issue
something to the users session to the effect of "already submitted
this form". Then if they do click back and submit it all again you can
check for the existence of this value and give them a nice friendly
error message ("Thanks for your enthusiasm, but you've already done
this!") :)
--
Best regards,
Richard mailto:rich
launchcode.co.uk
attached mail follows:
On Tuesday, December 2, 2003, at 02:01 AM, Frank Tudor wrote:
> I am building an application that has course material and one of
> the requirments is that questions related to course material pop
> up randomly in relation to the question bank and to time.
>
> So if there are 15 pages in a section and four questions need to
> populate somewhere after page 1 before the end of the section
> what would you guys use to do this.
>
> The questions and answers will be in a database.
>
> Also a question on page 4 can't be asked on page 1.
>
> The questions will not pop up like a javascript event but lay
> seeded between the pages it will either happen based on
> randomization or not.
>
> Anybody been down this road before?
Well, there's many topics here, including page generation, templating,
etc etc, but I'll stick to the one in the subject -- random questions.
Store your questions in a database (eg MySQL), and also store the page
which they relate to. Your table might look like this:
id,question,answer,page_id
In which case, when it comes time to ask a question after page 3, you
can use MySQL's RANDOM() function to retrieve 4 questions:
SELECT * FROM questions WHERE page_id=3 ORDER BY RAND() LIMIT 4
You probably need to take notice of the question id and put it in a
hidden form element, so that you know which answer to look for on the
next page:
$sql = "SELECT answer FROM questions WHERE id={$_POST['something']}";
Seems easy enough -- what else do you need help with?
Justin French
attached mail follows:
----------------------------------------------------------------------
Searchable archives for this list are available at
<http://www.listsearch.com/phplist.lasso>
----------------------------------------------------------------------
======================================================================
PHP Net List Stats
November, 2003
======================================================================
Note: Up/Down % as compared with October, 2003
Posts: 3184 (Down 15%)
Authors: 558 (Down 6%)
Threads: 757 (Down 9%)
Top 20 Contributors by Number of Posts
----------------------------------------------------------------------
Jay Blanchard 146
Chris Shiflett 131
Marek Kilimajer 109
David T-G 95
John Nichel 86
Burhan Khalid 71
John W. Holmes 70
Jason Wong 68
Eugene Lee 68
CPT John W. Holmes 63
Chris W. Parker 61
Robert Cummings 51
Raditha Dissanayake 47
Curt Zirzow 39
Kim Steinhaug 38
Wouter van Vliet 38
Scott Fletcher 35
Jake McHenry 33
pete M 33
- Edwin - 29
Top 20 Threads by Number of Posts
----------------------------------------------------------------------
[PHP] Add Reply-To to this list(s) 82
[PHP] Include an encoder into PHP distribution? 34
[PHP] High bandwidth application tips 28
[PHP] BTML 2.0 released!!! 27
[PHP]
and <br> 22
[PHP] Can't fetch HTTP POST data in PHP? 21
[PHP] Sessions within new windows 20
[PHP] Japanese character validation 18
[PHP] help create community newbie guide to security 18
[PHP] Microsoft .NET arguement 18
[PHP] echo or print 18
[PHP] msession - giving me a hard time 17
[PHP] Removing security-problematic chars from strings 17
[PHP] DAMN 16
[PHP] JavaScript question 15
[PHP] location= Construct Doc 14
[PHP] stepping through alphabet 14
[PHP] Why is the php loop, 'for()', so slow???? 14
[PHP] strpos() act funny when searching for "]]>".... 14
[PHP] Locking mysql tables with PHP 14
Top 20 Search Terms by Number of Requests
----------------------------------------------------------------------
imagemagick 2
pear 1
bbedit 1
file 1
write 1
--
---------------------------------------------------------------------
Bill Doerrfeld bill
blueworld.com
Blue World Communications, Inc. http://www.blueworld.com/
---------------------------------------------------------------------
Build and serve powerful data-driven Web sites
with Lasso Studio and Lasso Professional.
attached mail follows:
Bill --
...and then Bill Doerrfeld said...
%
...
% November, 2003
...
%
% Top 20 Threads by Number of Posts
% ----------------------------------------------------------------------
...
% [PHP]
% and <br> 22
[snip]
Tee hee -- you should validate your input and beware of "newline exploits",
even in the Subject: line! We should have a "worst interpreted subject"
contest (and if we all talk about it enough it'll make it onto this list
at the end of December ;-)
HAND
:-D
--
David T-G * There is too much animal courage in
(play) davidtg
justpickone.org * society and not sufficient moral courage.
(work) davidtgwork
justpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
iD8DBQE/y9c7Gb7uCXufRwARAtR3AKC6qIyoYdcdqYQAYxZRTeGXmxxUSACgiXZJ
2/sxKdE6J4TSUGk02m/bRh8=
=1a1Q
-----END PGP SIGNATURE-----
attached mail follows:
At 7:05 PM -0500 12/1/03, David T-G wrote:
>Bill --
>
>...and then Bill Doerrfeld said...
>%
>...
>% November, 2003
>...
>%
>% Top 20 Threads by Number of Posts
>% ----------------------------------------------------------------------
>...
>% [PHP]
>% and <br> 22
>[snip]
>
>Tee hee -- you should validate your input and beware of "newline exploits",
>even in the Subject: line! We should have a "worst interpreted subject"
>contest (and if we all talk about it enough it'll make it onto this list
>at the end of December ;-)
Thanks for bringing this to our attention. I'll forward this to the
appropriate person here to resolve. Feel free to send along any
additional comments/suggestions to listsearch
blueworld.com. Thanks.
--
---------------------------------------------------------------------
Bill Doerrfeld bill
blueworld.com
Blue World Communications, Inc. http://www.blueworld.com/
---------------------------------------------------------------------
Build and serve powerful data-driven Web sites
with Lasso Studio and Lasso Professional.
attached mail follows:
Megaupload does not reply on DHTML.
And sorry guys i have given the wrong link in the prev message. the
correct one is
http://www.raditha.com/megaupload/
Duncan Hill wrote:
>On Thursday 27 November 2003 18:21, Ryan A wrote:
>
>
>>>http://pear.php.net/package/HTML_Progress
>>>
>>>
>>Very nice,
>>But seems to have a problem with Netscape Communicator 4.75
>>
>>
>
>Quote: Your browser should accept DHTML feature.
>
>Last I checked, Netscape 4.x weren't very good at that.
>
>
>
>
attached mail follows:
What david says +
you have a nested loop, that means the running time is propotional to
the square of the number of inputs. - I haven't looked too hard either.
David Otton wrote:
>On Fri, 28 Nov 2003 03:26:08 -0800, you wrote:
>
>
>
>>Anybody got a few ideas on how to speed up these two sluggish lines of
>>code? I'm pretty much out of ideas. And if you have any other
>>suggestions to speed things up, I would really appreciate them too.
>>
>>
>
>I know nothing about your application, and I haven't looked too hard at your
>code.
>
>Having said that, you're not actually displaying 20,000 results on the page
>at one time, are you? And even if you did, what user is going to go check
>what hit no. 14,879 was? Most of your sort-processing is wasted.
>
>Pass over the array once, throwing away everything with a low relevancy.
>Then do your sort. If the user does decide to delve further into the
>results, then you can shuffle more of the abandoned stuff back in. But 99%
>of your users won't go past the first three pages, and you've saved yourself
>a vast amount of processor time.
>
>
>
attached mail follows:
I was very excited when I saw this link and the examples on the site. So
I've downloaded all the files and installed them all. Now I don't know what
to do with it or how to use it!?
The package doesn't have any humanly useable tutorials or quick start or
even a text file describing how I would put this in a web page of my own
site. Instead it seems to force me to use phpDocumentor to build the
corresponding .html files. Ugh!
So, I went through the extremely tedious process of (installing
phpDocumentor and) building the options.ini and stylesheet.css file with a
directory path that gave me carpal-tunnel...
"PEAR\data\PhpDocumentor\phpDocumentor\Converters\HTML\frames\templates\DOM\
earthli\templates\media\stylesheet.css"
Then I deciphered what the heck the author's README file meant to come up
with thiis magic incantation which he could have just typed out and said,
"run this command", or better yet, a shell script that builds the above dir
path, copies the files and runs the below commands.
phpdoc -f /usr/local/lib/php/HTML/Progress.php -d
/usr/local/lib/php/HTML/Progress -po HTML_Progress -o
HTML:frames:DOM/earthli -t /tmp/Progress/
Then trying to get what would appear to be the thing I need to actually use
this tool -- the tutorial -- I get an error that doesn't give any indication
of what file to look at to fix.
phpdoc -f /usr/local/lib/php/HTML/Progress.php -d
/usr/local/lib/php/HTML/Progress/tutorials -po HTML_Progress -o
HTML:frames:DOM/earthli -t /tmp/Progress/
Parsing configuration file phpDocumentor.ini...
done
using experimental tokenizer Parser
directory: '' not found
The website doesn't give a single tutorial (or example that I could copy and
change)...
http://pear.laurent-laville.org/HTML_Progress/apidoc/
http://pear.laurent-laville.org/HTML_Progress/examples/
And the progress maker bombs out at the end after you go through 5 tabs of
options.
http://pear.laurent-laville.org/HTML_Progress/examples/ProgressMaker.php
Could someone PLEASE tell me how to use this seemingly useful class? And I
guess, before we even started, what I want to do is query a mySQL database
every second and use the results to show the progress bar, without reloading
the web page. Can that be done with this project, or did I just waste a day?
Excuse my frustration please, but this seems way more complicated than it
should be. But perhaps that's the way PEAR is and since I've never used it,
I've been blissfully ignorant building my own things.
Daevid Vincent
http://daevid.com
> -----Original Message-----
> From: Burhan Khalid [mailto:phplist
meidomus.com]
> Sent: Thursday, November 27, 2003 2:47 AM
> To: Astron of BrOnX; php-general
lists.php.net
> Subject: Re: [PHP] Does anyone have Upload meter php codes?
>
> Astron of BrOnX wrote:
> > Hi everyone, i am looking for upload meter progress bar
> codes. I have looked
> > up arround and the most of them needs for patching PHP to get upload
> > variables. And also they are for Linux. I have need a
> solution for windows.
> > It can be a extra DLL file for PHP but i dont know how i can find?
>
> http://pear.php.net/package/HTML_Progress
>
> --
> Burhan Khalid
> phplist[at]meidomus[dot]com
> http://www.meidomus.com
> -----------------------
> "Documentation is like sex: when it is good,
> it is very, very good; and when it is bad,
> it is better than nothing."
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Hi there,
This is what I'm trying to do:
$pic = $_FILES['object$objectNumber'];
$picName = $pic['name'];
$pictmp = $pic['tmp_name'];
$objectNumber is being defined, but for some reason this code won't work.
Can someone tell me why and also what I can do to make it work?
Thanks in advance,
Dimitri Marshall
attached mail follows:
Just to answer my own question, but for reference for anyone else who has
this problem, I made a simple error (not very experienced with PHP). Anyway,
turns out that 'object$objectNumber' is different than 'object'$objectNumber
and also different that just $objectNumber. As most of you know, putting ' '
around a variable makes PHP print it out exactly like that (ie.
'$objectNumber' = $objectNumber in PHP) whereas I just wanted the variable
properties to actually be put into the $_FILES function (or whatever it is).
I couldn't figure out how to put 'object'$objectNumber together so I just
changed it to simply $objectNumber, so it now works.
This is what the code is now:
$file = $_FILES{$objectNumber};
$fileName = $file['name'];
$filetmp = $file['tmp_name'];
... and everything works.
Dimitri Marshall
"Dimitri Marshall" <webmaster
dyntdesign.com> wrote in message
news:20031202004839.86219.qmail
pb1.pair.com...
> Hi there,
> This is what I'm trying to do:
>
> $pic = $_FILES['object$objectNumber'];
> $picName = $pic['name'];
> $pictmp = $pic['tmp_name'];
>
> $objectNumber is being defined, but for some reason this code won't work.
> Can someone tell me why and also what I can do to make it work?
>
> Thanks in advance,
> Dimitri Marshall
attached mail follows:
On Mon, 1 Dec 2003, Dimitri Marshall wrote:
> This is what I'm trying to do:
> $pic = $_FILES['object$objectNumber'];
> $picName = $pic['name'];
> ...
> $objectNumber is being defined, but for some reason this code won't work.
> Can someone tell me why and also what I can do to make it work?
$_FILES["object$objectnumber"] will do it...
( or $_FILES['object'.$objectnumber] )
When you enclose a string in double quotes ("") PHP will interpolate
variables within the string, as you are trying to do.
When you enclose a string with '' it will be treated as a literal.
You may also consider "object{$objectnumber}" if you need to avoid
ambiguities with the rest of your string. I personally think it's a good
habit to use the curlies anyway, but I'm sure that's a matter of debate..
--
Kelly Hallman
// Ultrafancy
attached mail follows:
I have a script that replicates a human on a message board, and its logs
(logging in, going to inventory, etc.) occur every 12 (no more no less)
seconds. Do you know why?
function sendreq($addy,$type,$content = "",$cookie =
"",$useragent="------------",$host="-----------") {
$msg = strtoupper($type); // get or post
$msg .= " ";
$msg .= $addy;
$msg .= " HTTP/1.1\r\n";
$msg .= "Host: $host\r\n";
$msg .= "User-agent: $useragent\r\n";
if($cookie != "") $msg .= "Cookie: $cookie\r\n";
if (strtolower($type) == 'post') {
$msg .= "Content-type: application/x-www-form-urlencoded\r\n";
$msg .= "Content-length: ";
$msg .= strlen($content);
$msg .= "\r\n\r\n";
$msg .= $content;
} else {
$msg .= "\r\n";
}
//message is prepared!
$fp = fsockopen ($host, 80, $errno, $errstr, 30);
if (!$fp) {
die("$errstr ($errno)<br>\n");
} else {
fputs ($fp, $msg);
while (!feof($fp)) {
$result.= fgets ($fp);
}
fclose ($fp);
}
return $result;
}
function extractcookie($result) {
preg_match_all("!Set-Cookie: (.*);!",$result,$matches);
$matches = $matches[1];
return $matches[count($matches)-1];
}
attached mail follows:
Ahoy!
I'm sitting here, pondering on a problem that has just occurred to me. Having a short though intensive period of experience with PHP, I'm now in the process of being "swallowed" up by a group of web designers. That is, I've been offered a job opportunity.
Now, how do you charge your services? Do you do it on a time-slot basis (seems kind of awkard to me since much PHP code can be reused a l o t!) or do you do it on the basis of the size of projects and whether new code has to be developed etc etc?
Another question is: Since they are the owners of the web servers (also in control of the web admins.), they effectively control the PHP code that I develop. How do I make sure that I'm not just used once for a project and thereafter thrown on the trashbin, i.e. they take the code and keep using it for many other projects without my knowledge. As far as I'm concerned, a proper pay should be for each project that my PHP code goes into. Or do you not agree? Very thankful for your opinions here! And what is a proper pay?
I would really like to get some tips on how to specify a partnership with these web designers. I know about code obfuscators... but let's get real. They don't come close to hiding code (from these web designers and web admins.) as compiled software is hidden from end users.
Perhaps someone here remembers my last post - which was about security of PHP code (from viewing and unauthorized usage). Now, I'm kind of put against the wall here. I want to get to it, i.e. get to the work. But after some bad experiences *grunt*, I'm not willing to get literally squished by blood sucking vampires (*clearing my throat*) later on.
Kind regards,
Video Populares et Optimates
attached mail follows:
Hello Video,
Tuesday, December 2, 2003, 1:04:34 AM, you wrote:
VPeO> Now, how do you charge your services? Do you do it on a
VPeO> time-slot basis (seems kind of awkard to me since much PHP code
VPeO> can be reused a l o t!) or do you do it on the basis of the size
VPeO> of projects and whether new code has to be developed etc etc?
That is for you to decide and your client to agree with. Some will
prefer a fixed-cost project, others prefer time sheets. The fact you
are re-using code isn't a bad thing, I mean, you wrote it in the first
place right? and you're not a charity.. so what if you manage to save
yourself a few hours :)
VPeO> control the PHP code that I develop. How do I make sure that I'm
VPeO> not just used once for a project and thereafter thrown on the
VPeO> trashbin, i.e. they take the code and keep using it for many
Get a good contract. Unless they'll allow PHP script encoding (Zend
Encoder, etc) on their server, you have no other choice.
VPeO> And what is a proper pay?
Depends on country, location within country, age, experience, etc etc
etc.
VPeO> obfuscators... but let's get real. They don't come close to
VPeO> hiding code (from these web designers and web admins.) as
VPeO> compiled software is hidden from end users.
So compile it :)
--
Best regards,
Richard mailto:rich
launchcode.co.uk
attached mail follows:
Turck MMCache is a free optimizer/encoder. There is a free web based
front end to the encoding part of it available at
http://phpcoder.shadonet.com.
You can find Turck MMCache at http://turck-mmcache.sourceforge.net
It runs on Windows, Linux, BSD, and most other platforms and works with
PHP 4 and 5.
That said you should have a discussion with the person making the job
offer and get a good contract as others have said. If they want to use
the code in other projects without paying you each time ask for a higher
rate. Also make sure that you maintain the rights to use the code you
develop in other projects.
I do work on a per project basis, I base my quote on the number of hours
I expect it will take me then add 15% I've learned over the years to
estimate my time well, if you are just starting you will either want to
quote entirely per project or increase the time by more than 15% (most
newer people underquote for fear of coming in high and wind up eating it).
If you are quoting based on time you also want to come in slightly ahead
of schedule, not so much to make them think that you intentionally over
quoted but enough that it saves them some money and makes you look good.
Jason
Jason
Richard Davey wrote:
>Hello Video,
>
>Tuesday, December 2, 2003, 1:04:34 AM, you wrote:
>
>VPeO> Now, how do you charge your services? Do you do it on a
>VPeO> time-slot basis (seems kind of awkard to me since much PHP code
>VPeO> can be reused a l o t!) or do you do it on the basis of the size
>VPeO> of projects and whether new code has to be developed etc etc?
>
>That is for you to decide and your client to agree with. Some will
>prefer a fixed-cost project, others prefer time sheets. The fact you
>are re-using code isn't a bad thing, I mean, you wrote it in the first
>place right? and you're not a charity.. so what if you manage to save
>yourself a few hours :)
>
>VPeO> control the PHP code that I develop. How do I make sure that I'm
>VPeO> not just used once for a project and thereafter thrown on the
>VPeO> trashbin, i.e. they take the code and keep using it for many
>
>Get a good contract. Unless they'll allow PHP script encoding (Zend
>Encoder, etc) on their server, you have no other choice.
>
>VPeO> And what is a proper pay?
>
>Depends on country, location within country, age, experience, etc etc
>etc.
>
>VPeO> obfuscators... but let's get real. They don't come close to
>VPeO> hiding code (from these web designers and web admins.) as
>VPeO> compiled software is hidden from end users.
>
>So compile it :)
>
>
>
attached mail follows:
On Tuesday, December 2, 2003, at 12:04 PM, Video Populares et
Optimates wrote:
> Ahoy!
>
> I'm sitting here, pondering on a problem that has just occurred to me.
> Having a short though intensive period of experience with PHP, I'm now
> in the process of being "swallowed" up by a group of web designers.
> That is, I've been offered a job opportunity.
>
> Now, how do you charge your services? Do you do it on a time-slot
> basis (seems kind of awkard to me since much PHP code can be reused a
> l o t!) or do you do it on the basis of the size of projects and
> whether new code has to be developed etc etc?
What's the matter with re-using the code and charging the same rate for
it? You're a business, and you're supposed to make money. I currently
charge by the hour, but I'm trying whereever possible to move away from
hourly rates into fixed price services. Why?
a) The client knows exactly what to expect in terms of price and result
b) I don't spend half my days quoting every last detail of a job
c) I have the opportunity to re-use code over and over, making a
PROFIT, rather than braking even all the time
> Another question is: Since they are the owners of the web servers
> (also in control of the web admins.), they effectively control the PHP
> code that I develop. How do I make sure that I'm not just used once
> for a project and thereafter thrown on the trashbin, i.e. they take
> the code and keep using it for many other projects without my
> knowledge. As far as I'm concerned, a proper pay should be for each
> project that my PHP code goes into. Or do you not agree? Very thankful
> for your opinions here!
Copyright is the simple answer, but it needs to be
a) observed by your clients
b) enforced by you when not observed by clients
You can always compile your scripts, and supply them with compiled
(encoded) products, rather than source scripts. This of course would
depend on the copyright agreement you have with your clients.
> And what is a proper pay?
There's no decent answer to that -- there's soooooo many factors to
take into consideration, like the market, the economic environment,
your skills, your productivity, your client's budget, etc etc. The
only accurate answer is "twice as much as half".
> I would really like to get some tips on how to specify a partnership
> with these web designers. I know about code obfuscators... but let's
> get real. They don't come close to hiding code (from these web
> designers and web admins.) as compiled software is hidden from end
> users.
Compiling with Zend encoder or similar, as stated above.
> Perhaps someone here remembers my last post - which was about security
> of PHP code (from viewing and unauthorized usage). Now, I'm kind of
> put against the wall here. I want to get to it, i.e. get to the work.
> But after some bad experiences *grunt*, I'm not willing to get
> literally squished by blood sucking vampires (*clearing my throat*)
> later on.
You obviously aren't confident working with these people, so consider
NOT working for them.
Justin French
attached mail follows:
Hello,
As a development company who has been profitable for 6 years I suggest
the following:
1. There are no fixed fees. All time will be billed.
2. Put everything in writing. If they want you to change the f to F make
them put it in writing.
3. If you do have a flat fee for something... make it something you
already have code for or have a procedure for. Even then, make sure
you have a test case for the procedure. If the test case fails it is
time and materials.
4. Require a downpayment of at least 30% of the total "ESTIMATE". Our
estimates are usually something like:
15,000 - 22,000
7500.00 (we do 50% down) would be required to begin work. When
then hit the 15k they have to pay up to the 15k.
Sincerely,
Joshua D. Drake
On Tue, 2 Dec 2003, Justin French wrote:
> On Tuesday, December 2, 2003, at 12:04 PM, Video Populares et
> Optimates wrote:
>
> > Ahoy!
> >
> > I'm sitting here, pondering on a problem that has just occurred to me.
> > Having a short though intensive period of experience with PHP, I'm now
> > in the process of being "swallowed" up by a group of web designers.
> > That is, I've been offered a job opportunity.
> >
> > Now, how do you charge your services? Do you do it on a time-slot
> > basis (seems kind of awkard to me since much PHP code can be reused a
> > l o t!) or do you do it on the basis of the size of projects and
> > whether new code has to be developed etc etc?
>
> What's the matter with re-using the code and charging the same rate for
> it? You're a business, and you're supposed to make money. I currently
> charge by the hour, but I'm trying whereever possible to move away from
> hourly rates into fixed price services. Why?
>
> a) The client knows exactly what to expect in terms of price and result
> b) I don't spend half my days quoting every last detail of a job
> c) I have the opportunity to re-use code over and over, making a
> PROFIT, rather than braking even all the time
>
>
> > Another question is: Since they are the owners of the web servers
> > (also in control of the web admins.), they effectively control the PHP
> > code that I develop. How do I make sure that I'm not just used once
> > for a project and thereafter thrown on the trashbin, i.e. they take
> > the code and keep using it for many other projects without my
> > knowledge. As far as I'm concerned, a proper pay should be for each
> > project that my PHP code goes into. Or do you not agree? Very thankful
> > for your opinions here!
>
> Copyright is the simple answer, but it needs to be
> a) observed by your clients
> b) enforced by you when not observed by clients
>
> You can always compile your scripts, and supply them with compiled
> (encoded) products, rather than source scripts. This of course would
> depend on the copyright agreement you have with your clients.
>
> > And what is a proper pay?
>
> There's no decent answer to that -- there's soooooo many factors to
> take into consideration, like the market, the economic environment,
> your skills, your productivity, your client's budget, etc etc. The
> only accurate answer is "twice as much as half".
>
>
> > I would really like to get some tips on how to specify a partnership
> > with these web designers. I know about code obfuscators... but let's
> > get real. They don't come close to hiding code (from these web
> > designers and web admins.) as compiled software is hidden from end
> > users.
>
> Compiling with Zend encoder or similar, as stated above.
>
>
> > Perhaps someone here remembers my last post - which was about security
> > of PHP code (from viewing and unauthorized usage). Now, I'm kind of
> > put against the wall here. I want to get to it, i.e. get to the work.
> > But after some bad experiences *grunt*, I'm not willing to get
> > literally squished by blood sucking vampires (*clearing my throat*)
> > later on.
>
> You obviously aren't confident working with these people, so consider
> NOT working for them.
>
>
> Justin French
>
>
--
Co-Founder
Command Prompt, Inc.
The wheel's spinning but the hamster's dead
attached mail follows:
Hi there,
I've seen the code somewhere but can't remember what it is exactly.
Basically I need to know what the PHP is to get the picture width and
height.
I tried:
$pic = $_FILES[$objectNumber];
$width = $pic['width'];
$height = $pic['height'];
... with no success.
Any help is greatly appreciated.
Thanks,
Dimitri Marshall
attached mail follows:
Hello Dimitri,
Tuesday, December 2, 2003, 2:40:27 AM, you wrote:
DM> I've seen the code somewhere but can't remember what it is exactly.
DM> Basically I need to know what the PHP is to get the picture width and
DM> height.
Use getimagesize() on the uploaded file. See PHP manual for details.
--
Best regards,
Richard mailto:rich
launchcode.co.uk
attached mail follows:
I am developing one site. Initially it was working properly, but later
installed certificate so now instead of http:// now it has become https://
Now all weired things started happenning, it asks whether i want to download
the file ? if i open the file then it shows me all 'Source Codes' instead of
HTML output, but all plain html files are displayed ok, what is missing ?
do i need to change any php settings ?? please give me hints on that,
please please help me - it's very very urgent.
regards,
manisha
attached mail follows:
On Mon, 2003-12-01 at 22:46, Manisha Sathe wrote:
> I am developing one site. Initially it was working properly, but later
> installed certificate so now instead of http:// now it has become https://
>
> Now all weired things started happenning, it asks whether i want to download
> the file ? if i open the file then it shows me all 'Source Codes' instead of
> HTML output, but all plain html files are displayed ok, what is missing ?
> do i need to change any php settings ?? please give me hints on that,
>
> please please help me - it's very very urgent.
Sounds like your webserver settings aren't set properly fgor HTTPS and
so rather than processing the scripts it thinks they are just files.
This is most likely the case if your files don't end with .html.
HTH,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
attached mail follows:
--- Manisha Sathe <manisha
starhub.net.sg> wrote:
> I am developing one site. Initially it was working properly, but
> later installed certificate so now instead of http:// now it has
> become https://
>
> Now all weired things started happenning, it asks whether i want to
> download the file ? if i open the file then it shows me all 'Source
> Codes' instead of HTML output
Yeah, it sounds like you did more than install a new certificate. Look at
the last modified time of your httpd.conf, and I bet it coincides with
your recent installation.
You want to make sure you have this line in there:
AddType application/x-httpd-php .php
If PHP is still not getting parsed (in .php files), then it is likely that
you will need to reinstall Apache again, this time remembering to add
support for PHP.
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security Handbook
Coming mid-2004
HTTP Developer's Handbook
http://httphandbook.org/
attached mail follows:
A big thanks to both of you, it got solved,
it was a config problem only and with the help of ISP we could resolve it,
Thanks once again
manisha
attached mail follows:
In article <3FC7A2F1.1030900
by-tor.com>, jnichel
by-tor.com says...
> Chris W. Parker wrote:
> > sales
dotregistrar.com <mailto:sales
dotregistrar.com>
> > on Wednesday, November 26, 2003 9:30 PM said:
> >
> >>If you feel this transaction was made
> >>by our mistake, please press "No".
> >
> > I keep clicking "No" but nothing is happening. PLEASE HELP! Maybe it's a
> > bug with PHP??
> >
> > Chris.
>
> My keyboard doesn't have a 'No' key.
It should be right under the 'Any' key :-)
--
Quod subigo farinam
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?
attached mail follows:
Hi,
Having some problems with multi-dimentional arrays.
I am creatng an array using some database data, and adding stuff like an image tag, and hyperlink.
Then passing this to another function that creates an Html table from an array.
Here is the function to create the table from an array, seems to work fine.
//-------------------------------------------------------------------------
// Builds transparent table from array
function trans_table_array
($array, $bodyfontcolor = "", $headerfontcolor = "")
{
global $theme_bodyfontcolor, $theme_headerfontcolor; // Defined in a theme file
// Poputlate with theme colors if called without specifying
if ($bodyfontcolor == "")
$bodyfontcolor = $theme_bodyfontcolor;
if ($headerfontcolor == "")
$headerfontcolor = $theme_headerfontcolor;
$content = "<table align=center border=0>\n";
foreach ($array as $rowkey => $colkey)
{
$content .= "<tr align='center'>";
foreach ($colkey as $value)
{
if ($rowkey=="0") // Treat first row as column names
{
$content .= "<th><div align=\"center\"><font color=\"$headerfontcolor\">"
. $value . "</font></div></th>\n";
}
else
{
$content .= "<td>";
if (!isset($value)) //test for null value
{$content .= "NULL";}
else
{$content .= "<div align=\"center\"><font color=\"$bodyfontcolor\">"
. $value . "</font></div>";}
$content .= "</td>\n";
}
}
$content .= "</tr>\n";
}
$content .= "</table>";
return $content;
}
//------------------------------------------------------------
I use this function to get the whole database results into an array, passing the result of a query
//-------------------------------------------------
function mysql_fetch_array_r($result, $fetch = MYSQL_BOTH)
{
$row_counter = 0;
while ($row = mysql_fetch_array($result,$fetch))
{
$whole_result[$row_counter] = $row;
$row_counter++;
}
return $whole_result;
}
//----------------------------------------------
Then I am trying to build a table with 3 pictures per row.
$query = "Select * from picture";
$result = mysql_query($query)
or die (mysql_error());
// Returns array with entire contents of query
$whole_result = mysql_fetch_array_r($result);
$col_key = 0;
foreach ($whole_result as $rowkey => $colkey)
{
$table_string = "<a href='delete_pic.php?product_id=
{$whole_result[$rowkey]['product_id']}'>
<img src='{$whole_result[$rowkey]['path']}'
width='185' height='150' ><br>
{$whole_result[$rowkey]['path']}</a>";
$table_array[$rowkey][$col_key] = $table_string;
// 3 $table_string per row in table
if ($col_key< 2)
{ $col_key++; }
else
{ $col_key=0; }
}
echo trans_table_array($table_array);
The above is not populating the array correctly. It results in one $table_string per row instead of column.
Am I just simply making a logic error. This multi-dimentional array stuff is confusing, been struggling with this for hours.
Does anyone else have a simpler way of seperating logic, and html? Thanks for any help.
attached mail follows:
What do I put in .htaccess for Apache to process a named "archive" as a PHP file?
I did it before and can't seem to find what I did. Requests to http://myhost.com/archive/page1.php would get processed by the file named archive and page1.php would just be a parameter that I could access from within the script by checking the url and subtracting "http://myhost.com/archive/".
Thanks in advance,
-Ed
attached mail follows:
What do I put in .htaccess for Apache to process a named "archive" as a PHP file?
I did it before and can't seem to find what I did. Requests to http://myhost.com/archive/page1.php would get processed by the file named archive and page1.php would just be a parameter that I could access from within the script by checking the url and subtracting "http://myhost.com/archive/".
Thanks in advance,
-Ed
attached mail follows:
On Tuesday 02 December 2003 14:34, Ed Lazor wrote:
> What do I put in .htaccess for Apache to process a named "archive" as a PHP
> file?
>
> I did it before and can't seem to find what I did. Requests to
> http://myhost.com/archive/page1.php would get processed by the file named
> archive and page1.php would just be a parameter that I could access from
> within the script by checking the url and subtracting
> "http://myhost.com/archive/".
<Location /archive>
ForceType application/x-httpd-php
</Location>
--
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
------------------------------------------
/*
Win98 is called Win98 because it is 98% slower than Linux.
*/
attached mail follows:
Ed Lazor wrote:
>What do I put in .htaccess for Apache to process a named "archive" as a PHP file?
>
>I did it before and can't seem to find what I did. Requests to http://myhost.com/archive/page1.php would get processed by the file named archive and page1.php would just be a parameter that I could access from within the script by checking the url and subtracting "http://myhost.com/archive/".
>
<Location "/archive">
ForceType application/x-httpd-php
</Location>
--
H| I haven't lost my mind; it's backed up on tape somewhere.
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:ashley
pcraft.com> . 303.442.6410 x130
IT Director / SysAdmin / WebSmith . 800.441.3873 x130
Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6
http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.
attached mail follows:
Hi!
$first_date = 2003-12-01
$end_date = 2004-01-15
while ( $first_date <= $end_date) {
$sql = "INSERT INTO time_table (id, date, person_id) VALUES
(35,$first_date,0)";
$result = mysql_query($sql, $conn);
[next date] WHAT CODE TO HERE????
}
eg.
first insert row is 35, 2003-12-01,0
next should be 35,2003-12-02,0 etc....
...
and last 35,2004-01-15,0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]