![]() |
Anyone here can help me with PHP ?
Hi !
Anyone here knows how much memory i can use under php scripts ???? It seems that my script is reached this limit, because i'm geting same error warnings ... I'm using about 10 arrays with more than 500 items, each array with size about 400kbytes of html text I have got 128MB RAM in my server, it's so little for this matter ? Anyone can help me ? |
looks like you need a database.
|
This depends on a lot of different factors....how much memory
is used by the OS, other running applications, your webserver takes memory, the size of your swapfile, etc, etc.... Theoretically your appication requires 4Mb per session to run. 4Mb shared memory per user if you had 128Mb free memory you could have 128/4 32 simultanious users. Why store content in arrays? Better to use pointers to the content in your arrays... So don't put html in the array but just the location of the html. Same for database use. Don't store images in DB store the location of images in the DB that's far more effecient. DynaMite |
That shouldn't realy matter unless your scripts are being called a lot and maybe not exiting properly. A database would do nothing to help you as even with a DB query, your results will be stored in an array. That does seem like a lot of data to have stuck in arrays though, especially if the script is being executed 100K times a day.
|
i forgot to tell, that all what script would do is compose one e-mail for a subscribed user. each user get different email,
and it's launched only one time per day... now i'm thinking about db, because , i'm using db also for my users... I can't use pointers, it's good idea, but not in my case, because i must store THML tags to buffer, the best looks DB for this case too, but can i store HTML text to some fields of db ? anyway thanx guys for help |
I think AMP should be able to help out on this one..
|
The possible reason for the script to die / timeout, is that sending large chunks of e-mail with PHP, is not a very good solution.
PHP can't handle that, and would probably die, after maybe 25-50 e-mails in the same request/file/script. You should get an application which can work together with sendmail/qmail better. An application in PERL would do the job. Search for scripts at www.hotscripts.com. Good luck. |
Maybe if you explain exactly what your trying to do.
Then there may be different ways of programming or a script that fits what your trying to do.:Graucho |
Just had to do the same thing for a client. PHP definitely isn't the way to go. You'll need to use Perl's fork(). Fork a process that will continue to run until it's done with its tasks regardless of the status of the browser.
|
it's not good for me, i'm able only in PHP, + MYSQL
now i can't store full html file to column of MySQL, anyone can i tried store to column type TEXT, then BLOB, BLOB type allows store 65kb to one column, it's enought for me, but very time it's bouncing some HTML tags or some unknown chars, then nothing happens - ( don't add new record) I think i must use some function before putting full HTML text to columns of MYSQL table, or maybe i'm using wrong type of columns for this Could anyone help me what's type is the best for this matter i would very appreciated... |
shit it was this function i was needed
AddSlashes I must learn a lot... |
All times are GMT -7. The time now is 07:55 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123