Solved

PHP Shorthands are not working ...

Posted on 2011-02-13
7
310 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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

624 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