TLawrence Posted August 13, 2008 Share Posted August 13, 2008 I'm using javascript to create a popup window and load a PHP page in the window. The popup works fine, but the problem I'm having is that the PHP code is not being recognized in the popup window; it's loading as a normal HTML page, ignoring all PHP. There are other PHP files in this same directory and they all work correctly (PHP code is recognized). This is only happening on the client's server. On my local server, everything works fine, which leads me to believe it might be a file permission issue. But I've never come across a problem with one file...usually it's the whole directory that has the wrong permissions set, but other PHP files in this same directory are working. Plus, I don't think permissions would have anything to do with recognizing PHP code (am I wrong?) This leads me to the next possiblity, the URL I'm using to call the popup window. My javascript function is called like this: ...popup('pu_empid.php?source=update',400,500,'yes','no','no')... I'm passing the filename as the first parameter. Do I need to use "./" in front of the filename? I'm assuming if the code above works on my server, why wouldn't it work on the client server as well? I believe we're both running IIS 5. Has anyone ever come across this issue? Any idea why the PHP is not being recognized in the popup window? Thanks in advance. TLawrence Link to comment https://forums.phpfreaks.com/topic/119505-solved-php-code-not-recognized-in-popup-window/ Share on other sites More sharing options...
akitchin Posted August 13, 2008 Share Posted August 13, 2008 is pu_empid.php including any PHP pages that aren't labeled with the .php extension? and does it just ignore the PHP completely, or does it echo onto the screen as text? does the pu_empid.php page work fine if you type it into your browser manually? Link to comment https://forums.phpfreaks.com/topic/119505-solved-php-code-not-recognized-in-popup-window/#findComment-615668 Share on other sites More sharing options...
Stooney Posted August 13, 2008 Share Posted August 13, 2008 Try using an absolute url and see what happens. ex http://site.com/folder1/pu_empid.php?source=update Link to comment https://forums.phpfreaks.com/topic/119505-solved-php-code-not-recognized-in-popup-window/#findComment-615680 Share on other sites More sharing options...
TLawrence Posted September 11, 2008 Author Share Posted September 11, 2008 For anyone with a similar problem, or just interested in the solution, it ended up being my PHP tags. I noticed I was using <?php ?> throughout the site except for the pop-up window (don't ask me why). I was using <? ?> in the pop-up window, which I have turned on in my php.ini file, but it doesn't look like my client has the short-cut tags turned on for their server. It was just coincidence that this happened in the pop-up window. akitchin, thanks for the idea about typing the page manually in the browser. I was getting the same problem in the main browser window, which ruled out the pop-up as being the issue. That led me to looking at how that page was different than the rest, and sure enough, the PHP tags were the issue. Thanks again! Link to comment https://forums.phpfreaks.com/topic/119505-solved-php-code-not-recognized-in-popup-window/#findComment-639168 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.