Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

smarty 2 doesn't create compiled files

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
abdul202
Smarty n00b


Joined: 22 May 2015
Posts: 3

PostPosted: Fri May 22, 2015 3:41 pm    Post subject: smarty 2 doesn't create compiled files Reply with quote

I'm a newbie at smarty engine
i use smarty 2 for my script
i use it for admin area and front area
it dose compile files for admin area and not for front area
i sell my script for many clients and this is the first client i face this kind of problem
both compile folder has the same permission 755
PHP Version 5.4.40
Thanks
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Fri May 22, 2015 9:55 pm    Post subject: Reply with quote

Permissions aren't set in the void.
If your server is unable to create files, then the the user under which the server is running don't have write access to the directory.
Also 755 is too open for a webhosting.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Fri May 22, 2015 10:35 pm    Post subject: Reply with quote

Do you get any error message?
Does the PHP error log file show any errors?
Back to top
View user's profile Send private message
abdul202
Smarty n00b


Joined: 22 May 2015
Posts: 3

PostPosted: Sat May 23, 2015 3:07 pm    Post subject: Reply with quote

AnrDaemon wrote:
Permissions aren't set in the void.
If your server is unable to create files, then the the user under which the server is running don't have write access to the directory.
Also 755 is too open for a webhosting.

i can write other files to the the compile directory
U.Tews wrote:
Do you get any error message?
Does the PHP error log file show any errors?

i get no errors
really it's wierd issue
it's the first client i get this issue with
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sat May 23, 2015 4:38 pm    Post subject: Reply with quote

So what happens? You just get a blank page?
Anything in the Apache error log?
Is the compiler directory completely empty? Delete existing stuff.

Check if the application does return a successful is_writable() check for the folder.
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sat May 23, 2015 8:42 pm    Post subject: Reply with quote

abdul202 wrote:
AnrDaemon wrote:
Permissions aren't set in the void.
If your server is unable to create files, then the the user under which the server is running don't have write access to the directory.
Also 755 is too open for a webhosting.

i can write other files to the the compile directory

Your webserver is running under the user named "i" ? Weird. Normally it is "www-data" on many distributions around the worlds.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sat May 23, 2015 9:44 pm    Post subject: Reply with quote

AnrDaemon wrote:
abdul202 wrote:
AnrDaemon wrote:
Permissions aren't set in the void.
If your server is unable to create files, then the the user under which the server is running don't have write access to the directory.
Also 755 is too open for a webhosting.

i can write other files to the the compile directory

Your webserver is running under the user named "i" ? Weird. Normally it is "www-data" on many distributions around the worlds.


He didn't say the user name is "i"
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sat May 23, 2015 10:06 pm    Post subject: Reply with quote

I was pointing obvious flaws in his logic. Sorry if that wasn't apparent.
Back to top
View user's profile Send private message
abdul202
Smarty n00b


Joined: 22 May 2015
Posts: 3

PostPosted: Sun May 24, 2015 12:25 am    Post subject: Reply with quote

U.Tews wrote:
So what happens? You just get a blank page?
Anything in the Apache error log?
Is the compiler directory completely empty? Delete existing stuff.

Check if the application does return a successful is_writable() check for the folder.

i added this for the index.php file
Code:

error_reporting(E_ALL);
ini_set('display_errors', 1);


and i got this error
Code:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4294967296 bytes) in /home/xxxxx/includes/MysqliDb.php on line 628


and the error disapper and the script worked fine when i aded this

Code:

ini_set('memory_limit', '-1');

is this a good way to fix this issue
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sun May 24, 2015 1:40 am    Post subject: Reply with quote

What the hell does MysqliDb.php do?
It request 4GB of memory. Maybe something is configured wrong.

Anyway you should not set the memory limit to -1 (unlimited) Thia may hangup the whole system.
Use a reasonable value for your application.
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sun May 24, 2015 4:57 am    Post subject: Reply with quote

More like he tried to pull some millions of records from the DB at once.
Typical "SELECT * FROM table; -> foreach(if field=xxx) do stuff;" programming.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP