praethorian Posted March 3, 2009 Share Posted March 3, 2009 Hi all, this will sound a bit funny, but I am stuck at the mmnt. My ISP changed my .htaccess file and set php_value memory_limit 16M in my .htaccess file, but it is not still enough and I want to set it to 32M. I thought that the file is located in my root folder, but there is just my www folder (tried to use find function, but still no luck). I am a bit confused. Am I looking in the right place? Any help would be most welcome. Pete Quote Link to comment https://forums.phpfreaks.com/topic/147796-get-a-htaccess/ Share on other sites More sharing options...
corbin Posted March 3, 2009 Share Posted March 3, 2009 The file probably just got deleted, or something. Also, you can do it in PHP: ini_set('memory_limit', '32M'); Quote Link to comment https://forums.phpfreaks.com/topic/147796-get-a-htaccess/#findComment-775820 Share on other sites More sharing options...
trq Posted March 4, 2009 Share Posted March 4, 2009 Files starting with a period are hidden files in Linux, how are you accessing your directory? If your using an ftp client you may need to set 'show hidden files' or something simular. If your accessing the directory via a shell then... ls -a will show all files including those hidden by a period. Quote Link to comment https://forums.phpfreaks.com/topic/147796-get-a-htaccess/#findComment-775929 Share on other sites More sharing options...
praethorian Posted March 4, 2009 Author Share Posted March 4, 2009 Hi all, I am using ftp client Total commander ( and the property show hidden files is set ). I've tried to copy the .htaccess file even on the other server and there is all fine (can see it, copy it, ....). The funny thing about the first server is, that if I copy the .htaccess file over and over again to the same folder, I dont have to overwrite the old .htaccess file. It looks like it is not even there. Pete Quote Link to comment https://forums.phpfreaks.com/topic/147796-get-a-htaccess/#findComment-776156 Share on other sites More sharing options...
odpoa Posted March 4, 2009 Share Posted March 4, 2009 just put the .htaccess file in the same dir as the scripts you want it to affect(deleting the old on first of course) if you feel there is a problem you can write a php script to do the job for you then visit the script, forcing the server to delete the file for example <?php unlink('.htaccess'); $flha = fileopen('.htaccess', 'w+'); filewrite($flha, "php_value memory_limit=32MB"); fileclose($flha); echo 'SUCESS'; ?> then when you visit the page in your web browser the server will be forced to delete and recreate the file (if you have given the .php file access to read, execute, and write) or you could set it using php as stated in a post above me Quote Link to comment https://forums.phpfreaks.com/topic/147796-get-a-htaccess/#findComment-776774 Share on other sites More sharing options...
odpoa Posted March 4, 2009 Share Posted March 4, 2009 sorry code: <?php unlink('.htaccess'); $flha = fread('.htaccess', 'w+'); fwrite($flha, "php_value memory_limit=32MB"); fclose($flha); echo 'SUCESS'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/147796-get-a-htaccess/#findComment-776779 Share on other sites More sharing options...
corbin Posted March 4, 2009 Share Posted March 4, 2009 Uh, I think you meant fopen instead of fread. Quote Link to comment https://forums.phpfreaks.com/topic/147796-get-a-htaccess/#findComment-776815 Share on other sites More sharing options...
odpoa Posted March 5, 2009 Share Posted March 5, 2009 yes I did, forgive me, I have not slept in many days xD Quote Link to comment https://forums.phpfreaks.com/topic/147796-get-a-htaccess/#findComment-777147 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.