Solved

PHP Shorthands are not working ...

Posted on 2011-02-13
7
308 Views
Last Modified: 2012-05-11
Hi Guys,

I'm trying to include a php file within include file...  its not working....
the page shows blank.. (empty) no errors, no warnings
and when i upload my site on other hosting (Linux) server its working properly.
can u explain what was the problem...? and why this kind of behavior.

I'm using 1and1 VPS server (CentOS release 5.2)

Please advice, what is the problem or where I'm doing any thing wrong or how to fix ... :-(

Thanks in advance.
0
Comment
Question by:el123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 4

Expert Comment

by:JayDiablo
ID: 34884900
Do you have access to the server's http error log?

You may want to check there for errors.  Most default PHP installations have errors set to not display, but will still log (as they should be).
0
 

Author Comment

by:el123
ID: 34885047
yes I've access to linux server ... what to look and where to look? please guide, thanks.
0
 
LVL 16

Accepted Solution

by:
jessc7 earned 333 total points
ID: 34885136
Look for the "short_open_tag" directive in your php.ini. Change it to a value of "1" to turn it on. You may need to restart Apache.

http://www.php.net/manual/en/ini.core.php.

http://www.tomjepson.co.uk/tutorials/35/enabling-short-tags-in-php.html
0
Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

 
LVL 16

Expert Comment

by:jessc7
ID: 34885147
Here is a tip on finding your php.ini:

http://www.geeklog.net/faqman/index.php?op=view&t=53
0
 
LVL 16

Assisted Solution

by:jessc7
jessc7 earned 333 total points
ID: 34885154
If you want to display errors without changing your php.ini file, use the following to override in the page scope:

<?php
ini_set('display_errors', 1);
?>
0
 
LVL 11

Expert Comment

by:mattibutt
ID: 34886106
Hi
I use the 1an1 server with centos are you using plesk if you are then enable php short tag it worked fine as far I remember I didn't have to change anything
0
 
LVL 110

Assisted Solution

by:Ray Paseur
Ray Paseur earned 167 total points
ID: 34888081
Add this to the top of all the scripts that are involved in the process.  Then run it again and tell us what output you received.
<?php
ini_set('display_errors', TRUE);
error_reporting(E_ALL);

Open in new window

0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question