lamp

Which distro is best for hosting LAMP + memcache? (answer gets a Linode or Slicehost referral)

Despite having very little Linux experience, I'm too enticed by VPS (and too sick of cPanel/shared hosting crap) to not give it a try. I'm a smart kid and pick up things pretty quick. I took a class in Linux and know basic commands, how to pipe commands, some scripting and shell stuff -- all of which I've nearly forgotten... but I'm ...

How do I convert a PDF document to a preview image in PHP?

Our environment is a LAMP stack. I'm wondering what libraries/extensions etc. would be required to convert a portion of a PDF document into an image file? Most PHP PDF libraries that I have found center around creating PDF documents, but is there a simple way to render a document to an image format suitable for displaying on a web page...

What are the pros and cons of the various date/time field types in MySQL?

Date and time in MySQL can be stored as DATETIME, TIMESTAMP, and INTEGER (number of seconds since 01/01/1970). What are the benefits and drawbacks of each, particularly when developing under a LAMP stack? ...

are there any gotchas for hosting a Silverlight app on a Linux server?

I'm building a new Silverlight app for a photography studio. I was about to say "you have to have a Windows-based server hosting it" and then I thought, wait is that right? Looks like it's not. So I could point him toward a Linux host. I know you have to register the MIME types (from a different SO thread). Are there any other caveats ...

Submitting form fails when the form data contains a <script> tag LAMP

We have a hosted site that has a CMS we built running on a LAMP stack. We noticed that when you save HTML that has a tag embedded in the HTML the request immediately dies. This does not occur on the staging or local development instances of the CMS, so I'm assuming its a server configuration issue. Any ideas what might cause this behavi...

Best way to transparently log downloads?

I have a personal project that's been online for sometime now. I've been keeping a tally of downloads by doing this: When the user clicks the download link, it hits a PHP script that writes some information to a table. Once the data is written, the script returns the path to the actual file. The user then has the ability to save the fi...

Is SAJAX dead? What to replace with?

We use Sajax for adding small Ajax code to sites. After running into a problem and doing some digging, it seems the library hasn't been updated since 2005. I've appreciated Sajax for being lightweight, easy to use, and easy to install (just include the file in PHP). So, on the LAMP stack, if you have used Sajax before, what would you...

Is there any good tool to refactor Perl web code?

hi guys, i'm currently working on a perl web app LAMP style and recently stumbled upon this death maze of code left by some previous developer. He left so many magic numbers and weird logic that it's gives me a headache everytime i had to go through it. I'm learning unit testing right now so i want to find some useful tool to refactor t...

php and mysql not showing data, not entering foreach loop

Hello, I am having trouble with modifying a php application to have pagination. My error seems to be with my logic, and I am not clear exactly what I am doing incorrectly. I have had before, but am not currently getting errors that mysql_num_rows() not valid result resource and that invalid arguments were supplied to foreach. I think t...

How can one run multiple versions of PHP 5.x on a development LAMP server?

(Sorry for the poorly-phrased title.) I need to test my PHP applications with multiple versions of PHP 5.x, such as PHP 5.0.0 and PHP 5.2.8. Is there a way that I can configure a development LAMP server so I can quickly test applications with multiple versions of PHP5? ...

LAMP setup on elderly hardware?

My former roommate agreed to host my web site for a while on his server while I got situated at my new apartment with my wife (also new). He is looking to move soon and wants to retire his web server, so I need to build a server for my own use. I investigated setting up a virtual box on the Mac Mini that I use for development, but I ca...

How to properly link to files with accents in their names in a LAMP envirionment

I have made a php script that iterates through files in a directory and outputs links to them. The file names are in Spanish so some contain characters like á, é, etc. My script works fine in my dev machine which is windows+apache+php, however it does not work in my hosting's server which is linux+apache+php, it does not find the file. ...

Mod Rewrite Question - forwarding parameters to new parameter names

Hi, I've tested the following Mod Rewrite on MAMP, but for some reason, it fails on LAMP. Any idea of what I am doing wrong? RewriteEngine on RewriteCond %{QUERY_STRING} ^newParamA=(.*)&newParamB=([0-9]*)$ RewriteRule ^newfolder/newsubfolder/$ oldfolder/oldsubfolder\.php?oldParamC=%1\&oldParamD=%2 [QSA,L] The idea is that a query suc...

How do you compare the content of two archive files programmatically?

Hi there, I'm doing some testing to ensure that the all in one zip file that i created using a script file will produce the same output as the content of a few zip files that i must manually click and create via web interface. Therefore the zip will have different folder structure. Of course i can manually extracted them out and using ...

What are good LAMP choices for freelance web hosting?

I think it's best if I ask this question with an example scenario. Let's say your mom-and-pop local hardware store has never had a website, and they want you, a freelance developer, to build them a website. You have all the skills to run a LAMP setup and admin a system, so the difficult question you ask yourself is where will I host i...

How can I set one style to override another conflicting style in CSS?

I'm displaying links that get marked as read in a database when a user clicks them. I want to style the clicked and unclicked links based on the database information not the user's browser history. So far, when I use: 10 a:visited { 11 color: #444; 12 } 13 14 a:link { 15 font-weight: bold; 16 color:black; 17 } 18 19 .rea...

What are the best techniques for making my LAMP sites download faster?

Hi Everyone I have a few sites I built for my work, nothing major, mainly just little tools which people can access and use when they're out of the office. I'm not very experienced as a developer but I like to tinker quite a lot and I was wondering if anyone had any clever little tweaks I could do to my sites to make them download faste...

MAMP/LAMP native or virtual (Virtualbox/VMware)?

What is your preferred development environment ? Native WAMP/MAMP/LAMP (Apache, MySQL, PHP) on Windows/MacOS/Linux Working copy local, SVN/CVS on server IDE/Editor on the same system (Eclipse, Aptana, Zend...) Virtual/Native (Server on VM) LAMP on VirtualBox/VMware working copy in the VM IDE/Editor on host, access to the VM with ...

What platform would you recommend to develop a SAAS application?

Should I use LAMP, .Net, or any other platform? I have access to resources with LAMP, .Net, ROR and Java experience. Thanks. Sorry for being vague. Could you give me a few pluses and minuses of each like Paul? Thanks for your time and effort. ...

two programmers working on the same code

Hi, I'm working on some PHP code with a partner, and were both running a LAMP (or in my case - MAMP) server locally on our machines. Is there some way we can both work simultaneously on the same piece of code? This would require both our IDE's (I use Zend Studio, he uses PHPed) and our MySQL server to update when any change is done. ...