Trying to create an SQLite module in with pecl resulted in
/tmp/tmpb8wKoA/SQLite-1.0.3/sqlite.c -fPIC -DPIC -o .libs/sqlite.o
/tmp/tmpb8wKoA/SQLite-1.0.3/sqlite.c:56: error: ‘BYREF_NONE’ undeclared here (not in a function)
/tmp/tmpb8wKoA/SQLite-1.0.3/sqlite.c:56: error: ‘BYREF_FORCE’ undeclared here (not in a function)
/tmp/tmpb8wKoA/SQLite-1.0.3/sqlite.c:125: warning: initialization from incompatible pointer type
/tmp/tmpb8wKoA/SQLite-1.0.3/sqlite.c:126: warning: initialization from incompatible pointer type
make: *** [sqlite.lo] Error 1
ERROR: `make’ failed
Ug. Pain in the butt, but I did find a workaround….
Read the rest of this entry »
Originally posted August 23, 2006
———————————————–
Update: 4/8/07, added a 5.2.1 patch to the php5 tar ball
———————————————–
Ever wanted to display the progress of an upload to your user? This is handy for large uploads, gives users of your web site an idea of how long is left on the upload.
Unfortunately, PHP doesn’t provide this ability natively. Your first line of code in your PHP program receiving the upload doesn’t run until after the upload is complete. Therefore, there is no way, natively, for you to know the progress of the upload during the upload. Fortunately, I have a real solution. I downloaded a PHP source code patch (original patch available here http://pdoru.from.ro/) that adds this ability to PHP, then modified it to log data to a MySQL table or a flat file. The original patch did flat file only, which doesn’t work well on load balanced systems that need to share a data repository.
Read the rest of this entry »
I tried running both libphp4.so and libphp5.so modules at the same time by putting this in my /etc/httpd/conf.d/php.conf file:
LoadModule php5_module modules/libphp5.so
LoadModule php4_module modules/libphp4.so
AddHandler php5-script .php
AddHandler php-script .php4
AddType text/html .php
AddType text/html .php4
Doesn’t work… apache will restart, but any pages I hit seg fault now. Ug, oh well, it was worth a shot. My collegue told me he read it wasn’t possible, and I’ve seen some forum posts to support this, but I wanted to be sure. Unless there is a magic trick, cannot do it as apache modules.
————-
SOLUTION:
Read the rest of this entry »
Original Post: August 27, 2006
I have to admit, this task is not for the faint of heart. This entry goes with my “PHP Upload Progress Bar“ entry. I ported the entry from my old server, FC2 on Go Daddy’s Virtual Dedicated, to my new system, FC4 on Go Daddy’s Virtual Dedicated.
My goal is to recompile PHP with the PHP upload progress bar patch applied, while not breaking anything with Plesk!
All I am going to do is replace the “/etc/httpd/modules/libphp5.so” file on my system, and that’s it! Remember, I don’t want to break anything with my Plesk installation.
Read the rest of this entry »
I know that the Zend Accelerator works well, but it’s expensive. Turke MMCache is the best freeware PHP accelerator for PHP4, but has some problems with PHP5. Any thoughts?
Best Freeware Available, I think, is E Accelerator (this site uses this with PHP5):
http://eaccelerator.net/HomeUk?lg=uk
Best Payware, Zend:
http://www.zend.com/
Couple others:
- PHP Accelerator (http://www.php-accelerator.co.uk/)
- Alternative PHP Cache (http://pecl.php.net/package/APC)
- AfterBurner Cache (http://bwcache.bware.it/)
Read the rest of this entry »