View previous topic :: View next topic |
Author |
Message |
abdul202 Smarty n00b
Joined: 22 May 2015 Posts: 3
|
Posted: Fri May 22, 2015 3:41 pm Post subject: smarty 2 doesn't create compiled files |
|
|
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 |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri May 22, 2015 9:55 pm Post subject: |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri May 22, 2015 10:35 pm Post subject: |
|
|
Do you get any error message?
Does the PHP error log file show any errors? |
|
Back to top |
|
abdul202 Smarty n00b
Joined: 22 May 2015 Posts: 3
|
Posted: Sat May 23, 2015 3:07 pm Post subject: |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat May 23, 2015 4:38 pm Post subject: |
|
|
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 |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Sat May 23, 2015 8:42 pm Post subject: |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat May 23, 2015 9:44 pm Post subject: |
|
|
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 |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Sat May 23, 2015 10:06 pm Post subject: |
|
|
I was pointing obvious flaws in his logic. Sorry if that wasn't apparent. |
|
Back to top |
|
abdul202 Smarty n00b
Joined: 22 May 2015 Posts: 3
|
Posted: Sun May 24, 2015 12:25 am Post subject: |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sun May 24, 2015 1:40 am Post subject: |
|
|
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 |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Sun May 24, 2015 4:57 am Post subject: |
|
|
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 |
|
|