Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




How Long Is Too Long For A Script To Execute? GetTimer()


I'm using some scripts and they're executing from

.007 - .010

It defines many files, imports several files (total of maybe 20), encrypts 2 strings several times base64 IN flash, WWW-Authenticating to a PHP file, PHP grabs a MySQL Query, returns it, traces it.

That happens all in .007 seconds roughly. How long is too long until you should find a new script. If a script runs with a time of .05, is that the general limit or is that fast?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Strtotime And Dates Long Long Ago ...
while making an encyclopdie on my hometown (dutch,
http://www.kgv.nl/index.php?id=610) i am trying to use dates prior to
1970. birthdates in, let's say, 1615.

i'm getting errors while working with these dates, for example when i am
calculating which day of the week it is. the dates are stored in a
mysql database.

is there another way to convert stringtype dates to work with?

How Long Is Too Long For A Cgi Script?
I have a 4000 line php cgi script that is not memory or cpu intensive.
It runs in 1 second. Now I am getting a lot of customer requests to add
in new features. My question is if there is a point where my code will
be too long and take too long to run (i.e > 5 seconds). I would really
like to have my script rival the functionality of a desktop application
but can php do it?
My server is a dual processor with 2GB ram.

How Long For A Session?
how long a session lasts for. It's been a long time but I thought it was 20 minutes by default. IS this correct or is it some other time? Assuming the browser is not closed of course.

Long Text
im trying to figure out how to format text in a database ... If I have a TEXT AREA in a form .. and an user inputs say like 5 paragraphs ... how can I have it to where mysql will display that as 5 paragraphs and not just i chunk of text when i display it at a later date ?

Long Insert
I need to update a table in mysql and the information is very long. I changed it to Longtext and whenever i use php to update it, the query returns true but the data never gets inserted into the database. Here is an example of the text that would be entered: Code:

Determine How Long It Was Since Last Logged In?
I can insert the date and time into a SQL table, but where do I go from there? What would I use to figure out the exact minutes since they were last on?

Also, the minutes need to round to hours, and hours to days.

Oracle + PHP + Long Process
Oracle 10g RAC on Linux, with an end-user interface via Apache/PHP/AdoDB
on a separate Linux box.

I need to create a PHP web interface to allow an end-user to run a PL/SQL
stored proc that will do a force refresh of a series of materialized views
following the loading (through another PHP interface) of additional flat
file data into the underlying tables. I want to allow multiple data
uploads and then do a single refresh, so I won't be able to use fast
refresh or other internal database trigger mechanisms.

My real problem is that the time taken to execute the stored proc is
likely to considerably exceed the max script execution time for PHP, and I
don't want the end-user interface to just sit there bubbling away waiting
for the Oracle processes to return a response anyway.

I am considering creating a "master" PL/SQL stored procedure which would
use the Oracle DBMS_SCHEDULER package to run a nearly-immediate job as a
"background" (to the PHP interface) process.

Is this the way to go, or are there other better solutions that I am
overlooking?

How Long Can I Make A Cookie Last?
I realize that the "cookie" is not a PHP-specific topic. However, I'm developing my web site using primarily the PHP programming language so I thought that the PHP forum would be an appropriate place to post this question.

My question is this: Is there a limit on the amount of time that a cookie will remain on a user's computer? In other words, if I code a time frame of a year or two for the cookie to expire will the cookie stay on the user's computer for that long?

Long URL Breake My Html
I have small BB and when someone post long URL it breaks complete forum.
Is there anything I can do.

Condensing Long Strings
Say I have a really long URL e.g. http://www.testing123.com/testing123/testing123/testing123/testing123/testing123.html

What I want PHP to do is to condense it in a way that most popular forum software does. So the resulting URL should look like http://www.testing123.com/testing12...testing123.html

I'm guessing regular expressions would do something like this, but I don't have a clue at how to accomplish this.

How Long To Session Vars Last?
How long do session vars last? I believe some of my applicants are taking a long amount of time to complete their app, which is creating problems. Is there a way to lengthen the time that a session var is available? I would also like to do this to allow admin/csr's to stay logged in longer without having to log back in.

Session_start Costed Too Long....
I used ajax.
When the first time I visit the page, it spent about less than 0.3s
but when I visit the same url second time, it cost more than 10s, I
located the session_start(); call ,what is the problem?

Foreach On A Long Array
My array:

$pos_array = array(
0 => array("p1_pts" => $pts_1, "user_id" => "$p1_id", "pos" => 0),
1 => array("p2_pts" => $pts_2, "user_id" => "$p2_id", "pos" => 1),
2 => array("p3_pts" => $pts_3, "user_id" => "$p3_id", "pos" => 2));

How would I do a Foreach on a long array like this?

I know the basic ($pos_array as $x => $y) but not anything bigger.

Convert Double Value To Long Value
I have this issue with doubles values. When I store a long value like 1234567898999, the data is stored like 123E+10 or something like this.

I need retrieve the data like long value, like 1234567898999, but I need store it like double value.

Displaying Long Text
I have a MSSQL 2000 database with survey data, the data field that contains the long data is varchar (8000). When I display the data it truncates the data to 255 characters including spaces. The following code is something like this:

while($Results=mssql_fetch_array($SQL_Query) {
echo $Results[0]."<br />";

}

Is there something that I am missing?

How To Handle Long Process
i am developing a php web application where some programs requires a long time to process, such as going through a large table in a database and updating fields in each record.

how can i do this without causing a page to timeout?

Break Long Words Up
How can I break long words up, I tried wordwrap, but it didn't work.. anything else I can try..

How Long Session Will Be Alive ?
is it good to use both session and cookies to increase session's time ?

Why Does Getting Remote Pages Via Sockets Take So Long?
I'm using sockets right now to get a very small html file that just prints the latest version available of my project. When I run a script that gets the page from my dev server (we're talking local computer to local server), it takes like 10 seconds just to get the page back.

Long Contiguous String Checking
I'm working on a php/mysql site where users submit news.
A malicious contiguous string which is too long may mess up things (cause in tables witdh=100%) and make left columns in site not viewable.

how do i elegantly check if in a submission a string is longer than x char?

Shorten Long Url In A Regular Expression
I am using the function below I fould to create anchor tags of links in paragraph text.

It work fine but long url's obviously stretch the page.

Is there a way to shorten the link text in this reqular expression.

echo find_url(createParas(htmlentities($_POST['content'])));

function find_url($string){
//"www."
$pattern_preg1 = '#(^¦s)(www¦WWW).([^s<>.]+).([^s
<>]+)#sm'
$replace_preg1 = '1<a href="http://2.3.4" target="_blank" class="link">2.3.4</a>'
//"http://"
$pattern_preg2 = '#(^¦[^"=]]{1})(http¦HTTP¦ftp)(s¦S)?://([^s<>.]+).([^s<>]+)#sm'
$replace_preg2 = '1<a href="23://4.5" target="_blank" class="link">23://4.5</a>'
$string = preg_replace($pattern_preg1, $replace_preg1, $string);
$string = preg_replace($pattern_preg2, $replace_preg2, $string);
return $string;
}

Mail() Function Takes To Long.
I wrote a simple mail script, when executed it sends a mail to a specified address. It works fine except for the fact that it takes around 45secs to complete. I'm on a 10mbit LAN, and it shoudn't take that long at all. The mail server is on the same subnet as I am. Does anyone know of a solution to speed up the mail()ing process ? I've looked into maybe a DNS problem, but I don't see anything wrong. One thing I noticed, when the box is booting up through the INIT scripts, sendmail sits there for about a minute. I know the problem has to be with sendmail, just don't know what. The Box:

Slackware Linux
mail() using sendmail as the MTA.

One more thing, in the php.ini file you can specify an smtp server, but why does it say windows only ?

Proximity Question With Lat/long And Zipcodes
im making a search form that will return exact results from the dbase, then include a link with the zip code of the searched info, and that link will print all other stores within 30 miles of the given zip code.

so, if i type in wal mart chicago, the parsing file will return all of the wal marts in chicago. at the bottom, it will say 'nearby wal marts' (the zip of the chicago walmarts is included). when i click on that, it is going to search the database for all zip codes that are within 30 miles of the given zipcode, and print all the results.

the problem is this. there are 50,000+ zips in the US. i was going to break it up by state, but then border towns could potentially get screwed. but, if i was to search through all of the states zip codes, my logic would be as follows:

with entered zipcode, query it against the zipcode database and find the latitude/longitude. use this point as the starting point. search every other zipcode in the state and find their lat/long coordinates. using those numbers, use the distance formula to calculate the distance between the two zip codes. if it is less than say 30, then it will print out the store and city that it is located in. some code:

JPGRAPH Images On IE Take A Long Time
My images take forever to display in IE. If I click the stop button the images immedidately show up on the page. Can someone give me some hints as to what I can check for or modify to get this done faster? Status message line has "Downloading picture ..."

Using win2k, IIS , PHP4.2 and lastest version on IE.

Long Time To Finish A Program
I have a perl program called by my php script, which in turn is called
by the browser. Now, the perl program is called using exec, but takes
a long time to finish. So, till the time the perl script does not
finish its job, the browser does not show anything. I have messages
like "Dont close this window", but that does not show up till the
whole perl program finishes. Is there a way, I can somehow remedy
this, try to show a message on the browser - "Please while your data
processes" and then do the processing in the background?

Long Sleep() And Time-out's
The script I'm writing needs to wait a random amount of time (1-300s)
between each iteration of a loop, eg.

while(condition) {
do something
//wait between 1s and 5 minutes
sleep(rand(1,300));
}

Problem is, a browser times out if it doesn't get an answer within
about 30 seconds. Is the idea of having a PHP script sleep for a
longer amount of time incompatible with web applications? Any
work-around?

Wrapping A Long String At 80 Chars
I'm working on creating a "send an email to a friend" page that
includes the link of a given search from a website. However, the url
of the website is really long and when displayed on the page it screws
up all of the formatting. Is there a way to force a wrap of the text?
Say each line is approx 80 characters.

I don't believe there is a simple HTML solution...wanted to see if
anyone on this forum had to do this previously and has some code to
share.

Finding Out How Long It Took To Render Page?
Does anyone know of a quick and dirty way to find out how long it took to render a page? I'm using PHP4 and MySQL3 and Apache. Is there perhaps some mod_php function, or what?

Script Execution Time Too Long
I have a script that does a huge database update, which takes a long
time. However, the host I am running on (and I suspect most hosts) are
running in "safe mode." This means I cannot change the maximum execution
time of scripts. So, the script stops right in the middle of doing the
update.

On top of that, I am trying to make code that I can distribute to
others. As of now, the only way that this script can be run is with sys
admin intervention. I would like to make it run without any help from
the system administrator.



Strftime To Locale's Long Date
I have different dates stored as seconds from the Unix Epoch.

On different pages, I'm trying to write these dates according to the page's specified local.

As an example, some outputs would look like this:

Chinese (PRC): 2006”N11ŚŽ29“ú
Spanish (Spain): 29 de noviembre de 2006
German (Germany): 29. November 2006

I know I want to use PHP's strftime to write these dates, but I'm not exactly clear what I should write.....

Too Long Time For Performing Script
There is a PHP – script on the server, which is worked out for a long time (over 10 min). The connection breaks up while performing the script and the absence of output to the client’s browser since the browser thinks that the server stops answering.  How can I solve the problem that part of the PHP script on the server can not be performed because of connection interruption? 

Echo Long Strings Failure
I have a situation where I am echoing a long string to a client (winsock receive). This string is an extraction from a database. I use a while loop to do this (code below) . Problem is the echo immediately following the last iteration of the while doesn't get seen by the client (sometimes). Code:

If A String Is X Characters Long; Shorten It.
What I was wondering is if it was possible to shorten a certain string if it was X (I'll use 20 for this) characters long?

I know you would probably use a strlen function to find out if the string is 20 characters long. Code:

Long Post About PHPEclipse Session Debugging
debugging PHP applications interactively is possible, easy and free. I
am talking about PHPEclipse and using it for debugging over several
scripts or debugging through a session. Since I have wasted a lot of
time writing echo statements all over the code in order to confirm
program flow and watch variables, I feel I must share this with others
who will be facing similar problems.
PHPEclispe users can go to Step 5 directly.
(People who already have software which does all this or feel that
their software is the best suited, please ignore this post :-))

1)
First you need to get PHP and Apache.
(My OS is Windows XP Pro.) The best choice IMHO is XAMPP, as it allows
you to do many things - my version is 1.4.15 and it has, apart from
Apache2.0.54 and PHP5.0.4, phpMyAdmin2.6.3, FileZilla FTP, Webalizer
and many more things. It also allows you to switch between PHP4 and
PHP5!
So, get XAMPP at http://apachefriends.org.

2)
Second, you need to get PHPEclipse.
For that you need Eclipse first. Eclipse can be got from
http://eclipse.org. There are two releases of Eclipse - Eclipse 3.0 and
Eclipse 3.1 (although I use 3.0, it seems 3.1 is the better one - also,
there are other free products like JSEclipse which need 3.1 - sooner or
later you will need Javascript in your PHP application, for that, you
need Eclipse 3.1) Installing Eclipse 3.0 on windows was as simple as
unpacking the zip into a folder, say c:eclipse and double-clicking on
eclipse.exe to start. I've not tried 3.1 but I believe the installation
should not be any more difficult.
**********
Before downloading anything first read up the PHPEClipse related wiki
page at http://www.plog4u.org/index.php/Using_PHPEclipse
**********
Also read up http://www.plog4u.org/index.php/PHPEclipse_FAQ
NOTE: PHPEclipse runs from within Eclipse as module ("plugin").

3)
After you install Eclipse and PHPEclipse, comes the important part. I'm
just writing the steps which confuse most - since you have all the
necessary help needed available at
http://www.plog4u.org/index.php/Using_PHPEclipse in detail. Assuming
you have PHP files ready which you want to debug, you need to create a
new project in PHPEclipse. Go to Window->Show View->Navigator. This
shows the navigator pane. Now right-click to get a pop up menu which
gives among other options New->Project. Click that and choose PHP->PHP
Project in the next form in the wizard. Click Next to get the New
Project (PHP Project) form. There you have a place to give your project
a name and a place to specify the folder (you will miss this one if you
do not look closely as you need to uncheck a checkbox labelled "Use
default"). Now specify the folder location in the folder selection box.
This step troubled me for quite some time.

5)
Follow http://www.plog4u.org/index.php/Using_PHPEclipse for
intermediate steps like getting and installing the DBG debugger

6)
For debugging, you start by first setting up the environment by setting
paths and options in PHPEclipse. Click on Run menu in Eclipse, then
"Debug ..." (Debug dot dot dot). A window appears with a
navigator/explorer pane on the left and many tabs on the right. Give a
name (anything) to the debug configuration. Enter the paths in the File
tab and the Envirnment tab. Environment has two sub-tabs - Remote Debug
and Interpreter. In Remote Debug, check the Remote Debug checkbox and
(MOST IMPORTANT) uncheck the "Open DBGSESSION url in internal browser"
checkbox. This is needed, we will soon see why. Also, set the Remote
SourcePath to be a part of the full path to your php script. The rule
about the RemoteSourcePath is that
(RemoteSourcePath in the Environment tab) + (File path in the File tab)
= actual full path to your php file.
On the Interpreter sub-tab, if you have set things up correctly (with
XAMPP) you should see a php and a php5 option. Choose either. If
nothing is shown, you can add an interprter by setting a name for it
and the path for it from the adjoining "New..." button. Try a few
things and you should be able to start a debug session in about an hour
if not in a few minutes.

7)
Finally, run the Debug configuration (i.e., start the debugger) It will
now switch the window layout and show an active red button in the debug
toolbar with a few debug details in a prominent debug pane. It is now
_waiting_ for a request from any browser application. Set a breakpoint
in your PHP code (double clicking on the thin margin at the left of the
source code window, next to the text area). Also, set a breakpoint in
the next file that will get called when the user performs a form
submission in you first page.
Now, open your favorite webbrowser (independent of PHPEclipse) and
enter the url :
http://localhost/myproject/myfile.p...localhost:10001 or
http://localhost/myproject/myfile.p...lienthost:10003 One
of these should work. A moment or two after you enter this (PHPEclipse
must be in the waiting-to-debug mode) you will see control switching to
PHPEClipse and the line in your first page where you set a breakpoint
will get highlighted by the debugger. Step through to the end. and
switch back to your web browser (where page two is now being
displayed). Click on a form submit and see how control switches back to
PHPEclipse on the line in the second page where you had put a
breakpoint.

Thus you continually switch between your web browser and PHPEclipse.
The process can go on to as many number of files as you wish - just set
breakpoints in all the files before starting debugging. Trust me, it is
a good alternative to writing echo statements all over the place to
trap errors in a 15-20 page PHP application.

NOTE: On Windows, when control is switched to PHPEclipse, the Windows
taskbar button for PHPEclipse blinks, indicating that that program
demands interaction. I dont know how it is on Linux.

The important thing is to not start the debugger in the internal
browser. For that you must uncheck the checkbox saying "Open DBGSESSION
url in internal browser" which can be found in
Run->"Debug..."->Environment tab->Remote Debug tab. Somehow, (on my
machine at least) the internal browser does not support debuging over
multiple pages.

Hope this helps someone, because I've wasted a lot of time adding
echo's and exits to see the state of variables in various places in my
scripts and it is quite tedious. That kind of debugging has its merits,
though - you become really well versed with your code!

Status Note For Scripts That Run A Long Time
I got some script, that depending on the parameters it gets can take
20min or so to finish execution. When running the script for these
20min one sees nothing but a white page, which is somewhat bad, as the
user think's something is wrong. So I wonder if there's a way to tell
the user, that the script is still running and he's got to wait.

Long Strings In List/menu Boxes
Is there a way to get a list/menu box to resize as the page is resized and
for any long string that is an item in the list to be spread over two or
more lines in the same way as text in a table does.

Php/apache Errors (Argument List Too Long:)
I recently switched to a new hosting service and I've been having a few issues with my scripts (which previously worked with no problems). I often get an "Internal Server Error" on various pages of my site. It doesn't always happen but it happens quite often and at different spots. Here is what is listed in my httpd error log (I've edited out the IP address):

[Sun Jun 29 20:54:26 2003] [error] (7)Argument list too long: exec of /home/virtual/site2/www/interpreters/php-script failed
[Sun Jun 29 20:54:26 2003] [error] [client XX.XXX.XX.XXX] Premature end of script headers: /home/virtual/site2/www/interpreters/php-script

I have no clue why it is doing this. If I click refresh at the "Internal Server Error" then I am brought to my page like usual. I'm almost positive it has to do with sessions since when I log out my pages load normally.

Reg Ex Expression - Finding Long Character Strings
"Garp" <garp7@no7.blueyonder.co.uk> wrote in message news:<_vpuc.1424$j_3.13346038@news-text.cableinet.net>...[color=blue]
> "lawrence" <lkrubner@geocities.com> wrote in message
> news:da7e68e8.0405300907.3c8eabf7@posting.google.c om...[color=green]
> > This reg ex will find me any block of strings 40 or more characters in
> > length without a white space, yes?
> >
> > [^ ]{40}
> >
> >
> > To get it to include tabs and newlines, do I to this?
> >
> > [^
]{40}[/color]
>
> s is the whitespace token, if that's easier for you.[/color]

Good, but now my question is how to insert the white space that I
want. If I do this:

$string = ereg_replace ([^s]{40}, " ", $string);

Then the text gets obliterated and replaced by a white space. That is
not what I want. I simply want to break up long strings (mostly urls)
that threaten to destroy the format of a page. This is especially true
of Internet Explorer, which tends to expand DIV tags to fit the
contents (Netscape lets long urls burts outside the boundries of the
DIV.)

Go look at this page using IE 5 or 6:

http://www.publicdomainsoftware.org

You'll see a comment (right now it is the second one down) that looks
like this:
[color=blue][color=green][color=darkred]
>>>>>>>>>>>>>>>[/color][/color][/color]
Misty, I assume you're the one who came up with these interesting
photos of vegetables? Are they from the ARE garden?
http://www.publicdomainsoftware.org...vegetables2.JPG ...read
more[color=blue][color=green][color=darkred]
>>>>>>>>>>>>>>>[/color][/color][/color]

That long url is distorting the whole page. I need to break it up.

I suppose I could hit the whole string with explode() and break them
on the white space and then loop through the array and test each entry
for a length of more than 30 or 40 or so, and then stitch it all back
together with implode, but I was assuming I could do it all more
elegantly with regular expressions. I don't know much about regular
expressions, but if someone does,

Submitted Long Text : Php Could Have Problem With Quotes
I've run into this problem a few time but just ignored but I can't ignore it anymore.
On a few of my sites I have a "News" section and I've made a simple admin area for people to type in new stories, etc. They also get stories emailed to them to put up on the site.

But I found that articles with quotes and lots of punctuality and if the article is long, wont submit to the DB. PHP Code:

OOP Database Tables <-> Php Interface (semi LONG)
I'm trying to grasp OOP to build an interface using class objects that lets
me access database tables easily. You have probably seen this before, or
maybe even built it yourself at some point in time. I have studied some
examples I found on the internet, and am now trying to build my own from
scratch.

I have made a default table class (DB_Table), a default validation class
(Validator) which is an object inside DB_Table and my final database tables
each get a class: e.g. User, UserProfile, Country, etc that extend the
DB_Table class.

Its something along the lines of (incomplete code, just for demonstration
purpose):

<?php

class DB_Table
{
public function __construct()
{
// intialize object
// initialize (common) validator
$this->validator = new Validator( $this );
}

public function loadData()
{
// get all data from record
}

public function saveData()
{
// save all data to record
}

public function __get( $field )
{
// get object property
}

public function __set( $field, $value )
{
// set object property
}
}

class User extends DB_Table
{
public $dbt = DB_TABLE_USER;

public $fields = array(
'id' =NULL,
'userType' =NULL,
'username' =NULL,
'password' =NULL,
'email' =NULL,
'active' =NULL,
'timeCreated' =NULL,
'timeActivated' =NULL,
'timeUpdated' =NULL
);

public $fieldSpecs = array(
'id' =array(
'screenname' ='user id',
'type' ='int',
'autoinsert' =true,
'autoincrement' =true,
'static' =true
),
'userType' =array(
'type' ='tyniint',
'nodisplay' =true
),
'username' =array(
'screenname' ='username',
'type' ='string',
'unique' =true,
'required' =true,
'static' =true,
),
// etc...
);
}

?>

It definately still needs a lot of tayloring for it to even work smoothly
for straightforward DB tables. But besides that, a few future issues are
bothering me already:

For instance, take the class User: let's say somebody registers at my site.
This person fills in the details. The Validator class checks each field
seperately. No problem. A new User record is inserted in the database.

But what now, if a user wants to login to the system after the user is
registrated?
I would create an instance of class User. Asign the credential values to the
object. And let the Validator class do its work again.
But, if a user logs in with incorrect credentials, I don't want to report
back to the user whether he/she filled in an incorrect username or an
incorrect password. No, I only want to report back that he/she has filled in
wrong credentials.

But the Validator class only checks each field seperately. In order to keep
the Validator class as common as possible would you build a seperate Login
class for instance? A class that has some custom validation methods? Or
perhaps just insert custom validation methods in the User class? I myself
just cannot seem to make up my mind in this case. Probably cause I'm still
too inexperienced when it comes to OOP programming.

A few other minor questions come to mind also:
- My gut feeling tells me it is wise to make a reference to the Validator
class inside DB_Table, e.g:
$this->validator =& new Validator( $this );
.... because it only creates a single instance of the object, right?

- And why can't I refer to a private variable in DB_Table from an extended
class (such as User)? I would asume, that this private variable, declared in
the parent object, is now a private variable in User also, no?

- And last but not least, is there a way for me to access let's say User
properties from the Validator class without having to pass $this as an
argument to:
$this->validator = new Validator( $this );
.... I know the following to be incorrect, but I was thinking of something
like the keyword parent.

Long Load Times With Link Validation
I am creating a webpage that has a bunch of my friends webcams and displays whether they active or not. The webcam software we use basically runs a webserver on our computers and can be accessed by going to http://<ip>:<port>.

At first, I simply used the fopen function to determine if the page was active, however when I found that it took so long to work (It works, but takes about 1min-1.5mins to load) I downloaded a more complicated script from the internet that I don't quite understand at this point in my PHP career. Same result, works but takes forever. PHP Code:

Warning: Setcookie() Expects Parameter 3 To Be Long,
I am using a modified versoin of PHP Helpdesk from SourceForge.net. It uses cookies to do some authentication measures and present the user who is logged in with the tickets they need. And until recently, it was working well. I suspect that my host has recently upgraded their version of PHP, but I can't be sure.

Anyway, until recently, as I stated, it was working well. Now I am getting the following error when trying to log in:

Warning: setcookie() expects parameter 3 to be long, string given in /path/to/files/helpdesk/includes/cookie.inc.php on line 8

The cookie.inc.php is actually quite a small file and I would not think that it would cause me much grief, but it is. Below is the actual code for the cookie generation script: Code:

Cron Or Command Line: Run A Very Long Php Script
I have a list of links which point to e.g.
thescript.php?album=somePictures1
thescript.php?album=somePictures2

This list is about 3000 links. Each album may have 500 or more pictures in it.
the script looks in the specified dir, and creates thumbnails if they are not
present. So, displaying a particular album often takes quite a while. I've set
the proper php.ini stuff to accomodate the long script_execution's. Thats all
working fine.

Now, I dont want the end user to have to wait for the thumbs if they land on an
album that has not yet had thumbnails created.

So the question is, what is the best way to run all those links automatically,
thereby creating all the thumbs?



Warning: Rand() Expects Parameter 1 To Be Long
Rand() function doesnt like me....Heres my error:

Warning: rand() expects parameter 1 to be long, object given in C:Program Filesxampphtdocswinterswordcorecombatcombat.class.php on line 205

Now, I give it the two numbers 10 and 12. Whats wrong with that?

PHP Warning: Setcookie() Expects Parameter 3 To Be Long
I am moving a site (from a server running PHP4 to a server running PHP5) with a simple PHP login system that sets a cookie and sends an email that someone has logged in. It is returning an error and not setting the cookie. Here is the error:

PHP Warning: setcookie() expects parameter 3 to be long, string given in /home/taylor/public_html/login/login.php Here is the PHP code (the contents of the login.php page that the form calls): Code:

Convert A Long Sentence Into Words/string
how to convert a sentence into strings Eg. "I am just a beginner in this PHP" into new lines as follows:

I
am
just
a
beginner
in
this
PHP

Interrupting Long While Loops With Heading Rows
I have a lot of data that I am pulling from a MySQL DB and displaying it in a crude table. Is there anyway to start the while loop (pulling up say, 80 results), and direct it to print a row of headings every 20 results? So that way the users still know what they are looking at even when scrolled down to the bottom.

Date Script For Semester Long Classes
I'm trying to write a basic script that will fill in dates for me automatically. Specifically, I teach classes on either Monday/Wednesday/Friday, or Tuesday/Thursday sequences.

I want to enter a starting date, say Monday, August 27th, 2007, and a course sequence, either MWF or TR, and have all dates for days accessible, so for instance for Tuesday on the 14th week of class, I can just put Tuesday, <?php echo classDate[14] ?> and have it echo the date of that class.

Problem In Handling Long Text In MYSQL Table
i am making a database driven website which is working fine.
My web page contains lot of text and it is very diffcult to upadate its content from the text_field of MQSQL table. As i have to read each line again and again to update it.

I have alloted parent_id to each category_id in my database table and thus retreving results from it...

I want to know what should i do to handle this long text ...such as if i am able to make a seperate text file for each of my html_body variable and somehow include that file to a webpage when i select a particular parent_id from my wepage.


Copyright © 2005-08 www.BigResource.com, All rights reserved