- Moved install-local to install-sapi for clarity. (Joey)
- Improved extension build framework. Refer to README.SELF-CONTAINED-EXTENSIONS
for an introduction. (Sascha)
-- Dynamically allocate points for ImagePolygon (Marc Pohl)
+- ImagePolygon() is no longer limited by a maximum number of polygons (Marc Pohl)
- Added configure time checking for bcmath package (Joey, Sascha)
- Added get_declared_classes(). (Andrei, Zend library)
- Add initial NSAPI module from Jayakumar Muthukumarasamy. (Rasmus)
#endif
" -d foo[=bar] Define INI entry foo with value 'bar'\n"
" -e Generate extended information for debugger/profiler\n"
+ " -z<file> Load Zend extension <file>.\n"
" -i PHP information\n"
" -h This help\n", prog);
}
}
+void php_register_command_line_global_vars(char **arg)
+{
+ char *var, *val;
+
+ var = *arg;
+ val = strchr(var, '=');
+ if (!val) {
+ printf("No value specified for variable '%s'\n", var);
+ } else {
+ *val++ = NULL;
+ php_register_variable(var, val, NULL ELS_CC PLS_CC);
+ }
+ efree(*arg);
+}
+
+
+
+
int main(int argc, char *argv[])
{
int cgi = 0, c, i, len;
int orig_optind=ap_php_optind;
char *orig_optarg=ap_php_optarg;
char *argv0=NULL;
+ zend_llist global_vars;
#if SUPPORT_INTERACTIVE
int interactive=0;
#endif
}
if (!cgi) {
- while ((c=ap_php_getopt(argc, argv, "c:d:qvisnaeh?vf:"))!=-1) {
+ while ((c=ap_php_getopt(argc, argv, "c:d:z:g:qvisnaeh?vf:"))!=-1) {
switch (c) {
case 'c':
php_ini_path = strdup(ap_php_optarg); /* intentional leak */
break;
+ case '?':
+ php_output_startup();
+ SG(headers_sent) = 1;
+ php_cgi_usage(argv[0]);
+ exit(1);
+ break;
}
}
ap_php_optind = orig_optind;
SG(request_info).argv0 = argv0;
+ zend_llist_init(&global_vars, sizeof(char *), NULL, 0);
+
if (!cgi) { /* never execute the arguments if you are a CGI */
SG(request_info).argv0 = NULL;
- while ((c = ap_php_getopt(argc, argv, "c:d:qvisnaeh?vf:")) != -1) {
+ while ((c = ap_php_getopt(argc, argv, "c:d:z:g:qvisnaeh?vf:")) != -1) {
switch (c) {
case 'f':
if (!cgi_started){
case 'd':
define_command_line_ini_entry(ap_php_optarg);
break;
+ case 'g': {
+ char *arg = estrdup(ap_php_optarg);
+
+ zend_llist_add_element(&global_vars, &arg);
+ }
+ break;
+ case 'z':
+ zend_load_extension(ap_php_optarg);
+ break;
default:
break;
}
file_handle.type = ZEND_HANDLE_FP;
file_handle.handle.fp = stdin;
+ /* This actually destructs the elements of the list - ugly hack */
+ zend_llist_apply(&global_vars, php_register_command_line_global_vars);
+ zend_llist_destroy(&global_vars);
if (!cgi) {
if (!SG(request_info).query_string) {