php-general Digest 15 Sep 2005 17:58:48 -0000 Issue 3684
Topics (messages 222459 through 222480):
Re: Size limits of mysql
222459 by: Georgi Ivanov
passing values from dynamic form to another php page?
222460 by: hope
222461 by: hope
222470 by: Jay Blanchard
Re: mysql query
222462 by: Mark Rees
Re: Quick Poll: PHP 4 / 5
222463 by: Jochem Maas
222471 by: Oliver Grätz
222472 by: Robert Cummings
Re: PDO for PHP 4 (was Re: Quick Poll: PHP 4 / 5)
222464 by: Kevin Waterson
222467 by: Lester Caine
222469 by: Oliver Grätz
Re: php/mysql object id question..
222465 by: Oliver Grätz
cookies problem
222466 by: Ross
php and .htaccess...can't figure it out!
222468 by: blackwater dev
222477 by: John Nichel
PHP combined with JAVA
222473 by: Stasa Jerinic
222474 by: Stasa Jerinic
Re: trying to figure out the best/efficient way to tell whois loggedintoa site..
222475 by: Dan Baker
Re: size limit in mysql tables?
222476 by: John Nichel
Domain Info Possible?
222478 by: Chirantan Ghosh
222479 by: Jordan Miller
How to output a PNG with GD with same headers as pre-existing PNG file
222480 by: Graham Anderson
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
There is [max allowed packet] variable in mysql. The default is 1MB in my
config.
May be this is what stops you. Try increasing this value.
On Wednesday 14 September 2005 01:07, [EMAIL PROTECTED] wrote:
> Hi All,
>
>
>
>
>
> I have a simple database with one table with about 6 fields, just
> holding filenames, filepaths and sizes. Very basic audit for management
> here. Problem is I import a load of records into this table and it
> seems to only allow me to put in about 550,000 records. Maybe it's
> just mysqlFront that can only display that many records or something.
> Anybody know of a size or record limit in mysql tables? The actual size
> of the database is about 70Mb. Not huge really.
>
>
>
>
>
> Thanks
>
>
>
> Matthew
--- End Message ---
--- Begin Message ---
hi
i m generating a dynamic form (no. of fileds depend upon user selection
from previous page).
On this page user enters values into form fields
and i want to acess them on next page.
///////////////////////////file1.php////////////////////////////////////////
<?php require_once('../Connections/cnn.php');
/////////////////////////////////////////////////
$cID=$HTTP_POST_VARS['select1']; //echo $cID;
$query1 = "SELECT * FROM categories where cat_id=$cID" ;
$result1 = mysql_query($query1, $cnn) or die(mysql_error());
$row1=mysql_fetch_array($result1);
$cat_name=$row1['cat_name']; //echo $cat_name;
$cat_image=$row1['cat_image']; //echo $cat_name;
$cat_intro_text=$row1['cat_intro_text']; //echo $cat_name;
$attributes_list =$HTTP_POST_VARS['sql_query'];
echo $attributes_list;
$fldslist=split(",",$attributes_list);
$fldCount=count($fldslist);
$_SESSION['num_fields']=$fldCount;
$_SESSION['list_fields']=$fldslist;
?>
<html>
<head>
</head>
<body>
<form name="sqlform" action="table1_process2.php" method="post"
enctype="multipart/form-data" >
<table width="100%" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td width="13"> </td>
<td width="654" valign="top" align="center"><font
color="ffffff"><strong>Welcome to the Administration
Panel</strong></font></td>
<td width="12"> </td>
<td width="14"> </td>
</tr>
<tr>
<td> </td>
<td valign="top"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td height="26" align="center"><font color="ffffff"
size="+1">Category: <?php echo
$cID.". ".$cat_name;?></font></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td valign="top"><div align="center">
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td> </td>
<td width="40"> </td>
<td> </td>
</tr>
<tr align="left">
<td align="left"><img
src="../images/categories/<?php echo $cat_image;?>" width="80"
height="100"></td>
<td > </td>
<td align="justify" class="highlight"><?php echo $cat_intro_text;
?></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</div></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="center"><font class="highlight" size="+1">Product
Attributes</font></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td valign="top">
<table width="95%" align="center" border="1" cellpadding="0"
cellspacing="0">
<tr class="highlight">
<?php
for ($i=0;$i<$fldCount;$i++)
{
echo "<td>$fldslist[$i]</td>";
}
?>
<td>Action</td>
</tr>
<tr class="highlight">
<?php
for ($j=0;$j<$fldCount;$j++)
{
echo "<td><input type='text' name='$fldslist[$j]' size='8' value=''
maxlength='8'></td>";
}
?>
<td><input type="submit" name="submit" value="Add Product"
onClick="return validateForm(this)" onKeyPress="return validateForm(this)">
<input type="hidden" name="cat_id" value="<?php
echo $cID;?>">
<input type="hidden" name="MM_insert"
value="sqlform"></td>
</tr>
</table>
</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td valign="top" > </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td valign="top" > </td>
<td> </td>
<td> </td>
</tr>
</table></form>
</body>
</html>
//////////////////////////////////////////////////////////////////////////////
now i want to access the values from input fields on next page?
can somebody give me idea how to pass all form field values to next page
in this context??
regards
hope
--- End Message ---
--- Begin Message ---
hi
i m generating a dynamic form (no. of fileds depend upon user selection
from previous page).
On this page user enters values into form fields
and i want to acess them on next page.
///////////////////////////file1.php////////////////////////////////////////
<?php require_once('../Connections/cnn.php');
/////////////////////////////////////////////////
$cID=$HTTP_POST_VARS['select1']; //echo $cID;
$query1 = "SELECT * FROM categories where cat_id=$cID" ;
$result1 = mysql_query($query1, $cnn) or die(mysql_error());
$row1=mysql_fetch_array($result1);
$cat_name=$row1['cat_name']; //echo $cat_name;
$cat_image=$row1['cat_image']; //echo $cat_name;
$cat_intro_text=$row1['cat_intro_text']; //echo $cat_name;
$attributes_list =$HTTP_POST_VARS['sql_query'];
echo $attributes_list;
$fldslist=split(",",$attributes_list);
$fldCount=count($fldslist);
$_SESSION['num_fields']=$fldCount;
$_SESSION['list_fields']=$fldslist;
?>
<html>
<head>
</head>
<body>
<form name="sqlform" action="table1_process2.php" method="post"
enctype="multipart/form-data" >
<table width="100%" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td width="13"> </td>
<td width="654" valign="top" align="center"><font
color="ffffff"><strong>Welcome to the Administration
Panel</strong></font></td>
<td width="12"> </td>
<td width="14"> </td>
</tr>
<tr>
<td> </td>
<td valign="top"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td height="26" align="center"><font color="ffffff"
size="+1">Category: <?php echo
$cID.". ".$cat_name;?></font></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td valign="top"><div align="center">
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td> </td>
<td width="40"> </td>
<td> </td>
</tr>
<tr align="left">
<td align="left"><img
src="../images/categories/<?php echo $cat_image;?>" width="80"
height="100"></td>
<td > </td>
<td align="justify" class="highlight"><?php echo $cat_intro_text;
?></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</div></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="center"><font class="highlight" size="+1">Product
Attributes</font></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td valign="top">
<table width="95%" align="center" border="1" cellpadding="0"
cellspacing="0">
<tr class="highlight">
<?php
for ($i=0;$i<$fldCount;$i++)
{
echo "<td>$fldslist[$i]</td>";
}
?>
<td>Action</td>
</tr>
<tr class="highlight">
<?php
for ($j=0;$j<$fldCount;$j++)
{
echo "<td><input type='text' name='$fldslist[$j]' size='8' value=''
maxlength='8'></td>";
}
?>
<td><input type="submit" name="submit" value="Add Product"
onClick="return validateForm(this)" onKeyPress="return validateForm(this)">
<input type="hidden" name="cat_id" value="<?php
echo $cID;?>">
<input type="hidden" name="MM_insert"
value="sqlform"></td>
</tr>
</table>
</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td valign="top" > </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td valign="top" > </td>
<td> </td>
<td> </td>
</tr>
</table></form>
</body>
</html>
//////////////////////////////////////////////////////////////////////////////
now i want to access the values from input fields on next page?
can somebody give me idea how to pass all form field values to next page
in this context??
regards
hope
--- End Message ---
--- Begin Message ---
[snip]
<form name="sqlform" action="table1_process2.php" method="post"
enctype="multipart/form-data" >
////////////////////////////////////////////////////////////////////////////
//
now i want to access the values from input fields on next page?
can somebody give me idea how to pass all form field values to next page
in this context??
[/snip]
Look in the $_POST array (which matches the form method) on the next page.
For example;
<?php
print_r($_POST);
?>
--- End Message ---
--- Begin Message ---
On Wednesday 14 September 2005 07:36 pm, Jesús Alain Rodríguez Santos wrote:
> I have a table colum in mysql with two fields: day and month. I
> would like to know if it's possible to make a query where I can
> determine if exist days before to a selected day, for example:
> if I have in my table:
> day 19 - month 05, I wish to know if there are previous days
> inserted at the 19, the days they are not inserted in the table,
> they are inserted according your selection, what I want to get is
> that every time that you insert a day, I want to check if there
> are days previous to the one already inserted in the table in the
> same month, in case that there are not them then they owe you
> to insert together with the one selected,
I haven't tried this, but the logic should work according to the manual:
You don't have to check, you can just insert all the data. If the row
already exists, the data will not be inserted. This assumes that you have a
constraint on the table which prevents duplicate values!
$day=19;
$month=5;
for($i=1;i<=$day;i++){
$result=mysql_query("INSERT INTO table (month,day) VALUES (5,$i)");
}
If you don't have a constraint, then you will have to loop over the data for
that month and insert the rows where they don't already exist.
> I wait they understand me what I want:
> I work php/mysql.
create table tableA (
day int,
month int
);
select * from tableA where month=5 and day < 19;
This will select everything from the 5th month and before the 19th day of
the
5th month.
Is that what you were going for?
>
> sorry for my english i'm cuban
> Thank you and excuse the nuisances
>
>
>
> --
> Este mensaje ha sido analizado por MailScanner
> en busca de virus y otros contenidos peligrosos,
> y se considera que está limpio.
--- End Message ---
--- Begin Message ---
Stephen Leaf wrote:
On Tuesday 13 September 2005 05:52 pm, Ryan A wrote:
[x] I never work with PHP 4 anymore, all my work is with PHP 5
so far I've not found any hosts that do PHP5, however I do all my own hosting
anyway.
I've switched to use PHP5 because I was interested in doing XSL, and the
concept of doing objects intrigues me.
XSL support in 5 is far superior. It's a walk in the park now, where as before
it was quite confusing.
I'm currently doing a project where the client doesn't know what she wants...
because of this I'm constantly having to redo sections to add what she wants.
So taking this approach for this client has saved me from 10 times more work.
I personally can't wait for PDO. I do lots of projects that all use SQL
thats because you don't use firebird DB ;-)
(SQLite, PostgreSQL and MySQL) Right now I have to recode everything to use
the right DB. with my newest project I'm using SQLite with a custom Object to
handle the DB Object. It's actually design with PDO in mind.
After they get PDO in and working well It'll save me hours of work.
From that Website about the 6 dumbest ideas. I guess you could say I'm an
"early adopter" I like ideas that'll save me time in the long run, even if
I'm the one that has to do tons of testing to make it usable. The long run is
what matters to me. If I can spend time learning, testing.. and then later be
able to do something in 5 mins that'd take 15 the old way.. I'm up for it.
Has to be someone to do the testing to bring projects forward isn't
there ? ;)
From the opposite side of the spectrum I have had my share of upgrade issues.
One was from 5.0.4 to 5.0.5
$this->urlArr[0] = array_pop($arr = explode("&",$this->urlArr[0]));
I still have to scratch my head as to why I *need* that "$arr = "
prior to 5.0.5 this was not needed.
prior to 5.0.5 this was allowed but technically its the cause of memory
corruption
and has now been madce into a fatal error - the reason is that array_pop() takes
its arg as a reference (to a variable) - if you pass it the return value of a
function
then its technically not referencing something that exists because the value
(the array
that explode returns) only exists in the scope of the explode function call and
that dies
when explode returns .... placing the '$arr =' means you are assigning the
return value of
explode() to $arr and passing a reference to the same variable.
$this->urlArr[0] = array_pop(explode("&",$this->urlArr[0]));
Perhaps someone here could tell me what was change to make this happen.. and
how does that change make the engine better? It seemed to work perfectly fine
before.
'seemed' being the operative word. allowing code without the '$arr =' (from
your example)
is/was the source of many strange/subtle & difficult (impossible) to debug
segmentation faults (memory corruption) which quite often sprung up in
large/complex
codebases.
I've also had to upgrade a few classes written for PHP4 specifically ones that
like to use:
var $variable;
Overall, If you can upgrade to 5 .. do so. the advantages in my cases have
been so nice. If you can't upgrade, Don't. Use what works.
I personally would urge you to upgrade to 5 if you wanna get in deep with
objects. I'm sure that 3 and 4 can do them just fine. but whats the use of
learning how to do OOP in something that has been updated? Or worded
differently, Why learn old ways when you can benefit from newer
ideas/implementations ?
It'd be like putting logs under a platform and repositioning the log that came
out the back in the front again as a way to move something instead of wagon
just because it's always worked before.
--- End Message ---
--- Begin Message ---
Manuel Lemos schrieb:
>>A reference where _I_ have to search is something like a non-answer...
>
> If you try searching the bug database for PHP 4 versus PHP 5 opened bug
> reports you will get your answer.
Same sentence still applies. But OK: PHP4 has 518 open bugs, PHP5 only
203. What does this say about the stability of PHP4?
http://bugs.php.net/bugstats.php?phpver=4
http://bugs.php.net/bugstats.php?phpver=5
Also, PHP4 (first beta 19-Jul-1999) has a history of over 25300 bugs in
its 6 year long history whereas PHP5 (first beta 29-Jun-2003) has had
less than 4300 bugs filed in 2 years. Project this to 6 years and you
are at 13000 filed bugs, roughly half as many as for PHP4.
The site also states that PHP5 bugs are handled more quickly: PHP5: 47/3
vs PHP4: 71/5 (days average/median lifetime). So, you send me a link
supporting my arguments. Thank you.
> In case it was not clear for you, what I am saying is not the matter is
> PHP 4.x vs. PHP 5.x, but rather upgrading vs. not upgrading.
> [...]
>>I've got PHP5 and 4 running on the same machine.
>
> I just do not get why you still run PHP 4 when you are so confident that
> PHP 5 is the right version to use.
Didn't you give yourself the answer? I'm not using PHP5 (read:
upgrading) for stuff that doesn't want it (meaning its debian package
requires PHP4). For my own projects I use PHP5 and if I decide to use
some packages meant to be used with PHP4 I have yet to encounter real
problems that are PHP5-problems.
>>First of all, in many cases code reuse still is a myth. I hate to say it
>>but it's true. Then, a large potion of the PHP community hasn't even
>>heard of PEAR. Then, people definitely start projects from scratch. If
>
> You don't know if you have any numbers to back "the large portion of the
> PHP community claim".
The proof is the sheer number of "this is *THE* PHP application
framework to use" sites on the internet. Some people don't like reusing
code, some evaluate those projects and decide against them. For my part,
before reinventing the wheel I always spend some time serching through
PEAR and the web but very often the available solutions don't fit my
needs. I simply suppose other developers tend to act the same way.
> Anyway, as the developer of phpclasses.org, the largest PHP class
> repository, I can inform you that the site has accumulated near 270,000
> subscriber since 1999, of which at least half of them are considered
> active as you may verify here:
>
> http://www.phpclasses.org/browse/statistics/statistics.html
>
> The site has 2,200 approved packages but only 71 are PHP 5 specific.
>
> That is a lot of people reusing a lot of public class libraries!
Ah, that thing. The site that always gives me problems when I try to log
in after absence. I had switched to reregistering for every access
before Berlios came along (thanks for threatening to sue them) and now I
use the "Monster TGZs".
AllOLLi
____________
\let\thepage\relax
--- End Message ---
--- Begin Message ---
On Thu, 2005-09-15 at 08:32, Oliver Grätz wrote:
> Manuel Lemos schrieb:
>
> >>A reference where _I_ have to search is something like a non-answer...
> >
> > If you try searching the bug database for PHP 4 versus PHP 5 opened bug
> > reports you will get your answer.
>
> Same sentence still applies. But OK: PHP4 has 518 open bugs, PHP5 only
> 203. What does this say about the stability of PHP4?
>
> http://bugs.php.net/bugstats.php?phpver=4
> http://bugs.php.net/bugstats.php?phpver=5
Bug count is not necessarily indicative of stability issues. If there
are 100 bugs for a seldom used function and a single bug for a
ubiquitous function then the latter decreases stability more than the
former.
Cheers,
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. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
This one time, at band camp, Manuel Lemos <[EMAIL PROTECTED]> wrote:
> The matter is that PDO does not offer real database independence, so
> application developers that want to not have to deal with the important
> aspects that are different among databases will still have to deal them
> in their applications making their applications non-portable.
The point of PDO is not to gain database independence, rather a very
real attempt to create a standard database interface for PHP. This
it succeeds in doing.
Kevin
--
"Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contesting the vote."
--- End Message ---
--- Begin Message ---
Kevin Waterson wrote:
The matter is that PDO does not offer real database independence, so
application developers that want to not have to deal with the important
aspects that are different among databases will still have to deal them
in their applications making their applications non-portable.
The point of PDO is not to gain database independence, rather a very
real attempt to create a standard database interface for PHP. This
it succeeds in doing.
It is a reasonable start, but given the MAJOR differences in SQL, it is
only a start and only solves SOME of the 'standardisation' problems in
what seems a less than 'standard' way :(
Most of us need it to get a lot more support before we can even start to
consider switching to it - and the agro caused by now having apparently
*FIVE* versions of PHP on the go does not help .....
( PHP4.3.x - PHP4.4.0 - PHP5.0.5 - PHP5.1.x and PHP6 ALL of which
require work moving even existing applications between them !!! )
Having to go BACK to fix problems introduced by PHP4.4 when the main
development effort is PHP5 is simply a waste of resources - for a
'problem' that should perhaps have been picked up a lot sooner so that
the 'use' of it in many libraries could have been prevented in the first
place ?
Many people can't even fix the errors because they are in third party
libraries - so the ISP's HAVE to drop back to 4.3 ? But it would be nice
to see an orderly move to a SINGLE PHP codebase ?
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
--- End Message ---
--- Begin Message ---
Manuel Lemos schrieb:
> NEWSFLASH: PDO already exists for PHP 4:
>
> http://www.phpclasses.org/pdo
One can't implement overloading of the Zend Engine 2 in PHP4 so this is
not "the full package". And then, the most important feature of PDO is
that it's NOT WRITTEN IN PHP like any other database abstraction layer.
It's written in C for speed.
> Despite of that, I do not think PDO is a compelling reason to use PHP 5.
> Basically it is yet another attempt to do the same where other
> abstraction layers extensions have failed like ODBC and DBX.
It will not fail because it will be the de-facto-standard for new
programmers. PHP tutorials will start containing PDO examples instead of
mysql_* examples. That's even more true because the mysql extension is
not included by default anymore.
> The matter is that PDO does not offer real database independence, so
> application developers that want to not have to deal with the important
> aspects that are different among databases will still have to deal them
> in their applications making their applications non-portable.
This is true for the 10 percent of PHP programmers doing complicated
database stuff. PDO still is good for them because PDO explicitly makes
stuff unique to a particular DBMS available through its interface (the
doc is full of "this will only work for some engines"). The other 90
percent will be fine with what PDO has to offer.
AllOLLi
____________
"I'm bitter? Who's drunk and yelling at a dead woman?"
[Lisa, 6Fu 501]
--- End Message ---
--- Begin Message ---
Jasper Bryant-Greene schrieb:
> Oliver Grätz wrote:
>
>>3. Yes. One can abuse exceptions to return something in a constructor.
>> Just another argument against exceptions ;-) OK, it's unorthodox,
>> if you absolutely need to do that, do it and tell nobody *g*.
>
> This is not "abusing" exceptions. If you throw an exception then the
> expected behaviour should be that the following code should not be
> executed [1].
If you throw the exception for error purpose it's OK, but if you throw
the exception just for the purpose of returning a value then it's abuse.
That's what I meant.
> Throwing an exception inside a constructor will prevent the object from
> being created. It will not allow you to "return something" of your
> choice -- I haven't tested but I would expect that the variable you were
> setting as the object would either remain unset or would be set to NULL.
Tested. non-object. At least this is as expected ;-)
> I'm not too sure why you said "just another argument against exceptions"
> (apart from perhaps a lack of understanding) as exceptions are a very
> useful feature in any language.
Sorry I didn't mark this as personal opinion (just like all the rest).
Exceptions make good programming more difficult without need. Raymond
Chen wrote this about exceptions:
http://blogs.msdn.com/oldnewthing/archive/2005/1/14.aspx
AllOLLi
____________
This time it will surely run.
--- End Message ---
--- Begin Message ---
I am very close to getting this sorted.....Thanks for all the help on
'variable variables' and var_dump. Two useful techniques.
My function works but throws up a cookie problem
if (isset($add)){
${$add} = intval($_COOKIE['cookie'][$add]);
$new= $$add+1;
setcookie("cookie[$add]", "$new $add");
echo var_dump($_COOKIE['cookie'][$add]);
}
At the beginining of my page I have...
session_start();
require_once('init_cookies.php');
Init_cookies is jus a for loop to initialise the cookies...
$dishes= array ("pakora", "haggis_fritter");
for ($i=0; $i < 2; $i++){
setcookie("cookie[$dishes[$i]]", "0 $dishes[$i]");
when I leave it in it resets the cookies when they are sent to the page.
When I take it out the headers already sent error occurs. I do not know if
this is my lack of undertanding of require_once/include_once.
I need a way to initialise the cookies one time only. I have tried an 'if
(isset)' but that doesn't work.
thanks again....
Ross
--- End Message ---
--- Begin Message ---
Ok,
As per an earlier post, I am having problems with .htaccess files. I
am trying to set certain php directives using .htaccess files. First
it was complaining about several things such as mcrypt and zde:
<snip>
Wed Sep 14 20:04:46 2005] [notice] caught SIGTERM, shutting down
PHP Warning: PHP Startup: Unable to load dynamic library
'./php_mcrypt.so' - ./php_mcrypt.so: cannot open shared object file:
No such file or directory in Unknown o$
This version of ZDS requires a license. License check failed: Cannot
find the license file: zend_performance_suite.zl (path was:
/usr/local/Zend:/usr/local/Zend/etc:$
Zend Download Server not enabled.
[Wed Sep 14 20:04:51 2005 (18237)] [Zend Accelerator] [Info] License
check failed: Cannot find the license file: zend_canaveral.zl (path
was: /usr/local/Zend:/usr/lo$
[Wed Sep 14 20:04:51 2005] [notice] Apache/2.0.52 (Unix) PHP/5.0.3
configured -- resuming normal operations
</snip>
I then compiled php without mcrypt and removed all the Zend stuff from
the php.ini file and now I get this in the logs:
<snip>
[Thu Sep 15 04:28:12 2005] [notice] caught SIGTERM, shutting down
[Thu Sep 15 04:28:15 2005] [notice] Apache/2.0.52 (Unix) PHP/5.0.3
configured -- resuming normal operations
</snip>
Which means absolutely nothing to me...can someone shed some light on
all this? Why can't I use .htaccess files as this is all driving me a
little batty!
Thanks!
--- End Message ---
--- Begin Message ---
blackwater dev wrote:
<snip>
Which means absolutely nothing to me...can someone shed some light on
all this? Why can't I use .htaccess files as this is all driving me a
little batty!
</snip>
Did you try as someone suggested before, and put bogus content in the
.htaccess file to see if Apache was even reading it? If Apache is not
reading your .htaccess file, an Apache mailing list should be able to help.
http://httpd.apache.org/lists.html
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hallo,
I write one Java class that gives my name back. I implemented the call of
this Java class in php Unit, but there are some problems, because I will to
make only one time the instance of Java class and put it into Session and
everytime when the page is reloaded to load the Java object from the
session.
By first time calling the php unit its work, but after reloading the unit
(in the example below, after clicking the button Send) I get everytime
java.lang.NullPointerException.
The example:
<?php
session_start();
echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
if (!isset($_SESSION['P_User'])) {
echo "Class not set<br>";
$t = new Java("User");
$_SESSION['P_User']= $t;
} else {
echo "Class set<br>";
}
$t1= $_SESSION['P_User'];
echo $t1->getUserName();
echo '<input type="submit" value="Send" name="B1">';
echo "</form>"
?>
What I want to do, is to make only one time a instance of java class and to
use this object during the session (Internet browser of client) is opened
and not to create everytime the java instance by reloading or requesting
other php Unit.
Greetings,
Jerinic Stasa
--- End Message ---
--- Begin Message ---
Hallo,
I write one Java class that gives my name back. I implemented the call of
this Java class in php Unit, but there are some problems, because I will to
make only one time the instance of Java class and put it into Session and
everytime when the page is reloaded to load the Java object from the
session.
By first time calling the php unit its work, but after reloading the unit
(in the example below, after clicking the button Send) I get everytime
java.lang.NullPointerException.
The example:
<?php
session_start();
echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
if (!isset($_SESSION['P_User'])) {
echo "Class not set<br>";
$t = new Java("User");
$_SESSION['P_User']= $t;
} else {
echo "Class set<br>";
}
$t1= $_SESSION['P_User'];
echo $t1->getUserName();
echo '<input type="submit" value="Send" name="B1">';
echo "</form>"
?>
What I want to do, is to make only one time a instance of java class and to
use this object during the session (Internet browser of client) is opened
and not to create everytime the java instance by reloading or requesting
other php Unit.
Greetings,
Jerinic Stasa
--- End Message ---
--- Begin Message ---
"Ben" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Dan Baker wrote:
>> The *main* reason I use $_REQUEST is so I can code up GET and POST pages
>> that all are handled by the same php functions. I may have an item
>> called "Key" that contains what the end-user is expected to be doing
>> ("User.Create" or "User.Edit" or whatever). Then I may have a link (GET)
>> that has ?Key=User.Create, while a form (POST) that has a hidden value
>> "Key" with value "User.Create". I don't really care if it came from a
>> GET or POST -- if the data is all valid, I'll allow it to work.
>
> How are you passing your values to your functions? If you stick to local
> variables in your functions they won't care where you got the values from.
> Deal with the post or get values in whatever script handles your form
> submissions and have it pass the values on to your functions.
>
> IE
> In your post handling script:
>
> $result=doSomething($_POST['this'],$_POST['that']);
>
> In your get handling script:
>
> $result=doSomething($_GET['this'],$_GET['that']);
Aha! I direct my form's to the *exact* same page as GET's, so I don't even
know if a POST or GET sent the data (generally speaking). A typical page
looks something like the following:
*Every* request goes to a single page (Maybe called "Page.php"), which does
session management, includes several files that every page needs, and then
decodes what page the end-user is actually interested in, something like:
$key = explode('.', danbRequest::clean('key', 'a0._'));
Now, $key[0] = the "Primary" key, the main critter the end-user is trying to
do.
and $key[1]... = secondary keys (maybe Edit or Create or whatever).
This first key is used to branch off to various pages to handle that
specific Key. Usually, I have 1 file per Key:
if ($key[0] == 'Account')
{
include_once('......\Account.php');
account_Handler($key);
}
else if ($key[0] == 'Cart')
{
include_once('......\Cart.php');
cart_Handler($key);
}
DanB
ps The above function "danbRequest::clean()" is a handy little function that
performs almost all my cleaning of $_REQUEST values. The first argument is
the name, the second argument is a list of valid characters to allow. The
example given (danbRequest::clean('key', 'a0._')) will look for
$_REQUEST['key'], if not found it returns "false", if found -- it takes the
value and "cleans" it to only include 'a0._' (all letters, all digits, all
dots and underscores).
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
I have a simple database with one table with about 6 fields, just
holding filenames, filepaths and sizes. Very basic audit for management
here.
Problem is I import a load of records into this table and it
seems to only allow me to put in about 550,000 records.
Maybe it's
just mysqlFront that can only display that many records or something.
Anybody know of a size or record limit in mysql tables? The actual size
of the database is about 70Mb. Not huge really.
That is just a fascinating story.
Now, do you have a php question for the group?
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hello,
I was wondering if there was way to generate domain statistics by any PHP
script?
I just need some basic info like:
Monthly Traffic( Sites, Kbytes, Visits, Pages, Files, Hits )
Example: http://server18.internetserver.com/stats/1800homecare/
If it is possible can I also create a Log In for that page?
I would appreciate any direction.
Thanks,
C. Ghosh
--- End Message ---
--- Begin Message ---
do you have log files? the page you linked to was generated by
webalizer. is there a reason you can't use that (or Awstats, or
something similar)? you probably don't need to reinvent the wheel
here... though you may need to tweak your webserver to put more
information in the log files so you can see all the stats you desire.
Jordan
On Sep 15, 2005, at 11:07 AM, Chirantan Ghosh wrote:
Hello,
I was wondering if there was way to generate domain statistics by
any PHP script?
I just need some basic info like:
Monthly Traffic( Sites, Kbytes, Visits, Pages, Files, Hits )
Example: http://server18.internetserver.com/stats/1800homecare/
If it is possible can I also create a Log In for that page?
I would appreciate any direction.
Thanks,
C. Ghosh
--- End Message ---
--- Begin Message ---
I am trying to get a PNG created with GD to output exactly as a
pre-existing PNG file on the server
I have an app that is being very finicky about how it is loading images
:(
Within Quicktime, If I point to the PNG file directly on the server,
it works.
this works:
$image = isset($_GET['image'])? $_GET['image']:"yolanda.png";
$image = "./".$image;
$imageInfo = getimagesize($image);
$mime = $imageInfo['mime'];
header("Content-type:".$mime);
header ("Content-Length:".filesize($image));
header ("Cache-Control:".$cacheInfo);
readfile($image);
If I output a PNG with GD, it does not work within Quicktime for the PC.
My guess is that Quicktime for PC is very finicky when it comes to
headers :(
[excerpt from php script]
$im = imagecreatefrompng($image);
imagettftext($im, $fontSize, 0, 17, 20, $color, $font, $text);
imageAlphaBlending($im, true);
imageSaveAlpha($im, true);
// Output handler
function output_handler($im) {
header('Content-type: image/png');
header('Content-Length: ' . strlen($im));
header('Cache-Control:no-store, no-cache');
return $im;
}
// Image output
ob_start("output_handler");
imagepng($im);
ob_end_flush();
anyone know a bullet proof way to output the headers to look like a
pre-existing PNG file ?
many thanks in advance
g
--- End Message ---