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

Known issues with PHP 4.3.2 / IIS 5.0?

 
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 -> Installation and Setup
View previous topic :: View next topic  
Author Message
case23_69
Smarty Rookie


Joined: 15 Apr 2004
Posts: 26

PostPosted: Wed Aug 04, 2004 7:42 pm    Post subject: Known issues with PHP 4.3.2 / IIS 5.0? Reply with quote

Hello,

Are there any known issues with running smarty on PHP 4.3.2.?

My production environment is Win2K Server, IIS 5.0, PHP 4.3.2.

My development environment is WinXP Pro, IIS 5.0, PHP 4.3.6.

I have run into a CGI Timeout in one of my scripts. Very strange, I populate 3 tables with SECTION loops. I admit it's pretty database intensive, but it runs on my personal SQL Server (which is much slower than the production environment). On the production server, it fills are 3 tables, and all that's left is outputing the SUBMIT button. THe page grinds away and finally outputs a CGI Timeout error.

Other issues: I can't use an extended smarty class with all of my template files (some of them I can) on production. I just get a blank page. Works fine in development. The only thing different in the PHP.INI files was I had magic_sybase_quotes turned On in production and Off in development. I turned them off in production and this didn't help.

Final issue: In development, I upgraded to 2.6.3 no problem. In production, blank page. I have error reporting off in production and don't have access to the event file, but I recieved no Warnings/Errors in development. All of my PHP and TPL files are the EXACT same in both environments. I really want to extend the smarty class so I can move my template directories out of the application directory. I also want to upgrade to 2.6.3. I'm at a point where I'm considering moving this app to the .NET platform if I can't be confident in this setup.

Anyone?
Back to top
View user's profile Send private message
case23_69
Smarty Rookie


Joined: 15 Apr 2004
Posts: 26

PostPosted: Wed Aug 04, 2004 7:51 pm    Post subject: Reply with quote

I should also mention I'm using PEAR-DB and Smarty 2.6.2
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Aug 04, 2004 7:52 pm    Post subject: Re: Known issues with PHP 4.3.2 / IIS 5.0? Reply with quote

case23_69 wrote:
Final issue: In development, I upgraded to 2.6.3 no problem. In production, blank page. I have error reporting off in production and don't have access to the event file, but I recieved no Warnings/Errors in development.


so you refuse to turn your error_reporting on, just because everything works fine on a totally different setup?
and now you want us all to put out our magic spheres to help you, instead?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Aug 04, 2004 8:00 pm    Post subject: Reply with quote

Time your SQL queries in both environments. Messju is right, though--unless you ensure the debugging on your problem environment, we are left to guessing, which isn't much help. BTW: you can turn debugging on/off from you PHP script.
Back to top
View user's profile Send private message
case23_69
Smarty Rookie


Joined: 15 Apr 2004
Posts: 26

PostPosted: Wed Aug 04, 2004 9:00 pm    Post subject: Reply with quote

Thanks for the responses and pointing me in the right direction.

I added the following to the top of my script in production:

error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', true );

And wa-la!
Code:

Warning: Smarty error: problem writing temporary file 'templates_c\41114d4727988' in c:\php\Smarty\libs\Smarty.class.php on line 1102


Now, are you going to put on your magic spheres or make me dig through the documentation?
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Aug 04, 2004 9:10 pm    Post subject: Reply with quote

your $smarty->compile_dir doesn't seem to be configured correctly, or you don't have permissions to write into it. sorry i don't know much about file-permissions in IIS or Win2K.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
case23_69
Smarty Rookie


Joined: 15 Apr 2004
Posts: 26

PostPosted: Wed Aug 04, 2004 9:28 pm    Post subject: Reply with quote

Is it safe to delete all files in the templates_c directory and let smarty recompile from scratch?
Back to top
View user's profile Send private message
case23_69
Smarty Rookie


Joined: 15 Apr 2004
Posts: 26

PostPosted: Wed Aug 04, 2004 9:32 pm    Post subject: Reply with quote

I have set my security to give write access to templates_c and no more error message, but the full page content will load, but the page just keeps spinning into a CGI Timeout. So, I'm back to square 1.
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Aug 04, 2004 9:32 pm    Post subject: Reply with quote

case23_69 wrote:
Is it safe to delete all files in the templates_c directory and let smarty recompile from scratch?


yes, it's safe to delete them. and if you upgrade smarty (or switch versions in some way) it is a must.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Aug 04, 2004 10:14 pm    Post subject: Reply with quote

magic spheres -- that just kills me Smile
Back to top
View user's profile Send private message
case23_69
Smarty Rookie


Joined: 15 Apr 2004
Posts: 26

PostPosted: Thu Aug 05, 2004 6:28 pm    Post subject: Reply with quote

Well, I still have
[php:1:a441b46108]
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', true );
[/php:1:a441b46108]
at the top of my script. I'm getting no error messages and the page is still hanging. The full page content loads, but the page continues to load and I get a CGI Timeout if I wait long enough. It seemed like smarty wasn't picking the templates directory in the application directory, so I added:

[php:1:a441b46108]
$smarty = new Smarty;
$smarty->template_dir = 'C:/InetPub/wwwroot/myDir/templates/';
$smarty->compile_dir = 'C:/InetPub/wwwroot/myDir/templates_c/';
$smarty->config_dir = 'C:/InetPub/wwwroot/myDir/configs/';
$smarty->cache_dir = 'C:/InetPub/wwwroot/myDir/cache/';
$smarty->caching = false
[/php:1:a441b46108]
.. where myDir is where my application resides.
Note that the page hangs with or without specifying these directories.
Back to top
View user's profile Send private message
case23_69
Smarty Rookie


Joined: 15 Apr 2004
Posts: 26

PostPosted: Thu Aug 05, 2004 6:30 pm    Post subject: Reply with quote

There is a semicolon after
$smarty->caching = false
in my script, I just mistyped it here.
Back to top
View user's profile Send private message
case23_69
Smarty Rookie


Joined: 15 Apr 2004
Posts: 26

PostPosted: Thu Aug 05, 2004 6:40 pm    Post subject: Reply with quote

Here's the error, if you want to see it:

Code:
HTTP/1.1 502 Gateway Error Server: Microsoft-IIS/5.0 Date: Thu, 05 Aug 2004 18:36:36 GMT Connection: close Content-Length: 186 Content-Type: text/html
CGI Timeout
The specified CGI application exceeded the allowed time for processing. The server has deleted the process.


If I had PHP running as an ISAPI module, this would bring down the server.
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Aug 05, 2004 7:06 pm    Post subject: Reply with quote

I doubt a timeout would crash the server. What have you done to validate the idea that this is being caused by Smarty? The fact that it works on your dev box but not the prod box is very telling, yes? I assume, for example, that the prod box has a much larger dataset in the DB than the dev box. Have you verified that the queries are acting nicely? Are they acting nicely from straight PHP code?

Have you tried the FastCGI module? Are you using a PHP accelerator, and if so, did you clear it after upgrading your version of Smarty? Do you have the right security access for the templates, templates_c and cache dirs for your IUSR?

Basically, I'm not seeing in your posts any indiciation that you have pinpointed this as a Smarty issue (it may be, of course, but it is hard to tell from your description so far).
Back to top
View user's profile Send private message
case23_69
Smarty Rookie


Joined: 15 Apr 2004
Posts: 26

PostPosted: Fri Aug 06, 2004 1:05 am    Post subject: Reply with quote

The datasets on production and testing are the exact same. I did a db restore to testing recently for testing. I'm not using any PHP accelerator. However, I just upgraded production to PHP 4.3.8 and the page loads like a champ! No more hang, no more cgi timeout. I am still having issues upgrading to Smarty263, though.
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 -> Installation and Setup 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