New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

Issue with Lion and Apache with PHP includes


Post Reply New Thread Subscribe

 
Thread Tools
grahambr

 
Member Since: Nov 22, 2011
Posts: 7
grahambr is on a distinguished road

grahambr is offline
Hi there..I have a strange issue. I have an AIR with LION and turned on Apache and installed MySql. Everything seems to work OK until I use an INCLUDE with PHP. At that point, I just get a blank page on the browser...I take out the include statement and works OK. I know I am using the right syntax as i put the script on a different server and it works fine.

So I am really confused. I dont even get error messages.

Any ideas?
QUOTE Thanks
dekan

 
dekan's Avatar
 
Member Since: Mar 16, 2007
Posts: 756
dekan is a jewel in the roughdekan is a jewel in the rough

dekan is offline
Would you be able to post here what your include statement looks like?

To me it sounds like there is an error or warning and Apache is configured not to display those.

Something to check: on that blank page, display the page source. Is there any sort of html code in there or is it empty?

QUOTE Thanks
grahambr

 
Member Since: Nov 22, 2011
Posts: 7
grahambr is on a distinguished road

grahambr is offline
This is all that is displayed

<html>
<head></head>
<body></body>
</html>


As for the line of code that is doing it... it is this:

include 'includes.php';

I also tried this:

include ('includes.php');

and this

include ('../includes.php');


Sometimes, when I refhresh, I also get the prompt of what I want to do with the file (Open or Save).

Weird.
QUOTE Thanks
johncogan

 
Member Since: Nov 23, 2011
Posts: 6
johncogan is on a distinguished road

johncogan is offline
Do you have firebug installed on Firefox and if so does that give any errors ?
QUOTE Thanks
grahambr

 
Member Since: Nov 22, 2011
Posts: 7
grahambr is on a distinguished road

grahambr is offline
I do, and no errors.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 18,352
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
Firebug won't notice anything since it focuses on HTML, CSS and JS.

Have you tried including different files? Are you trying to include something that you installed by chance?

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
grahambr

 
Member Since: Nov 22, 2011
Posts: 7
grahambr is on a distinguished road

grahambr is offline
Yeah...tried it with different files, in different locations, with different things. Once I link a file it does nothing.

Is there a way to turn on error reporting on Apache or something? If I had an error message..at least that would be something...
QUOTE Thanks
grahambr

 
Member Since: Nov 22, 2011
Posts: 7
grahambr is on a distinguished road

grahambr is offline
Also... it is nothing I installed. I am just linking a file that has functions in it that i can call later (Like Headers etc..). The weird thing is it works fine on the webserver that is on our cloud server...just not the MacBook Air localhost.
QUOTE Thanks
grahambr

 
Member Since: Nov 22, 2011
Posts: 7
grahambr is on a distinguished road

grahambr is offline
Anyone?
QUOTE Thanks
sierraphotog

 
sierraphotog's Avatar
 
Member Since: Mar 12, 2011
Posts: 27
sierraphotog is on a distinguished road

sierraphotog is offline
Perhaps a rights issue on the folder with the scripts?? Dunno, but that's the first thing I'd check on a Windows server...
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,737
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
Dumb question..you have enabled Apache and MySQL..does that automatically give you PHP? I think I had to specifically modify the Apache configuration to enable the PHP shared library and restart it..

Seeing what you are seeing without having the PHP libs loaded makes sense..

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks
grahambr

 
Member Since: Nov 22, 2011
Posts: 7
grahambr is on a distinguished road

grahambr is offline
OK..so I found out the issue. 1) The error logs for Apache are your best friend ...

2) For some reason, for PHP, I could just <? and ?> to break in and out of the script language on my web server, but on the LION apache version I needed to have <?php and ?>.

Strange, but I got it to work. GO figure.
QUOTE Thanks

Post Reply New Thread Subscribe


« Could my mac have a virus... | Can't print anymore »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Ghosts of Mac Lion Server? 2surgeons OS X - Operating System 1 11-14-2011 08:38 AM

All times are GMT -4. The time now is 12:23 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?