PDA

View Full Version : Mac PHP Support


rlbailey
02-07-2007, 09:21 AM
Hi,
I have a client/friend/associate who has an apple laptop. She needs to use a web-app front end website content manager thats built in PHP. There's a controll to enter and edit new webpages that is very similar to the controll to enter a new post on this (PHP Invisionboard) OSCR forum. In safari, it renders a few of the editing controlls, and in firefox and opera it doesnt render any of them. On a windows machine, this font end website manager renders and acts like normal. Just for kicks, we looked at the new post/thread page on this forum with her mac and all of the editing controlls rendered fine.

We're having alot of trouble with her computer when it comes to PHP support. I created a webpage for her that had a one-line PHP script to refresh google's search cache for that particular webpage and the whole page would not render on her computer, but renders normally on Windows machines.

What's going on, and more importantly, how can we fix this problem for her?

Thanks in advance!

emurphy1
02-07-2007, 11:50 AM
Hi,
I have a client/friend/associate who has an apple laptop. She needs to use a web-app front end website content manager thats built in PHP. There's a controll to enter and edit new webpages that is very similar to the controll to enter a new post on this (PHP Invisionboard) OSCR forum. In safari, it renders a few of the editing controlls, and in firefox and opera it doesnt render any of them. On a windows machine, this font end website manager renders and acts like normal. Just for kicks, we looked at the new post/thread page on this forum with her mac and all of the editing controlls rendered fine.

We're having alot of trouble with her computer when it comes to PHP support. I created a webpage for her that had a one-line PHP script to refresh google's search cache for that particular webpage and the whole page would not render on her computer, but renders normally on Windows machines.

What's going on, and more importantly, how can we fix this problem for her?
It sounds like your friend is trying to use a Content Management System (http://en.wikipedia.org/wiki/Content_management_system) (CMS) to edit/create web pages. Some popular open-source CMS systems include: Joomla (http://www.joomla.org/), Drupal (http://drupal.org/) and Typo3 (http://typo3.com/). There are lots and lots of CMS systems, commercial and open-source. That's good, these systems make it easy for non-web programmers to maintain web pages.

This forum is built on VBulletin (http://www.vbulletin.com/), a PHP/MySQL commercial forum application. I know well they type of controls you are describing. It sounds like the problem you friend is having is with the user interface, the client software, in this case the web browser. PHP is a back-end, server side technology. A PHP script is executed on the server and plain old HTML is served up by the web server to the browser. When you are talking about web applications and you notice differences between platforms (Windows, Mac, Linux) and/or browsers this is due to some client side technology. Possible culprits are javascript (http://en.wikipedia.org/wiki/Javascript) and Cascading Style Sheets (CSS (http://en.wikipedia.org/wiki/CSS)). Each browser may implement the W3C standards differently. Some may not support all the CSS possibilities, some may react differently to javascript elements.

To solve the CMS problem I recommend doing some research and finding out what CMS system the web site is using and checking with the creators regarding use of Safari or Firefox on a Mac. Perhaps they are relying on javascript and you have javascript disabled on the browser? Perhaps they are relying on active-X (http://en.wikipedia.org/wiki/Active_X) (a Microsoft technology)? Safari doesn't do well with a lot of active-x controls. This is why you will sometimes see disclaimers like, "This site best viewed using Internet Explorer".

Regarding your simple PHP page (Google cache refresh), I would take a closer look at the logic for that page. Are you sure it is only using PHP? My guess is there's some javascript or even AJAX (http://en.wikipedia.org/wiki/Ajax_%28programming%29) involved. Both of which are client side technologies and would explain why a control works on a PC but not on a Mac. Mac's do support javascript and AJAX just fine, so it's hard to say exactly what is the problem with your page without looking at the code.

picch
02-07-2007, 11:41 PM
If Ed is correct and you are looking for a CMS, PHP-Nuke is another good one and is widely used so it makes it a lot easier to find already written modules and themes.

fischerm
02-09-2007, 11:34 AM
We're having alot of trouble with her computer when it comes to PHP support. I created a webpage for her that had a one-line PHP script to refresh google's search cache for that particular webpage and the whole page would not render on her computer, but renders normally on Windows machines.
This is not a 'PHP on mac' problem, this is probably a problem with incorrectly formed HTML. PHP runs entirely on the server side, and so does nothing different when talking to a mac or a windows PC. What's the URL, its quite likely there's a simple mistake that is simply being treated differently on certain browsers.

rlbailey
02-10-2007, 05:56 PM
What's the URL, its quite likely there's a simple mistake that is simply being treated differently on certain browsers.
The site she has problems with is http://wordpress.org/ .

She also had problems with a normal webpage that I made for her (i don't know php) with a one-line php script to refresh the google cache, here's the start of that page (file named with .php extension ):



<?php
header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0"); ?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE> Title is here </TITLE>
<META http-equiv=Content-Type content="text/htm; charset=windows-1252">
<STYLE>
...
This page is no longer on the server, so it's no big deal that she can't view it. I included it for troubleshooting purposes.

If it's just the browser displaying the page wrong, why do none of the browsers (safari, firefox, opera) show the wordpress edit-page control correctly?

Is there anything we can do so the wordpress control renders correctly?

Thanks for helping me out.

fischerm
02-13-2007, 12:26 PM
Hmm. Well i went and setup a wordpress site on my local computer here to play with:

http://estranged.oscr.arizona.edu/wordpress/

Go ahead and make an account, all new accounts should be 'authors' so you should be able to post. On Safari, the edit box was pretty plain, but it worked ok. In Firefox the edit box was a nicer ajax thing. This is wordpress 2.1, so it may be that older installations do not detect / handle the mac browsers as well as this version does.

The short of it is, there's nothing you can do on the client side short of downloading your own copy of the webkit source and try and hack it to render correctly. It is up to website authors to create pages and tools that are universally usable.

Update:
Wordpress testing is over now.