Tag Archives: php

htaccess nightmare

I have rewritten my image website last week, collapsing 25 php scripts into 1 while combining it with another 5 javascript files. The interesting point is that most of the server side layout moved now to the client side.
The website was running basically for 20 years while I felt it is too time consuming now to update it one more time always running at risk of some security flaws.
There is now now a true responsive layout, image upload is now done by a web form and no more by FTP. I am also not storing any more different image sizes while all the processing including watermarking is now done on the fly. This required however some more sophisticated rules for site access.
Writing the htaccess rules was the most complicated. thing where even chatGPT failed.  Only the rules tester helped me out…

OS X 10.10 Yosemite update breaks PHP in Apache localhost

Unfortunately the recent system upgrade overwrites all your local web server installation. As the Apache versionnow  also increased to 2.4 in Yosemite, it is  not a good idea to get your former http.conf from the backup.
computersnyou.com nicely explains the repair procedure but this still did not work for me as there is another configuration change necessary.

# needs to be uncommented
LoadModule php5_module libexec/apache2/libphp5.so
# needs to be added
<IfModule mime_module>
  AddType application/x-httpd-php .php
..

I am still struggling with the GD graphics library. It looks enabled from phpinfo() while ferrotype functions like imagettftext() are still not working. But there is a solution at stack overflow

curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6