PHP and Unixy stuff...
Tony Leggett
(Moderator)
– March 20, 2008 06:04PM
Hey, hey! I'm looking at sticking my big toe into MySQL and PHP.
Here's the place to share tips/tricks etc and ask dumbass noob questions...
Page 3 of 3
Pages:
123
Mokers
(Moderator)
– November 13, 2010 03:11PM
Formerly Remy Martin
there is an open source library system called koha. It installs just fine on Ubuntu, but since my company only supports Windows and OS X, I have to get it to compile on OS X for our client. iconv comes standard with OS X, but for some reason, perl is not seeing it so I can't build this component.
John Willoughby
– November 13, 2010 03:12PM
Homo Sapiens Sedentarius
It's not in Fink, is it?
tomierna
(Admin)
– November 13, 2010 04:06PM
Hideously Unnatural
Usually iconv is pathing + versioning problems. It's why PHP bundles their own iconf, IIRC.
In any case, what you need to do is use MacPorts to install the compatible iconv in /opt/local and then make the koha library makefile or configuration point at /opt/local for the iconv libs.
Mokers
(Moderator)
– November 13, 2010 08:02PM
Formerly Remy Martin
I used the ports version of iconv when I built the earlier versions of koha, but I used an earlier version of the Text::Iconv module. The latest version of koha requires the latest version of Text::Iconv, which for some reason I wasn't able to build. Unfortunately, I don't have another computer with Leopard Server that I can test this install on. I'll recheck my directories once I get to the client again.
And now that I think of it, the make's were complaining that it couldn't find xcode, even though everything else was building correctly, so I am going to reinstall the latest xcode tools as well.
porruka
(Admin)
– November 14, 2010 07:51AM
Remy,
Send along the compile lines and .config output, and specific error messages.
[Edit] Posts crossed. If you don't get it figured out with the xcode reinstall, send along the output/commands/etc. There's probably a path definition that needs to be set, or is in conflict and needs to be overridden.
Edited 1 time(s). Last edit at 11/14/2010 07:54AM by porruka.
Mokers
(Moderator)
– November 14, 2010 06:03PM
Formerly Remy Martin
Thanks. I am not going to be at this client again for at least a couple of weeks, but I'll keep you posted.
Cloudscout
– November 16, 2010 03:45PM
˙pɹɐoqʎǝʞ ʎɯ ɥʇıʍ ƃuoɹʍ ƃuıɥʇǝɯos sı ǝɹǝɥʇ ʞuıɥʇ ı ?ɹǝʇndɯoɔ ʎɯ ɥʇıʍ ǝɯ dlǝɥ ǝuoǝɯos uɐɔ
I ended up with an old G4 Mac Mini. I wanted to put 10.5 Server on it but couldn't find a copy. Instead, I'm in the process of installing Ubuntu 10.10. We'll see how well that runs.
Cloudscout
– November 16, 2010 04:33PM
˙pɹɐoqʎǝʞ ʎɯ ɥʇıʍ ƃuoɹʍ ƃuıɥʇǝɯos sı ǝɹǝɥʇ ʞuıɥʇ ı ?ɹǝʇndɯoɔ ʎɯ ɥʇıʍ ǝɯ dlǝɥ ǝuoǝɯos uɐɔ
Well, it's installed. I'm a little disappointed to learn that there's no Google Chrome for PowerPC Linux.
Cloudscout
– November 16, 2010 05:01PM
˙pɹɐoqʎǝʞ ʎɯ ɥʇıʍ ƃuoɹʍ ƃuıɥʇǝɯos sı ǝɹǝɥʇ ʞuıɥʇ ı ?ɹǝʇndɯoɔ ʎɯ ɥʇıʍ ǝɯ dlǝɥ ǝuoǝɯos uɐɔ
Conclusion: Ubuntu is pretty much useless as a desktop OS on a G4 Mac Mini.
Tony Leggett
(Moderator)
– September 11, 2011 05:45PM
Hmmm...
I'm trying to modify some php templates for a child theme for wordpress. For some reason wordpress is barfing on these files. I was just wondering what text encoding php files should be saved as?
Is UTF-8 ok or should it be something else?
porruka
(Admin)
– September 11, 2011 08:24PM
UTF-8 should be fine. What color is the barf? (error messages, description of the particular format of the barf: chunky, splash, projectile, etc)
Tony Leggett
(Moderator)
– September 11, 2011 08:32PM
Page goes blank. Code snippet is here:
<?php if ( !is_page_template ('brandedPage.php') { ?>
<?php if ( is_front_page() ) { ?>
< h2 class="entry-title"><?php the_title(); ?></ h2>
<?php } else { ?>
< h1 class="entry-title"><?php the_title(); ?></ h1>
<?php } ?>
<?php } ?>
The only thing I've changed is the wrapper to check whether the page template is brandedPage or not. If it is, it's not meant to display the page title at the top of the page. Page goes blank regardless of whether the template selected is brandedPage or something different.
Spaces have been added so h1 and h2 don't display
Baffled,
TL
Edited 3 time(s). Last edit at 09/11/2011 08:36PM by Tony Leggett.
porruka
(Admin)
– September 11, 2011 08:38PM
General debugging: Blank page probably means 500 error which means you should be checking the apache error_log file for the PHP error in question (which leads to rapid resolution, usually).
Specific debugging: You're missing a closing paren on your is_page_template() call.
[EDIT] Technically, you're missing the closing paren on the if conditional surrounding the is_page_template() call...
Edited 1 time(s). Last edit at 09/11/2011 08:40PM by porruka.
Tony Leggett
(Moderator)
– September 11, 2011 08:52PM
Thanks Porruka,
Lynda.com really needs to correct their tutorials.
The third movie in part 14 of
this course has the text exactly as I had it - and yet the page somehow inexplicably displays...
porruka
(Admin)
– September 11, 2011 08:59PM
I obviously can't speak for the quality of any online tutorials, but this one would likely have been fairly easy to find from the actual error. If you're not friends with your webserver error and access logs, you should introduce yourself. Doing so has the ability to save you significant grief.
Other than that, did the closing paren get you on your way to whatever is next?
Tony Leggett
(Moderator)
– September 11, 2011 09:27PM
The closing paren did the trick.
I didn't look for syntax errors in the php because I was under the assumption that if I copy it exactly like in the tutorial video (where it's shown to work perfectly with that code) it should work.
Where do I get the webserver logs from?
porruka
(Admin)
– September 11, 2011 09:37PM
Quote
Tony Leggett
Where do I get the webserver logs from?
Server/config dependent. Apache default is /var/log/httpd IIRC (or maybe /var/log/apache2 these days, and I believe is this on the Mac OS). Very likely to be somewhere else on your server if it's a hosting platform.
Tony Leggett
(Moderator)
– September 11, 2011 09:47PM
Ah, found it amongst the MAMP files.
porruka
(Admin)
– April 12, 2012 12:24PM
Ok, so I've hit something that just reinforces my opinion that Linux distro creators simply don't give a fuck about production worlds, but perhaps I'm letting my bias get ahead of me...
would someone be able to school me on a way to get SystemTap running (as in correctly executing, for example, the iotime.stp script from the SystemTap example pool) on CentOS5.5 *without* pulling in the world in terms of software dependencies and full kernel sources?
Page 3 of 3
Pages:
123