Weird PHP issue with Server 4.0.3

Yosemite 10.10.2
OS X Server 4.0.3
default PHP installation 5.5.14
Ok, so I successfully added a couple of Virtual Host websites, strictly using the OS X Server.app, and I can browse on my local network using the private url I gave them.
The problem is, on one of my websites, the PHP that renders the menu isn't working properly. I'm not smart enough to understand exactly why or what's going wrong. It does this whether I host the files in the standard document root, or my own virtual host folder.
Here's how it looks when hosted by OS X Server's Apache (i.e. - wrong)
And for comparison, here's how it looks using MAMP (i.e. - perfect)
The index.php of the site is literally just this and nothing more…
<?php
     include('head.html');
?>
<?php
     include('logo.html');
?>
<?php
     include('menu.html');
?>
<?php
     include('showreel/showreel.html');
?>
The PHP error appears to be happening in the menu.html portion, in particular the array section. I've copied it here for you to see http://pastebin.com/fpAi2YjF
I have a info.php file that confirms php is on, and the checkbox 'Enable PHP Web Applications' is checked in Server.app.
Now, I now I could use MAMP, but I'd rather not. I just want a simple, clean OS X solution. I've paid for Server.app and I want to use it. I'm only hosting these sites for dev purposes on my local network. Also I have no use for MySQL, etc. MAMP is overkill for my needs.
Any idea what I did wrong? Or what I need to change? I'm thinking maybe apple's version of PHP may have slightly different settings.

Mark,
Using the following code I got a properly formatted bullet list - as you would expect as I do not have the css.
<?php
  ini_set('display_errors', '1');
  $current_url = $_SERVER['REQUEST_URI'];
?>
<?php
$menu_items = array(
        "Showreel" => "/",
        "Motion" => "/motion/index.php",
        "Animation" => "/animation/index.php",
        "Interface" => "/interface/index.php",
        "Live Action" => "/live_action/index.php",
        "Info" => "/info/index.php",
?>
<div class="main_menu_container">
        <ul id="main_menu">
        <?php
    foreach ($menu_items as $title => $url)
        if($current_url==$url)
        ?>              
                        <li class='active'><?php echo $title; ?></a></li>
                        <?php
                    else  
                        ?>
                        <li><a href="<?=$url?>"><?php echo $title; ?></a></li>
                        <?php
        ?>
        </ul>
</div>

Similar Messages

  • Issues with Server.app

    hello together,
    I have some issues with Server.app.
    I connect to a server in our local network.
    In the Users tab I see only local users of the server, not the network accounts
    When I choose "Manage Network Accounts" from the "Manage" Menu, it tells me to configure the server as a network directory, but it is already configured as such.
    When I hit "next" and enter account information for the directory admin it tells me that this server is already configured to manage network accounts.
    How can I view and mange the network accounts again?
    Thanks in advance
    macmartin  

    Just fyi, I was not able to resolve this on my migrated server. Every time when I imported the OD backup from 10.5.8 Server.app couldn't load the user or group list and issues an error message with "error 5000" or something. Check if you have that in your logs, too. If so, Server.app is no longer able to authenticate against the OD. There are several threads regarding this 5000-error, none of them worked for me. Usually this happens when the hostname, IP or something in the OD setup changes and the agreed keys no longer work for authentication. As mentioned, I never managed to get that to work again and had to use a fresh OD and create the users from a list (without pwd). Not very charming.

  • Php issue with IE, but works with Chrome & Safari

    In Dreamweaver CS6 I created a html & a php file for an online employment application to be sent via email.  The html file views fine in Internet Explorer but when you select the button that runs the php it thinks for a minute then brings back application screen with nothing filled in. Both Chrome & Safari completes the action (submitting the application via email then displays the "successful" message). I have tried using the Adobe BrowserLab on both the HTML & PHP files.  No messages popped up that something is wrong. Any suggestions?
    Files in question are posted to www.heartprinthomecare.com/application1.html & www.heartprinthomecare.com/app.php
    Thank you in advance for any assistance you can provide
    Additional Note: when the php runs in IE it does send a BLANK email.

    Since php is a server side scripting language, the problem must be with the client side code. Your form page has many validation errors:
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.heartprinthomecare.com%2Fappl ication1.html
    Most of this is probably due to your doctype not matching your markup. You should fix that.
    But I think the problem is that you are using the formaction attribute in the submit button which is only supported in HTML5.  Rather than using two buttons, put the action in the form tag and give the visitor a radio button to choose location. Then have your script take appropriate action based on the radio button selected.

  • A weird installer issue with xcode

    This is a new macbookpro i bought only a few weeks ago. I installed xcode on it, then removed it due to the fact that i needed to put some really huge hd video files, which needed all the hard disk space i could muster. After moving the videos from my mbp to my external hd, i tried to install xcode again. However, xcode's mpkg won't open, no matter how many times i open it with installer. Other mpkgs and pkgs work fine. What's the problem?

    Hi rhonnywhoop, and welcome to the Dev Forum!
    rhonnywhoop wrote:
    I installed xcode on it, then removed it ... i tried to install xcode again.
    There's no such thing as a weird issue with Xcode after an uninstall-install again cycle. Almost anything can go wrong and weird is the rule, not the exception. But yes, most of the strange problems show up after the installation (e.g., Xcode won't open, Xcode starts up but gcc always fails, Interface builder won't read nib files, etc., etc.). If I needed disk space for a video, I'd probably get another drive before I'd uninstall Xcode, but then I use Xcode all the time. Plus it's too late for that advice, so I'll try my best to point you in the right direction.
    A few questions:
    1) Was there any message when the mpkg failed to open? Please post any such message for us;
    2) Did you install from the DVD that came with your MacBook, or did you download a dmg from the Mac or iPhone Dev Center? If you haven't tried downloading the latest Xcode version yet, that might be worth trying;
    3) Did you uninstall from Terminal, using the command given in the Xcode doc (e.g. /Developer/"About Xcode Tools.pdf"? If not, how did you uninstall the prior Dev Tools?
    4) Is any entry made in one of your logs at the time of the failure? E.g., open Console.app (in /Applications/Utilities) and look for the most recent entries in install.log and system.log. If you find anything like that, please post it for us;
    5) Have you tried any additional cleanup besides the recommended uninstall (question 3, above)? Based on case histories in this and other forums, the most powerful trick is to rename /Developer (e.g. to /OldDev). Other tips will be found by searching on terms like "uninstall" or "clean" in this forum.
    In general, we can assume that since your previous installation was successful, the game is to restore your system to its past condition. This may seem like a no-brainer, but it might help to rule out irrelevant conditions as you try one thing after another. In fact, some developers have cleaned up by re-installing the entire system (needless to say, be sure to try restarting your system before resorting to anything that drastic!). On the other hand, some developers have reported that installing a more recent version of the Dev Tools (if any), can clean up a problem when repeated installs of the same system fail.
    I hope something above will lead you to a solution. Several other developers who regularly contribute to this forum know much more than I do about installation problems. For example, if etresoft joins this thread, be sure to follow his instructions completely and before any others.
    \- Ray

  • BPC 4.2 connectivity issues with server

    Hello All, I have a user that is experiencing connectivity issues with our server.  This appears to be at a client level and I would like to know how to correct it.  We are currently using BPC 4.2 (service pack 2).
    The problem occurred when they had IE8 uninstalled and installed IE6 today.  This morning he had no issues connecting to BPC w/ IE8, but lost that connection when IE6 was installed.  When working through the connection wizard, the following errors appear.
    Here are the pop-up error messages they are receiving:
    "The server name, or IP address (srvbpmarl01) is unreachable now.  Please check the following:
    1.  LAN connection or Internet connection is working properly.
    2.  Server name or IP address is invalid
    Detailed Error Message:  Internet connection is not available"
    "The system cannot download information from server:  SRVBPMARL01.
    There may be a network or security issue.
    Error message:  Your LAN connection or Internet connection is not working properly.
    Detailed error message:  Internet connection is not available."
    I can't help but feel this issue is a result of the IE 8/6 complications, but I do not know which actions to take next.
    Thanks for any help you could provide!

    I don't think the problem is related to IE.
    It seems to be more a problem of configuration of IE.
    I suggest to chec the follow:
    1. Please make sure you are not using any proxy into connection of IE. Ot if you neede then make sure you will add your server into exceptions of proxy.
    2. Try to connect with IE to server. use: http://nameofserver/osoft and also http://nameofserver.
    If you received errors in both cases then it seems it is a problem with installaion of IE.
    If you are able to connect and to display the default page for osoft then it must be a configuration problem.
    I suppose MSDTC or Pivot table services is not correct.Try to use slow connection when you connect to server not High connection.
    Regards
    Sorin Radulescu

  • Any issues with server 2008R2 being a backup AD when the Primary AD is a 2003 that was upgraded from NT

    Someone recently told me if a customer has a Windows 2003 server that originally came from NT which was upgraded to Windows 2000, then upgraded to 2003 as their primary AD, if you add a 2008R2 server as a backup AD, it will upgrade the forest, but there
    is an issue with the global catalog not properly replicating to the 2008R2 backup server and thus if the primary Windows 2003 server were to crash the backup 2008R2 server will not be able to authenticate users.
    Can you tell me if this is true?  It seems rather odd to me that if the 2008R2 is able to become a backup controller without any errors and does not report any AD or replication errors in the event log that it would not work if the primary AD failed.
    Thoughts?

    This is not true & never heard/seen of anything as such. The AD database either on windows 2003 or 2008 R2 contains similar objects & attributes, but few groups are only created when you transfer PDC role to windows 2008 & above DC esp if you
    are using RODC.Also, there is no concept of primary & secondary DC from windows 2000 & above. PDC & BDC concepts existed in windows NT not any more.
    The DC with GC role have bit more information because it contains partial information of the objects in other domain too. So, i would be taking backup of the windows 2008 R2 DC. As long as DLF/FFL is not enhanced you can run windows 2003 & 2008 R2 DC
    in coexistence.
    My suggestion would be transfer FSMO role on the windows 2008 R2 DC becasue may be at some point of time you would get rid of windows 2003 DC to enjoy full features of windows 2008 R2 AD.
    Awinish Vishwakarma - MVP
    My Blog: awinish.wordpress.com
    Disclaimer This posting is provided AS-IS with no warranties/guarantees and confers no rights.

  • Weird screen issues with safari

    Hi, I just got a refurbished 15" macbook pro...not retina, but I believe it's a 2012 model.  I'm experiencing a couple weird issues with it.  So far, they seem to be exclusive to Safari, but I'm not sure yet.  Haven't been able to recreate the same problems in Chrome or other programs.  The problems are:
    1)  When filling text into a blank or box...as in a google search, or typing a facebook message, the text I am typing will often disappear or be invisible until i move the cursur to someplace else...then the text will show up.  Words at a time can be invisible.  Like I said, so far, I'm only noticing this in Safari, not Chrome, but I'll have to test with Chrome some more to know for sure.
    2)  Sometimes portion of a page will be misplaced on the screen.  For example, if I'm on Safari, and reading a news story, the left side of the page will look normal, and the right side of the page will look normal, but they won't match in the middle....I'll be seeing text from the beginning of the article one the left side, but from the end on the right side as though only part of the page is able to scroll.  Again, this is only in Safari so far. 
    Both these issues (which I assume are related) have been happening since the first day I got the computer last week and it hasn't been dropped or had anything spilled on it or anything.  I'm well within the warranty period, but this problem may be hard to recreate immediately if I bring it in to a store, so I want to check here first and see if anybody has any ideas. 
    I'm hoping this is a simple known bug with Safari that will eventually be fixed and not a problem with my new computer.  It is enough to have me second guessing my decision to go with a refurbished model, but I'm probably just paranoid.  I'd appreciate any info that anyone has.  Thanks!!!

    I could suggest a reset, but I don't believe that will do much good.
    First, I would contact your local Apple Store, should you be near one, and see if the Genius Bar can solve the problem quickly.
    Second, if they require repairs, you can use their expertise; or, you can use iPod Juice - a business that's more competitive. The latter is where I had my repairs done; email them for fees and services.

  • Weird python issues with dvbobjects.

    So, despite getting opencaster to build and install, I seem to have a strange issue with actually importing dvbojects. There are several examples:
    When initially making the modules... (This happens to all of them. None of the modules are copied)
    byte-compiling usr/lib/python3.4/site-packages/dvbobjects/DVB/Loops.py to Loops.cpython-34.pyc
    Sorry: TabError: inconsistent use of tabs and spaces in indentation (Loops.py, line 116)
    ...then when I manually install them...
    Python 3.4
    Traceback (most recent call last):
    File "./PSIP_MP2.py", line 7, in <module>
    from dvbobjects.PSI.PAT import *
    File "/usr/lib/python3.4/site-packages/dvbobjects/PSI/PAT.py", line 41
    self.private_indicator = 0
    ^
    TabError: inconsistent use of tabs and spaces in indentation
    Python 2.7
    Traceback (most recent call last):
    File "./PSIP_MP2.py", line 7, in <module>
    from dvbobjects.PSI.PAT import *
    File "/usr/lib/python2.7/site-packages/dvbobjects/PSI/__init__.py", line 5
    SyntaxError: Non-ASCII character '\xa9' in file /usr/lib/python2.7/site-packages/dvbobjects/PSI/__init__.py
    on line 5, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
    Never had this issue on Ubuntu or Fedora when I ran these. How can I import these modules without having to edit them? Or whatever other solution is available?
    Thanks.

    The errors you get are pretty self explanatory:
    TabError: inconsistent use of tabs and spaces in indentation
    There's no way you can "fix" this without editing the file. Whoever wrote that code used both tabs and spaces for indentation, when he/she should have stuck with one or the other.
    To fix it, you need to open the file in an editor and do a search/replace-all to replace all tabs with four spaces. Or you need to manually ensure that all indentations in the file are either four spaces or a single tab.
    Last edited by rune0077 (2014-06-17 19:36:59)

  • Very weird issue with server logging when using log4j.properties file

    I'm using log4j logging. In log4j.properties the root logger is set up to use the ServerLoggingAppender class so that all our application logs go to the main server logfile. In addition, there are several appenders defined for specific components, with output going to specific per-component log files. Everything is going fine until I launch the server console. At this point all of those per-component log files get wiped out (zero length) and some non-ASCII lines are written to at least one of these files, after which the logs appear to be fine. The main server log file does not appear to be affected (because the root logger is set to "warn" level, while component-specific loggers are set to trace, the contents in these files is different; however I tried disabling all the other appenders and turning the root logger up to trace, and that still did not re-create the problem in the main server log file.
    And here's the really weird part -- if I use the same configuration, but in a log4j.xml file, the problem does not happen.

    Figured it out.
    We were passing in the configuration for log4j as -Dlog4j.configuration=file:/<properties file> and this was added to the command line for both the managed and admin servers. Problem is that the console app starts its own instance of log4j, and when it reads the configuration for the appenders it initializes or rolls over the files. At some point we have two JVMs accessing the same files, so some corruption is bound to happen.
    I'm not clear why the .xml file made a difference, but earlier we had been passing the log4j configuration as a jar file placed in the domain/lib folder, so perhaps the designer reverted to that (placed the log4j.xml file in a jar in lib, and not simply changed the -Dlog4j.configuration=file:/ option.

  • Mac OS X Server Print Sharing Issues With Server Admin

    Hello,
    I have a fresh install of Mac OS X 10.6.5, with just PaperCut and network printers added. When I open Server Admin (on the server itself) and select the Print service I can see 'servermgrd' and 'cups' using 60%+ CPU each for about 3 minutes. Then when I click 'Queues' tab the 'servermgrd' and 'cups' using go back up to using 60%+ CPU each and even if I leave it running for 12 hours it continues to stay like this, until I quit Server Admin.
    I currently have 45 shared printer queues.
    It sounds like the same issue discussed here:
    http://discussions.apple.com/thread.jspa?messageID=11895050
    Any help would be great! Thank you.
    Message was edited by: Pagemaster

    Anyone???

  • Issues with server side recording in FMS

    I have FMS installed on Windows XP machine.
    I am recording using the server side Stream class. This
    creates a FLV but when I play it back it does not play though it
    has created the file under the dir in FMS.
    After a lot of research I figured out that the recording is
    done properly but I have to restart my FMS before the play back.
    After which the play back goes on smoothly.
    Can any one help me with this. I need to know if this is a
    known issue or else I have to do something on stream at the the
    server side after recording so that I can play it back immediately.

    **Bump**
    I am having a similar issue. I have an app that will redirect
    the stream to the same application but a different instance. The
    ns.publish method is called for recording and the file will write
    correctly. However, after I stop publishing and go in to play the
    file in flv player, it doesnt play back. Looks like the meta data
    is there but no video. Is there a specific procedure to close off
    the file or something that I'm not performing?

  • Issues with server

    Morning everyone!
    We were recently given permission to install RoboSource
    control in order to manage our help projects. What we've done, is
    create one database for each project (we have quite a few versions
    and sub projects). The problem we are encountering, though, is
    getting these projects into source control.
    With the smaller projects (about 100 topics total), the load
    was easy. I did it through the Add Project command in RH, and had
    no issues. However, with the larger projects, it's not going so
    well. The larger projects contain about 2,800 topics, and when I go
    to add them to source control..it will work and work (I see "adding
    file..., etc." in the status window)...then I'll get a database
    error <unknown> and can't continue. This happened twice in a
    row, so both times I removed the project from source control. I
    went into the RoboSource Explorer directly to try and add the files
    that way (keeping in mind to remove the .pss and .cpd files when I
    was done), but no luck. Halfway through doing that, I got another
    error that the server had gone offline. Because I'm in a corporate
    environment, I have to contact someone specifically to reboot the
    servers, which is time consuming.
    Any ideas on why the database errors are happening? Is it
    from large projects? Any advice or ideas would be greatly
    appreciated. All I'm trying to do is get the darn projects INTO
    source control! Thanks in advance!

    We are running projects with about 2,000 topics without any
    problems. We are working with a dedicated server, which only sees a
    little traffic apart from RSC.
    You have apllied all the updates to RSC, didn't you?
    Oh, and to reset the source control system you don't have to
    reboot the server. Restarting the RSC service suffices. Of course,
    you need administrator privileges for this as well.
    Regards
    ---Dirk Bock

  • Issue with Server 2012 RDS roles

    I have a Server 2012 system where the Remote Desktop Services roles were installed manually, not using Remote Desktop Services Installation. This was picked up because of the licensing errors which popup from time to time. From what I have read, it is not
    possible to fix the licensing issues without installing the RDS roles correctly.
    I have tried to uninstall the roles but Server Manager hangs with an empty progress bar and never completes the task.
    I have run Remote Desktop Services installation, but it fails as the roles are already installed. The error message is "Failed to open the runspace pool. The Server Manager WinRM plug-in might be corrupted or missing."
    I am reluctant to reload the operating system and start again, as various pieces of software have already been installed. Is there a way to successfully remove the RDS roles or successfully run the RDS installation wizard with the roles already installed?

    Hi FissioPB, could you give us a reference about how to detect and remove the internet filter?
    I´ve tried the following, but the same issue “Failed to open the runspace pool. The Server Manager 
    WinRM plug-in might be corrupted or missing" and "ERROR_WINHTTP_TIMEOUT" events.
    netsh http add iplisten 127.0.0.1
    netsh http add iplisten ::1
    "netsh winhttp show proxy"
    netsh winhttp reset proxy
    Block GPOs
    Any advice could be helpful. Thanks!!
    :S
    H1R@M

  • [SOLVED] Weird pacman issue with wine

    Good Morning Community,
    I'm on X86_64. I've just brought a system out of the ground from a differnt distro. Arch is up and running well.
    Then when I went to install wine .....pacman is giving me a strange error. Here is a cut n paste from the terminal
    //-----------------Begin cut n pasted text
    [dcbdbis@Curly-Sr ~]$ sudo pacman -S wine
    error: 'wine': could not find or read package
    [dcbdbis@Curly-Sr ~]$
    //----------------- End cut n pasted text
    I am using one mirror in the pacman.d/mirrorlist:
    //----------------Begin cut n pasted text
    Server = http://ftp.osuosl.org/pub/archlinux/$repo/os/$arch
    //---------------- End cut n pasted text
    And in using pacman to list packages, here is what I get
    //----------------Begin cut n pasted text
    [dcbdbis@Curly-Sr ~]$ sudo pacman -Sl|grep wine
    community winefish 1.3.3-9
    community winegame 0.2.0-1
    community winestuff 0.2.0-1
    community winetricks 20101222-1
    [dcbdbis@Curly-Sr ~]$
    //---------------- End cut n pasted text
    Google returns nothing. And I've not found it in the forums, at least the ones I've been able to read in the last three hours.
    Does anyone have any idea what's happening?
    Ideas on what I can do to find out what's happening?
    Help will be greatly appreciated!
    Sincerely and respectfully,
    Dave...........
    Last edited by dcbdbis (2011-01-03 22:47:51)

    Leonid.I wrote:
    Allan wrote:You need multlib : http://www.archlinux.org/news/true-mult … ux-x86_64/
    I would rather do a virtual machine...
    Which can't do all the things wine can, due to the considerable additional overhead. Regardless, how's that comment supposed to contribute to the topic at all, especially with no justification.
    To the OP, please mark the thread [solved] by editing your first post title.

  • I am having a issue with server.app. It errors out on reading the settings for DNS

    Apr  8 10:01:13 portal.ejsoftware.private servermgrd[6373]: -[DNSRequestHandler readSettingsWithRequest:]: exception thrown: *** setObjectForKey: object cannot be nil (key: comments)
    Apr  8 10:01:13 portal.ejsoftware.private Server[6363]: Error: The server '127.0.0.1' reported an error while processing a command of type: 'readSettings' in plug-in: 'servermgr_dns'. Error: Error Domain=XSActionErrorDomain Code=0 "READ_ERR" UserInfo=0x7f9353605970 {NSLocalizedDescription=READ_ERR}
    The DNS is working fine. The error is with a nil

    sudo named-check-conf -z /etc/named.conf
    zone 1.168.192.in-addr.arpa/IN: loaded serial 2013040701
    zone XXXXXX.com/IN: loaded serial 2013040701
    zone XXXXXX.private/IN: loaded serial 2013040701
    zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
    zone XXXXXX.com/IN: loaded serial 2013040701
    zone XX.1.168.192.in-addr.arpa/IN: loaded serial 2013040701
    zone localhost/IN: loaded serial 42
    Do you know what the line means?
    setObjectForKey: object cannot be nil (key: comments)
    Is it refering to the text area in the GUI that you can add a description?  where are they stored?

Maybe you are looking for