include and include_once dont throw fatal exception.
You should use require or require_once and catch the exception with
try{}catch{} block
[EMAIL PROTECTED] a écrit :
include and require are not functions.
They are language constructs.
They probably don't "return values" nor short-circui
I've got an Apache 2.2.3 server running PHP 5.2.6 on top of FreeBSD
6.2. It's worked quite well for over a year now. However, as of some
time last night, phpBB broke; upon investigation, I realized that the
problem was that $_POST was never getting populated, even on properly
formed HTML forms.
T
I've got an Apache 2.2.3 server running PHP 5.2.6 on top of FreeBSD
6.2. It's worked quite well for over a year now. However, as of some
time last night, phpBB broke; upon investigation, I realized that the
problem was that $_POST was never getting populated, even on properly
formed HTML forms.
T
touch /var/log/php.err
chown apache:apache /var/log/php.err
adjust apache with your webserver user/group (check httpd.conf)
though I doubt anything will show up there.
Well, done anyway, just in case.
Do you have mod_security enabled in apache? Maybe it's catching
something it shouldn't.
Quoting "Daniel P. Brown" <[EMAIL PROTECTED]>:
On Wed, Dec 3, 2008 at 6:03 PM, Alex Kirk <[EMAIL PROTECTED]> wrote:
It works like a charm on a different machine with an essentially identical
config (it's a newer version of FreeBSD, but that's about it); however, it
never displays the contents
On Wed, Dec 3, 2008 at 6:03 PM, Alex Kirk <[EMAIL PROTECTED]> wrote:
>
> It works like a charm on a different machine with an essentially identical
> config (it's a newer version of FreeBSD, but that's about it); however, it
> never displays the contents of $_POST['testvar'] on the machine that
> s
Alex Kirk wrote:
I've got an Apache 2.2.3 server running PHP 5.2.6 on top of FreeBSD
6.2. It's worked quite well for over a year now. However, as of some
time last night, phpBB broke; upon investigation, I realized that the
problem was that $_POST was never getting populated, even on properly
for
Did you check the apache logs or the php error logs?
Apache logs show no errors at all. The PHP error log is more interesting
- I turned on logging to /var/log/php.err once I started trying to
diagnose this, and that file has yet to be created.
Apache can't write to that location. You need
I've got an Apache 2.2.3 server running PHP 5.2.6 on top of FreeBSD
6.2. It's worked quite well for over a year now. However, as of some
time last night, phpBB broke; upon investigation, I realized that the
problem was that $_POST was never getting populated, even on properly
formed HTML forms.
T
[EMAIL PROTECTED] wrote:
There are httpd.conf settings to reject POST requests, but I don't think it
would behave like that...
But maybe it's a bit more complicated than what I've ever seen for httpd.conf
Could be mod_security getting in the way and killing some content.
--
Postgresql & php
Nathan Rixham wrote:
> Alex Kirk wrote:
>> I've got an Apache 2.2.3 server running PHP 5.2.6 on top of FreeBSD
>> 6.2. It's worked quite well for over a year now. However, as of some
>> time last night, phpBB broke; upon investigation, I realized that the
>> problem was that $_POST was never gettin
There are httpd.conf settings to reject POST requests, but I don't think it
would behave like that...
But maybe it's a bit more complicated than what I've ever seen for httpd.conf
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-Original Message-
From: Alex Kirk
I've got an Apache 2.2.3 server running PHP 5.2.6 on top of FreeBSD
6.2. It's worked quite well for over a year now. However, as of some
time last night, phpBB broke; upon investigation, I realized that the
problem was that $_POST was never getting
Alex Kirk wrote:
I've got an Apache 2.2.3 server running PHP 5.2.6 on top of FreeBSD 6.2.
It's worked quite well for over a year now. However, as of some time
last night, phpBB broke; upon investigation, I realized that the problem
was that $_POST was never getting populated, even on properly f
I've got an Apache 2.2.3 server running PHP 5.2.6 on top of FreeBSD
6.2. It's worked quite well for over a year now. However, as of some
time last night, phpBB broke; upon investigation, I realized that the
problem was that $_POST was never getting populated, even on properly
formed HTML fo
haha,is funny, i like it.
> Date: Wed, 3 Dec 2008 12:40:39 -0800
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]; php-general@lists.php.net
> Subject: Re: [PHP] adding key-> value pair to an array
>
> >
> > //you can get really stupid with this..
> > ${false} = 'some string he
>
> //you can get really stupid with this..
> ${false} = 'some string here';
> echo ${''};
> //echos some string here
>
I like stupid things
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jim Lucas wrote:
I don't think the above will work either, afaik php doesn't allow you to have variable names start with numbers.
well debatable..
#
$12 = 'value';
Parsing Error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE
or '$'
#
$varname = 12;
Aniketto wrote:
> Hi all,
> Can anybody tell me how can I add key->value pair in an array.
> My code is as follows
>
> $criteria = array();
> $criteria['mail_subject'] = $form->subject->getValue();
> $criteria['delivery_user_name'] = $form->delivery_user_name->getValue();
> $criteria['start_da
Yeti wrote:
>> //for each row I want to add percentage as new key->value pair
>> // but it gives error 'Undefined variable:
>> percentage'
>>$row->$percentage = ($browseCount / $totalCount ) * 100;
>
> Obviously you get the error because $percentage is not d
And yet another thing i have overseen in my statement ..
If you remove the first for loop, also change the sql query. But I'm
sure you saw that already
NEW QUERY:
$sql = "SELECT study,symbol FROM test WHERE study IN ('".implode(', ',
$myArray)."')";
--
PHP General Mailing List (http://www.php.ne
I actually would do more like:
$myArray[$study][$symbol] = true;
No need to call in_array.
Probably won't matter, really, but it's a good practice for when you end up
doing the same kind of code for an array with thousands of elements.
--
PHP General Mailing List (http://www.php.net/
As I recall, there needs to be a \SENTSINCE instead of just SENTSINCE, and the
PHP online manual ended up stripping out the \ business...
Or maybe that was in some kind of "flags" somewhere else...
Check the user contributed notes -- Those are invaluable for "what can go
wrong" type of ins
Thanks Yeti, it works.
Best, Andrej
Yeti wrote:
Correcting myself now ..
$myArray = array('b2005', 'b2008');
$sql = "SELECT study,symbol FROM test WHERE study IN ('$myArray[$i]')";
$result = mysql_query($sql);
if(mysql_num_rows($result) > 0) {
while ($myrow = mysql_fetch_array($result)) {
I'm surprised nobody mentioned:
http://php.net/assert
in this thread yet.
Perhaps I missed it?
You should really consider doing this:
1) At the outer API layer, do a typecast (possibly with preg_match first) to
convert the input data to acceptable form.
2) For inner API layer[s], sp
> but I gather from your reply that the browser issues the new (printer)
> page without reference to the server.
> Is this what actually happens?
Yes, this is what actually happens for the browser "print" button.
You could do something like a "Printer Friendly" button to generate a PDF on
Thanks for the quick reply,
There is no SENTSINCE keyword in the critera parameter section, so I
believe that no SENTSINCE queries can be performed againts the server.
The problem with the SINCE keyword is that it returns the wrong
results.
On Wed, Dec 3, 2008 at 12:07 PM, Richard Heyes <[EMAIL
I've seen this issue on a normally healthy machine. I think it's a
memory issue, or IE just corrupting itself sometimes. I don't change
anything and it seems to go away (probably fresh browser session)
Although I am sure invalid/confusing headers won't help.
On Wed, Dec 3, 2008 at 3:08 AM, Sándor
I don't think, because it happens on different machines, with different users.
(one of them is a fresh install)
SanTa
- Original Message -
From: Ramesh Thiruchelvam
To: Sándor Tamás (HostWare Kft. )
Sent: Wednesday, December 03, 2008 12:05 PM
Subject: Re: [PHP] Picture downlo
A couple of sites about making CSS print stylesheets.
http://www.alistapart.com/articles/goingtoprint/
http://www.webdesignschoolreview.com/css-printing.html
I'd send you links to more, but my Internet connection is shaped, and
it's too slow to look through many more.
Michael Kubler
*G*rey *P
Hi,
I have a strange error / misfunction with PHP header and IE7.
I render a JPG from a database BLOB to show it on a page.
In Firefox, when the user clicks on the image, and selects "Save image as... ",
(s)he can download it in JPG format.
But when a user in IE7 does the same, (s)he only can ge
> I have a Fedora Core 9 system with php 5.2.5 and imap enabled.
> A little program that uses imap_search results in this error. Does the
> current php version support imap4 search criterias ?
It does, and has done for a while. I used it my Vwebmail application
(which I no longer have I'm afraid).
'Twas brillig, and Ashley Sheridan at 03/12/08 08:15 did gyre and gimble:
Whatever you do, don't have a separate
page for "print view". This is one of those things that some bright
spark thought to do on a site at work, and the site in question was
already a couple hundred HTML pages, so he effec
> //for each row I want to add percentage as new key->value pair
> // but it gives error 'Undefined variable:
> percentage'
>$row->$percentage = ($browseCount / $totalCount ) * 100;
Obviously you get the error because $percentage is not defined ..
I did not
On Wed, 03 Dec 2008 08:15:14 +, [EMAIL PROTECTED] (Ashley
Sheridan) wrote:
>Go with what Yeti said. The browser will automatically pick the right
>stylesheet when the user presses the print button or you issue a
>window.print() from Javascript. Whatever you do, don't have a separate
>page for
Hi all,
Can anybody tell me how can I add key->value pair in an array.
My code is as follows
$criteria = array();
$criteria['mail_subject'] = $form->subject->getValue();
$criteria['delivery_user_name'] = $form->delivery_user_name->getValue();
$criteria['start_date'] = $form->start_date->getVa
Hi all,
Can anybody tell me how can I add key->value pair in an array.
My code is as follows
$criteria = array();
$criteria['mail_subject'] = $form->subject->getValue();
$criteria['delivery_user_name'] = $form->delivery_user_name->getValue();
$criteria['start_date'] = $form->start_date->getVa
On Tue, Dec 2, 2008 at 7:48 PM, Micah Gersten <[EMAIL PROTECTED]> wrote:
> VamVan wrote:
> > Hello All,
> >
> > I was stuck with this issue. So just felt the need to reach out to other
> > strugglers.
> > May be people might enjoy this:
> >
> > Here is the code for object to array and array to obj
Correcting myself now ..
$myArray = array('b2005', 'b2008');
$sql = "SELECT study,symbol FROM test WHERE study IN ('$myArray[$i]')";
$result = mysql_query($sql);
if(mysql_num_rows($result) > 0) {
while ($myrow = mysql_fetch_array($result)) {
if (in_array($myrow['study'], $myArray))
$combi
On Wed, 2008-12-03 at 08:00 +0100, Maciek Sokolewicz wrote:
> Clancy wrote:
> > Oh?
> >
> > Unfortunately I have had great difficulty trying to find out how
> > things really work, as all the books I have seen are recipe books,
> > which tell you how to achieve particular results, but not what is
> How should I proceed? Thanks in advance for any suggestions.
Since you are looping through the result already, why not do it this way ..
$combinedArray = array();
for ($i=0;$i 0) {
while ($myrow = mysql_fetch_array($result)) {
if (in_array($myrow['study'], $myArray))
$combinedArray[$m
Hello,
I have a Fedora Core 9 system with php 5.2.5 and imap enabled.
A little program that uses imap_search results in this error. Does the
current php version support imap4 search criterias ?
Thanks for your help.
Here is the little program :
" ;
$concatResults = implode(",", $searchRe
> I have enough trouble getting my rather ancient brain around PHP, and
> was hoping that I could avoid getting involved with JavaScript.
> However it seems that it, or CSS, are the only possibilities for this
> case.
If I understood you correctly what you want is to change the style of
the page w
43 matches
Mail list logo