|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Fatal error: Allowed memory size of 33554432 bytes exhausted
Hi all,
. as you can see in the subject, I get the following error : Fatal error: Allowed memory size of 33554432 bytes exhausted What you might also have noticed is that I allready tuned the value in php.ini to be 32 MB in size (searching google is a nice thing to do before actually posting something luke this). BUT, i figured out when I get the error !! . Here's what my php script does. - checks if the user is actually logged in - if it is a certain user, it will show me the directory contents of the web page that user hosts on my site. This last part is where the problem comes: if that directorie is an actual directory, everything is ok, BUT, if it is a link to another directory anywhere (even one 'next to' the link) within my system, I get the error !!! So, the chdir does not seem to follow the link, causing this memory exception to be thrown !! If anybody has any ideas on how I could possibly be able to solve this that would be great. (I just thought of something: hard-link instead of a soft link, but I have to look into that on first.) BTW, I'm running on Linux |
|
#2
|
|||
|
|||
|
Try running a validation to check if the dir listing is a link or a sub-dir or a file.
is_link() can help find it its a link, is_dir for directory. |
|
#3
|
|||
|
|||
|
Thanks, but that would not to the trick for me. It will merely tell me that it is a link, but I want to chdir() into that link, and that's the part that is failing !
|
|
#4
|
|||
|
|||
|
Then use $DIR = readlink( $LINK ); And then use chdir( $DIR ); ...
|
|
#5
|
|||
|
|||
|
Thanks, but that didn't do the trick for me either.
I did find out why it would fail. I have a link in /var/www/html/users. (eg funny). when I do a chdir(funny), the actual dir would become /data/funny. However, I don't allow that, and change it back to /var/www/html/users/funny. Hence I go into an infinate loop. I have to do some redesign here. Thanks for the help anyway. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Fatal error: Allowed memory size of 33554432 bytes exhausted |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|