Skip navigation.

Raphael's Blog

A look into a programmer's life

Posts tagged with "php"

php now has name\spaces support

Finally, the long-awaited release (just alpha atm) of PHP with namespaces support is out, go, get it, and enjoy the sub\spaces\separator before you get\mad\with\it.

Resurrecting the "Using C++ With PHP" guide

Nowadays it is really hard, if not impossible, to find "J Smith"'s "Using C++ With PHP" guide. A couple of years ago I found a web server that seemed to be the, by then already dead, tutorbuddy.com site, and being afraid of loosing track of the website I downloaded some files from there.

So, today while cleaning up my home dir I found something: php5cpp.sgml! :smile:

The guide can also be browsed directly here.

Even though it is a very basic and old guide it is a nice way to get started with PHP extensions in C++.

Update: bah, it ain't an important finding, archive.org has it all: http://web.archive.org/web/*/http://bugs.tutorbuddy.com/

"OpenID" (a.k.a. OpenXSS) implementations...

, , ,

I have just took a quick look at yet another OpenID-related php script which is, just like the others I've seen, open to XSS attacks.

Read more...

Drop PHP4 support or not?

, , , ...

The classical to do, or not to do question is here, and the InWeb CMS, x64Template and more projects are threatened because of the question.

Read more...

PHP4 and PHP5, both in Apache...

, ,

I just tried to install both PHP4 (well, already installed) and PHP5 both in Apache, ... everything was ok until I downloaded the php5 package... who would think that it is going to install php5 as cgi, apache module and apache2 module? :S well, this little package made me reinstall apache, php4 and php5... because since php4 and php5 can't live together working both of them as Apache modules, it removed PHP4!

Now after I got to solve that issue, I had to install PHP5 as a CGI (hehe, since PHP5 is not my main language... it has the bad luck to run as a CGI), so, as I didn't know how to add it as a CGI, I googled for a while and I found this site: http://www.howtoforge.com/apache2_with_php5_and_php4 .. I said nice... it is for debian but suddenly I saw that it was for Apache2, so I googled some more and then I found this other site: http://www.dotdeb.org/howto/php5_and_php4_on_the_same_apache Finally one for Apache! (almost all google results were for Apache2). And I added PHP5, the bad guy, as a CGI. Everything seemed to be ok, until I did a /etc/init.d/apache restart, that was when I got this nice error:

Configuration syntax error detected, not starting/reloading...
Syntax error on line 818 of /etc/apache/httpd.conf:
Invalid command 'Action', perhaps mis-spelled or defined by a module not included in the server configuration
failed!


So, after reading the message about five times finally I understood what was going on: "defined by a module not included" so I just noticed that there had to be a module called mod_action, if you know something about that you will say "... what happened to the s of mod_actions ?", and yes, the name of the module is mod_actions; so finally I got to make it work.

Now I just have to find out why Apache sometimes doesn't want to work with MySQL ... only Apache-SSL always works, and also, I have to rename some PHP5 scripts to .php5 so they work (hehe, I already was kind of scared when some classes from phpclasses.org were not working :whistle: ).