mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-14 12:40:50 +00:00
Compare commits
1826
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b29fe5976 | ||
|
|
ca25d91f13 | ||
|
|
b663137e04 | ||
|
|
6175cec8a7 | ||
|
|
2b5c855143 | ||
|
|
4fdd5249fb | ||
|
|
35b1b345c4 | ||
|
|
15b4d3dc78 | ||
|
|
ef6d751b04 | ||
|
|
0938da3685 | ||
|
|
b30885d8a3 | ||
|
|
4a202474ef | ||
|
|
a975e43310 | ||
|
|
0abfed95e3 | ||
|
|
3e7f149be6 | ||
|
|
18fdb3b33e | ||
|
|
5949c3968e | ||
|
|
ab4433e348 | ||
|
|
d84d278900 | ||
|
|
8a17d68216 | ||
|
|
8c9126e101 | ||
|
|
3a27e5a0c1 | ||
|
|
8a12f7d72d | ||
|
|
54ec8a53d3 | ||
|
|
4265c3d6f4 | ||
|
|
51452106e7 | ||
|
|
4ed862d6fb | ||
|
|
62a06abf37 | ||
|
|
66b8788497 | ||
|
|
bc7fd9511f | ||
|
|
77b928515a | ||
|
|
4cebdf96d6 | ||
|
|
92b51bfe9d | ||
|
|
5fd50121a2 | ||
|
|
ef38483ca3 | ||
|
|
1efef3488f | ||
|
|
0d73873aad | ||
|
|
6c42291ed6 | ||
|
|
70e839b911 | ||
|
|
3bdf8fda7f | ||
|
|
53b3b33aae | ||
|
|
a05ffc841e | ||
|
|
1b480cd24b | ||
|
|
88e1d65564 | ||
|
|
64245f3654 | ||
|
|
74bbb513a2 | ||
|
|
35bf13d97f | ||
|
|
4d03a6980d | ||
|
|
a0902bfa37 | ||
|
|
2086644e2b | ||
|
|
7be45c1573 | ||
|
|
e749e406d8 | ||
|
|
a7a797726e | ||
|
|
541f96e1b6 | ||
|
|
11d323faae | ||
|
|
61ff34a945 | ||
|
|
c6debc5600 | ||
|
|
d6316ebef3 | ||
|
|
0e39d9932a | ||
|
|
4577ef345d | ||
|
|
c38946f838 | ||
|
|
9409252d3f | ||
|
|
2e63531d77 | ||
|
|
54b5111a98 | ||
|
|
bc8dccc7e2 | ||
|
|
8592a15028 | ||
|
|
de231c928c | ||
|
|
ca19c39b62 | ||
|
|
3dd7a7f8b4 | ||
|
|
35a2f5306d | ||
|
|
c008ca83c4 | ||
|
|
d0bfbece1a | ||
|
|
1f13e32204 | ||
|
|
bcac9d3773 | ||
|
|
041b586c59 | ||
|
|
77d6edf304 | ||
|
|
bb1624acd9 | ||
|
|
e212b6c56c | ||
|
|
043fdb5fb1 | ||
|
|
429a6bc483 | ||
|
|
ef6cfdbec3 | ||
|
|
00f869c0a7 | ||
|
|
7869874e5a | ||
|
|
7456da1533 | ||
|
|
9cb224eafe | ||
|
|
cd774e73fb | ||
|
|
0d1c4f234b | ||
|
|
2b73a58a4c | ||
|
|
f647379a3d | ||
|
|
098de0df5d | ||
|
|
510a2806b3 | ||
|
|
cc47667fb0 | ||
|
|
42a50158bc | ||
|
|
6957c8ab5a | ||
|
|
1802b2c9dd | ||
|
|
e3a480faf8 | ||
|
|
53cc10e1c2 | ||
|
|
619f6faa20 | ||
|
|
184917eb1f | ||
|
|
4bed8c9537 | ||
|
|
235ef76a89 | ||
|
|
9638f4c8ff | ||
|
|
d61681ffe8 | ||
|
|
bfe60f6a55 | ||
|
|
53f837720f | ||
|
|
5a3f8c4864 | ||
|
|
ca71f35892 | ||
|
|
14e3bbd0ca | ||
|
|
2419d2e170 | ||
|
|
c94734d283 | ||
|
|
a47aa0e936 | ||
|
|
87631a8713 | ||
|
|
6b2dc66a5b | ||
|
|
9947c89d6e | ||
|
|
0fb6cde415 | ||
|
|
9fb029f257 | ||
|
|
aaaa6ce403 | ||
|
|
3e7cb1286f | ||
|
|
ff9097524c | ||
|
|
d8e1afab0b | ||
|
|
fea008a67f | ||
|
|
1857c0d17f | ||
|
|
a7067ff166 | ||
|
|
8b504aad98 | ||
|
|
8dfbcec9a6 | ||
|
|
4b40bdbc00 | ||
|
|
f4c286ce51 | ||
|
|
549b2ae9fe | ||
|
|
d5edc8497b | ||
|
|
8cafde7940 | ||
|
|
f864a93b00 | ||
|
|
1556fa2665 | ||
|
|
fe68f62429 | ||
|
|
1d14c2f46f | ||
|
|
a4b9d8117f | ||
|
|
e7252868ce | ||
|
|
435da1b34e | ||
|
|
0a968e6e62 | ||
|
|
78e6f958af | ||
|
|
384900bd89 | ||
|
|
a3a9ff1309 | ||
|
|
0cc1014ebf | ||
|
|
aed8e18415 | ||
|
|
669897add1 | ||
|
|
5584e5ef18 | ||
|
|
a84df36b1e | ||
|
|
de54f321b3 | ||
|
|
cba1c57ac6 | ||
|
|
4240a5d3cf | ||
|
|
10a0500ad9 | ||
|
|
7e965d8661 | ||
|
|
2d18951de4 | ||
|
|
d2be511ea2 | ||
|
|
b67e80ea4f | ||
|
|
3b9b9a4bbd | ||
|
|
0a766591b8 | ||
|
|
63dc7bd0ce | ||
|
|
d564f6dda8 | ||
|
|
0314e61193 | ||
|
|
67d56970b9 | ||
|
|
115ba4988e | ||
|
|
06c716589e | ||
|
|
45b4b82fe4 | ||
|
|
323a19116c | ||
|
|
1b88577508 | ||
|
|
a7aa47c46d | ||
|
|
eef33e863b | ||
|
|
0f78991ac6 | ||
|
|
d6d59e9609 | ||
|
|
0fba197478 | ||
|
|
eae73713eb | ||
|
|
f6c1bcfb4d | ||
|
|
d8afde1799 | ||
|
|
70ad496213 | ||
|
|
4d861228c3 | ||
|
|
a21f7c4998 | ||
|
|
2080e2fb4a | ||
|
|
80616e818e | ||
|
|
0b69477a1d | ||
|
|
08887c2067 | ||
|
|
254451337c | ||
|
|
c5eb0540e0 | ||
|
|
2053bc60d2 | ||
|
|
25f5ea0398 | ||
|
|
1618452e53 | ||
|
|
307eedeffe | ||
|
|
aad180c93f | ||
|
|
b38423c7f6 | ||
|
|
f62069244a | ||
|
|
6aecc4c6d6 | ||
|
|
a8d2d22d9b | ||
|
|
8f5c250266 | ||
|
|
8ee3553aa4 | ||
|
|
12e1c89041 | ||
|
|
40329bff38 | ||
|
|
b9d3aafe55 | ||
|
|
7966bb1186 | ||
|
|
5e2f6ea744 | ||
|
|
354eff7e1e | ||
|
|
9a5f0ef61a | ||
|
|
df0d52bd78 | ||
|
|
baed8167d6 | ||
|
|
47b6b1e28a | ||
|
|
a063cc2956 | ||
|
|
5e5de1960f | ||
|
|
893aee30e8 | ||
|
|
30b2af9511 | ||
|
|
03edfa1677 | ||
|
|
1a9d759fc4 | ||
|
|
b8a8640846 | ||
|
|
e384ab1666 | ||
|
|
c50ef2e715 | ||
|
|
f17eff3a6c | ||
|
|
e7e54fccac | ||
|
|
9c488ef4f2 | ||
|
|
5a3baf610b | ||
|
|
9dd0472573 | ||
|
|
900eaa32f3 | ||
|
|
8635889231 | ||
|
|
c0cea96139 | ||
|
|
45fa60d315 | ||
|
|
b7479f6c29 | ||
|
|
27c3401da5 | ||
|
|
8761f766d4 | ||
|
|
22214bc11e | ||
|
|
5eaf82b6eb | ||
|
|
f93672da8e | ||
|
|
7be44d2b6d | ||
|
|
e864dc5b13 | ||
|
|
41da69f20f | ||
|
|
879cbe7961 | ||
|
|
739846a6a8 | ||
|
|
e5d7aef143 | ||
|
|
47692de95f | ||
|
|
6be3e2d751 | ||
|
|
e69edbeac2 | ||
|
|
86b31b56de | ||
|
|
efb6da662d | ||
|
|
7f8bbde609 | ||
|
|
338de41cf9 | ||
|
|
139deb5ddb | ||
|
|
6d859da0da | ||
|
|
8f242bb48b | ||
|
|
7afbc02392 | ||
|
|
e3aa91d3f3 | ||
|
|
8838b0f114 | ||
|
|
349514ed2d | ||
|
|
d676db7541 | ||
|
|
b7c800e6fb | ||
|
|
ba9faa42a0 | ||
|
|
164703f306 | ||
|
|
a9d700c5c7 | ||
|
|
a750e94013 | ||
|
|
bbf5e08fa3 | ||
|
|
1be1a0b472 | ||
|
|
072961be7b | ||
|
|
9f7829fb47 | ||
|
|
80dfa0ba37 | ||
|
|
d1be87446b | ||
|
|
4c9527044b | ||
|
|
7de0f803d1 | ||
|
|
208a735a85 | ||
|
|
58466f957f | ||
|
|
06fd453fb9 | ||
|
|
2d9549455d | ||
|
|
7aa63c6209 | ||
|
|
bc594f1506 | ||
|
|
b5d2a4aa12 | ||
|
|
a20b67c30f | ||
|
|
1aad1b4291 | ||
|
|
6fc504ce16 | ||
|
|
b24de2d58a | ||
|
|
4c5521ad81 | ||
|
|
808dee23d7 | ||
|
|
4c722bee9c | ||
|
|
19db79ff1d | ||
|
|
e3727d1061 | ||
|
|
43d81b700a | ||
|
|
a6ea6cc87c | ||
|
|
9f6f2471f0 | ||
|
|
90adf3ec54 | ||
|
|
de83567151 | ||
|
|
c6af3e463a | ||
|
|
09d9532952 | ||
|
|
4e9e5c1913 | ||
|
|
9a9864a0e9 | ||
|
|
065d0986aa | ||
|
|
8a088529c9 | ||
|
|
908f37b08b | ||
|
|
ea2fa14acb | ||
|
|
ebf7a4f847 | ||
|
|
46d273a2b9 | ||
|
|
4293672558 | ||
|
|
f5865d02d0 | ||
|
|
cf3d459815 | ||
|
|
fcfe6ff818 | ||
|
|
88b30630b2 | ||
|
|
9d4bd52adf | ||
|
|
bf45f6d5ba | ||
|
|
76c42836b2 | ||
|
|
fd4dea3500 | ||
|
|
c1134d6bb9 | ||
|
|
9166d10260 | ||
|
|
fa843198d4 | ||
|
|
e5a94e640e | ||
|
|
3a95b4b173 | ||
|
|
8a6f9ab5c0 | ||
|
|
9a87c59f72 | ||
|
|
831caad432 | ||
|
|
0ef09b9609 | ||
|
|
df1e5064e7 | ||
|
|
ad63c6c086 | ||
|
|
8d802f10f0 | ||
|
|
6c192034a2 | ||
|
|
3bab4824f0 | ||
|
|
951f80976b | ||
|
|
0e00c049c7 | ||
|
|
e85ca0efce | ||
|
|
56c1fec8d8 | ||
|
|
4b1deca2e1 | ||
|
|
c40ac6b268 | ||
|
|
8e07a4fd52 | ||
|
|
5336ad6dbd | ||
|
|
e1fa70df9a | ||
|
|
85923625fe | ||
|
|
de9e6e1f1b | ||
|
|
b145f87d40 | ||
|
|
f579d02059 | ||
|
|
2058fec25b | ||
|
|
6c63a9e153 | ||
|
|
4de55b50dc | ||
|
|
bbdbfa8563 | ||
|
|
cc5e0df571 | ||
|
|
d528916296 | ||
|
|
0cd7e11430 | ||
|
|
772523e4a8 | ||
|
|
5f1a942add | ||
|
|
ddbc35b39c | ||
|
|
ea3c36078c | ||
|
|
24e9c2b3ff | ||
|
|
6241abce94 | ||
|
|
53b5689016 | ||
|
|
7eed89deb7 | ||
|
|
06f91140fe | ||
|
|
0825bb2386 | ||
|
|
64fe4952b6 | ||
|
|
96b2eaca0d | ||
|
|
ffe1113b3d | ||
|
|
db9a8f2f5e | ||
|
|
6efb1b369c | ||
|
|
538a818db0 | ||
|
|
9934670186 | ||
|
|
89206cfca4 | ||
|
|
cb8e1f16ee | ||
|
|
1af4d7724f | ||
|
|
7e941eefe8 | ||
|
|
885e837b2a | ||
|
|
6a3fc10b05 | ||
|
|
e96b4d55bd | ||
|
|
5188dd875f | ||
|
|
6f431d5d6d | ||
|
|
4e78551db1 | ||
|
|
9de151b2ce | ||
|
|
91786ab7a5 | ||
|
|
0bf404dbeb | ||
|
|
e566c744d1 | ||
|
|
a96a6a2b7f | ||
|
|
f51237d726 | ||
|
|
b1061c7443 | ||
|
|
5d3a542a08 | ||
|
|
20c0fb5e9c | ||
|
|
e89ac09125 | ||
|
|
94728f7301 | ||
|
|
e65f145d46 | ||
|
|
2986565c79 | ||
|
|
e2088baab4 | ||
|
|
3263cdd42e | ||
|
|
c6a2f0628d | ||
|
|
39dc110f91 | ||
|
|
a3b179d916 | ||
|
|
84b6a9dfb3 | ||
|
|
c6b98d3891 | ||
|
|
8621923a5e | ||
|
|
c096e54196 | ||
|
|
663841fd31 | ||
|
|
02ab9ce41d | ||
|
|
442c6c9c6f | ||
|
|
5df1e69be1 | ||
|
|
f7226bcc2d | ||
|
|
0b9b69be38 | ||
|
|
5888fd4024 | ||
|
|
1b2b9a6a0d | ||
|
|
a207ace664 | ||
|
|
38b637bdfc | ||
|
|
a96582f13b | ||
|
|
8cf790dea1 | ||
|
|
e58b48e89c | ||
|
|
210d34a088 | ||
|
|
ed5a974ab0 | ||
|
|
bb7f2e4210 | ||
|
|
31b2848051 | ||
|
|
5ebe7edcb3 | ||
|
|
ed68bc6095 | ||
|
|
6a9e52543b | ||
|
|
f1c31423d7 | ||
|
|
441dc97d75 | ||
|
|
8378373527 | ||
|
|
d76514d892 | ||
|
|
2bbfddb533 | ||
|
|
85e5585a1c | ||
|
|
e6840ed921 | ||
|
|
cb20f5cafe | ||
|
|
a95a14cebf | ||
|
|
8b9cc5ba81 | ||
|
|
259a07f733 | ||
|
|
a9674113d1 | ||
|
|
168786cfcf | ||
|
|
3f43cfbb6a | ||
|
|
93578a5789 | ||
|
|
89eaec22b5 | ||
|
|
a99c6916f3 | ||
|
|
30c8d9b166 | ||
|
|
5a6d9048e5 | ||
|
|
0e9275fb37 | ||
|
|
b08b041503 | ||
|
|
9c340ef86f | ||
|
|
baf702a009 | ||
|
|
65ab4040fc | ||
|
|
c3d0c735b8 | ||
|
|
1a5342e468 | ||
|
|
eeaaaf7fce | ||
|
|
5dd18df5eb | ||
|
|
6deb70d17d | ||
|
|
5babe27344 | ||
|
|
ac4adcc2f7 | ||
|
|
46e793d8dc | ||
|
|
cc2149097f | ||
|
|
cdb852e21f | ||
|
|
c18cbd0f35 | ||
|
|
40fe027642 | ||
|
|
2184a5a584 | ||
|
|
b2f06ce507 | ||
|
|
80553d8fc7 | ||
|
|
5b4eeb628c | ||
|
|
2af0c3bbdf | ||
|
|
d4e86c36ed | ||
|
|
fe4a118383 | ||
|
|
ada04f382d | ||
|
|
e1505662ad | ||
|
|
3766f870d4 | ||
|
|
e4c30e6b89 | ||
|
|
9543e9c111 | ||
|
|
d0551c2a7c | ||
|
|
66df106383 | ||
|
|
4c6e92bdb8 | ||
|
|
b2732089f2 | ||
|
|
8e8f8ece29 | ||
|
|
7275b5a177 | ||
|
|
5f0305e605 | ||
|
|
2a0e69c111 | ||
|
|
74c2e50253 | ||
|
|
cb915e0498 | ||
|
|
3379ffa7ed | ||
|
|
0053324a83 | ||
|
|
a0c001aa70 | ||
|
|
7b6a710bd0 | ||
|
|
221d4b346b | ||
|
|
1e60e670ba | ||
|
|
fdec1ab00e | ||
|
|
1aac6063a4 | ||
|
|
0808ccd417 | ||
|
|
61c00477b4 | ||
|
|
9ea8c7ddd4 | ||
|
|
d6cc9d4f01 | ||
|
|
c07cd30cd0 | ||
|
|
c9af2f28e2 | ||
|
|
ea54e26972 | ||
|
|
0ac2170517 | ||
|
|
bd6b53c1d8 | ||
|
|
ca90ec2cac | ||
|
|
91abce9917 | ||
|
|
4cc252ca16 | ||
|
|
1ed5d89106 | ||
|
|
c262cf962c | ||
|
|
8e510ef9b9 | ||
|
|
1aaadf3ca3 | ||
|
|
ca98ed755c | ||
|
|
2fe16812bd | ||
|
|
a300b68b08 | ||
|
|
b9d98f0098 | ||
|
|
deb89ce2f4 | ||
|
|
405101d10d | ||
|
|
bc11725188 | ||
|
|
938e964beb | ||
|
|
49118556bb | ||
|
|
47d30e40e4 | ||
|
|
4135978add | ||
|
|
86bdf2b049 | ||
|
|
1d6cca1b2f | ||
|
|
1e12ed5e1a | ||
|
|
6fe6810c8a | ||
|
|
408c183013 | ||
|
|
cdb4683c30 | ||
|
|
3a6eb48e1e | ||
|
|
2706fda4a6 | ||
|
|
fafe8a19b8 | ||
|
|
69eaab8aac | ||
|
|
6035439314 | ||
|
|
79ed81e971 | ||
|
|
ca53f68729 | ||
|
|
2b66aa860f | ||
|
|
17cef37fd1 | ||
|
|
fa2f1ac2a4 | ||
|
|
a9e21b0a18 | ||
|
|
353b838a13 | ||
|
|
a68c033bf9 | ||
|
|
8c7af900cf | ||
|
|
8e46f4b273 | ||
|
|
86337bac18 | ||
|
|
125d5a2b73 | ||
|
|
de23ffbee3 | ||
|
|
6af73a9f5e | ||
|
|
df8c668559 | ||
|
|
c346be31a1 | ||
|
|
a360d7d794 | ||
|
|
a9b6b75a02 | ||
|
|
fa8c24ff7a | ||
|
|
fb4f76e78d | ||
|
|
f261a8f571 | ||
|
|
5bffdef46d | ||
|
|
d48d599294 | ||
|
|
2b637a2c03 | ||
|
|
e26531e7c3 | ||
|
|
55142148ad | ||
|
|
b9147e80a6 | ||
|
|
96338f74c5 | ||
|
|
0bf4ee95b6 | ||
|
|
697102558f | ||
|
|
e5a2da9811 | ||
|
|
1ca21fdf96 | ||
|
|
66fee7dd46 | ||
|
|
f62beb8487 | ||
|
|
25d980f23c | ||
|
|
33d0cdb426 | ||
|
|
99bcc186f6 | ||
|
|
e596539840 | ||
|
|
0a00d25a28 | ||
|
|
6467ac57d6 | ||
|
|
dd4d0ba050 | ||
|
|
7afa3484c0 | ||
|
|
d525845531 | ||
|
|
ce983dad77 | ||
|
|
5e8bee0b4d | ||
|
|
4e151b1c7d | ||
|
|
ca47777e5f | ||
|
|
0ffeb8f5cd | ||
|
|
195dcc7eda | ||
|
|
c28909f9d9 | ||
|
|
2667855bad | ||
|
|
3887735c4c | ||
|
|
056bb1ad7c | ||
|
|
50f57d6cbb | ||
|
|
074b68fe73 | ||
|
|
bb0973e294 | ||
|
|
223398e0fa | ||
|
|
aef84ceb00 | ||
|
|
55f2a16d01 | ||
|
|
65fa341a3e | ||
|
|
643b271bea | ||
|
|
3b61fc5389 | ||
|
|
8a67145847 | ||
|
|
cef2c74845 | ||
|
|
202500193d | ||
|
|
6505875c9a | ||
|
|
c49fdf4dd8 | ||
|
|
ed53d131ea | ||
|
|
8bb1db38f8 | ||
|
|
29f088a033 | ||
|
|
a081107225 | ||
|
|
d16b06c185 | ||
|
|
c1b09a29f2 | ||
|
|
7b25877fec | ||
|
|
27959e82ec | ||
|
|
c74a480546 | ||
|
|
935ed0d844 | ||
|
|
bfc284dfb5 | ||
|
|
92deeac732 | ||
|
|
6e22b67233 | ||
|
|
31f10bc418 | ||
|
|
331b6605c3 | ||
|
|
e902399d15 | ||
|
|
90583839db | ||
|
|
bdfe271088 | ||
|
|
fe2eb8697f | ||
|
|
d8d8abeee8 | ||
|
|
5207463590 | ||
|
|
fc6aba5bea | ||
|
|
f22177b7e4 | ||
|
|
633a7470d1 | ||
|
|
17d0b30415 | ||
|
|
12d27576f3 | ||
|
|
0b74da4a4a | ||
|
|
09f6f3244b | ||
|
|
5f19e3c747 | ||
|
|
936b7e8e82 | ||
|
|
41904eb4b2 | ||
|
|
baa7c1746e | ||
|
|
f9ee999b71 | ||
|
|
28686f683f | ||
|
|
fea2f6e689 | ||
|
|
cbc8c32567 | ||
|
|
70e26f8ebc | ||
|
|
a6dcd940b5 | ||
|
|
a8202c83d3 | ||
|
|
a5952e9c8b | ||
|
|
4da78a716c | ||
|
|
e41bc6906c | ||
|
|
1f0fe33edb | ||
|
|
422dfcaf3e | ||
|
|
0f7556a1b8 | ||
|
|
bea9ba8fc2 | ||
|
|
3b61552cd7 | ||
|
|
77e02d2e30 | ||
|
|
9058adacc8 | ||
|
|
ab99e92450 | ||
|
|
b539f500fc | ||
|
|
a85cfe5b14 | ||
|
|
f7aef14323 | ||
|
|
8ea0a2c1c8 | ||
|
|
7f529a8361 | ||
|
|
9a0060e27c | ||
|
|
90f72e11bf | ||
|
|
c0d963299a | ||
|
|
cc6dd2f296 | ||
|
|
1fc017d8a3 | ||
|
|
aa288c1f7a | ||
|
|
f899afbfca | ||
|
|
f9279a6b81 | ||
|
|
3cee600ed8 | ||
|
|
a0c6c4f59f | ||
|
|
f2307f1623 | ||
|
|
e03bd905ad | ||
|
|
03db21ee2c | ||
|
|
9235a5d001 | ||
|
|
2a7a76c93e | ||
|
|
1fe64c5ffb | ||
|
|
eb74b414a8 | ||
|
|
0fa2ebc0f2 | ||
|
|
160852eaf0 | ||
|
|
338a796166 | ||
|
|
ba634aacd4 | ||
|
|
437a1e90c9 | ||
|
|
c8dbe95e7a | ||
|
|
f8fa606849 | ||
|
|
60cd2d0604 | ||
|
|
9349ad79ff | ||
|
|
6aeafbd611 | ||
|
|
4f3b9cd691 | ||
|
|
348078406d | ||
|
|
f9bc86556e | ||
|
|
d7d8388543 | ||
|
|
7e950b6a31 | ||
|
|
98dc115fab | ||
|
|
1c9c0f592c | ||
|
|
bf93051fff | ||
|
|
fc3db427b2 | ||
|
|
f3543b425f | ||
|
|
6741fc0883 | ||
|
|
cf2b96f84b | ||
|
|
49e7c1eb7a | ||
|
|
1018001888 | ||
|
|
4d2cdc8224 | ||
|
|
4ae82d2189 | ||
|
|
0e6a306e68 | ||
|
|
a4935ca741 | ||
|
|
162fb6f465 | ||
|
|
f72080cb48 | ||
|
|
e0eaa22d19 | ||
|
|
046da9b906 | ||
|
|
3d3d33c018 | ||
|
|
76a19ecdf8 | ||
|
|
09d6b582ae | ||
|
|
e61a8d577c | ||
|
|
8c0e3568a9 | ||
|
|
cdbfc6a8fb | ||
|
|
5a7f4ada80 | ||
|
|
bf7636d282 | ||
|
|
9973b97212 | ||
|
|
e5b8ff2641 | ||
|
|
6d227b5775 | ||
|
|
d5a0cf3575 | ||
|
|
30f6668c7d | ||
|
|
5f32f2e6a1 | ||
|
|
aade4a6069 | ||
|
|
45b85c504b | ||
|
|
2d5754d69f | ||
|
|
10b70c23ae | ||
|
|
1ceef81ac8 | ||
|
|
f26881fdc0 | ||
|
|
2f7e889009 | ||
|
|
6119dad1ec | ||
|
|
a450efff4e | ||
|
|
ceda30930a | ||
|
|
1729d3ca75 | ||
|
|
4115b9aa6c | ||
|
|
1303e186e5 | ||
|
|
7ba00c2563 | ||
|
|
112bc3df71 | ||
|
|
318fc44c8a | ||
|
|
6771367c95 | ||
|
|
7999d1a384 | ||
|
|
82321ff0d4 | ||
|
|
da74ef221f | ||
|
|
2c28506fcf | ||
|
|
592380ac7c | ||
|
|
a4c86a50bb | ||
|
|
d28971a2b6 | ||
|
|
9b225deeb2 | ||
|
|
3f5a393d9c | ||
|
|
2361a14e0f | ||
|
|
5d7f648f83 | ||
|
|
f766cea8af | ||
|
|
6cdf895b62 | ||
|
|
60661a012b | ||
|
|
b93038396e | ||
|
|
12defebcf0 | ||
|
|
8e0820820a | ||
|
|
087326527e | ||
|
|
5061d1ca32 | ||
|
|
7f504d30ea | ||
|
|
0479203e55 | ||
|
|
ee840f1ff6 | ||
|
|
580d5e80b5 | ||
|
|
8c4361d2f1 | ||
|
|
c6e131f9a4 | ||
|
|
83bec74173 | ||
|
|
a1f00c0bae | ||
|
|
ed54147a4b | ||
|
|
e4b49f2de7 | ||
|
|
b8cd29330d | ||
|
|
a4d189ed94 | ||
|
|
53d0e56f42 | ||
|
|
37871089e1 | ||
|
|
396074e1cc | ||
|
|
da55f714a9 | ||
|
|
8d025a62fb | ||
|
|
74540e51a7 | ||
|
|
1592b88645 | ||
|
|
9dfae5b28d | ||
|
|
bdf9ed31c0 | ||
|
|
cd5ef04293 | ||
|
|
67674a77c7 | ||
|
|
8633a4fb0e | ||
|
|
7efed1c11d | ||
|
|
e0f235787c | ||
|
|
ac05068dd2 | ||
|
|
ee1077aad0 | ||
|
|
6c22098068 | ||
|
|
de3937a88f | ||
|
|
5f4df19833 | ||
|
|
cfeec1e72b | ||
|
|
c77e4951c5 | ||
|
|
5f0729c281 | ||
|
|
1525e15d4f | ||
|
|
4c86e3b2bf | ||
|
|
680dd335bc | ||
|
|
575bd9e537 | ||
|
|
f8fed9d571 | ||
|
|
6aa5175259 | ||
|
|
fe4e7d7b43 | ||
|
|
188d80b7cf | ||
|
|
04a57e2f54 | ||
|
|
68d477c66a | ||
|
|
5fd7263f01 | ||
|
|
f93c6a6a13 | ||
|
|
c878f2708e | ||
|
|
c16bbec898 | ||
|
|
91f0d18894 | ||
|
|
ead22712c9 | ||
|
|
405fcde229 | ||
|
|
e1823b67c2 | ||
|
|
37f824c02a | ||
|
|
b3f36ce142 | ||
|
|
ed1af8a375 | ||
|
|
19d34e9304 | ||
|
|
6f718d420d | ||
|
|
a844072181 | ||
|
|
3a09eb44cf | ||
|
|
67ba3f4c30 | ||
|
|
bbbf8effb4 | ||
|
|
16f65cff5b | ||
|
|
d20c4bc95a | ||
|
|
34c2d8f7a2 | ||
|
|
bbd07ddfff | ||
|
|
3f5a2f35e6 | ||
|
|
5354a79497 | ||
|
|
27298684b2 | ||
|
|
d038c0e046 | ||
|
|
d95ee6d92a | ||
|
|
d3e82a6876 | ||
|
|
a8e94dd8c3 | ||
|
|
c3b2390ea8 | ||
|
|
90957978ab | ||
|
|
06659b28ba | ||
|
|
894f2c9be2 | ||
|
|
c85bca1758 | ||
|
|
12b32d871f | ||
|
|
02ca709afd | ||
|
|
4ffec49140 | ||
|
|
460d1dfaeb | ||
|
|
5e6d8ed2d1 | ||
|
|
79c6c1efbe | ||
|
|
ffa0515b59 | ||
|
|
69796efc37 | ||
|
|
d6541cb740 | ||
|
|
f0b9f4beca | ||
|
|
7765e06ef7 | ||
|
|
6e105b5751 | ||
|
|
52e0410d8e | ||
|
|
c30dfcbd20 | ||
|
|
176f804d75 | ||
|
|
7d60c49e0e | ||
|
|
c4871a7329 | ||
|
|
0d260304dc | ||
|
|
61a601cb12 | ||
|
|
26d3d83a4d | ||
|
|
6d124bfc5e | ||
|
|
10a18840da | ||
|
|
e58611c0c7 | ||
|
|
d71244b42b | ||
|
|
c26e78f88a | ||
|
|
b5fb634af4 | ||
|
|
5bc3f3656a | ||
|
|
13a5ff7119 | ||
|
|
8d9bd14c18 | ||
|
|
c47c73519e | ||
|
|
174f14c76b | ||
|
|
bafccc7dbf | ||
|
|
7b1f6c319e | ||
|
|
a5a3d7b657 | ||
|
|
10b71e08e1 | ||
|
|
869f61fcf8 | ||
|
|
fa90d82b27 | ||
|
|
c3fd539306 | ||
|
|
eae45bec5c | ||
|
|
812f7748a6 | ||
|
|
58a2f7d6a9 | ||
|
|
2dabb19a5a | ||
|
|
e08feebfd5 | ||
|
|
aa359d95e3 | ||
|
|
02b56d1709 | ||
|
|
202d0cb224 | ||
|
|
7aa8ca5e6f | ||
|
|
95e990757d | ||
|
|
9e1dd60032 | ||
|
|
e2cce3325b | ||
|
|
40ffe5ed82 | ||
|
|
5958582185 | ||
|
|
b564d1f137 | ||
|
|
b828a3c43c | ||
|
|
bd5b1ff74f | ||
|
|
e246ca1ef6 | ||
|
|
b6752a1393 | ||
|
|
00203d2968 | ||
|
|
038e99660f | ||
|
|
ed5212ca70 | ||
|
|
7dc3d8bd0e | ||
|
|
701b075782 | ||
|
|
0fff37b01a | ||
|
|
3af4920403 | ||
|
|
d6bb1fd35a | ||
|
|
94f7723659 | ||
|
|
571ca7f26e | ||
|
|
3d08aea7da | ||
|
|
4c9381c538 | ||
|
|
bc087095be | ||
|
|
61e6878898 | ||
|
|
43209b4bf6 | ||
|
|
ca763cac46 | ||
|
|
43cf3d6f66 | ||
|
|
005dfa3c04 | ||
|
|
112c1def73 | ||
|
|
9c1611188c | ||
|
|
1406239f9a | ||
|
|
0958e5a5cb | ||
|
|
ac0a394ffa | ||
|
|
d80b742e44 | ||
|
|
227088c36b | ||
|
|
09529af3b0 | ||
|
|
e8a8dac741 | ||
|
|
0bf7c7781c | ||
|
|
f03caa7b35 | ||
|
|
84eb811be9 | ||
|
|
86da4546de | ||
|
|
9006d8e97b | ||
|
|
e189a15dbf | ||
|
|
88ccac85f3 | ||
|
|
f22b3a19cf | ||
|
|
78f795af80 | ||
|
|
4b18e8086a | ||
|
|
73b34fff94 | ||
|
|
dc04255655 | ||
|
|
c254e0f3ee | ||
|
|
dca5128c58 | ||
|
|
64ee4a850e | ||
|
|
8ff5296643 | ||
|
|
9a24af562c | ||
|
|
e943420bbb | ||
|
|
4608fd6e3f | ||
|
|
370a9e6266 | ||
|
|
59835d886b | ||
|
|
17a411d422 | ||
|
|
393dfba684 | ||
|
|
6d369a51c8 | ||
|
|
9decf616c9 | ||
|
|
f4d96cee48 | ||
|
|
afd5493707 | ||
|
|
7df5e203c6 | ||
|
|
36478058f4 | ||
|
|
fe871be5ca | ||
|
|
25679a60c7 | ||
|
|
afd9e80cb1 | ||
|
|
2361e1e342 | ||
|
|
e41125d052 | ||
|
|
5be79b203b | ||
|
|
9c4b602ee2 | ||
|
|
27879d0f0d | ||
|
|
800b1765ae | ||
|
|
0e93bfdbc3 | ||
|
|
7b7543afad | ||
|
|
4bd822a180 | ||
|
|
35e0567b62 | ||
|
|
4191d2bde1 | ||
|
|
ef14bdb691 | ||
|
|
69cfb62619 | ||
|
|
adfb56c304 | ||
|
|
f335d5447e | ||
|
|
ef89c82c02 | ||
|
|
4c28ca442f | ||
|
|
3a63f098bd | ||
|
|
c0ddfe89e2 | ||
|
|
da62e960e2 | ||
|
|
d0d3b02de7 | ||
|
|
2ce3e8cdec | ||
|
|
2a1bfae434 | ||
|
|
ac534dbf37 | ||
|
|
2aeb246874 | ||
|
|
18a2f7bab4 | ||
|
|
8b2def80d0 | ||
|
|
f0ae93e466 | ||
|
|
21616c7854 | ||
|
|
116956cc64 | ||
|
|
2dd02323c0 | ||
|
|
a85a72e29a | ||
|
|
7492d02cb2 | ||
|
|
52d5dd4da5 | ||
|
|
16ab834b5e | ||
|
|
1b60fa245e | ||
|
|
c057fc931a | ||
|
|
10243d019d | ||
|
|
a13710455c | ||
|
|
cfac03af3c | ||
|
|
39894c69cd | ||
|
|
59d28ed4df | ||
|
|
e2cf657294 | ||
|
|
d18b7a533a | ||
|
|
9308d262d0 | ||
|
|
ad791c135c | ||
|
|
48900111a8 | ||
|
|
61e4791abe | ||
|
|
9b708216d5 | ||
|
|
f692aeb36b | ||
|
|
3a867aad64 | ||
|
|
e4a63807a1 | ||
|
|
1a92434b06 | ||
|
|
2dfed48c99 | ||
|
|
1c2b48e0ca | ||
|
|
fea1d6c1fb | ||
|
|
a754abdc5f | ||
|
|
a56a817706 | ||
|
|
e547d66316 | ||
|
|
d6f18bd5f3 | ||
|
|
6d0d0172f3 | ||
|
|
e2e0cfb6fa | ||
|
|
ec1d763fd2 | ||
|
|
d88229acba | ||
|
|
eb00f1dd54 | ||
|
|
adec65bea6 | ||
|
|
a82bc1b50c | ||
|
|
7620efc274 | ||
|
|
45775e2029 | ||
|
|
46eecba03b | ||
|
|
6e6732ae6a | ||
|
|
9c33e3d3ce | ||
|
|
fff1d6a533 | ||
|
|
ab2ba0f49f | ||
|
|
bda27d167f | ||
|
|
edff9053e8 | ||
|
|
60d11d734c | ||
|
|
5e9a4ecc0e | ||
|
|
0d59c975a0 | ||
|
|
6db270f8fc | ||
|
|
a11f040979 | ||
|
|
e2a74cf344 | ||
|
|
89dde23f32 | ||
|
|
a07e4ef2ff | ||
|
|
a60b5db89e | ||
|
|
85bffe131e | ||
|
|
361aa7dd32 | ||
|
|
e5b50cede5 | ||
|
|
b5b29e267e | ||
|
|
d632dba1ef | ||
|
|
4704bb7186 | ||
|
|
b1eafc6a75 | ||
|
|
c2a66c59c6 | ||
|
|
cb9b99262e | ||
|
|
480e8dd7fc | ||
|
|
f1b478c291 | ||
|
|
a23dfb3b11 | ||
|
|
5646e5f747 | ||
|
|
ee9deb187a | ||
|
|
806c28b5c2 | ||
|
|
8103e07a23 | ||
|
|
de85bccf03 | ||
|
|
18557cba09 | ||
|
|
2fb568e65e | ||
|
|
94f05e60c2 | ||
|
|
2bf4ba798f | ||
|
|
0d6bac093d | ||
|
|
f17845f9bd | ||
|
|
40a1c4b4f4 | ||
|
|
283476972f | ||
|
|
8acd0a3835 | ||
|
|
925a3b6ba8 | ||
|
|
149d034a81 | ||
|
|
b485c4f26c | ||
|
|
db8d5a7fb0 | ||
|
|
ee3c85162f | ||
|
|
ccc0fb6122 | ||
|
|
d18b757655 | ||
|
|
08604e5d44 | ||
|
|
ce2f1ce4bc | ||
|
|
872948f21a | ||
|
|
491cf63bab | ||
|
|
675a41bee2 | ||
|
|
5714f48f4c | ||
|
|
05331829c6 | ||
|
|
258d90d101 | ||
|
|
8d28cb5737 | ||
|
|
c1a998a604 | ||
|
|
ca4d592e11 | ||
|
|
42d1578fb4 | ||
|
|
36e88551eb | ||
|
|
fea99094df | ||
|
|
5b3a654f07 | ||
|
|
0e09bbae14 | ||
|
|
3fcd022dc5 | ||
|
|
66ac209938 | ||
|
|
bbbf1df01d | ||
|
|
3857aa4f7d | ||
|
|
b4bed3fd88 | ||
|
|
776587fdac | ||
|
|
d0d8c4a6a3 | ||
|
|
353dd2444a | ||
|
|
472aaf3f50 | ||
|
|
186e6dc1ba | ||
|
|
46afe5a792 | ||
|
|
99ab17375d | ||
|
|
6d36221995 | ||
|
|
2dadbe3855 | ||
|
|
a11e7affc8 | ||
|
|
fbed1b901c | ||
|
|
75d44d8c07 | ||
|
|
491347fba6 | ||
|
|
b2a44d9327 | ||
|
|
3e59eb2be9 | ||
|
|
32f67e7664 | ||
|
|
010213e4ca | ||
|
|
6afa7b45ef | ||
|
|
6e1032c30d | ||
|
|
70c3e3e95f | ||
|
|
c290f39e3b | ||
|
|
b0fe9422e4 | ||
|
|
2f695ba37d | ||
|
|
72e5f9d395 | ||
|
|
1ba3c62c8b | ||
|
|
e56b9397d9 | ||
|
|
4aacd42826 | ||
|
|
ac848809b5 | ||
|
|
3f585ac923 | ||
|
|
f7972bc8be | ||
|
|
cd8ba5af5b | ||
|
|
fc787ac20f | ||
|
|
72cafaaabf | ||
|
|
968eb65b01 | ||
|
|
c872775134 | ||
|
|
55ec6edbfb | ||
|
|
7a06046d74 | ||
|
|
9761587fc6 | ||
|
|
65b33edeee | ||
|
|
62b4710d9e | ||
|
|
e60d220d5c | ||
|
|
e8d32e9779 | ||
|
|
32505ff927 | ||
|
|
5bda30d1bb | ||
|
|
40bc834210 | ||
|
|
24f458a004 | ||
|
|
aa405f4114 | ||
|
|
13e0c93f0c | ||
|
|
9ec1245550 | ||
|
|
aa1c8bdee5 | ||
|
|
0934056575 | ||
|
|
f59a6aceea | ||
|
|
28dabfb7a6 | ||
|
|
bd5f18bdf7 | ||
|
|
95c6f3e8a0 | ||
|
|
1f2cc89995 | ||
|
|
d20b3d0ed5 | ||
|
|
94e8d2ec62 | ||
|
|
d5bb4753c8 | ||
|
|
8ab1c72867 | ||
|
|
bfb188eff5 | ||
|
|
cbb59ee1b0 | ||
|
|
b02ce8bdc7 | ||
|
|
4d98201217 | ||
|
|
189fe6e665 | ||
|
|
20a35aa472 | ||
|
|
889eb2234e | ||
|
|
b4a6c9fe75 | ||
|
|
b1e3eaacaf | ||
|
|
2457ddb3ba | ||
|
|
e225eee248 | ||
|
|
1c65d69485 | ||
|
|
1eb9a119af | ||
|
|
7651ed0925 | ||
|
|
901af0e106 | ||
|
|
b485be88da | ||
|
|
7c728e6b9e | ||
|
|
049eaa886a | ||
|
|
a2f21f3e8c | ||
|
|
4ac705885e | ||
|
|
5f003af4d4 | ||
|
|
6ce26891e8 | ||
|
|
3d9aed8039 | ||
|
|
c298c075f4 | ||
|
|
84c5c7da97 | ||
|
|
17d5386bb3 | ||
|
|
5fdef05cb0 | ||
|
|
ce4fbe580d | ||
|
|
9f8be37c4e | ||
|
|
bf26b9a7e1 | ||
|
|
c23ec177d5 | ||
|
|
1a283a6c42 | ||
|
|
ca64fae35d | ||
|
|
485cba185b | ||
|
|
43eddf7a58 | ||
|
|
5896ff7e80 | ||
|
|
0767e6f1e2 | ||
|
|
4f2153fd14 | ||
|
|
8edac7234d | ||
|
|
b767129303 | ||
|
|
6d57013b3e | ||
|
|
f137ee87f7 | ||
|
|
fa55a5a826 | ||
|
|
0be182e1ba | ||
|
|
c3757b1f05 | ||
|
|
21af3e8c4e | ||
|
|
4df567fe9d | ||
|
|
1c662bee50 | ||
|
|
e7f085d84b | ||
|
|
fc12da950c | ||
|
|
1f27563128 | ||
|
|
e2782d9e1d | ||
|
|
3782f21222 | ||
|
|
bc24daedc3 | ||
|
|
41c1ea1b05 | ||
|
|
415df9168f | ||
|
|
e98926be3f | ||
|
|
488f26359a | ||
|
|
e5cc26627a | ||
|
|
619d34b7f8 | ||
|
|
58fa31451a | ||
|
|
4942844edb | ||
|
|
f4d7971b7f | ||
|
|
ab9ceb9526 | ||
|
|
9e07fed96e | ||
|
|
0ea4d57d56 | ||
|
|
77005be687 | ||
|
|
aef886e34c | ||
|
|
b21f1582dd | ||
|
|
f8f72bd52e | ||
|
|
7cd06f5088 | ||
|
|
db7baa737f | ||
|
|
bb83f93954 | ||
|
|
008b424ee9 | ||
|
|
720d3804fc | ||
|
|
9d61de0ec9 | ||
|
|
16f3c4b7fb | ||
|
|
65c28b0cc6 | ||
|
|
c0edbc5eee | ||
|
|
a170be820e | ||
|
|
652147def5 | ||
|
|
343a1f081c | ||
|
|
c82c3a41b4 | ||
|
|
e2ee8d0edb | ||
|
|
d702e37902 | ||
|
|
e0d22f195b | ||
|
|
88004a6208 | ||
|
|
a2a30ca7d3 | ||
|
|
d7264e744d | ||
|
|
7f04983ed3 | ||
|
|
ac99c5ab03 | ||
|
|
60097c2661 | ||
|
|
72f98037f4 | ||
|
|
6465017e05 | ||
|
|
f75ae95c8f | ||
|
|
26ff74d670 | ||
|
|
b34666a014 | ||
|
|
d8bbff45c1 | ||
|
|
39a8fc274a | ||
|
|
b6006ed2fc | ||
|
|
4ceecd3e5e | ||
|
|
ab74b63ff2 | ||
|
|
3214d963ec | ||
|
|
6bacb29c98 | ||
|
|
339427de12 | ||
|
|
f1dd5c2406 | ||
|
|
bb4ea41589 | ||
|
|
c5a669caa6 | ||
|
|
cee27dd710 | ||
|
|
879fb489f3 | ||
|
|
1ab01b470b | ||
|
|
e25d006476 | ||
|
|
2732fbadbe | ||
|
|
418cada107 | ||
|
|
850a158531 | ||
|
|
4282e55dfe | ||
|
|
05a0c36072 | ||
|
|
05ae3f22ab | ||
|
|
903275e887 | ||
|
|
88b48b5376 | ||
|
|
88e0b419f2 | ||
|
|
33d7423950 | ||
|
|
30c26df348 | ||
|
|
cadd668aac | ||
|
|
b2c85181d0 | ||
|
|
7da8651511 | ||
|
|
22aab1e328 | ||
|
|
919f53ee51 | ||
|
|
3b2cf9ddef | ||
|
|
3f11a2a6a8 | ||
|
|
2725d3534f | ||
|
|
48c975a333 | ||
|
|
fe042a90b9 | ||
|
|
fab70dea69 | ||
|
|
7b1548e798 | ||
|
|
e084903eab | ||
|
|
3f71921c58 | ||
|
|
806f9145de | ||
|
|
bd3cb846c0 | ||
|
|
9356017daa | ||
|
|
351a686a7c | ||
|
|
61c05dfc9f | ||
|
|
553fb5a3be | ||
|
|
35f457c92e | ||
|
|
b855ab0dd4 | ||
|
|
238aa7baee | ||
|
|
46174f8ac8 | ||
|
|
379040771d | ||
|
|
37a02a3984 | ||
|
|
575b38ee2f | ||
|
|
977ec5eb4a | ||
|
|
064cab8ac8 | ||
|
|
d5fe19eb92 | ||
|
|
c2eb068c8a | ||
|
|
efc550eea3 | ||
|
|
3f54dd40b6 | ||
|
|
7c0dd1251c | ||
|
|
0d8beb77f6 | ||
|
|
1cab24458b | ||
|
|
cfc97c7d71 | ||
|
|
30f1001553 | ||
|
|
92d3c2a08e | ||
|
|
9cfcbd137b | ||
|
|
b74daafbcd | ||
|
|
af01cf787d | ||
|
|
6da25bdae8 | ||
|
|
6ffa3e1780 | ||
|
|
ff35f925b7 | ||
|
|
6b0aaabc98 | ||
|
|
e60da236ae | ||
|
|
d58f597885 | ||
|
|
a25742e18f | ||
|
|
b75c57e521 | ||
|
|
77a22a2835 | ||
|
|
0690aff6b5 | ||
|
|
f877a76a0e | ||
|
|
605563c0a8 | ||
|
|
b2a7d2ed4e | ||
|
|
b2bd6e465c | ||
|
|
ceb065f9eb | ||
|
|
c2302046dd | ||
|
|
bd6bd53646 | ||
|
|
c95bd4ad87 | ||
|
|
1167e85cf3 | ||
|
|
77225b912f | ||
|
|
aa3a1426e8 | ||
|
|
0072a36646 | ||
|
|
cecfd0ace4 | ||
|
|
d7409a9797 | ||
|
|
1560aabbaf | ||
|
|
6ff7c1cedf | ||
|
|
6c7394101b | ||
|
|
c4845a8b65 | ||
|
|
728ca44dff | ||
|
|
1af7f512bc | ||
|
|
07ff7f16c7 | ||
|
|
bfcbf4bc19 | ||
|
|
69322ae43b | ||
|
|
2dea730e08 | ||
|
|
84cc58d013 | ||
|
|
165a1d62c8 | ||
|
|
d5fba05f61 | ||
|
|
9868377fa0 | ||
|
|
c25ed56914 | ||
|
|
a6aef8844f | ||
|
|
7d96d95a5e | ||
|
|
79ff9f2fa3 | ||
|
|
79f338488e | ||
|
|
7c70a8f8c2 | ||
|
|
1e76a63719 | ||
|
|
29c92b6d91 | ||
|
|
7ec8b0bcba | ||
|
|
370eecd336 | ||
|
|
f89eae47f2 | ||
|
|
3d598476ec | ||
|
|
b7d673db52 | ||
|
|
e3d9b17e53 | ||
|
|
dfba9a0ab0 | ||
|
|
47e16d8ad6 | ||
|
|
f3618527a6 | ||
|
|
ad2fa621bd | ||
|
|
f2565109ea | ||
|
|
b1a7a8d572 | ||
|
|
519c152527 | ||
|
|
2e783c4dac | ||
|
|
e95fbd1f2c | ||
|
|
fa40ecfec1 | ||
|
|
be27697628 | ||
|
|
86842904be | ||
|
|
2556aa7b2a | ||
|
|
9f7f4f5bb8 | ||
|
|
85f4e2b191 | ||
|
|
e945608fa4 | ||
|
|
d892bf5333 | ||
|
|
d3b271d04f | ||
|
|
498c4ce19d | ||
|
|
6f53bb90e4 | ||
|
|
e57d86daef | ||
|
|
b050f6e430 | ||
|
|
8caea61bd3 | ||
|
|
8b2dc6853a | ||
|
|
02a1624d22 | ||
|
|
c09cdb4a07 | ||
|
|
2e870b76c6 | ||
|
|
687e73c7af | ||
|
|
71be643056 | ||
|
|
e975382a82 | ||
|
|
35a8ad18a9 | ||
|
|
349a98d388 | ||
|
|
c65fd57a24 | ||
|
|
b459ec5cdb | ||
|
|
e187fad2d1 | ||
|
|
8182575647 | ||
|
|
f9938a3e9a | ||
|
|
ca50da933e | ||
|
|
f43b7faec5 | ||
|
|
ba533a91c4 | ||
|
|
ae171ce2d2 | ||
|
|
97662dc30e | ||
|
|
fc8b10cf71 | ||
|
|
a6901dc7ba | ||
|
|
7297a2b02e | ||
|
|
a4d484b478 | ||
|
|
d3399f8f25 | ||
|
|
5b1dd1818c | ||
|
|
04e9bdd516 | ||
|
|
f5c49771df | ||
|
|
7759a36327 | ||
|
|
fb51a889f4 | ||
|
|
facd6c20c8 | ||
|
|
5e0da82b7f | ||
|
|
9dbbc057c5 | ||
|
|
886184c38e | ||
|
|
3da82597bb | ||
|
|
c2de8f4282 | ||
|
|
0ea41bf2b1 | ||
|
|
7e3fa7bd59 | ||
|
|
cf9cec3562 | ||
|
|
e680c28694 | ||
|
|
8db0c60f58 | ||
|
|
fba6b0da53 | ||
|
|
916627208c | ||
|
|
8da6929e93 | ||
|
|
385db5abbd | ||
|
|
fd4d2df3e6 | ||
|
|
7076a84b83 | ||
|
|
957fcfac4b | ||
|
|
77ec263329 | ||
|
|
d496c5f4a5 | ||
|
|
372fe3128c | ||
|
|
ff8670e601 | ||
|
|
451deb0101 | ||
|
|
b278b99605 | ||
|
|
1d5ca2f45e | ||
|
|
fc0799f0ca | ||
|
|
3a43c4124f | ||
|
|
d197a131db | ||
|
|
7be9dcd263 | ||
|
|
117395ed23 | ||
|
|
7d40544703 | ||
|
|
064e743014 | ||
|
|
701da1fa4d | ||
|
|
224e070c74 | ||
|
|
c1dc317791 | ||
|
|
add133a4c6 | ||
|
|
383d813dd9 | ||
|
|
9a53d1b4fe | ||
|
|
2fe43e8af8 | ||
|
|
f55e1330d5 | ||
|
|
9e09a7c02b | ||
|
|
07b9f0c1d5 | ||
|
|
61fc0ba6b2 | ||
|
|
10bb058051 | ||
|
|
7ba06d0145 | ||
|
|
1b48b07ee4 | ||
|
|
e941298e55 | ||
|
|
be2763d13d | ||
|
|
ef440f1b4e | ||
|
|
d990e2881b | ||
|
|
0c4cf5aff2 | ||
|
|
38b3ef790b | ||
|
|
fd7bb0b3da | ||
|
|
2298aaef75 | ||
|
|
123a5c20d8 | ||
|
|
d60fc0981b | ||
|
|
70491a7ea0 | ||
|
|
0b49f0bea0 | ||
|
|
33108da1d0 | ||
|
|
1674a79e11 | ||
|
|
6f581e803c | ||
|
|
9c7d125108 | ||
|
|
5fc1090dbe | ||
|
|
2057041621 | ||
|
|
3cadadee34 | ||
|
|
660d1fe292 | ||
|
|
d3cc1a3186 | ||
|
|
274237f4d2 | ||
|
|
602241f936 | ||
|
|
7880b84ba7 | ||
|
|
e9c4ca1b61 | ||
|
|
c0bc7b6c80 | ||
|
|
0934f19c69 | ||
|
|
41441e017a | ||
|
|
1277a79544 | ||
|
|
ce527f42cd | ||
|
|
edb801394b | ||
|
|
c40e1cbbfc | ||
|
|
faff0dbd45 | ||
|
|
dff2f35098 | ||
|
|
261429dc52 | ||
|
|
2db6b7e8f1 | ||
|
|
9aa1cce146 | ||
|
|
8c766b9670 | ||
|
|
0777e6062c | ||
|
|
8d4a2eabb8 | ||
|
|
2a836845c8 | ||
|
|
5c4f19b7c5 | ||
|
|
63a8f46dda | ||
|
|
3d972fcc0e | ||
|
|
d69e7b6d04 | ||
|
|
f0623f78eb | ||
|
|
2891206718 | ||
|
|
c4ab6c2cad | ||
|
|
56b4205f38 | ||
|
|
35b40bdb2a | ||
|
|
63289837ae | ||
|
|
439596bce5 | ||
|
|
f725d7b180 | ||
|
|
933ef3298a | ||
|
|
16b3e1e406 | ||
|
|
d560e58711 | ||
|
|
29a8e606f3 | ||
|
|
b4f086b52a | ||
|
|
cf33623715 | ||
|
|
894e2f15f0 | ||
|
|
e7175cbecf | ||
|
|
241945e11f | ||
|
|
1aecd0f1ff | ||
|
|
9cb84b6351 | ||
|
|
cc68ee790e | ||
|
|
e786476701 | ||
|
|
a48ac52a7d | ||
|
|
9e33cdb499 | ||
|
|
5de9ca91cb | ||
|
|
f2d8bb4c38 | ||
|
|
bd719279db | ||
|
|
4f16113988 | ||
|
|
fb79cfb853 | ||
|
|
1a0e3b62e2 | ||
|
|
af30033599 | ||
|
|
b6c6a8db3a | ||
|
|
07b70c743c | ||
|
|
ca7ad2ff2c | ||
|
|
79e4f5a47f | ||
|
|
2be22abf64 | ||
|
|
2fafe59ed2 | ||
|
|
3687e5e953 | ||
|
|
4c1c759343 | ||
|
|
ef32b131ce | ||
|
|
792645aa6f | ||
|
|
8055bab946 | ||
|
|
19928d2509 | ||
|
|
c0f72d9fac | ||
|
|
77b6cdb7dd | ||
|
|
f71e66e50d | ||
|
|
71461f74b2 | ||
|
|
dfbeb6b786 | ||
|
|
3e1affd647 | ||
|
|
1ba9226cb5 | ||
|
|
7f2c03ed0e | ||
|
|
251b1ad96b | ||
|
|
c8e7bc0542 | ||
|
|
ab3957bda7 | ||
|
|
5320379dc0 | ||
|
|
f6b36353a6 | ||
|
|
e5523b4954 | ||
|
|
de9f401877 | ||
|
|
46fd530566 | ||
|
|
b6b4369972 | ||
|
|
3aeaad418f | ||
|
|
b2bedbf40e | ||
|
|
62ef1e2857 | ||
|
|
0d03073c89 | ||
|
|
1ebbe4d551 | ||
|
|
1d14341231 | ||
|
|
b4c03fb0a9 | ||
|
|
9eeb62c4a3 | ||
|
|
116f2fa00a | ||
|
|
d6fbae0c27 | ||
|
|
6c37499531 | ||
|
|
7a92fe4c4c | ||
|
|
986b654098 | ||
|
|
ef7c1af78d | ||
|
|
2a8c1bb255 | ||
|
|
ef2d599f45 | ||
|
|
627c9515b1 | ||
|
|
fc846109ba | ||
|
|
5775569f18 | ||
|
|
55b41157cf | ||
|
|
5ba98ed5d3 | ||
|
|
69e0f3bf48 | ||
|
|
97422095ed | ||
|
|
40acbc1ea5 | ||
|
|
94a9447396 | ||
|
|
8229beefa4 | ||
|
|
6a62b9d5b7 | ||
|
|
bf6c5ff7c1 | ||
|
|
e6177356ec | ||
|
|
53b384c01d | ||
|
|
b66f3b08bb | ||
|
|
92e30ad3df | ||
|
|
17e89935c4 | ||
|
|
04ced9d63d | ||
|
|
555173a263 | ||
|
|
54391bb2ca | ||
|
|
ea0f710586 | ||
|
|
5a2899b78e | ||
|
|
f26cc7bcd4 | ||
|
|
08bc2cde18 | ||
|
|
a5d361d9c4 | ||
|
|
96d4171df7 | ||
|
|
fd2aaa768a | ||
|
|
24f73838f2 | ||
|
|
2b97f7ce7b | ||
|
|
e7e577e05d | ||
|
|
52bdfd3dca | ||
|
|
0e29833fc7 | ||
|
|
92c07fbccc | ||
|
|
bc3d6e90fa | ||
|
|
056e268cb3 | ||
|
|
50eb9f576a | ||
|
|
0db5048d6a | ||
|
|
eed604dce5 | ||
|
|
97b55a966d | ||
|
|
8d5a034c9d | ||
|
|
de6e5e315d | ||
|
|
8a44b6f251 | ||
|
|
e6770d6361 | ||
|
|
e5d8e11306 | ||
|
|
821b603ec2 | ||
|
|
34363d77db | ||
|
|
7a8260d5e0 | ||
|
|
1f1d49bbd6 | ||
|
|
0e82616ea6 | ||
|
|
9a68a887f0 | ||
|
|
f2b405924d | ||
|
|
eee7417f1f | ||
|
|
db48c076a6 | ||
|
|
5a15aee0e0 | ||
|
|
d67afcc9c1 | ||
|
|
b09f475602 | ||
|
|
c4e6c0aa83 | ||
|
|
e459214613 | ||
|
|
3dbe3deb64 | ||
|
|
701c81c7d1 | ||
|
|
557fd9b7a3 | ||
|
|
ae3de7f0c0 | ||
|
|
43b0c8adea | ||
|
|
c70f036024 | ||
|
|
d74a72d580 | ||
|
|
40d758b019 | ||
|
|
b390e0ebf1 | ||
|
|
ab2ea18cb5 | ||
|
|
ea33b2824e | ||
|
|
140e562446 | ||
|
|
9209328fd3 | ||
|
|
35938e4d90 | ||
|
|
316d124ec4 | ||
|
|
b1f59b4703 | ||
|
|
08ce3d0ed5 | ||
|
|
e39472c606 | ||
|
|
3924c1eabf | ||
|
|
929ab8b529 | ||
|
|
da55120b84 | ||
|
|
b1c0e42d00 | ||
|
|
b694edc23d | ||
|
|
0fe951a702 | ||
|
|
4cf62ff62c | ||
|
|
c6647fc0bf | ||
|
|
50b17c0f7d | ||
|
|
a0853a17ed | ||
|
|
35888b62f4 | ||
|
|
6b74250915 | ||
|
|
1269ac0661 | ||
|
|
a2f0a9c380 | ||
|
|
434926a39e | ||
|
|
4ccbb1b867 | ||
|
|
02af1ac144 | ||
|
|
1b747da374 | ||
|
|
f82e06d4f8 | ||
|
|
7812b45b36 | ||
|
|
09c034c096 | ||
|
|
7473ff4698 | ||
|
|
03468f3079 | ||
|
|
138a1157ee | ||
|
|
a63c981d70 | ||
|
|
9888224208 | ||
|
|
33ba2503c6 | ||
|
|
a9eea29b84 | ||
|
|
c21de1dbe5 | ||
|
|
6b8d3f6b01 | ||
|
|
e2ff71d2dd | ||
|
|
36097f68a0 | ||
|
|
20088e34b5 | ||
|
|
ad24ef01de | ||
|
|
304a39c793 | ||
|
|
338ad09a44 | ||
|
|
015712b9f1 | ||
|
|
11cb016d39 | ||
|
|
327e5834d5 | ||
|
|
c984c80a7d | ||
|
|
fe43729707 | ||
|
|
54cee9cd1f | ||
|
|
ad98994e4a | ||
|
|
87c57062c4 | ||
|
|
180e604534 | ||
|
|
47f2fb1832 | ||
|
|
96d9102630 | ||
|
|
f6f08969d1 | ||
|
|
676b4c0362 | ||
|
|
a789f6bb85 | ||
|
|
1e71ec7613 | ||
|
|
b3af6c9da5 | ||
|
|
0ce220d77a | ||
|
|
dc1f25d6fb | ||
|
|
e8c057e33f | ||
|
|
80c568bb30 | ||
|
|
e6b637cd72 | ||
|
|
10228f3bb8 | ||
|
|
e783c0b5a1 | ||
|
|
626f3de608 | ||
|
|
4cc45a7ba9 | ||
|
|
1c7f16c742 | ||
|
|
60211ee3b3 | ||
|
|
68accfe5c1 | ||
|
|
3f824c7e1e | ||
|
|
ab037ed242 | ||
|
|
4aec010451 | ||
|
|
9f97891939 | ||
|
|
9c9b10f047 | ||
|
|
5f4e664e8b | ||
|
|
220a5cb89f | ||
|
|
2cf200c493 | ||
|
|
d042cecbd9 | ||
|
|
cfc8c7a95e | ||
|
|
6c7e5d9c18 | ||
|
|
3fdf998703 | ||
|
|
babbbb048b | ||
|
|
36c9f3116e | ||
|
|
451f0b2d07 | ||
|
|
da10d61faa | ||
|
|
b4aeccba6d | ||
|
|
c60c1258e2 | ||
|
|
cef32b1e2f | ||
|
|
06d67f822b | ||
|
|
97da8ca6bb | ||
|
|
11a765e77d | ||
|
|
52dbb39ecd | ||
|
|
92b1fecc92 | ||
|
|
18c269209d | ||
|
|
808fc0a0bf | ||
|
|
5e852417dd | ||
|
|
677375c0d1 | ||
|
|
33a47baa0f | ||
|
|
a788378ce2 | ||
|
|
d3728b5fff | ||
|
|
79dc4f7a0c | ||
|
|
a32672c1c5 | ||
|
|
a384966f76 | ||
|
|
fd5d1094d3 | ||
|
|
a4ff44794c | ||
|
|
e2d057bd2c | ||
|
|
90eb73bb9d | ||
|
|
d6245c9e69 | ||
|
|
e99d47a3aa | ||
|
|
89e4c87e57 | ||
|
|
8f50a67b87 | ||
|
|
269a3ad5ad | ||
|
|
533c499b44 | ||
|
|
39f801b957 | ||
|
|
17d28abb62 | ||
|
|
9fbee0b347 | ||
|
|
e83404fea2 | ||
|
|
1a65bf61a8 | ||
|
|
6443fb2581 | ||
|
|
2112f46885 | ||
|
|
074aa05880 | ||
|
|
9afa0f3249 | ||
|
|
3b8f0741cb | ||
|
|
4f75f3bef1 | ||
|
|
28f4501f0a | ||
|
|
47acdced4c | ||
|
|
b2cf9fe953 | ||
|
|
1505f6af03 | ||
|
|
35659b625f | ||
|
|
5482637876 | ||
|
|
24e91108ba | ||
|
|
b130f77b94 | ||
|
|
84ebb3ae39 | ||
|
|
aa9d7d766e | ||
|
|
0718a54934 | ||
|
|
b0884491ae | ||
|
|
2da81fefb8 | ||
|
|
651d262d43 | ||
|
|
22a9c4d448 | ||
|
|
b44ea85296 | ||
|
|
951e64a4bc | ||
|
|
19081305e1 | ||
|
|
f189957991 | ||
|
|
fb7f9eb420 | ||
|
|
9085f883ad | ||
|
|
fe95410380 | ||
|
|
7ccfa69750 | ||
|
|
0b0a331e63 | ||
|
|
5a28c6dd94 | ||
|
|
8506ee1bfe | ||
|
|
7cd254b070 | ||
|
|
931f3abe4e | ||
|
|
873f321cf7 | ||
|
|
24a42bb761 | ||
|
|
4168763049 | ||
|
|
84707a7504 | ||
|
|
881414e0af | ||
|
|
d1cbbf62c9 | ||
|
|
59b59d2651 | ||
|
|
1447af9522 | ||
|
|
376c94c239 | ||
|
|
b617f54d34 | ||
|
|
4e38d42183 | ||
|
|
5966ec08a9 | ||
|
|
f7f36b4f37 | ||
|
|
05e3f11ac5 | ||
|
|
be18fcec6b | ||
|
|
0bf1fb6f19 | ||
|
|
7bef1c1f2a | ||
|
|
77763cee25 | ||
|
|
01d848075a | ||
|
|
f9f0c83b30 | ||
|
|
90952aae2d | ||
|
|
fab2534381 | ||
|
|
ea8eefdf72 | ||
|
|
ae7fadf900 | ||
|
|
c97e3bac2a | ||
|
|
63130ca782 | ||
|
|
b653dfe7ba | ||
|
|
33d844496f | ||
|
|
39267c2bf9 | ||
|
|
5430f7efa9 | ||
|
|
f01b062a06 | ||
|
|
db81c3d979 | ||
|
|
092b805de5 | ||
|
|
2ab7673bb0 | ||
|
|
ee11982bcb | ||
|
|
e0c3093711 | ||
|
|
7de28bdc6a | ||
|
|
c5ec799b2d | ||
|
|
3ae99689f7 | ||
|
|
210ce6796f | ||
|
|
9a9b55e60b | ||
|
|
2dc7873362 | ||
|
|
1ebb0b0785 | ||
|
|
01fa930e6b | ||
|
|
28ce738ce7 | ||
|
|
c49dfb1007 | ||
|
|
96559baede |
No files matched your search
+16
-7
@@ -31,6 +31,11 @@ EXTENSION: aolserver
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: activescript
|
||||
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -45,6 +50,10 @@ EXTENSION: cgi
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cli
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: fhttpd
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
@@ -54,8 +63,9 @@ MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: nsapi
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
PRIMARY MAINTAINER: Uwe Schindler <thetaphi@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: phttpd
|
||||
MAINTENANCE: Unknown
|
||||
@@ -126,7 +136,7 @@ STATUS: Experimental
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: interbase
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>, Ard Biesheuvel <ard@ard.nu>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -166,7 +176,7 @@ MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oci8
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
|
||||
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -177,8 +187,7 @@ STATUS: Working
|
||||
COMMENT: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oracle
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
|
||||
MAINTENANCE: Maintained
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
COMMENT: Using the new OCI8 driver is encouraged where possible.
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -330,7 +339,7 @@ MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mcrypt
|
||||
PRIMARY MAINTAINER: Derick Rethans <d.rethans@jdimedia.nl>
|
||||
PRIMARY MAINTAINER: Derick Rethans <derick@derickrethans.nl>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
+17
-13
@@ -16,15 +16,15 @@ build-modules: $(PHP_MODULES)
|
||||
|
||||
libphp4.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
|
||||
-@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
|
||||
|
||||
libs/libphp4.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp4.so
|
||||
|
||||
install: $(install_targets)
|
||||
install: $(all_targets) $(install_targets)
|
||||
|
||||
install-sapi: libphp4.la
|
||||
@echo "Installing PHP SAPI module"
|
||||
-@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
|
||||
install-sapi: $(OVERALL_TARGET)
|
||||
@echo "Installing PHP SAPI module: $(PHP_SAPI)"
|
||||
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
|
||||
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
|
||||
for i in 0.0.0 0.0 0; do \
|
||||
@@ -38,10 +38,10 @@ install-sapi: libphp4.la
|
||||
|
||||
install-modules: build-modules
|
||||
@test -d modules && \
|
||||
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR) && \
|
||||
echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/" && \
|
||||
rm -f modules/*.la && \
|
||||
$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) >/dev/null 2>&1 || true
|
||||
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR)
|
||||
@echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/"
|
||||
@rm -f modules/*.la >/dev/null 2>&1
|
||||
@$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
|
||||
|
||||
install-tester:
|
||||
@echo "Installing regression tester: $(INSTALL_ROOT)$(PEAR_INSTALLDIR)/"
|
||||
@@ -50,11 +50,15 @@ install-tester:
|
||||
|
||||
install-su: install-pear install-tester
|
||||
|
||||
test: $(SAPI_CLI_PATH)
|
||||
@TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' $(top_srcdir)/run-tests.php $(TESTS)
|
||||
test:
|
||||
-@if test -x $(SAPI_CLI_PATH) && test ! -z $(SAPI_CLI_PATH); then \
|
||||
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' $(top_srcdir)/run-tests.php $(TESTS); \
|
||||
else \
|
||||
echo "ERROR: Cannot run tests without CLI sapi."; \
|
||||
fi
|
||||
|
||||
clean:
|
||||
find . -name \*.lo | xargs rm -f
|
||||
|
||||
@@ -1,6 +1,712 @@
|
||||
PHP 4 NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? May 2003, Version 4.3.2
|
||||
22 Sep 2004, Version 4.3.9
|
||||
- GPC input processing fixes (Stefano Di Paola, Rasmus, Stefan)
|
||||
- Implemented periodic PCRE compiled regexp cache cleanup, to avoid memory
|
||||
exhaustion. (Andrei)
|
||||
- Fixed bug with raw_post_data not getting set (Brian)
|
||||
- Fixed a file-descriptor leak with phpinfo() and other 'special' URLs (Zeev)
|
||||
- Rewritten UNIX and Windows install help files. (Documentation Team)
|
||||
- Updated PCRE to provide better error handling in certain cases. (Andrei)
|
||||
- NSAPI: added "bucket" parameter to list of non-php.ini-keys of php4_execute
|
||||
for doing performance stats without warnings in server-log. (Uwe Schindler)
|
||||
- Fixed leap year checking with idate(). (Christian Schneider, Derick)
|
||||
- Fixed strip_tags() to correctly handle '\0' characters. (Stefan)
|
||||
- Fixed funny forking effect in FastCGI when PHP_FCGI_CHILDREN was not set.
|
||||
- Fixed bug #30050 (Possible crash inside php_shutdown_config()).
|
||||
(Ilia, nw at softwarekombinat dot de)
|
||||
- Fixed bug #29882 (isset crashes on arrays). (Marcus)
|
||||
- Fixed bug #29753 (mcal_fetch_event() allows 2nd argument to be optional).
|
||||
(Ilia, Vrana)
|
||||
- Fixed bug #29727 (Added missing CURL authentication directives). (Ilia)
|
||||
- Fixed bug #29719 (fgetcsv() has problem parsing strings ending with escaped
|
||||
enclosures). (Ilia)
|
||||
- Fixed bug #29607 (highlighting code with HEREDOC produces invalid output).
|
||||
(Ilia)
|
||||
- Fixed bug #29599 (domxml_error segfaults another apache module). (Rob)
|
||||
- Fixed bug #29594 (Use PHP's own tmpfile() implementation). (Ilia)
|
||||
- Fixed bug #29581 (Typo inside php.ini comments for mysql.trace_mode). (Ilia)
|
||||
- Fixed bug #29493 (extract(array, EXTR_REFS) misbehaves with elements referred
|
||||
twice or more times). (Moriyoshi)
|
||||
- Fixed bug #29443 (Sanity check for wbmp detection). (Ilia)
|
||||
- Fixed bug #29369 (Uploaded files with ' or " in their names get their names
|
||||
truncated at those characters). (Ilia)
|
||||
- Fixed bug #29349 (imagecreatefromstring() crashes with external GD library).
|
||||
(Ilia, adconrad at debian dot org)
|
||||
- Fixed bug #29333 (output_buffering+trans_sess_id can corrupt output). (Ilia)
|
||||
- Fixed bug #29226 (ctype_* functions missing validation of numeric string
|
||||
representations). (Ilia)
|
||||
- Fixed bug #29209 (imap_fetchbody() doesn't check message index).
|
||||
(Ilia, tony2001 at phpclub dot net)
|
||||
- Fixed bug #29116 (Zend constant warning uses memory after free).
|
||||
(Marcus, jdolecek at NetBSD dot org)
|
||||
- Fixed bug #29114 (Potential double free in php_stat). (Sara)
|
||||
- Fixed bug #29075 (strnatcmp() incorrectly handles whitespace).
|
||||
(Curt, Ilia)
|
||||
- Fixed bug #29049 (array sorting via user function/method does not
|
||||
validate it). (Ilia)
|
||||
- Fixed bug #29038 (extract() with EXTR_PREFIX_SAME prefixes empty strings).
|
||||
(Andrey)
|
||||
- Fixed bug #29034 (wordwrap() returns a boolean when passed empty string).
|
||||
(Ilia)
|
||||
- Fixed bug #28974 (overflow in array_slice(), array_splice(), substr,
|
||||
substr_replace(), strspn(), strcspn()). (Andrey)
|
||||
- Fixed bug #28897 (ibase: -1 returned as -0.000 for 64-bit scaled int). (Ard)
|
||||
- Fixed bug #28879 (Implicit/Explicit array creation inconsistency when using
|
||||
Resources, Arrays, or Objects as indices). (Sara)
|
||||
- Fixed bug #28878 (Setting of inikey's in obj.conf fails). (Uwe Schindler)
|
||||
- Fixed bug #28868 (Internal wrapper registry not thread safe). (Sara)
|
||||
- Fixed bug #28818 (Apache 2 sapis do not export st_dev).
|
||||
(xuefer at 21cn dot com, Ilia).
|
||||
- Fixed bug #28800 (strings beginning with "inf" improperly converted). (Ilia)
|
||||
- Fixed bug #28723 (Fixed mbstring config.m4 to work on OSes where test
|
||||
command does not support -e parameter). (Ilia)
|
||||
- Fixed bug #28692 (\0 in Authenticate header passed via safe_mode). (Ilia)
|
||||
- Fixed bug #28670 (WWW-Authentication header mangling with PCRE in safe_mode
|
||||
adds extra spaces). (Ilia)
|
||||
- Fixed bug #28668 (glob() does not work with relative paths on Windows). (Ilia)
|
||||
- Fixed bug #28649 (Proper glob() return value on Linux when there are no
|
||||
matches). (Ilia)
|
||||
- Fixed bug #28633 (sprintf incorrectly adding padding to floats). (Ilia)
|
||||
- Fixed bug #28627 (When multiple MySQL links are used default link is leaked).
|
||||
(gavin at ipalsoftware dot com, Ilia)
|
||||
- Fixed bug #28525 (gmp_powm() does not work with hexadecimal string modulo
|
||||
represented as a string). (pickett at sumu dot org, Ilia)
|
||||
- Fixed bug #28512 (Allocate enough space to store MSSQL data). (Frank)
|
||||
- Fixed bug #28466 (mbstring_convert_variables() array separation problem).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #28175 (Allow bundled GD to compile against freetype 2.1.2).
|
||||
(Elf, Ilia)
|
||||
|
||||
14 Jul 2004, Version 4.3.8
|
||||
- Fixed strip_tags() to correctly handle '\0' characters. (Stefan)
|
||||
- Fixed memory_limit during request startup. (Stefan)
|
||||
- Replace alloca() with emalloc() for better stack protection. (Ilia)
|
||||
- Added missing safe_mode checks inside ftok and itpc. (Ilia)
|
||||
- Fixed bug #28963 (Missing space for \0 in address allocation in IMAP). (Ilia)
|
||||
- Fixed bug #28632 (Prevent open_basedir bypass via MySQL's LOAD DATA LOCAL).
|
||||
(Ilia)
|
||||
|
||||
03 Jun 2004, Version 4.3.7
|
||||
- Upgraded bundled GD library to 2.0.23. (Ilia)
|
||||
- Changed user error handler mechanism to relay to built-in error handler if it
|
||||
returns false. (Andrei)
|
||||
- Fixed command line escaping routines for win32. (Ilia)
|
||||
- Fixed problems with *printf() functions and '%f' formatting. (Marcus)
|
||||
- Fixed possible crash inside pg_copy_(to|from) function if delimiter is more
|
||||
then 1 character long. (Ilia)
|
||||
- Fixed crash inside cpdf_place_inline_image() when working with truecolor
|
||||
images. (Ilia)
|
||||
- Fixed handling of return values from storred procedures in mssql_execute()
|
||||
with multiple result sets returned. (Frank)
|
||||
- Fixed logic bug in session_register() which allowed registering _SESSION
|
||||
and/or HTTP_SESSION_VARS. (Sara)
|
||||
- Fixed bug #28597 (xmlrpc_encode_request() incorrectly encodes chars in
|
||||
200-210 range). (fernando dot nemec at folha dot com dot br, Ilia)
|
||||
- Fixed bug #28569 (informix connection id is not thread safe).
|
||||
(novicky at aarongroup dot cz, Ard)
|
||||
- Fixed bug #28564 (Problem building informix as a shared extension).
|
||||
(roques at mti dot ag, Ilia)
|
||||
- Fixed bug #28508 (Do not make hypot() available if not supported by libc).
|
||||
(Ilia)
|
||||
- Fixed bug #28506 (Allow negative start angle in imagearc and imagefilledarc.
|
||||
(Pierre)
|
||||
- Fixed bug #28456 (Problem with enclosed / in uploaded files). (Antony)
|
||||
- Fixed bug #28386 (wordwrap() wraps lines 1 character too soon). (Ilia)
|
||||
- Fixed bug #28374 (Possible unterminated loop inside
|
||||
_php_pgsql_trim_message()). (Ilia)
|
||||
- Fixed bug #28355 (glob() does not return error on Linux when it does not
|
||||
have permission to open the directory). (Ilia)
|
||||
- Fixed bug #28289 (incorrect resolving of relative paths by glob() in
|
||||
windows). (Ilia)
|
||||
- Fixed bug #28229 (run-tests tripped up by spaces in names). (Marcus)
|
||||
- Fixed bug #28228 (number_format() does not allow empty decimal separator).
|
||||
(Ilia)
|
||||
- Fixed bug #28196 (missing error constants in cURL extension). (Ilia)
|
||||
- Fixed bug #28187 (parse_url() not handling embedded IPv6 in URLs). (Sara)
|
||||
- Fixed bug #28175 (build problem for people using FreeType 2.1.0-2.1.2).
|
||||
(Ilia)
|
||||
- Fixed bug #28147 (Crash with drawing anti-aliased lines). (Derick)
|
||||
- Fixed bug #28122 (dba_open db3: Permission denied). (Marcus)
|
||||
- Fixed bug #28112 (sqlite_query() crashing apache on malformed query). (Ilia,
|
||||
Marcus)
|
||||
- Fixed bug #28055 (timeout duration too long in feof()/pfsockopen() liveness
|
||||
checks). (Wez)
|
||||
- Fixed bug #28087 (Do not force mysql.trace_mode to 0 on every request).
|
||||
(Ilia)
|
||||
- Fixed bug #28042 (greek letters in html to entitity mapping not correct).
|
||||
(Derick)
|
||||
- Fixed bug #28007 (compile mssql extension with old versions of FreeTDS
|
||||
fails). (Frank)
|
||||
- Fixed bug #27995 (imagefilltoborder() stops the fill process prematurely).
|
||||
(Ilia)
|
||||
- Fixed bug #27810 (don't use php's pemalloc in ext/pcre). (Joe Orton)
|
||||
- Fixed bug #23220 (SSL: fatal protocol error when talking to IIS). (Wez)
|
||||
|
||||
15 Apr 2004, Version 4.3.6
|
||||
- Updated bundled PDFLib library to version 5.0.3p1 in Windows distribution.
|
||||
(Edin)
|
||||
- Fixed a crash in multi-threaded environments when a thread is shutdown by
|
||||
the web server. (Stas)
|
||||
- Fixed a bug that prevented building of the GD extension against external GD
|
||||
lib 1.X. (Ilia, Edin, Nick Talbott).
|
||||
- Synchronized bundled GD library with GD 2.0.22. (Ilia)
|
||||
- Fixed bug #27963 (Session lifetime setting may leak between requests). (Ilia)
|
||||
- Fixed bug #27849 (configure craps out on trivial syntax error). (Derick)
|
||||
- Fixed bug #27822 (is_resource() returns TRUE for closed resources). (Derick)
|
||||
- Fixed bug #27819 (problems returning reference to a reference parameter).
|
||||
(Ilia)
|
||||
- Fixed bug #27809 (ftp_systype returns null on some ftp servers). (Ilia)
|
||||
- Fixed bug #27802 (default number of children to 8 when PHP_FCGI_CHILDREN is
|
||||
not defined). (Ilia)
|
||||
- Fixed bug #27780 (strtotime(+1 xxx) returns a wrong date/time). (Derick)
|
||||
- Fixed bug #27769 (domxml_xmltree crashes). (Rob)
|
||||
- Fixed bug #27764 (Get return value from a stored procedure not returning any
|
||||
result sets). (Frank)
|
||||
- Fixed bug #27762 (SCO Openserver doesn't have S_ISSOCK). (Wez)
|
||||
- Fixed bug #27743 (Make sure Money types are converted and returned
|
||||
correctly). (Frank)
|
||||
- Fixed bug #27732 (Fixed compilation bug inside php_sab_info.h). (Ilia)
|
||||
- Fixed bug #27731 (error_reporting() inside @ block fails to set
|
||||
error_reporting level). (Ilia)
|
||||
- Fixed bug #27719 (mktime issues on and around DST changeover). (Rasmus)
|
||||
- Fixed bug #27717 (Test Failures when compiled on 64-bit mode). (Ard, Derick)
|
||||
- Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type
|
||||
Header). (Marcus)
|
||||
- Fixed bug #27663 (compile failure with cURL 7.11.1). (Ilia)
|
||||
- Fixed bug #27646 (Cannot serialize/unserialize non-finite numeric values).
|
||||
(Marcus)
|
||||
- Fixed bug #26757 (session.save_path default is bogus for win32). (Wez)
|
||||
- Fixed bug #26589 (Crash inside mssql extension when selecting many columns
|
||||
of type money). (Frank)
|
||||
- Fixed bug #25547 (error_handler and array index with function call).
|
||||
(cschneid at cschneid dot com)
|
||||
|
||||
26 Mar 2004, Version 4.3.5
|
||||
- Fixed possible crash using an invalid color index with a palette image in
|
||||
imagecolortransparent. (Pierre)
|
||||
- Fixed php-cgi to not ignore command-line switches when run in a web context.
|
||||
This fixes our test cases allowing INI with GET sections to work. (Rasmus)
|
||||
- Fixed getopt() so it works without $_SERVER. (Rasmus, bfrance)
|
||||
- Fixed crash in php_ini_scanned_files() when no additional INI files were
|
||||
actually parsed. (Jon)
|
||||
- Fixed possible crashes inside socket extension, due to missing check inside
|
||||
allocation functions. (Ilia)
|
||||
- Fixed zero bytes memory allocation when no extra ini files are found in the
|
||||
--with-config-file-scan-dir specified directory. (Eric Colinet, Derick)
|
||||
- Changed "allow_url_fopen" php.ini option to be PHP_INI_SYSTEM. (Sara)
|
||||
- Improved the sybase_ct module: (Timm)
|
||||
. Added ability to define a message handler not only globally, but also per
|
||||
connection.
|
||||
. Added "sybct.packet_size" php.ini option.
|
||||
. Changed "sybct.login_timeout" php.ini option changeable at runtime.
|
||||
. Fixed memory leak in sybase_set_message_handler().
|
||||
- Synchronized bundled GD library with GD 2.0.17. (Ilia)
|
||||
- Upgraded PCRE library to version 4.5. (Andrei)
|
||||
- Updated bundled PostgreSQL library to version 7.4 in Windows distribution.
|
||||
(Edin)
|
||||
- Added support for --program-prefix and --program-suffix configure options.
|
||||
(Jani)
|
||||
- Added a warning when creating temp stream fails with ftp_(n)list(). (Sara)
|
||||
- Fixed header handler in NSAPI SAPI module (header->replace was ignored,
|
||||
send_default_content_type now sends value from php.ini). (Uwe Schindler)
|
||||
- Fixed bug #27633 (Incorrect EOL translation by ftp_get() in ASCII mode).
|
||||
(Ilia)
|
||||
- Fixed bug #27600 (GCC 3.0.4 does not like __attribute__ directive). (Sascha)
|
||||
- Fixed bug #27590 (crash during shutdown when freeing persistent resources in
|
||||
ZTS mode). (Ilia)
|
||||
- Fixed bug #27582 (possible crashes in imagefilltoborder()). (Pierre)
|
||||
- Fixed bug #27580 (pre-initialization errors in ap2 handler are not being
|
||||
written to vhost error log). (Ilia)
|
||||
- Fixed bug #27559 (Corrected open_basedir resolving logic). (Ilia)
|
||||
- Fixed bug #27530 (broken http auth when safe_mode is on and PCRE is disabled).
|
||||
(Ilia)
|
||||
- Fixed bug #27509 (broken getaddrinfo() causes fsockopen() error). (Sara)
|
||||
- Fixed bug #27505 (htmlentities() does not handle BIG5 correctly). (Ilia,
|
||||
ywliu at hotmail dot com)
|
||||
- Fixed bug #27498 (bogus safe_mode error on nonexistent directories for
|
||||
chdir() and opendir() functions). (Ilia)
|
||||
- Fixed bug #27460 (base64_decode() does not handle extra padding).
|
||||
(Ilia, naish at klanen dot net)
|
||||
- Fixed bug #27443 (defined() returns wrong type). (Derick)
|
||||
- Fixed bug #27437 (wrong freetype include inside GD library). (Ilia)
|
||||
- Fixed bug #27424 (headers missing on flush() in apache 2 SAPIs). (Ilia)
|
||||
- Fixed bug #27421 (mbstring.func_overload should be system ini setting).
|
||||
(Ilia)
|
||||
- Fixed bug #27384 (unpack() misbehaves with 1 char string). (GeorgeS)
|
||||
- Fixed bug #27383 (Potential crash inside fopen_wrapper, while
|
||||
parsing response code). (Ilia)
|
||||
- Fixed bug #27354 (Modulus operator crashes PHP). (Derick)
|
||||
- Fixed bug #27341 (HEAD requests fail to return data). (Ilia)
|
||||
- Fixed bug #27337 (missing sapi_shutdown() in sapi/isapi causes memory leak).
|
||||
(Jani, msisolak at yahoo dot com)
|
||||
- Fixed bug #27328 (ftp extension relies on 32-bit longs). (Sara)
|
||||
- Fixed bug #27300 (Improved regex for pg_convert()).
|
||||
(benjcarson at digitaljunkies dot ca, Ilia)
|
||||
- Fixed bug #27295 (memory leak inside sscanf()). (Ilia)
|
||||
- Fixed bug #27293 (two crashes inside image2wbmp()). (Ilia)
|
||||
- Fixed bug #27291 (get_browser matches browscap.ini patterns incorrectly).
|
||||
(Jay)
|
||||
- Fixed bug #27278 (*printf() functions treat arguments as if passed by
|
||||
reference). (Ilia)
|
||||
- Fixed bug #27238 (iptcparse() function misses some fields). (Pierre)
|
||||
- Fixed bug #27235 (Interbase NUMERIC x.0 field returns empty string on 0).
|
||||
(Ard)
|
||||
- Fixed bug #27196 (Missing content_length initialization in apache 2 sapis).
|
||||
(Ilia, pdoru at kappa dot ro)
|
||||
- Fixed bug #27183 (userland stream wrapper segfaults on stream_write).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #27175 (tzset() is not being called by PHP on startup).
|
||||
(Ilia, sagawa at sohgoh dot net)
|
||||
- Fixed bug #27172 (Possible floating point exception in gmp_powm()).
|
||||
(Ilia)
|
||||
- Fixed bug #27171 (crash inside gmp_hamdist()). (Jani)
|
||||
- Fixed bug #27157 (Compile Failure on Solaris 8). (Timm)
|
||||
- Fixed bug #27149 (broken CLOB support in oci8 extension). (Antony)
|
||||
- Fixed bug #27135 (Possible crash inside mb_strlen()). (Moriyoshi)
|
||||
- Fixed bug #27104 (CLI/CGI SAPI module variable name conflict). (Marcus)
|
||||
- Fixed bug #27058 (crash in sybase_connect() with 2 arguments). (Ilia)
|
||||
- Fixed bug #27056 (ints used instead of longs inside some GD functions).
|
||||
(Ilia)
|
||||
- Fixed bug #27040 (passing an array of form-fields to CURLOPT_POSTFIELDS
|
||||
does not work). (Ilia, Jani)
|
||||
- Fixed bug #27037 (fixed possible crash in apache2handler output code).
|
||||
(Ilia)
|
||||
- Fixed bug #27026 (Added "cgi.nph" php.ini option to allow forcing of the
|
||||
'Status: 200' header that is not normally needed). (Ilia)
|
||||
- Fixed bug #27011 (64bit int/long confusion in preg_match*() functions).
|
||||
(Ilia)
|
||||
- Fixed bug #27007 (missing connection closure when connect fails in pgsql).
|
||||
(Ilia)
|
||||
- Fixed bug #26974 (rename() doesn't check the destination file against
|
||||
safe_mode/open_basedir). (Ilia)
|
||||
- Fixed bug #26973 (*printf() '+' modifier broken). (Jani)
|
||||
- Fixed bug #26969 (--with-openssl=shared build fails). (Jani)
|
||||
- Fixed bug #26968 (Segfault with Interbase module built as shared). (Ard)
|
||||
- Fixed bug #26949 (rand(min,max) always returns min when ZTS enabled). (Jani)
|
||||
- Fixed bug #26937 (Warning in xml.c). (Jani)
|
||||
- Fixed bug #26927 (preg_quote() does not escape \0). (Ilia)
|
||||
- Fixed bug #26923 (ext/imap: pam and crypt libraries missing when build as
|
||||
shared extension). (Jani)
|
||||
- Fixed bug #26909 (crash in imap_mime_header_decode() when no encoding is
|
||||
used). (Ilia)
|
||||
- Fixed bug #26896 (ext/ftp does not work as shared extension). (Jani)
|
||||
- Fixed bug #26892 (ORA-21301 in ocinewcollection() call). (Antony)
|
||||
- Fixed bug #26878 (problem with multiple references to the same variable with
|
||||
different types). (Ilia)
|
||||
- Fixed bug #26864 (pg_(update|delete) ignore PGSQL_DML_EXEC option). (Ilia)
|
||||
- Fixed bug #26862 (ob_flush() followed by output_reset_rewrite_vars() may
|
||||
result in data loss). (Ilia, scottmacvicar at ntlworld dot com)
|
||||
- Fixed bug #26847 (memory leak in mail() when to/subject contain only spaces).
|
||||
(Ilia)
|
||||
- Fixed bug #26814 (When included file has a parse error, terminate script
|
||||
execution). (Ilia)
|
||||
- Fixed bug #26777 (ext/interbase: Let DB handle NULL params). (Ard)
|
||||
- Fixed bug #26772, #26967 (file operations return NULL instead of FALSE).
|
||||
(Wez, Ilia)
|
||||
- Fixed bug #26758 (FastCGI exits immediately with status 255).
|
||||
(Ilia, tcarter at noggin dot com dot au)
|
||||
- Fixed bug #26755 (CLI now overrides php.ini settings and switches off output
|
||||
buffering). (Edin)
|
||||
- Fixed bug #26753 (zend_fetch_list_dtor_id() doesn't check NULL strings).
|
||||
(Jani, Markus dot Lidel at shadowconnect dot com)
|
||||
- Fixed bug #26752 (Silent unterminated loop when length parameter for fgets(),
|
||||
fread() and fgetss() is 0). (Ilia)
|
||||
- Fixed bug #26751 (PHP can't find the MySQL socket on a case sensitive file
|
||||
system). (Derick)
|
||||
- Fixed bug #26703 (Certain characters inside strings incorrectly treated
|
||||
as keywords). (vrana [at] php [dot] net, Ilia)
|
||||
- Fixed bug #26699 (mbstring doesn't identify "binary" as a valid encoding).
|
||||
(nirva-php at ishiboo dot com, Moriyoshi)
|
||||
- Fixed bug #26667 (Added safety checks to ip2long()). (Ilia)
|
||||
- Fixed bug #26653 (open_basedir incorrectly resolved on win32).
|
||||
(Ilia, scottmacvicar at ntlworld dot com)
|
||||
- Fixed bug #26639 (mb_convert_variables() clutters variables beyond the
|
||||
references). (Moriyoshi)
|
||||
- Fixed bug #26635 (fixed look up for fonts in the current directory w/ZTS).
|
||||
(Ilia)
|
||||
- Fixed bug #26625 (pg_convert sets NULL incorrectly for character data types).
|
||||
(Ilia)
|
||||
- Fixed bug #26604 (Apache2 SAPIs implicitly disable Keep-Alive). (Ilia)
|
||||
- Fixed bug #26595 (ext/domxml: XSLT_NAMESPACE undeclared). (Christian)
|
||||
- Fixed bug #26565 (strtotime("this month") resolving to the wrong month).
|
||||
(Jani)
|
||||
- Fixed bug #26564 (ncurses5 has headers in PREFIX/include/ncurses/). (Jani)
|
||||
- Fixed bug #26548 (ext/session: Malformed HTTP dates headers). (Derick)
|
||||
- Fixed bug #26531 (ext/domxml: get_elements_by_tag_name() wildcard fails).
|
||||
(Rob Richards)
|
||||
- Fixed bug #26488 (Missing declaration of CRTSCTS in ext/dio/dio.c). (Jani)
|
||||
- Fixed bug #26467 (flock() does not force the "wouldblock" parameter to be
|
||||
passed by reference). (Wez)
|
||||
- Fixed bug #26463 (Incorrect handling of semicolons after heredoc). (Ilia)
|
||||
- Fixed bug #26462 (phpize + ext/bcmath -> compile error). (Jani)
|
||||
- Fixed bug #26461 (-lssl missing from LIBS). (Jani)
|
||||
- Fixed bug #26458 (var_dump(), var_export(), debug_zval_dump() not binary safe
|
||||
for array keys). (Ilia)
|
||||
- Fixed bug #26447 (--with-openssl=shared causes compile errors). (Jani)
|
||||
- Fixed bug #26446 (domxml_open_file() returns an empty error-Array). (Rob)
|
||||
- Fixed bug #26440 (MFH missing context options). (Ilia)
|
||||
- Fixed bug #26438 (error in thttpd SAPI installation). (Jani)
|
||||
- Fixed bug #26415 (Updated bundled OpenSSL DLLs in the Windows distribution
|
||||
to 0.9.7c). (Edin)
|
||||
- Fixed bug #26407 (Result set fetching broken around transactions). (Timm)
|
||||
- Fixed bug #26391 (parse_url() destroys strings that contain a character in
|
||||
range of \x80-\xff)). (Moriyoshi)
|
||||
- Fixed bug #26384 (crash in domxslt->process()). (Christian)
|
||||
- Fixed bug #26381 (rand() without srand() doesn't work with certain php.ini).
|
||||
(Jani)
|
||||
- Fixed bug #26376 (typo in ext/odbc/config.m4: DBMaker test fails). (Jani)
|
||||
- Fixed bug #26355 (flock() doesn't initialize the wouldblock argument). (Ilia)
|
||||
- Fixed bug #26309 (Fixed argument parsing for imageftbbox()). (Ilia)
|
||||
- Fixed bug #26304 (Unexpected data loss when opening dba file). (Marcus)
|
||||
- Fixed bug #26285 (escapeshellarg() uses wrong quotes on windows). (Ilia)
|
||||
- Fixed bug #26267 (gmp_random() leaks memory and does not produce random
|
||||
numbers). (Jani)
|
||||
- Fixed bug #26253 (ext/tokenizer: build as shared extension fails). (Jani)
|
||||
- Fixed bug #26235 (yp_first/yp_next do not specify correct key length). (Ilia)
|
||||
- Fixed bug #26216 ("getimagesize(): stream does not support seeking" when
|
||||
using remote files). (Marcus)
|
||||
- Fixed bug #26201 (crash in ibase_trans() on invalid link handle). (Ilia)
|
||||
- Fixed bug #26198 (strtotime() handling of M/F Y date format). (Ilia)
|
||||
- Fixed bug #26194 (iconv() not properly defined with libiconv).
|
||||
(Steph, Frank, Moriyoshi)
|
||||
- Fixed bug #26176 (Fixed handling of numeric keys in INI files). (Ilia)
|
||||
- Fixed bug #26168 (shtool availability check in phpize).
|
||||
(robbat2 at gentoo dot org, Ilia)
|
||||
- Fixed bug #26148 (Print the notice before modifying variable on type
|
||||
mismatch). (morten-bugs dot php dot net at afdelingp dot dk, Ilia)
|
||||
- Fixed bug #26128 (mbstring prints out wrong information on phpinfo()).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #26113 (remove leftover local file when ftp_get/ftp_nb_get
|
||||
fails). (Ilia)
|
||||
- Fixed bug #26105 (Compile failure on GCC version 3.0.X). (Ilia)
|
||||
- Fixed bug #26103 (ext/mime_magic causes compile failure in ext/mssql). (Jani)
|
||||
- Fixed bug #26097 (gdImageColorClosestAlpha() returns incorrect results).
|
||||
(sprice at wisc dot edu, Ilia)
|
||||
- Fixed bug #26042 (memory leak if mcrypt_generic_deinit() is not called after
|
||||
every mcrypt_generic_init() call). (Ilia)
|
||||
- Fixed bug #26025 (Segfault on glob() without GLOB_NOCHECK or GLOB_NOMAGIC
|
||||
under *BSD platforms). (Moriyoshi)
|
||||
- Fixed bug #26005 (Random "cannot change the session ini settings" errors).
|
||||
(Jani, jsnajdr at kerio dot com)
|
||||
- Fixed bug #26003 (Make fgetcsv() binary safe). (Ilia, Moriyoshi)
|
||||
- Fixed bug #25963 (PostgreSQL error message include \n characters).
|
||||
(Marcus, Ilia)
|
||||
- Fixed bug #25939 (feof() not working correctly for sockets). (Wez)
|
||||
- Fixed bug #25916 (get_browser() -> PHP Fatal error: Nesting level too
|
||||
deep - recursive dependency?). (Uwe Schindler)
|
||||
- Fixed bug #25794 (Cannot open existing hash db3 file with write" ext/dba).
|
||||
(Marcus)
|
||||
- Fixed bug #25753 (php.ini settings "leak" from vhosts/.htaccess files).
|
||||
(Patch by: rover at tob dot ru)
|
||||
- Fixed bug #25694 (round() and number_format() give inconsistent results).
|
||||
(Ilia)
|
||||
- Fixed bug #25664 (calling ITypeInfo::Invoke with bogus params). (Wez)
|
||||
- Fixed bug #25581 (getimagesize () return incorrect values on bitmap (os2)
|
||||
files). (Marcus)
|
||||
- Fixed bug #25329 (sqlite_create_function with method and reference to
|
||||
$this). (Marcus).
|
||||
- Fixed bug #24773 (unsetting string as array causes a crash). (Sara)
|
||||
- Fixed bug #24773 (Unsetting string offsets crashes PHP). (Moriyoshi, Sara)
|
||||
- Fixed bug #24582 (extensions can't be loaded dynamically in Solaris/iPlanet).
|
||||
(Jani)
|
||||
- Fixed bug #23467 (date('T') outputs incorrect Time Zone).
|
||||
(Jani, scottmacvicar at ntlworld dot com)
|
||||
- Fixed bug #22403 (PHP crashes when executing a sql procedure without
|
||||
parameters). (Timm)
|
||||
- Fixed bug #22127 (Invalid response code when force-cgi-redirect safety
|
||||
mechanism is triggered). (Ilia, scottmacvicar at ntlworld dot com)
|
||||
- Fixed bug #21760 (Use of uninitialized pointer inside php_read()).
|
||||
(Ilia, uce at ftc dot gov)
|
||||
- Fixed bug #21513 (shutdown functions not executed if timed out). (Zeev)
|
||||
- Fixed bug #21070 (ftp_genlist/ANSI-tmpfile() fail w/ some platform). (Sara)
|
||||
|
||||
3 Nov 2003, Version 4.3.4
|
||||
- Made MCVE extension available on win32. (Jani)
|
||||
- Upgraded bundled libfcgi and made FastCGI support viable on Win32. (Sascha)
|
||||
- Added apache_get_version() function. (Ilia)
|
||||
- Fixed disk_total_space() and disk_free_space() under FreeBSD. (Jon Parise)
|
||||
- Fixed crash bug when non-existing save/serializer handler was used. (Jani)
|
||||
- Fixed memory leak in gethostbynamel() if an error occurs. (Sara)
|
||||
- Fixed FastCGI being unable to bind to a specific IP. (Sascha)
|
||||
- Fixed multibyte regex engine to properly handle ".*" pattern under
|
||||
POSIX compatible mode. (K.Kosako <kosako at sofnec.co.jp>, Moriyoshi)
|
||||
- Fixed bug #25955 (Compile failure on MacOSX 10.3 Panther). (Marko, Dan)
|
||||
- Fixed bug #25923 (mail() modifies the to & subject arguments). (Ilia)
|
||||
- Fixed bug #25922 (Crash in error handler when 5th argument is modified).
|
||||
(Ilia)
|
||||
- Fixed bug #25918 (Possible crash in mime_content_type()). (Ilia)
|
||||
- Fixed bug #25900 (document->get_elements_by_tag_name with default xmlns).
|
||||
(Rob)
|
||||
- Fixed bug #25895 (Incorrect detection of safe_mode limited ini options).
|
||||
(Ilia)
|
||||
- Fixed bug #25888 (Crash of php.exe when xpath_eval of a namespace). (Rob)
|
||||
- Fixed bug #25836 (last key of multi-dimensional array passed via GPC not
|
||||
being escaped when magic_quotes_gpc is on). (Ilia)
|
||||
- Fixed bug #25825 (tzset() was not called to reset libc environment on
|
||||
request shutdown). (Wez)
|
||||
- Fixed bug #25814 (Make flock() return correct value when 3rd argument is
|
||||
used). (Ilia)
|
||||
- Fixed bug #25800 (parse_url() could not parse urls with empty port). (Ilia)
|
||||
- Fixed bug #25780 (ext/session: invalid "session.cookie_lifetime" makes
|
||||
session_start() to crash in win32). (Jani)
|
||||
- Fixed bug #25777 (Do not rtrim() of text fields fetched from mssql). (Ilia)
|
||||
- Fixed bug #25770 (Segfault with PHP and bison 1.875).
|
||||
(eggert@gnu.org, Marcus)
|
||||
- Fixed bug #25764 (ldap_get_option() crashes with unbound ldap link). (Jani)
|
||||
- Fixed bug #25758 (var_export does not escape ' & \ inside array keys).
|
||||
(Ilia)
|
||||
- Fixed bug #25752 (ext/ncurses: ncurses.h instead of curses.h with BSD).
|
||||
(Jani)
|
||||
- Fixed bug #25746 (Do not bail out when unable to chdir original dir on
|
||||
systems with broken getcwd()). (Ilia)
|
||||
- Fixed bug #25745 (ctype functions fail with non-ascii characters).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #25744 (make ZTS build of ext/sybase compile). (Ilia)
|
||||
- Fixed bug #25738 (alloca() related issues on the Darwin platform).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #25708 (extract($GLOBALS, EXTR_REFS) mangles $GLOBALS).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #25707 (html_entity_decode() over-decodes &lt;). (Moriyoshi)
|
||||
- Fixed bug #25703 (openssl configure check failed). (Jani)
|
||||
- Fixed bug #25701 (On flush() set headers_sent in apache2handler). (Ilia)
|
||||
- Fixed bug #25671 (str_replace() corrupts subarrays). (Sara)
|
||||
- Fixed bug #25669 (eregi() with non-ascii characters). (Moriyoshi)
|
||||
- Fixed bug #25665 (var_dump() hangs on Nan and INF). (Ilia)
|
||||
- Fixed bug #25648 (xslt_set_encoding() not detected correctly). (Jani)
|
||||
- Fixed bug #25636 (SNMP Session not closed on success).
|
||||
(Ilia, patch by: nesslage at mwsc dot edu)
|
||||
- Fixed bug #25635 (Make "make tests" to fail due to invalid include_path).
|
||||
(Ilia)
|
||||
- Fixed bug #25604 (HAVE_SNMP_PARSE_OID undefined with phpize build). (Jani)
|
||||
- Fixed bug #25583 (Incorrect handling of paths starting with "/" on win32
|
||||
inside glob() function). (Ilia)
|
||||
- Fixed bug #25570 (Possible crash in apache2handler when zend_bailout called
|
||||
outside of zend_try {} block). (Ilia)
|
||||
- Fixed bug #25558 (ext/dbase: reverted fix for bug #23463). (Vlad)
|
||||
- Fixed bug #25530 (checkdate() incorrectly handles floats). (Ilia)
|
||||
- Fixed bug #25525 (ldap_explode_dn() crashes when passed invalid dn).
|
||||
(Sara, patch by: mikael dot suvi at trigger dot ee)
|
||||
- Fixed bug #25504 (pcre_match_all() crashes when passed only 2 parameters).
|
||||
(Jani)
|
||||
- Fixed bug #25483 (ext/informix: bogus -469 error from ifx_query()).
|
||||
(Jani, patch by: denisov at kubsu dot ru)
|
||||
- Fixed bug #25463 (ext/cpdf: compile failure with bundled GD)
|
||||
- Fixed bug #25429 (fix copying of stdin using copy() function). (Ilia)
|
||||
- Fixed bug #25424 (ext/informix: lvarchar not supported in win32). (Jani)
|
||||
- Fixed bug #25404 (ext/pgsql: open transactions not closed when script ends).
|
||||
(Marcus)
|
||||
- Fixed bug #25385 (ob_gzhandler(): typo in sapi_add_header_ex() call). (Jani)
|
||||
- Fixed bug #25378 (unserialize() crashes with invalid data). (Jani)
|
||||
- Fixed bug #25372 (sscanf() does not work with %X). (Jani)
|
||||
- Fixed bug #25348 ("make install" fails with --enable-short-tags). (Jani)
|
||||
- Fixed bug #25343 (is_dir() gives warning on FreeBSD). (Jani)
|
||||
- Fixed bug #25333 (Possible body corruption & crash in win32 mail()). (Ilia)
|
||||
- Fixed bug #25316 (Possible infinite loop inside _php_stream_write()). (Ilia)
|
||||
- Fixed bug #25314 (FTP_ASCII mode behaving like binary from Win->Unix).
|
||||
(Sara)
|
||||
- Fixed bug #25308 (php -m crashes when zend extensions are loaded). (Stas)
|
||||
- Fixed bug #25307 (Crash with WDDX serializer). (Sascha, Jani)
|
||||
- Fixed bug #25295 (QNX6: php_ini.c:414: 'alphasort' undeclared). (Jani)
|
||||
- Fixed bug #25294 (ext/ftp: NLST failure leads to crash on exit). (Sara, Rob)
|
||||
- Fixed bug #25293 (Output correct EOL to error_log). (Ilia)
|
||||
- Fixed bug #25239 (ftp_fopen_wrapper not RFC compliant). (Sara)
|
||||
- Fixed bug #25218 ("deflate" compressed pages had a gzip header). (Stefan)
|
||||
- Fixed bug #25211 (image.c compile failure with AIX). (Marcus)
|
||||
- Fixed bug #25166 (WDDX serializer handler missing in win32). (Jani)
|
||||
- Fixed bug #25109 (Possible crash when fetching field names in pgsql). (Ilia)
|
||||
- Fixed bug #25106 (Added more stringent checks on bzopen() mode). (Ilia)
|
||||
- Fixed bug #25070 (unlock session files on win32 before closing them). (Ilia)
|
||||
- Fixed bug #24402 (Compile failure with gettext 0.12.x). (Jani)
|
||||
- Fixed bug #23488 (zlib.output_compression overrides Vary header). (Stefan)
|
||||
- Fixed bug #23326 (ext/domxml: Attributes via append_child not supported).
|
||||
(Melvyn)
|
||||
- Fixed bug #21220 (Wrong Apache version shown in phpinfo() output). (Jani)
|
||||
- Fixed bug #18534 (ifx_close() leaves open session). (nobbie@php.net)
|
||||
- Fixed bug #14049 (realpath() returns invalid results for non-existent
|
||||
paths). (Ilia)
|
||||
|
||||
25 Aug 2003, Version 4.3.3
|
||||
- Upgraded the bundled Expat library to version 1.95.6. (Jani)
|
||||
- Upgraded the bundled PCRE library to version 4.3. (Andrei)
|
||||
- Upgraded the bundled GD library to version GD 2.0.15. (Ilia)
|
||||
- Improved the engine to use POSIX/socket IO where feasible. (Sascha)
|
||||
- Improved the IMAP extension (Ilia)
|
||||
. Added imap_timeout() function. (bug #24161)
|
||||
. Added optional 'charset' parameter to imap_search() and imap_sort().
|
||||
(bug #22505)
|
||||
- Improved the InterBase extension (Daniela)
|
||||
. Added transaction constants: IBASE_REC_VERSION, IBASE_REC_NO_VERSION,
|
||||
IBASE_WRITE, IBASE_WAIT and IBASE_CONCURRENCY. (bugs #8797, #23887)
|
||||
. Made numeric/decimal datatype handling work on any platform.
|
||||
- Improved the NSAPI SAPI module (Uwe Schindler)
|
||||
. Added possibility to use PHP to generate HTTP error pages (404 Not Found..)
|
||||
. Added possibility to use PHP to generate directory listings for directories
|
||||
without index.html
|
||||
. php4_init (magnus.conf): new parameter to set alternate path to php.ini.
|
||||
(php_ini="/path/to/php.ini")
|
||||
. php4_execute (obj.conf): support for additional php.ini values.
|
||||
Allows different settings per virtual server.
|
||||
(See sapi/nsapi/nsapi-readme.txt for more information)
|
||||
. Added support for virtual().
|
||||
. Added nsapi_request_headers() and nsapi_response_headers() with aliases
|
||||
for apache compatibility.
|
||||
. Added "nsapi.read_timeout" php.ini option.
|
||||
. Synced $_SERVER variables to be similar to Apache variables.
|
||||
- Added DBA handler 'inifile' to support ini files. (Marcus)
|
||||
- Added a "DEBUG" note to 'php -v' output when --enable-debug is used. (Derick)
|
||||
- Added long options into CLI & CGI (e.g. --version). (Marcus)
|
||||
- Added a new parameter to preg_match*() that can be used to specify
|
||||
the starting offset in the subject string to match from. (Andrei)
|
||||
- Fixed possible integer overflows in:
|
||||
. base64_encode(). (Moriyoshi)
|
||||
. bundled GD library. (Ilia)
|
||||
- Fixed "mysql.connect_timeout" php.ini option to be settable with ini_set().
|
||||
(Rasmus)
|
||||
- Fixed FastCGI IIS document root problem. (Shane)
|
||||
- Fixed corruption of multibyte character including 0x5c as second
|
||||
byte in multipart/form-data. (Rui)
|
||||
- Fixed possible crash in imagerotate() when an invalid color index
|
||||
is used for background color. (Pierre-Alain Joye)
|
||||
- Fixed a bug that under certain circumstances could invalidate safe_mode.
|
||||
(Ilia)
|
||||
- Fixed certificate version and allowed setting of the serial number in
|
||||
openssl_csr_sign(). (Stefan Roehrich)
|
||||
- Fixed each() to be binary safe for keys. (Zeev)
|
||||
- Fixed ext/yaz to not log if "yaz.log_file" php.ini option is not set. (Adam)
|
||||
- Fixed a bug in bundled libmysql (mysql bug #564). (Georg)
|
||||
- Fixed ext/exif to honor "magic_quotes_runtime" php.ini option. (Marcus)
|
||||
- Fixed bug #25093 (ext/pgsql: Various leaks due to non-freed queries). (Ilia)
|
||||
- Fixed bug #25084 (ext/session: Fixed session.referer_check to be independent
|
||||
on register_globals). (Ilia)
|
||||
- Fixed bug #25081 (odbc_fetch_array() may mangle numeric fields). (Ilia)
|
||||
- Fixed bug #25044 (header("Location:") changing HTTP status). (Marcus)
|
||||
- Fixed bug #25037 (win32 mail(): Possible infinite loop inside SendText()).
|
||||
(Ilia)
|
||||
- Fixed bug #25007 (rand() & mt_rand() seed RNG every call). (Jani)
|
||||
- Fixed bug #24989 (external libexpat conflicts with bundled libexpat). (Jani)
|
||||
- Fixed bug #24980 (array_reduce() uses first element as default running
|
||||
total). (Ilia)
|
||||
- Fixed bug #24977 (Reverted mysql_select_db() optimization). (Ilia)
|
||||
- Fixed bug #24958 (Apache2 SAPIs: Incorrect handling of 404s). (Ilia, Justin)
|
||||
- Fixed bug #24951 (ob_flush() needlessly destroys output handler). (Ilia)
|
||||
- Fixed bug #24936 (ext/fdf not linked properly as shared extension). (Jani)
|
||||
- Fixed bug #24909 (Bad random numbers with ZTS builds on Solaris). (Ilia)
|
||||
- Fixed bug #24897 (inconsistent behavior of shuffle() & array_multisort()).
|
||||
(Ilia, Jani)
|
||||
- Fixed bug #24883 ("variables_order" and "gpc_order" being ignored). (Ilia)
|
||||
- Fixed bug #24873 (incorrect handling of / inside open_basedir). (Ilia)
|
||||
- Fixed bug #24871 (aggregate(): methods misidentified as constructors). (Ilia)
|
||||
- Fixed bug #24827 (ob_gzhandler overrides Vary header). (Ilia)
|
||||
- Fixed bug #24792 (--enable-zend-multibyte causes random segfaults with ZTS).
|
||||
(Fujimoto)
|
||||
- Fixed bug #24783 (foreach($ar as $key => $val), $key not binary safe). (Zeev)
|
||||
- Fixed bug #24760 (non-default SNMP port number not working). (Jani)
|
||||
- Fixed bug #24752 (Unhandled "uniqueidentifier" field type).
|
||||
(Ilia, s.sonnenberg[at]coolspot.de)
|
||||
- Fixed bug #24710 (Crash when $obj->{0} is used). (Zeev)
|
||||
- Fixed bug #24663 (\n. sequences were not being escaped). (Ilia)
|
||||
- Fixed bug #24640 (var_export() and var_dump() can not output large floats).
|
||||
(Marcus)
|
||||
- Fixed bug #24629 (FreeBSD select() does not like large microseconds values).
|
||||
(Mirco Bauer).
|
||||
- Fixed bug #24609 (ext/domxml: segfault when using replace node across
|
||||
different docs). (Rob Richards)
|
||||
- Fixed bug #24594 (Rewrite of the imagefill() function). (Pierre-Alain Joye)
|
||||
- Fixed bug #24592 (NULL related crash in session extension). (Sascha)
|
||||
- Fixed bug #24573 (debug_backtrace() crashes if $this set to null). (Jani)
|
||||
- Fixed bug #24560 (parse_url() incorrectly handling certain file:// based
|
||||
schemas). (Ilia)
|
||||
- Fixed bug #24557 (make fclose() respect refcount on the resource).
|
||||
(Wez, Ilia)
|
||||
- Fixed bug #24537 (apache2 compile misses some include directories). (Jani)
|
||||
- Fixed bug #24535 (ext/mysql: crash when retrieving data from unbuffered
|
||||
result after the original connection has been changed). (Ilia)
|
||||
- Fixed bug #24519 (aggregate_methods_by_list() does not increment refcount).
|
||||
- Fixed bug #24313 (file_exists() warning on non-existent files when
|
||||
open_basedir is used). (Ilia)
|
||||
- Fixed bug #24312 (base64_decode() does not skip 0xF0-0xFF characters).
|
||||
(gereon.steffens[at]onvista.de, Ilia)
|
||||
- Fixed bug #24284 (Fixed memory leak inside pg_ping()). (Ilia)
|
||||
- Fixed bug #24249 (fdf_add_doc_javascript() not available on Windows). (Edin)
|
||||
- Fixed bug #24224 (ibase_blob_get() overflow). (Ard)
|
||||
- Fixed bug #24223 (missing variable initialization in bundled gd). (Ilia)
|
||||
- Fixed bug #24220 (range() didn't handle numeric strings correctly). (Ilia)
|
||||
- Fixed bug #24210 (not detecting assume_default_colors - typo). (Sara)
|
||||
- Fixed bug #24198 (Invalid recursion detection in array_merge_recurcive()).
|
||||
(Ilia)
|
||||
- Fixed bug #24177 (Apache2 SAPIs: status set incorrectly after flush()).
|
||||
(Ilia)
|
||||
- Fixed bug #24155 (gdImageRotate270 incorrectly use x parameter for y axis).
|
||||
(tom@gksystems.com, Ilia)
|
||||
- Fixed bug #24150 (crash in imap_fetch_overview() &
|
||||
imap_rfc822_write_address()). (Ilia)
|
||||
- Fixed bug #24142 (workaround for a gcc bug affecting round()). (Marcus, Ilia)
|
||||
- Fixed bug #24063 (serialize() missing 0 after the . on scientific notation).
|
||||
(Marcus, Ilia)
|
||||
- Fixed bug #24063 (scientific notation broken in *printf()). (Ilia)
|
||||
- Fixed bug #24060 (ncurses_del_panel() causes segfault). (Georg)
|
||||
- Fixed bug #24054 (Integer overflow failure with GCC/x86 for *=). (Sascha)
|
||||
- Fixed bug #24028 (Reading raw post message by php://input failed). (Jani)
|
||||
- Fixed bug #24009 (FastCGI handling of file not found). (Shane)
|
||||
- Fixed bug #24007 (Problem with register_globals & arrays). (Ilia)
|
||||
- Fixed bug #23951 (constants in static initializers clobbered by inheritance).
|
||||
(Wez, Zend Engine)
|
||||
- Fixed bug #23936 (ext/interbase: fail to select and fetch). (Ard)
|
||||
- Fixed bug #23913 (make rename() work across partitions on *nix). (Ilia)
|
||||
- Fixed bug #23912 (Invalid CSS in phpinfo() output). (Ilia)
|
||||
- Fixed bug #23902 (NULL in CGI header output). (Shane)
|
||||
- Fixed bug #23898 (Proper handling of NULLs in odbc_result, odbc_fetch_into
|
||||
and odbc_result_all). (Ilia)
|
||||
- Fixed bug #23897 (Fixed a check for mbfilter_ru.h). (aleks@m2media.ru, Ilia)
|
||||
- Fixed bug #23894 (sprintf() decimal specifiers problem). (Moriyoshi)
|
||||
- Fixed bug #23888 (Missing input validation for flags parameter). (Ilia)
|
||||
- Fixed bug #23808 (broken imagecopymerge()). (Pierre-Alain Joye)
|
||||
- Fixed bug #23798 (Spaces were not being stripped from Bcc header). (Ilia)
|
||||
- Fixed bug #23792 (imagerotate() problems with limited platte, the function
|
||||
will always return true color image from now on). (Pierre-Alain Joye)
|
||||
- Fixed bug #23779 (mysql_connect(): disable local infile option if php.ini
|
||||
option "open_basedir" is set). (Georg)
|
||||
- Fixed bug #23769 (In FreeBSD glob() gives wrong result when pattern not
|
||||
found). (Hartmut)
|
||||
- Fixed bug #23733 (Coredump on startup with Oracle 9+). (Edin)
|
||||
- Fixed bug #23685 (fake values returned when OID value is an empty string).
|
||||
(Jani)
|
||||
- Fixed bug #23664 (FastCGI socket listenting). (Shane)
|
||||
- Fixed bug #23509 (exit code lost when exit() called from
|
||||
register_shutdown_function()). (Ilia)
|
||||
- Fixed bug #23463 (ext/dbase: added Dbase2 version check). (Vlad Krupin)
|
||||
- Fixed bug #23285 (Potential Stack overflow in zendlex). (Wez)
|
||||
- Fixed bug #23104 (hash position of static arrays not being reset). (Ilia)
|
||||
- Fixed bug #23038, #23574 (aggregate() related leaks and crashes). (Andrei)
|
||||
- Fixed bug #22947 (Ack() inside win32/sendmail.c may stall in certain
|
||||
situations). (Ilia)
|
||||
- Fixed bug #22690 (ob_start() did not work with create_function() callbacks).
|
||||
(Marcus)
|
||||
- Fixed bug #22592 (Cascading assignments to strings with curly braces broken).
|
||||
(Stas)
|
||||
- Fixed bug #22245 (References inside $_SESSION not being handled). (Ilia)
|
||||
- Fixed bug #22154 (Possible crash when memory_limit is reached and output
|
||||
buffering in addition to session.use_trans_sid is used). (Ilia)
|
||||
- Fixed bug #22072 (Apache2 sapis do not detect aborted connections). (Ilia)
|
||||
- Fixed bug #21958 (workaround for unusual realpath() on AIX & Tru64). (Ilia)
|
||||
- Fixed bug #21957 (serialize() mangles objects with __sleep). (Ilia)
|
||||
- Fixed bug #21918 (strange behaviour of mixed type in array-keys). (Marcus)
|
||||
- Fixed bug #21855 (Threading issue on HP-UX). (Roshan Naik, Andi, Moriyoshi)
|
||||
- Fixed bug #21611 (version_compare() does not support "p" as suffix).
|
||||
(Stefan Walk)
|
||||
- Fixed bug #21074 (Apache2: "ErrorDocument xxx /error.php" broken). (Jani)
|
||||
- Fixed bug #20896 (-s -w modes with php-cli cause php to hang). (Ilia)
|
||||
- Fixed bug #19613 (putenv("VAR=") does not empty VAR on win32). (Zeev)
|
||||
- Fixed bug #18744 (ibase_blob_add() has max limit of 64k). (Ard)
|
||||
- Fixed bug #18291 (escapeshellcmd() can now handle quoted arguments). (Ilia)
|
||||
- Fixed bug #17414 (pthreads bug workaround). (timo.teras[at]iki.fi)
|
||||
- Fixed bug #13142 (strtotime not handling "M d H:i:s Y" format). (Ilia)
|
||||
- Fixed bug #11924 (ibase_query(), ibase_execute() mangled passed parameters).
|
||||
(Jani)
|
||||
- Fixed bug #7014 (crash in _php_ibase_error() after request shutdown). (Ard)
|
||||
|
||||
29 May 2003, Version 4.3.2
|
||||
- Syncronized bundled GD library with GD 2.0.12. (Ilia)
|
||||
- Removed support for GDLIB version 1.x.x (php_gd.dll) on Windows. (Edin)
|
||||
- Enabled read-only GIF support in the bundled GDLIB (php_gd2.dll) on Windows.
|
||||
@@ -159,6 +865,7 @@ PHP 4 NEWS
|
||||
- Fixed bug #22017 (date() does not support negative timestamps on win32).
|
||||
(Ilia)
|
||||
- Fixed bug #22008 (strip_tags() eliminates too much). (Moriyoshi)
|
||||
- Fixed bug #21007 (html_errors off text-only output in phpinfo). (Marcus)
|
||||
- Fixed bug #22004 (Overload extension and _call() breaks classes). (Shane)
|
||||
- Fixed bug #21998 (array_pop() did not reset the current array position).
|
||||
(Jani)
|
||||
|
||||
+10
-18
@@ -37,8 +37,11 @@ The next few rules are more of a technical nature.
|
||||
messages every day. Woe be to those who attempt to mess with it.
|
||||
|
||||
2. All news updates intended for public viewing, such as new features,
|
||||
bug fixes, improvements, etc., should go into the NEWS file. Also see
|
||||
the note below about automatically updating NEWS in your commit message.
|
||||
bug fixes, improvements, etc., should go into the NEWS file.
|
||||
|
||||
NB! Lines, starting with @ will go automagically into NEWS file, but
|
||||
this is NOT recommended, though. Please, add news entries directly to
|
||||
NEWS file and don't forget to keep them adjusted and sorted.
|
||||
|
||||
3. Do not commit multiple file and dump all messages in one commit. If you
|
||||
modified several unrelated files, commit each group separately and
|
||||
@@ -59,14 +62,10 @@ The next few rules are more of a technical nature.
|
||||
The format of the commit messages is pretty simple.
|
||||
|
||||
If a line begins with #, it is taken to be a comment and will not appear
|
||||
in the ChangeLog. If the line begins with @, it will be redirected to the
|
||||
NEWS file. Everything else goes into the ChangeLog.
|
||||
in the ChangeLog. Everything else goes into the ChangeLog.
|
||||
|
||||
It is important to note that if your comment or news logline spans multiple
|
||||
lines, you have to put # or @ at the beginning of _every_ such line. Every
|
||||
entry in NEWS has to have a name after it, so if you did it with someone's
|
||||
help, put both your names there. Your name WILL NOT be automatically put
|
||||
at the end of the NEWS entry - so, please provide it yourself.
|
||||
lines, you have to put # at the beginning of _every_ such line.
|
||||
|
||||
Example. Say you modified two files, datetime.c and string.c. In datetime.c
|
||||
you added a new format option for date() function, and in string.c you fixed
|
||||
@@ -78,17 +77,12 @@ For datetime.c:
|
||||
|
||||
(PHP date) Added new 'K' format modifier for printing out number of
|
||||
days until New Year's Eve.
|
||||
@- Added new 'K' format modifier that will output the number of days
|
||||
@ until New Year's Eve. (Bob)
|
||||
|
||||
For string.c:
|
||||
(php_trim) Fixed a memory leak resulting from improper use of zval_dtor().
|
||||
# Man, that thing was leaking all over the place!
|
||||
@- Fixed memory leak in trim(). (Bob)
|
||||
|
||||
The lines above marked with @ will go into NEWS file automagically, and the
|
||||
# lines will be omitted from the ChangeLog. Alternatively, you might want
|
||||
to modify NEWS file directly and not use the @ lines.
|
||||
The # lines will be omitted from the ChangeLog automagically.
|
||||
|
||||
If you fix some bugs, you should note the bug ID numbers in your
|
||||
commit message. Bug ID should be prefixed by "#" for easier access to
|
||||
@@ -97,12 +91,10 @@ bug report when developers are browsing CVS via. LXR or Bonsai.
|
||||
Example:
|
||||
|
||||
Fixed pgsql notice handler double free crash bug. Bug #14016
|
||||
@ Fixed pgsql notice handler double free crash bug. Bug #14016
|
||||
|
||||
If you don't see your messages in ChangeLog and NEWS right away, don't worry!
|
||||
If you don't see your messages in ChangeLog right away, don't worry!
|
||||
These files are updated once a day, so your stuff will not show up until
|
||||
somewhat later. Don't go adding stuff to NEWS by hand if you already put @
|
||||
lines in the commit message.
|
||||
somewhat later.
|
||||
|
||||
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
|
||||
to look at PHP CVS repository in various ways.
|
||||
|
||||
@@ -37,7 +37,7 @@ Note though that you might get little response, if your patch is
|
||||
too hard to review.
|
||||
|
||||
If you would like change/add many lines, it is better to ask module
|
||||
maintainer and/or php-dev@lists.php.net, or pear-dev@lists.php.net if
|
||||
maintainer and/or internals@lists.php.net, or pear-dev@lists.php.net if
|
||||
you are patching PEAR. Official module maintainers can be found in
|
||||
EXTENSIONS file in PHP source.
|
||||
|
||||
@@ -79,7 +79,7 @@ Check list for submitting patch
|
||||
|
||||
Where to send your patch?
|
||||
-------------------------
|
||||
If you are patching C source, send the patch to php-dev@lists.php.net.
|
||||
If you are patching C source, send the patch to internals@lists.php.net.
|
||||
If you are patching a module, you should also send the patch to the
|
||||
maintainer. Official module maintainers are listed in EXTENSION file
|
||||
in source.
|
||||
@@ -123,4 +123,5 @@ commit log. If your patch affects end-users, a brief description
|
||||
and your name might be added to the NEWS file.
|
||||
|
||||
|
||||
|
||||
Thank you for submitting patch for PHP!
|
||||
@@ -80,11 +80,11 @@ documentation
|
||||
|
||||
ext/bz2
|
||||
-------
|
||||
* Add ini setting for decompression buffer size. The default 4k is to small
|
||||
for big files and takes ages to decompress. However, 40k which perform
|
||||
quite good with big files may be to much under certain environments as
|
||||
default setting. There should be consideren different default sizes for
|
||||
different SAPIS (e.g. apache and cli).
|
||||
* Add an ini directive to specify the size of decompression buffer.
|
||||
The default 4k is too small for large files and also requires much time
|
||||
for decompression. 40k is suitable for such files, however it may be too
|
||||
much under certain environments. There should be appropriate default
|
||||
settings for the various SAPI modules (e.g. apache and cli).
|
||||
|
||||
ext/curl
|
||||
--------
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
- clean up .cvsignores
|
||||
- purge Makefile.ins and replace PHP_EXTENSION in config.m4s
|
||||
with appropiate calls to PHP_NEW_EXTENSION
|
||||
+8
-40
@@ -15,6 +15,7 @@ Fixed:
|
||||
str_repeat (Ilia)
|
||||
imagecopyresized (Ilia)
|
||||
mhash_keygen_s2k (Ilia)
|
||||
bundled gd (Ilia)
|
||||
mb_ereg, mb_ereg_match, mb_eregi, mb_split (Moriyoshi)
|
||||
xml_parser_create (Moriyoshi)
|
||||
ob_start (Sascha)
|
||||
@@ -22,18 +23,14 @@ Fixed:
|
||||
flock (Sascha)
|
||||
register_shutdown_function (Sascha)
|
||||
mb_strcut('', [number greater than the length of first arg]) (Moriyoshi)
|
||||
ext/exif, ext/dba (7) (Marcus)
|
||||
ext/exif, ext/dba (Marcus)
|
||||
php_base64_encode (Moriyoshi)
|
||||
|
||||
Open:
|
||||
|
||||
the dbase extension (1)
|
||||
chunk_split (2)
|
||||
socket_select (3)
|
||||
php_imagepolygon (4)
|
||||
imagesetstyle (5)
|
||||
bundled gd (6)
|
||||
php_base64_encode (8)
|
||||
pack (9)
|
||||
socket_select (2)
|
||||
pack (3)
|
||||
|
||||
(1) heap corruption, mostly visible in malloc-related calls. Whether you see
|
||||
this or not might depend on your libc/compiler. Hard to track down,
|
||||
@@ -53,9 +50,7 @@ dbase_numrecords
|
||||
dbase_open
|
||||
X
|
||||
|
||||
(2) integer overflow in php_chunk_split
|
||||
|
||||
(3) heap corruption, dies in efree()/execute()
|
||||
(2) heap corruption, dies in efree()/execute()
|
||||
|
||||
Methodology
|
||||
|
||||
@@ -75,36 +70,9 @@ Methodology
|
||||
|
||||
echo dbase_open | php do_crash.txt
|
||||
|
||||
(4) integer overflow inside php_imagepolygon and possible subsequent
|
||||
integer overflows inside gdlib's gdImageFilledPolygon().
|
||||
(3) multiple integer overflows, ex. pack("d4294967297", 2);
|
||||
|
||||
(5) integer overflow if the number of elements in the array passed as
|
||||
second argument * sizeof(int) result in an overflow.
|
||||
gdImageSetStyle function called by this php wrapper can die for the
|
||||
same reason.
|
||||
|
||||
(6) multiple integer overflows that can occur when trying to allocate a buffer
|
||||
for a new image. Affected functions:
|
||||
gdImageCreateFromJpegCtx
|
||||
readwbmp
|
||||
gdImageCreateFromXpm
|
||||
gdImageCreateFromPngCtx
|
||||
gdImagePngCtx
|
||||
gdImageCreateFromJpegCtx
|
||||
gdImageJpegCtx
|
||||
gdImageCreateFromGd2Ctx
|
||||
gdImageCreateFromGd2PartCtx
|
||||
_gdImageGd2
|
||||
GetDataBlock (gd_gif_in.c)
|
||||
|
||||
(7) few possible integer overflows, once safe_emalloc() or something similar
|
||||
is implemented they can all be addressed.
|
||||
|
||||
(8) integer overflow if the specified string is longer then ~1.1 billion bytes.
|
||||
|
||||
(9) multiple integer overflows, ex. pack("d4294967297", 2);
|
||||
|
||||
Ammendment 1.
|
||||
Amendment 1.
|
||||
|
||||
CFLAGS='-O0 -g' \
|
||||
'../src/php4/configure' \
|
||||
|
||||
+12
-1
@@ -157,7 +157,16 @@ TSRM_API void tsrm_shutdown(void)
|
||||
int j;
|
||||
|
||||
next_p = p->next;
|
||||
for (j=0; j<id_count; j++) {
|
||||
for (j=0; j<p->count; j++) {
|
||||
/* Disabled - calling dtors in tsrm_shutdown makes
|
||||
modules registering TSRM ids to crash, if they have
|
||||
dtors, since the module is unloaded before tsrm_shutdown
|
||||
is called. Can be re-enabled after tsrm_free_id is
|
||||
implemented.
|
||||
if (resource_types_table && resource_types_table[j].dtor) {
|
||||
resource_types_table[j].dtor(p->storage[j], &p->storage);
|
||||
}
|
||||
*/
|
||||
free(p->storage[j]);
|
||||
}
|
||||
free(p->storage);
|
||||
@@ -181,6 +190,7 @@ TSRM_API void tsrm_shutdown(void)
|
||||
#if defined(GNUPTH)
|
||||
pth_kill();
|
||||
#elif defined(PTHREADS)
|
||||
pthread_setspecific(tls_key, 0);
|
||||
pthread_key_delete(tls_key);
|
||||
#elif defined(TSRM_WIN32)
|
||||
TlsFree(tls_key);
|
||||
@@ -481,6 +491,7 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
|
||||
if (mutexp) {
|
||||
#ifdef TSRM_WIN32
|
||||
DeleteCriticalSection(mutexp);
|
||||
free(mutexp);
|
||||
#elif defined(NETWARE)
|
||||
NXMutexFree(mutexp);
|
||||
#elif defined(GNUPTH)
|
||||
|
||||
+3
-2
@@ -95,14 +95,15 @@ dnl For the thread implementations, we always use --with-*
|
||||
dnl to maintain consistency
|
||||
|
||||
AC_ARG_WITH(tsrm-pth,
|
||||
[ --with-tsrm-pth[=pth-config] Use GNU Pth.],[
|
||||
[ --with-tsrm-pth[=pth-config]
|
||||
Use GNU Pth.],[
|
||||
TSRM_PTH=$withval
|
||||
],[
|
||||
TSRM_PTH=no
|
||||
])
|
||||
|
||||
AC_ARG_WITH(tsrm-st,
|
||||
[ --with-tsrm-st],[
|
||||
[ --with-tsrm-st Use SGI's State Threads],[
|
||||
TSRM_ST=$withval
|
||||
],[
|
||||
TSRM_ST=no
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#define HAVE_UTIME 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_REALPATH 1
|
||||
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef __GNUC__
|
||||
# ifndef HAVE_ALLOCA_H
|
||||
# ifdef _AIX
|
||||
#pragma alloca
|
||||
#pragma alloca
|
||||
# else
|
||||
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
||||
char *alloca ();
|
||||
|
||||
+12
-8
@@ -92,7 +92,7 @@ static int php_check_dots(const char *element, int n)
|
||||
(len >= 2 && !php_check_dots(element, len))
|
||||
|
||||
#define IS_DIRECTORY_CURRENT(element, len) \
|
||||
(len == 1 && ptr[0] == '.')
|
||||
(len == 1 && element[0] == '.')
|
||||
|
||||
#elif defined(NETWARE)
|
||||
/* NetWare has strtok() (in LibC) and allows both slashes in paths, like Windows --
|
||||
@@ -111,12 +111,12 @@ static int php_check_dots(const char *element, int n)
|
||||
|
||||
#ifndef IS_DIRECTORY_UP
|
||||
#define IS_DIRECTORY_UP(element, len) \
|
||||
(len == 2 && memcmp(element, "..", 2) == 0)
|
||||
(len == 2 && element[0] == '.' && element[1] == '.')
|
||||
#endif
|
||||
|
||||
#ifndef IS_DIRECTORY_CURRENT
|
||||
#define IS_DIRECTORY_CURRENT(element, len) \
|
||||
(len == 1 && ptr[0] == '.')
|
||||
(len == 1 && element[0] == '.')
|
||||
#endif
|
||||
|
||||
/* define this to check semantics */
|
||||
@@ -486,19 +486,23 @@ CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path
|
||||
CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int retval;
|
||||
char *retval;
|
||||
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
retval = virtual_file_ex(&new_state, path, NULL, 1);
|
||||
|
||||
if (!retval) {
|
||||
if (virtual_file_ex(&new_state, path, NULL, 1)==0) {
|
||||
int len = new_state.cwd_length>MAXPATHLEN-1?MAXPATHLEN-1:new_state.cwd_length;
|
||||
|
||||
memcpy(real_path, new_state.cwd, len);
|
||||
real_path[len] = '\0';
|
||||
return real_path;
|
||||
retval = real_path;
|
||||
} else {
|
||||
retval = NULL;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
CWD_STATE_FREE(&new_state);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path TSRMLS_DC)
|
||||
|
||||
+29
-2
@@ -41,6 +41,10 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(__osf__) || defined(_AIX)
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
#include "readdir.h"
|
||||
#include <sys/utime.h>
|
||||
@@ -57,10 +61,10 @@ typedef unsigned short mode_t;
|
||||
* to account for volume name that is unique to NetWare absolute paths
|
||||
*/
|
||||
#define COPY_WHEN_ABSOLUTE(path) 2
|
||||
#define IS_ABSOLUTE_PATH(path, len) \
|
||||
(len >= 2 && ((isalpha(path[0]) && path[1] == ':') || (IS_SLASH(path[0]) && IS_SLASH(path[1]))))
|
||||
#define IS_UNC_PATH(path, len) \
|
||||
(len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1]))
|
||||
#define IS_ABSOLUTE_PATH(path, len) \
|
||||
(len >= 2 && ((isalpha(path[0]) && path[1] == ':') || IS_UNC_PATH(path, len)))
|
||||
|
||||
#elif defined(NETWARE)
|
||||
#ifdef HAVE_DIRENT_H
|
||||
@@ -155,6 +159,25 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC);
|
||||
CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC);
|
||||
#endif
|
||||
|
||||
/* On AIX & Tru64 when a file does not exist realpath() returns
|
||||
* NULL, and sets errno to ENOENT. Unlike in other libc implementations
|
||||
* the destination is not filled and remains undefined. Therefor, we
|
||||
* must populate it manually using strcpy as done on systems with no
|
||||
* realpath() function.
|
||||
*/
|
||||
#if defined(__osf__) || defined(_AIX)
|
||||
static char *php_realpath_hack(char *src, char *dest)
|
||||
{
|
||||
char *ret;
|
||||
|
||||
if ((ret = realpath(src, dest)) == NULL && errno == ENOENT) {
|
||||
return strcpy(dest, src);
|
||||
} else {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAVE_UTIME
|
||||
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC);
|
||||
#endif
|
||||
@@ -232,7 +255,11 @@ typedef struct _virtual_cwd_globals {
|
||||
#define VCWD_ACCESS(pathname, mode) access(pathname, mode)
|
||||
|
||||
#ifdef HAVE_REALPATH
|
||||
#if defined(__osf__) || defined(_AIX)
|
||||
#define VCWD_REALPATH(path, real_path) php_realpath_hack(path, real_path)
|
||||
#else
|
||||
#define VCWD_REALPATH(path, real_path) realpath(path, real_path)
|
||||
#endif
|
||||
#else
|
||||
#define VCWD_REALPATH(path, real_path) strcpy(real_path, path)
|
||||
#endif
|
||||
|
||||
@@ -359,4 +359,13 @@ TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
TSRM_API char *realpath(char *orig_path, char *buffer)
|
||||
{
|
||||
int ret = GetFullPathName(orig_path, _MAX_PATH, buffer, NULL);
|
||||
if(!ret || ret > _MAX_PATH) {
|
||||
return NULL;
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
#endif
|
||||
@@ -101,4 +101,5 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags);
|
||||
TSRM_API int shmdt(const void *shmaddr);
|
||||
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf);
|
||||
|
||||
TSRM_API char *realpath(char *orig_path, char *buffer);
|
||||
#endif
|
||||
+156
-97
@@ -16,6 +16,9 @@ AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[
|
||||
sed -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments
|
||||
])
|
||||
|
||||
AC_DEFUN(PHP_PROG_RE2C,[
|
||||
AC_CHECK_PROG(RE2C, re2c, re2c, [exit 0;])
|
||||
])
|
||||
|
||||
dnl PHP_DEFINE(WHAT[, value])
|
||||
dnl
|
||||
@@ -177,73 +180,13 @@ AC_DEFUN([PHP_REMOVE_USR_LIB],[
|
||||
unset ac_new_flags
|
||||
for i in [$]$1; do
|
||||
case [$]i in
|
||||
-L/usr/lib|-L/usr/lib/) ;;
|
||||
*) ac_new_flags="[$]ac_new_flags [$]i" ;;
|
||||
-L/usr/lib|-L/usr/lib/[)] ;;
|
||||
*[)] ac_new_flags="[$]ac_new_flags [$]i" ;;
|
||||
esac
|
||||
done
|
||||
$1=[$]ac_new_flags
|
||||
])
|
||||
|
||||
AC_DEFUN([PHP_SETUP_OPENSSL],[
|
||||
if test "$PHP_OPENSSL" = "yes"; then
|
||||
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
|
||||
fi
|
||||
|
||||
for i in $PHP_OPENSSL; do
|
||||
if test -r $i/include/openssl/evp.h; then
|
||||
OPENSSL_INCDIR=$i/include
|
||||
fi
|
||||
if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then
|
||||
OPENSSL_LIBDIR=$i/lib
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$OPENSSL_INCDIR"; then
|
||||
AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>])
|
||||
fi
|
||||
|
||||
if test -z "$OPENSSL_LIBDIR"; then
|
||||
AC_MSG_ERROR([Cannot find OpenSSL's libraries])
|
||||
fi
|
||||
|
||||
old_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=-I$OPENSSL_INCDIR
|
||||
AC_MSG_CHECKING([for OpenSSL version])
|
||||
AC_EGREP_CPP(yes,[
|
||||
#include <openssl/opensslv.h>
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x0090600fL
|
||||
yes
|
||||
#endif
|
||||
],[
|
||||
AC_MSG_RESULT([>= 0.9.6])
|
||||
],[
|
||||
AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
|
||||
])
|
||||
CPPFLAGS=$old_CPPFLAGS
|
||||
|
||||
PHP_ADD_INCLUDE($OPENSSL_INCDIR)
|
||||
PHP_ADD_LIBPATH($OPENSSL_LIBDIR)
|
||||
|
||||
PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
|
||||
PHP_ADD_LIBRARY(crypto)
|
||||
],[
|
||||
AC_MSG_ERROR([libcrypto not found!])
|
||||
],[
|
||||
-L$OPENSSL_LIBDIR
|
||||
])
|
||||
|
||||
PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
|
||||
PHP_ADD_LIBRARY(ssl)
|
||||
],[
|
||||
AC_MSG_ERROR([libssl not found!])
|
||||
],[
|
||||
-L$OPENSSL_LIBDIR
|
||||
])
|
||||
|
||||
OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
|
||||
AC_SUBST(OPENSSL_INCDIR_OPT)
|
||||
])
|
||||
|
||||
dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD)
|
||||
dnl
|
||||
dnl Use this macro, if you need to add libraries and or library search
|
||||
@@ -253,11 +196,11 @@ dnl
|
||||
AC_DEFUN([PHP_EVAL_LIBLINE],[
|
||||
for ac_i in $1; do
|
||||
case $ac_i in
|
||||
-l*)
|
||||
-l*[)]
|
||||
ac_ii=`echo $ac_i|cut -c 3-`
|
||||
PHP_ADD_LIBRARY($ac_ii,1,$2)
|
||||
;;
|
||||
-L*)
|
||||
-L*[)]
|
||||
ac_ii=`echo $ac_i|cut -c 3-`
|
||||
PHP_ADD_LIBPATH($ac_ii,$2)
|
||||
;;
|
||||
@@ -273,7 +216,7 @@ dnl
|
||||
AC_DEFUN([PHP_EVAL_INCLINE],[
|
||||
for ac_i in $1; do
|
||||
case $ac_i in
|
||||
-I*)
|
||||
-I*[)]
|
||||
ac_ii=`echo $ac_i|cut -c 3-`
|
||||
PHP_ADD_INCLUDE($ac_ii)
|
||||
;;
|
||||
@@ -337,10 +280,10 @@ AC_DEFUN([PHP_SHLIB_SUFFIX_NAME],[
|
||||
PHP_SUBST(SHLIB_SUFFIX_NAME)
|
||||
SHLIB_SUFFIX_NAME=so
|
||||
case $host_alias in
|
||||
*hpux*)
|
||||
*hpux*[)]
|
||||
SHLIB_SUFFIX_NAME=sl
|
||||
;;
|
||||
*darwin*)
|
||||
*darwin*[)]
|
||||
SHLIB_SUFFIX_NAME=dylib
|
||||
;;
|
||||
esac
|
||||
@@ -511,17 +454,17 @@ AC_DEFUN([PHP_ARG_ANALYZE_EX],[
|
||||
ext_output="yes, shared"
|
||||
ext_shared=yes
|
||||
case [$]$1 in
|
||||
shared,*)
|
||||
shared,*[)]
|
||||
$1=`echo "[$]$1"|sed 's/^shared,//'`
|
||||
;;
|
||||
shared)
|
||||
shared[)]
|
||||
$1=yes
|
||||
;;
|
||||
no)
|
||||
no[)]
|
||||
ext_output=no
|
||||
ext_shared=no
|
||||
;;
|
||||
*)
|
||||
*[)]
|
||||
ext_output=yes
|
||||
ext_shared=no
|
||||
;;
|
||||
@@ -654,8 +597,8 @@ main() {
|
||||
])
|
||||
])
|
||||
case $ac_cv_time_r_type in
|
||||
hpux) AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x]) ;;
|
||||
irix) AC_DEFINE(PHP_IRIX_TIME_R,1,[Whether you have IRIX-style functions]) ;;
|
||||
hpux[)] AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x]) ;;
|
||||
irix[)] AC_DEFINE(PHP_IRIX_TIME_R,1,[Whether you have IRIX-style functions]) ;;
|
||||
esac
|
||||
])
|
||||
|
||||
@@ -1124,6 +1067,7 @@ AC_DEFUN([PHP_CHECK_CC_OPTION],[
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
rm -rf conftest*
|
||||
])
|
||||
|
||||
AC_DEFUN([PHP_REGEX],[
|
||||
@@ -1186,7 +1130,9 @@ main() {
|
||||
int res = 0;
|
||||
res = res || (snprintf(buf, 2, "marcus") != 6);
|
||||
res = res || (buf[1] != '\0');
|
||||
res = res || (snprintf(buf, 0, "boerger") != 7);
|
||||
/* Implementations may consider this as an encoding error */
|
||||
snprintf(buf, 0, "boerger");
|
||||
/* However, they MUST ignore the pointer */
|
||||
res = res || (buf[0] != 'm');
|
||||
res = res || (snprintf(NULL, 0, "boerger") != 7);
|
||||
res = res || (snprintf(buf, sizeof(buf), "%f", 0.12345678) != 8);
|
||||
@@ -1207,20 +1153,21 @@ main() {
|
||||
fi
|
||||
])
|
||||
|
||||
dnl PHP_SHARED_MODULE(module-name, object-var, build-dir)
|
||||
dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx)
|
||||
dnl
|
||||
dnl Basically sets up the link-stage for building module-name
|
||||
dnl from object_var in build-dir.
|
||||
dnl
|
||||
AC_DEFUN([PHP_SHARED_MODULE],[
|
||||
install_modules="install-modules"
|
||||
PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.la"
|
||||
PHP_SUBST($2)
|
||||
cat >>Makefile.objects<<EOF
|
||||
\$(phplibdir)/$1.la: $3/$1.la
|
||||
\$(LIBTOOL) --mode=install cp $3/$1.la \$(phplibdir)
|
||||
|
||||
$3/$1.la: \$($2) \$(translit($1,a-z-,A-Z_)_SHARED_DEPENDENCIES)
|
||||
\$(LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z-,A-Z_)_SHARED_LIBADD)
|
||||
$3/$1.la: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
|
||||
\$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)
|
||||
|
||||
EOF
|
||||
])
|
||||
@@ -1236,10 +1183,10 @@ AC_DEFUN([PHP_SELECT_SAPI],[
|
||||
PHP_SAPI=$1
|
||||
|
||||
case "$2" in
|
||||
static) PHP_BUILD_STATIC;;
|
||||
shared) PHP_BUILD_SHARED;;
|
||||
bundle) PHP_BUILD_BUNDLE;;
|
||||
program) PHP_BUILD_PROGRAM($5);;
|
||||
static[)] PHP_BUILD_STATIC;;
|
||||
shared[)] PHP_BUILD_SHARED;;
|
||||
bundle[)] PHP_BUILD_BUNDLE;;
|
||||
program[)] PHP_BUILD_PROGRAM($5);;
|
||||
esac
|
||||
|
||||
ifelse($3,,,[PHP_ADD_SOURCES([sapi/$1],[$3],[$4],[sapi])])
|
||||
@@ -1247,7 +1194,7 @@ AC_DEFUN([PHP_SELECT_SAPI],[
|
||||
|
||||
dnl deprecated
|
||||
AC_DEFUN([PHP_EXTENSION],[
|
||||
sources=`$AWK -f $abs_srcdir/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in`
|
||||
sources=`$AWK -f $abs_srcdir/build/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in`
|
||||
|
||||
PHP_NEW_EXTENSION($1, $sources, $2, $3)
|
||||
|
||||
@@ -1265,7 +1212,7 @@ AC_DEFUN([PHP_GEN_BUILD_DIRS],[
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags]]])
|
||||
dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags[, cxx]]]])
|
||||
dnl
|
||||
dnl Includes an extension in the build.
|
||||
dnl
|
||||
@@ -1295,7 +1242,7 @@ dnl ---------------------------------------------- Static module
|
||||
if test "$3" = "shared" || test "$3" = "yes"; then
|
||||
dnl ---------------------------------------------- Shared module
|
||||
PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes)
|
||||
PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir)
|
||||
PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6)
|
||||
AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module)
|
||||
fi
|
||||
fi
|
||||
@@ -1325,13 +1272,13 @@ AC_DEFUN([PHP_SOLARIS_PIC_WEIRDNESS],[
|
||||
if test -n "$EXT_SHARED"; then
|
||||
os=`uname -sr 2>/dev/null`
|
||||
case $os in
|
||||
"SunOS 5.6"|"SunOS 5.7")
|
||||
"SunOS 5.6"|"SunOS 5.7"[)]
|
||||
case $CC in
|
||||
gcc*|egcs*) CFLAGS="$CFLAGS -fPIC";;
|
||||
*) CFLAGS="$CFLAGS -fpic";;
|
||||
*[)] CFLAGS="$CFLAGS -fpic";;
|
||||
esac
|
||||
AC_MSG_RESULT([yes]);;
|
||||
*)
|
||||
*[)]
|
||||
AC_MSG_RESULT([no]);;
|
||||
esac
|
||||
else
|
||||
@@ -1369,8 +1316,8 @@ AC_DEFUN([PHP_SYS_LFS],
|
||||
ac_shellvars='CPPFLAGS LDFLAGS LIBS'
|
||||
for ac_shellvar in $ac_shellvars; do
|
||||
case $ac_shellvar in
|
||||
CPPFLAGS) ac_lfsvar=LFS_CFLAGS ;;
|
||||
*) ac_lfsvar=LFS_$ac_shellvar ;;
|
||||
CPPFLAGS[)] ac_lfsvar=LFS_CFLAGS ;;
|
||||
*[)] ac_lfsvar=LFS_$ac_shellvar ;;
|
||||
esac
|
||||
eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
|
||||
(getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
|
||||
@@ -1379,14 +1326,14 @@ AC_DEFUN([PHP_SYS_LFS],
|
||||
eval ac_test_$ac_shellvar=\$ac_getconf
|
||||
done
|
||||
case "$ac_result$ac_getconfs" in
|
||||
yes) ac_result=no ;;
|
||||
yes[)] ac_result=no ;;
|
||||
esac
|
||||
case "$ac_result$ac_set" in
|
||||
yes?*) ac_result="yes, but $ac_set is already set, so use its settings"
|
||||
yes?*[)] ac_result="yes, but $ac_set is already set, so use its settings"
|
||||
esac
|
||||
AC_MSG_RESULT([$ac_result])
|
||||
case $ac_result in
|
||||
yes)
|
||||
yes[)]
|
||||
for ac_shellvar in $ac_shellvars; do
|
||||
eval $ac_shellvar=\$ac_test_$ac_shellvar
|
||||
done ;;
|
||||
@@ -1456,10 +1403,10 @@ AC_DEFUN([PHP_BROKEN_GETCWD],[
|
||||
AC_MSG_CHECKING([for broken getcwd])
|
||||
os=`uname -sr 2>/dev/null`
|
||||
case $os in
|
||||
SunOS*)
|
||||
SunOS*[)]
|
||||
AC_DEFINE(HAVE_BROKEN_GETCWD,1, [Define if system has broken getcwd])
|
||||
AC_MSG_RESULT([yes]);;
|
||||
*)
|
||||
*[)]
|
||||
AC_MSG_RESULT([no]);;
|
||||
esac
|
||||
])
|
||||
@@ -1600,12 +1547,18 @@ dnl Wrapper for AC_CHECK_LIB
|
||||
dnl
|
||||
AC_DEFUN([PHP_CHECK_LIBRARY], [
|
||||
save_old_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$5 $LDFLAGS"
|
||||
ac_stuff="$5"
|
||||
|
||||
save_ext_shared=$ext_shared
|
||||
ext_shared=yes
|
||||
PHP_EVAL_LIBLINE([$]ac_stuff, LDFLAGS)
|
||||
AC_CHECK_LIB([$1],[$2],[
|
||||
LDFLAGS=$save_old_LDFLAGS
|
||||
ext_shared=$save_ext_shared
|
||||
$3
|
||||
],[
|
||||
LDFLAGS=$save_old_LDFLAGS
|
||||
ext_shared=$save_ext_shared
|
||||
unset ac_cv_func_$1
|
||||
$4
|
||||
])dnl
|
||||
@@ -1631,6 +1584,112 @@ AC_DEFUN([PHP_CHECK_FRAMEWORK], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])
|
||||
dnl
|
||||
dnl Common setup macro for openssl
|
||||
dnl
|
||||
AC_DEFUN([PHP_SETUP_OPENSSL],[
|
||||
found_openssl=no
|
||||
unset OPENSSL_INCDIR
|
||||
unset OPENSSL_LIBDIR
|
||||
|
||||
dnl First try to find pkg-config
|
||||
if test -z "$PKG_CONFIG"; then
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
fi
|
||||
|
||||
dnl If pkg-config is found try using it
|
||||
if test "$PHP_OPENSSL" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
|
||||
if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
|
||||
found_openssl=yes
|
||||
OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
|
||||
OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
|
||||
OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
|
||||
else
|
||||
AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
|
||||
fi
|
||||
|
||||
if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
|
||||
PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
|
||||
PHP_EVAL_INCLINE($OPENSSL_INCS)
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
dnl If pkg-config fails for some reason, revert to the old method
|
||||
if test "$PHP_OPENSSL" = "yes"; then
|
||||
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
|
||||
fi
|
||||
|
||||
for i in $PHP_OPENSSL; do
|
||||
if test -r $i/include/openssl/evp.h; then
|
||||
OPENSSL_INCDIR=$i/include
|
||||
fi
|
||||
if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then
|
||||
OPENSSL_LIBDIR=$i/lib
|
||||
fi
|
||||
test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break
|
||||
done
|
||||
|
||||
if test -z "$OPENSSL_INCDIR"; then
|
||||
AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>])
|
||||
fi
|
||||
|
||||
if test -z "$OPENSSL_LIBDIR"; then
|
||||
AC_MSG_ERROR([Cannot find OpenSSL's libraries])
|
||||
fi
|
||||
|
||||
old_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=-I$OPENSSL_INCDIR
|
||||
AC_MSG_CHECKING([for OpenSSL version])
|
||||
AC_EGREP_CPP(yes,[
|
||||
#include <openssl/opensslv.h>
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x0090600fL
|
||||
yes
|
||||
#endif
|
||||
],[
|
||||
AC_MSG_RESULT([>= 0.9.6])
|
||||
],[
|
||||
AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
|
||||
])
|
||||
CPPFLAGS=$old_CPPFLAGS
|
||||
|
||||
PHP_ADD_INCLUDE($OPENSSL_INCDIR)
|
||||
|
||||
PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
|
||||
PHP_ADD_LIBRARY(crypto,,$1)
|
||||
],[
|
||||
AC_MSG_ERROR([libcrypto not found!])
|
||||
],[
|
||||
-L$OPENSSL_LIBDIR
|
||||
])
|
||||
|
||||
old_LIBS=$LIBS
|
||||
LIBS="$LIBS -lcrypto"
|
||||
PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
|
||||
found_openssl=yes
|
||||
],[
|
||||
AC_MSG_ERROR([libssl not found!])
|
||||
],[
|
||||
-L$OPENSSL_LIBDIR
|
||||
])
|
||||
LIBS=$old_LIBS
|
||||
PHP_ADD_LIBRARY(ssl,,$1)
|
||||
|
||||
PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
|
||||
fi
|
||||
|
||||
dnl For apache 1.3.x static build
|
||||
OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
|
||||
AC_SUBST(OPENSSL_INCDIR_OPT)
|
||||
|
||||
if test "$found_openssl" = "yes"; then
|
||||
ifelse([$2],[],:,[$2])
|
||||
ifelse([$3],[],,[else $3])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]])
|
||||
dnl
|
||||
@@ -1765,12 +1824,12 @@ AC_DEFUN([PHP_CHECK_FUNC],[
|
||||
AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ])
|
||||
|
||||
case $found in
|
||||
yes)
|
||||
yes[)]
|
||||
PHP_DEF_HAVE($1)
|
||||
ac_cv_func_$1=yes
|
||||
;;
|
||||
ifelse($#,1,,[
|
||||
*) PHP_CHECK_FUNC_LIB($@) ;;
|
||||
*[)] PHP_CHECK_FUNC_LIB($@) ;;
|
||||
])
|
||||
esac
|
||||
])
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ snapshot:
|
||||
md5sum $$distname.tar.bz2; \
|
||||
bzip2 -t $$distname.tar.bz2
|
||||
|
||||
cvsclean:
|
||||
cvsclean-work:
|
||||
@for i in `find . -name .cvsignore`; do \
|
||||
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore | grep -v config.nice` *.o *.a .libs || true); \
|
||||
done
|
||||
|
||||
+7
-2
@@ -52,8 +52,13 @@ $(TOUCH_FILES):
|
||||
touch $(TOUCH_FILES)
|
||||
|
||||
aclocal.m4: configure.in acinclude.m4
|
||||
aclocal 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
|
||||
@echo rebuilding $@
|
||||
@libtoolize=`./build/shtool path glibtoolize libtoolize`; \
|
||||
$$libtoolize --copy --automake; \
|
||||
ltpath=`dirname $$libtoolize`; \
|
||||
ltfile=`cd $$ltpath/../share/aclocal; pwd`/libtool.m4; \
|
||||
cat acinclude.m4 $$ltfile > $@
|
||||
|
||||
configure: aclocal.m4 configure.in $(config_m4_files)
|
||||
@echo rebuilding $@
|
||||
@autoconf 2>&1 | $(SUPPRESS_WARNINGS)
|
||||
+15
-35
@@ -16,7 +16,7 @@
|
||||
# | Sascha Schumann <sascha@schumann.cx> |
|
||||
# +----------------------------------------------------------------------+
|
||||
#
|
||||
# $Id: buildcheck.sh,v 1.21.2.3 2003-05-19 13:14:06 sniper Exp $
|
||||
# $Id: buildcheck.sh,v 1.21.2.6 2003-09-28 13:37:59 tal Exp $
|
||||
#
|
||||
|
||||
echo "buildconf: checking installation..."
|
||||
@@ -24,7 +24,7 @@ echo "buildconf: checking installation..."
|
||||
stamp=$1
|
||||
|
||||
# autoconf 2.13 or newer
|
||||
ac_version=`autoconf --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
|
||||
ac_version=`autoconf --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
|
||||
if test -z "$ac_version"; then
|
||||
echo "buildconf: autoconf not found."
|
||||
echo " You need autoconf version 2.13 or newer installed"
|
||||
@@ -50,39 +50,17 @@ if test "$1" = "2" && test "$2" -ge "50"; then
|
||||
stamp=
|
||||
fi
|
||||
|
||||
|
||||
# automake 1.4 or newer
|
||||
am_version=`automake --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
|
||||
am_version_clean=`echo $am_version|sed -e 's/-p[0-9]*$//'`
|
||||
if test "$am_version" = ""; then
|
||||
echo "buildconf: automake not found."
|
||||
echo " You need automake version 1.4 or newer installed"
|
||||
echo " to build PHP from CVS."
|
||||
exit 1
|
||||
fi
|
||||
IFS=.; set $am_version_clean; IFS=' '
|
||||
if test "$1" = "1" -a "$2" -lt "4" || test "$1" -lt "1"; then
|
||||
echo "buildconf: automake version $am_version found."
|
||||
echo " You need automake version 1.4 or newer installed"
|
||||
echo " to build PHP from CVS."
|
||||
exit 1
|
||||
else
|
||||
echo "buildconf: automake version $am_version (ok)"
|
||||
fi
|
||||
|
||||
# libtool 1.4.3 or newer
|
||||
# Prefer glibtool over libtool for Mac OS X compatibility
|
||||
libtool=`./build/shtool path glibtool 2> /dev/null`
|
||||
if test ! -r "$libtool"; then libtool=`./build/shtool path libtool`; fi
|
||||
lt_pversion=`$libtool --version 2>/dev/null|sed -n -e 's/^[^0-9]*//' -e 1's/[- ].*//p'`
|
||||
# libtoolize 1.4.3 or newer
|
||||
# Prefer glibtoolize over libtoolize for Mac OS X compatibility
|
||||
libtoolize=`./build/shtool path glibtoolize libtoolize 2> /dev/null`
|
||||
lt_pversion=`$libtoolize --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//'`
|
||||
if test "$lt_pversion" = ""; then
|
||||
echo "buildconf: libtool not found."
|
||||
echo " You need libtool version 1.4.3 or newer installed"
|
||||
echo " to build PHP from CVS."
|
||||
exit 1
|
||||
fi
|
||||
lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
|
||||
IFS=.; set $lt_version; IFS=' '
|
||||
IFS=.; set $lt_pversion; IFS=' '
|
||||
|
||||
if test "$3" = ""; then
|
||||
third=0
|
||||
@@ -100,12 +78,14 @@ echo " to build PHP from CVS."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
am_prefix=`./build/shtool path automake | sed -e 's#/[^/]*/[^/]*$##'`
|
||||
lt_prefix=`echo $libtool | sed -e 's#/[^/]*/[^/]*$##'`
|
||||
if test "$am_prefix" != "$lt_prefix"; then
|
||||
echo "WARNING: automake and libtool are installed in different"
|
||||
echo " directories. This may cause aclocal to fail."
|
||||
echo " continuing anyway"
|
||||
ltpath=`echo $libtoolize | sed -e 's#/[^/]*/[^/]*$##'`
|
||||
ltfile="$ltpath/share/aclocal/libtool.m4"
|
||||
if test -r "$ltfile"; then
|
||||
:
|
||||
else
|
||||
echo "buildconf: $ltfile does not exist."
|
||||
echo " Please reinstall libtool."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test -n "$stamp" && touch $stamp
|
||||
|
||||
File renamed without changes.
@@ -18,11 +18,6 @@ while test $# -gt 0; do
|
||||
automake_flags=--copy
|
||||
fi
|
||||
|
||||
if test "$1" = "--ZendEngine2"; then
|
||||
ZENDDIR=ZendEngine2
|
||||
echo "Using Zend Engine 2 code"
|
||||
fi
|
||||
|
||||
if test "$1" = "--force"; then
|
||||
devok=1
|
||||
echo "Forcing buildconf"
|
||||
@@ -38,6 +33,28 @@ if test "$dev" = "0" -a "$devok" = "0"; then
|
||||
fi
|
||||
|
||||
if test -z "$ZENDDIR"; then
|
||||
if grep "PHP_MAJOR_VERSION 5" main/php_version.h >/dev/null; then
|
||||
v=5
|
||||
else
|
||||
v=4
|
||||
fi
|
||||
|
||||
if test "$v" = "5"; then
|
||||
if test -r "Zend/OBJECTS2_HOWTO"; then
|
||||
:
|
||||
else
|
||||
mv Zend ZendEngine1 2>/dev/null
|
||||
mv ZendEngine2 Zend
|
||||
fi
|
||||
else
|
||||
if test -r "Zend/zend_execute_globals.h"; then
|
||||
:
|
||||
else
|
||||
mv Zend ZendEngine2 2>/dev/null
|
||||
mv ZendEngine1 Zend
|
||||
fi
|
||||
fi
|
||||
|
||||
ZENDDIR=Zend
|
||||
echo "using default Zend directory"
|
||||
fi
|
||||
|
||||
+149
-77
@@ -40,8 +40,8 @@ AC_CONFIG_HEADER(main/php_config.h)
|
||||
|
||||
MAJOR_VERSION=4
|
||||
MINOR_VERSION=3
|
||||
RELEASE_VERSION=3
|
||||
EXTRA_VERSION="-dev"
|
||||
RELEASE_VERSION=9
|
||||
EXTRA_VERSION=""
|
||||
VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
|
||||
|
||||
dnl Define where extension directories are located in the configure context
|
||||
@@ -127,6 +127,7 @@ dnl AC_PROG_CXXCPP
|
||||
dnl check for -R, etc. switch
|
||||
PHP_RUNPATH_SWITCH
|
||||
|
||||
PHP_PROG_RE2C
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_AWK
|
||||
@@ -136,8 +137,8 @@ if test "$YACC" != "bison -y"; then
|
||||
else
|
||||
AC_MSG_CHECKING([bison version])
|
||||
set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /'|tr -d a-z`
|
||||
if test "${1}" = "1" -a "(" "${2}" -lt "75" -a "${2}" -ne "28" -a "${2}" -ne "35" -o "${2}" -ge "875" ")"; then
|
||||
AC_MSG_WARN(You will need bison 1.28, 1.35 or 1.75 if you want to regenerate the Zend parser (found ${1}.${2}).)
|
||||
if test "${1}" -ne "1" -o "(" "${2}" != "28" -a "${2}" != "35" -a "${2}" != "75" -a "${2}" != "875" ")"; then
|
||||
AC_MSG_WARN(You will need bison 1.28, 1.35, 1.75 or 1.875 if you want to regenerate the Zend parser (found ${1}.${2}).)
|
||||
fi
|
||||
AC_MSG_RESULT(${1}.${2} (ok))
|
||||
fi
|
||||
@@ -188,6 +189,7 @@ case $host_alias in
|
||||
CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";;
|
||||
*darwin*|*rhapsody*)
|
||||
CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
|
||||
AC_DEFINE(BIND_8_COMPAT, 1, [Enabling BIND8 compatibility for Panther])
|
||||
php_multiple_shlib_versions_ok=yes;;
|
||||
*beos*)
|
||||
beos_threads=1
|
||||
@@ -316,17 +318,14 @@ dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_DIRENT
|
||||
|
||||
dnl In QNX opendir resides in libc but dirent.h is still required
|
||||
if test "`uname -s 2>/dev/null`" != "QNX"; then
|
||||
AC_HEADER_DIRENT
|
||||
else
|
||||
AC_CHECK_HEADERS(dirent.h)
|
||||
fi
|
||||
PHP_MISSING_FCLOSE_DECL
|
||||
dnl QNX requires unix.h to allow functions in libunix to work properly
|
||||
AC_CHECK_HEADERS([ \
|
||||
dirent.h \
|
||||
ApplicationServices/ApplicationServices.h \
|
||||
sys/param.h \
|
||||
sys/types.h \
|
||||
sys/time.h \
|
||||
netinet/in.h \
|
||||
@@ -370,7 +369,11 @@ unix.h \
|
||||
utime.h \
|
||||
sys/utsname.h \
|
||||
sys/ipc.h \
|
||||
dlfcn.h
|
||||
],[],[],[
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
@@ -518,10 +521,45 @@ vsnprintf \
|
||||
)
|
||||
|
||||
dnl Check for getaddrinfo, should be a better way, but...
|
||||
dnl Also check for working getaddrinfo
|
||||
AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,
|
||||
[AC_TRY_COMPILE([#include <netdb.h>],
|
||||
[struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);],
|
||||
ac_cv_func_getaddrinfo=yes, ac_cv_func_getaddrinfo=no)])
|
||||
[AC_TRY_LINK([#include <netdb.h>],
|
||||
[struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);],
|
||||
AC_TRY_RUN([
|
||||
#include <netdb.h>
|
||||
#include <sys/types.h>
|
||||
int main(void) {
|
||||
struct addrinfo *ai, *pai, hints;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_flags = AI_NUMERICHOST;
|
||||
|
||||
if (getaddrinfo("127.0.0.1", NULL, &hints, &ai) < 0) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (ai == NULL) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
pai = ai;
|
||||
|
||||
while (pai) {
|
||||
if (pai->ai_family != AF_INET) {
|
||||
/* 127.0.0.1/NUMERICHOST should only resolve ONE way */
|
||||
exit(1);
|
||||
}
|
||||
if (pai->ai_addr->sa_family != AF_INET) {
|
||||
/* 127.0.0.1/NUMERICHOST should only resolve ONE way */
|
||||
exit(1);
|
||||
}
|
||||
pai = pai->ai_next;
|
||||
}
|
||||
freeaddrinfo(ai);
|
||||
exit(0);
|
||||
}
|
||||
],ac_cv_func_getaddrinfo=yes, ac_cv_func_getaddrinfo=no),
|
||||
ac_cv_func_getaddrinfo=no)])
|
||||
if test "$ac_cv_func_getaddrinfo" = yes; then
|
||||
AC_DEFINE(HAVE_GETADDRINFO,1,[Define if you have the getaddrinfo function])
|
||||
fi
|
||||
@@ -613,27 +651,6 @@ if test "$PHP_CONFIG_FILE_SCAN_DIR" = "DEFAULT"; then
|
||||
PHP_CONFIG_FILE_SCAN_DIR=""
|
||||
fi
|
||||
|
||||
# compatibility
|
||||
if test -z "$with_pear" && test "$enable_pear" = "no"; then
|
||||
with_pear=no
|
||||
fi
|
||||
|
||||
PHP_ARG_WITH(pear, [whether to install PEAR, and where],
|
||||
[ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php)
|
||||
--without-pear Do not install PEAR], DEFAULT, yes)
|
||||
|
||||
if test "$PHP_PEAR" != "no" && test "$disable_cli" != "1"; then
|
||||
install_pear="install-pear"
|
||||
PEAR_INSTALLDIR=$PHP_PEAR
|
||||
fi
|
||||
|
||||
if test "$PHP_PEAR" = "DEFAULT" || test "$PHP_PEAR" = "yes"; then
|
||||
case $PHP_LAYOUT in
|
||||
GNU) PEAR_INSTALLDIR=$datadir/pear;;
|
||||
*) PEAR_INSTALLDIR=$libdir/php;;
|
||||
esac
|
||||
fi
|
||||
|
||||
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
|
||||
|
||||
PHP_ARG_ENABLE(safe-mode, whether to enable safe mode by default,
|
||||
@@ -731,17 +748,19 @@ if test "$PHP_IPV6" != "no" && test "$ac_cv_ipv6_support" = yes; then
|
||||
AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
|
||||
fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl OpenSSL configure
|
||||
dnl
|
||||
PHP_ARG_WITH(openssl,for OpenSSL support,
|
||||
[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.6) ])
|
||||
|
||||
if test "$PHP_OPENSSL" != "no"; then
|
||||
ext_openssl_shared=$ext_shared
|
||||
PHP_SETUP_OPENSSL
|
||||
fi
|
||||
AC_MSG_CHECKING([whether to enable versioning])
|
||||
AC_ARG_ENABLE(versioning,
|
||||
[ --enable-versioning Export only required symbols.
|
||||
See INSTALL for more information], [
|
||||
if test "x$APXS" != "x"; then
|
||||
PHP_VERSIONING=$enableval
|
||||
else
|
||||
PHP_VERSIONING=no
|
||||
fi
|
||||
],[
|
||||
PHP_VERSIONING=no
|
||||
])
|
||||
AC_MSG_RESULT([$PHP_VERSIONING])
|
||||
|
||||
divert(5)
|
||||
|
||||
@@ -778,26 +797,9 @@ AC_ARG_ENABLE(all,
|
||||
# reading config stubs
|
||||
esyscmd(./build/config-stubs ext)
|
||||
|
||||
|
||||
dnl Other settings.
|
||||
dnl Extensions post-config
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
PHP_HELP_SEPARATOR([Other settings:])
|
||||
|
||||
AC_MSG_CHECKING([whether to enable versioning])
|
||||
AC_ARG_ENABLE(versioning,
|
||||
[ --enable-versioning Export only required symbols.
|
||||
See INSTALL for more information], [
|
||||
if test "x$APXS" != "x"; then
|
||||
PHP_VERSIONING=$enableval
|
||||
else
|
||||
PHP_VERSIONING=no
|
||||
fi
|
||||
],[
|
||||
PHP_VERSIONING=no
|
||||
])
|
||||
AC_MSG_RESULT([$PHP_VERSIONING])
|
||||
|
||||
if test "$PHP_VERSIONING" = "yes"; then
|
||||
test -z "$PHP_SYM_FILE" && PHP_SYM_FILE="$abs_srcdir/sapi/$PHP_SAPI/php.sym"
|
||||
if test -f "$PHP_SYM_FILE"; then
|
||||
@@ -823,8 +825,6 @@ shared)
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_REGEX
|
||||
|
||||
EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
|
||||
|
||||
dnl this has to be here to prevent the openssl crypt() from
|
||||
@@ -835,10 +835,70 @@ fi
|
||||
|
||||
unset LIBS LDFLAGS
|
||||
|
||||
dnl PEAR
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
PHP_HELP_SEPARATOR([PEAR:])
|
||||
PHP_CONFIGURE_PART(Configuring PEAR)
|
||||
|
||||
# compatibility
|
||||
if test -z "$with_pear" && test "$enable_pear" = "no"; then
|
||||
with_pear=no
|
||||
fi
|
||||
|
||||
PHP_ARG_WITH(pear, [whether to install PEAR],
|
||||
[ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php)
|
||||
--without-pear Do not install PEAR], DEFAULT, yes)
|
||||
|
||||
if test "$PHP_PEAR" != "no"; then
|
||||
|
||||
dnl
|
||||
dnl PEAR dependancies
|
||||
dnl
|
||||
if test "$PHP_SAPI_CLI" = "no"; then
|
||||
pear_error_msg="$pear_error_msg
|
||||
PEAR requires CLI to be enabled. Add --enable-cli to the configure line. (or --disable-pear)"
|
||||
fi
|
||||
if test "$PHP_PCRE_REGEX" = "no"; then
|
||||
pear_error_msg="$pear_error_msg
|
||||
PEAR requires PCRE to be enabled. Add --with-pcre-regex to the configure line. (or --disable-pear)"
|
||||
fi
|
||||
if test "$PHP_XML" = "no"; then
|
||||
pear_error_msg="$pear_error_msg
|
||||
PEAR requires XML to be enabled. Add --enable-xml to the configure line. (or --disable-pear)"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl ext/xmlrpc is not really there yet to be a requirement..
|
||||
dnl
|
||||
dnl if test "$PHP_XMLRPC" = "no"; then
|
||||
dnl pear_error_msg="$pear_error_msg
|
||||
dnl PEAR requires XML-RPC to be enabled. Add --with-xmlrpc to the configure line. (or --disable-pear)"
|
||||
dnl fi
|
||||
dnl
|
||||
|
||||
if test "$pear_error_msg"; then
|
||||
AC_MSG_ERROR([$pear_error_msg])
|
||||
fi
|
||||
|
||||
install_pear="install-pear"
|
||||
PEAR_INSTALLDIR=$PHP_PEAR
|
||||
|
||||
if test "$PHP_PEAR" = "DEFAULT" || test "$PHP_PEAR" = "yes"; then
|
||||
case $PHP_LAYOUT in
|
||||
GNU) PEAR_INSTALLDIR=$datadir/pear;;
|
||||
*) PEAR_INSTALLDIR=$libdir/php;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
dnl Configuring Zend and TSRM.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
PHP_HELP_SEPARATOR([Zend:])
|
||||
PHP_CONFIGURE_PART(Configuring Zend)
|
||||
|
||||
LIBZEND_BASIC_CHECKS
|
||||
LIBZEND_DLSYM_CHECK
|
||||
LIBZEND_OTHER_CHECKS
|
||||
@@ -862,17 +922,21 @@ fi
|
||||
ZEND_EXTRA_LIBS="$LIBS"
|
||||
unset LIBS LDFLAGS
|
||||
|
||||
PHP_HELP_SEPARATOR([TSRM:])
|
||||
PHP_CONFIGURE_PART(Configuring TSRM)
|
||||
TSRM_BASIC_CHECKS
|
||||
if test "$PHP_THREAD_SAFETY" = "yes"; then
|
||||
TSRM_THREADS_CHECKS
|
||||
fi
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LDFLAGS"
|
||||
EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $LDFLAGS"
|
||||
EXTRA_LIBS="$EXTRA_LIBS $LIBS"
|
||||
unset LIBS LDFLAGS
|
||||
|
||||
test "$prefix" = "NONE" && prefix=/usr/local
|
||||
test "$exec_prefix" = "NONE" && exec_prefix='${prefix}'
|
||||
test "$program_prefix" = "NONE" && program_prefix=
|
||||
test "$program_suffix" = "NONE" && program_suffix=
|
||||
|
||||
case $libdir in
|
||||
'${exec_prefix}/lib')
|
||||
@@ -967,6 +1031,7 @@ if test -z "$php_ldflags_add_usr_lib"; then
|
||||
fi
|
||||
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
|
||||
EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
|
||||
|
||||
PHP_BUILD_DATE=`date '+%Y-%m-%d'`
|
||||
AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
|
||||
@@ -997,6 +1062,8 @@ PHP_SUBST_OLD(php_abs_top_srcdir)
|
||||
|
||||
PHP_SUBST(bindir)
|
||||
PHP_SUBST(exec_prefix)
|
||||
PHP_SUBST(program_prefix)
|
||||
PHP_SUBST(program_suffix)
|
||||
PHP_SUBST(includedir)
|
||||
PHP_SUBST(libdir)
|
||||
PHP_SUBST(mandir)
|
||||
@@ -1022,6 +1089,7 @@ PHP_SUBST_OLD(DEBUG_CFLAGS)
|
||||
PHP_SUBST(DEFS)
|
||||
PHP_SUBST_OLD(EXTENSION_DIR)
|
||||
PHP_SUBST_OLD(EXTRA_LDFLAGS)
|
||||
PHP_SUBST_OLD(EXTRA_LDFLAGS_PROGRAM)
|
||||
PHP_SUBST_OLD(EXTRA_LIBS)
|
||||
PHP_SUBST_OLD(ZEND_EXTRA_LIBS)
|
||||
PHP_SUBST_OLD(INCLUDES)
|
||||
@@ -1044,6 +1112,7 @@ PHP_SUBST(PHP_RPATHS)
|
||||
PHP_SUBST(PHP_SAPI)
|
||||
PHP_SUBST_OLD(PHP_VERSION)
|
||||
PHP_SUBST(PROG_SENDMAIL)
|
||||
PHP_SUBST(RE2C)
|
||||
PHP_SUBST(SHELL)
|
||||
PHP_SUBST(SHARED_LIBTOOL)
|
||||
PHP_SUBST(TSRM_DIR)
|
||||
@@ -1077,6 +1146,7 @@ dnl
|
||||
dnl Libtool creation
|
||||
dnl
|
||||
|
||||
PHP_HELP_SEPARATOR([Libtool:])
|
||||
PHP_CONFIGURE_PART(Configuring libtool)
|
||||
|
||||
LDFLAGS="$LDFLAGS $PHP_AIX_LDFLAGS"
|
||||
@@ -1103,10 +1173,19 @@ INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
|
||||
CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
|
||||
|
||||
all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
|
||||
install_targets="install-sapi install-modules $install_pear install-build install-headers install-programs"
|
||||
if test "$PHP_SAPI" != "cgi"; then
|
||||
install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
|
||||
fi
|
||||
install_targets="$install_modules $install_pear install-build install-headers install-programs"
|
||||
|
||||
case $PHP_SAPI in
|
||||
cgi)
|
||||
install_targets="install-sapi $install_targets"
|
||||
;;
|
||||
cli)
|
||||
install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
|
||||
;;
|
||||
*)
|
||||
install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets"
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_SUBST(all_targets)
|
||||
PHP_SUBST(install_targets)
|
||||
@@ -1175,13 +1254,6 @@ if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test "\$CONFIG_FILES" = " $ALL
|
||||
REDO_ALL=yes
|
||||
fi
|
||||
|
||||
if test ! -f $srcdir/ext/bcmath/number.c; then
|
||||
echo "creating number.c"
|
||||
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.c
|
||||
echo "creating number.h"
|
||||
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.h
|
||||
fi
|
||||
|
||||
################################################################
|
||||
# Create configuration headers
|
||||
#
|
||||
@@ -1335,7 +1407,7 @@ cat <<X
|
||||
| If your application relies on register_globals being ON, you |
|
||||
| should explicitly set it to on in your php.ini file. |
|
||||
| Note that you are strongly encouraged to read |
|
||||
| http://www.php.net/manual/en/security.registerglobals.php |
|
||||
| http://www.php.net/manual/en/security.globals.php |
|
||||
| about the implications of having register_globals set to on, and |
|
||||
| avoid using it if possible. |
|
||||
+--------------------------------------------------------------------+
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#! /bin/sh
|
||||
|
||||
${MAKE:-make} -f build/build.mk cvsclean
|
||||
${MAKE:-make} -f build/build.mk cvsclean-work
|
||||
+2
-2
@@ -439,7 +439,7 @@ PHP_FUNCTION(bcsqrt)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string bccomp(string left_operand, string right_operand [, int scale])
|
||||
/* {{{ proto int bccomp(string left_operand, string right_operand [, int scale])
|
||||
Compares two arbitrary precision numbers */
|
||||
PHP_FUNCTION(bccomp)
|
||||
{
|
||||
@@ -481,7 +481,7 @@ PHP_FUNCTION(bccomp)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string bcscale(int scale)
|
||||
/* {{{ proto bool bcscale(int scale)
|
||||
Sets default scale parameter for all bc math functions */
|
||||
PHP_FUNCTION(bcscale)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ PHP_ARG_ENABLE(bcmath, whether to enable bc style precision math functions,
|
||||
|
||||
if test "$PHP_BCMATH" != "no"; then
|
||||
AC_DEFINE(WITH_BCMATH, 1, [Whether you have bcmath])
|
||||
PHP_NEW_EXTENSION(bcmath, bcmath.c number.c \
|
||||
PHP_NEW_EXTENSION(bcmath, bcmath.c \
|
||||
libbcmath/src/add.c libbcmath/src/div.c libbcmath/src/init.c libbcmath/src/neg.c libbcmath/src/outofmem.c libbcmath/src/raisemod.c libbcmath/src/rt.c libbcmath/src/sub.c \
|
||||
libbcmath/src/compare.c libbcmath/src/divmod.c libbcmath/src/int2num.c libbcmath/src/num2long.c libbcmath/src/output.c libbcmath/src/recmul.c \
|
||||
libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/debug.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \
|
||||
|
||||
@@ -52,9 +52,12 @@ typedef struct bc_struct
|
||||
in the case of leading zeros generated. */
|
||||
} bc_struct;
|
||||
|
||||
#include <php.h>
|
||||
#include <ext/bcmath/php_bcmath.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
#include "../../php_bcmath.h"
|
||||
|
||||
/* The base used in storing the numbers in n_value above.
|
||||
Currently this MUST be 10. */
|
||||
|
||||
+18
-5
@@ -165,9 +165,12 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
|
||||
if (strncasecmp("compress.bzip2://", path, 17) == 0) {
|
||||
path += 17;
|
||||
}
|
||||
if (mode[0] != 'w' && mode[0] != 'r' && mode[1] != '\0') {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef VIRTUAL_DIR
|
||||
virtual_filepath(path, &path_copy TSRMLS_CC);
|
||||
virtual_filepath_ex(path, &path_copy, NULL TSRMLS_CC);
|
||||
#else
|
||||
path_copy = path;
|
||||
#endif
|
||||
@@ -182,7 +185,7 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
|
||||
|
||||
if (bz_file == NULL) {
|
||||
/* that didn't work, so try and get something from the network/wrapper */
|
||||
stream = php_stream_open_wrapper(path, mode, options, opened_path);
|
||||
stream = php_stream_open_wrapper(path, mode, options | STREAM_WILL_CAST, opened_path);
|
||||
|
||||
if (stream) {
|
||||
int fd;
|
||||
@@ -190,6 +193,12 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
|
||||
bz_file = BZ2_bzdopen(fd, mode);
|
||||
}
|
||||
}
|
||||
/* remove the file created by php_stream_open_wrapper(), it is not needed since BZ2 functions
|
||||
* failed.
|
||||
*/
|
||||
if (!bz_file && mode[0] == 'w') {
|
||||
VCWD_UNLINK(*opened_path);
|
||||
}
|
||||
}
|
||||
|
||||
if (bz_file) {
|
||||
@@ -216,8 +225,7 @@ static php_stream_wrapper_ops bzip2_stream_wops = {
|
||||
NULL, /* fstat */
|
||||
NULL, /* stat */
|
||||
NULL, /* opendir */
|
||||
"BZip2",
|
||||
NULL /* unlink */
|
||||
"BZip2"
|
||||
};
|
||||
|
||||
php_stream_wrapper php_stream_bzip2_wrapper = {
|
||||
@@ -303,7 +311,12 @@ PHP_FUNCTION(bzopen)
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_string_ex(mode);
|
||||
|
||||
|
||||
if (Z_STRVAL_PP(mode)[0] != 'r' && Z_STRVAL_PP(mode)[0] != 'w' && Z_STRVAL_PP(mode)[1] != '\0') {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "'%s' is not a valid mode for bzopen(). Only 'w' and 'r' are supported.", Z_STRVAL_PP(mode));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
/* If it's not a resource its a string containing the filename to open */
|
||||
if (Z_TYPE_PP(file) != IS_RESOURCE) {
|
||||
convert_to_string_ex(file);
|
||||
|
||||
+12
-5
@@ -14,6 +14,7 @@ if test "$PHP_BZ2" != "no"; then
|
||||
if test -r $i/include/bzlib.h; then
|
||||
BZIP_DIR=$i
|
||||
AC_MSG_RESULT(found in $i)
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
@@ -23,11 +24,17 @@ if test "$PHP_BZ2" != "no"; then
|
||||
AC_MSG_ERROR(Please reinstall the BZip2 distribution)
|
||||
fi
|
||||
|
||||
PHP_ADD_INCLUDE($BZIP_DIR/include)
|
||||
|
||||
PHP_SUBST(BZ2_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_DIR/lib, BZ2_SHARED_LIBADD)
|
||||
AC_CHECK_LIB(bz2, BZ2_bzerror, [AC_DEFINE(HAVE_BZ2,1,[ ])], [AC_MSG_ERROR(bz2 module requires libbz2 >= 1.0.0)],)
|
||||
PHP_CHECK_LIBRARY(bz2, BZ2_bzerror,
|
||||
[
|
||||
PHP_ADD_INCLUDE($BZIP_DIR/include)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_DIR/lib, BZ2_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_BZ2,1,[ ])
|
||||
], [
|
||||
AC_MSG_ERROR(bz2 module requires libbz2 >= 1.0.0)
|
||||
], [
|
||||
-L$BZIP_DIR/lib
|
||||
])
|
||||
|
||||
PHP_NEW_EXTENSION(bz2, bz2.c, $ext_shared)
|
||||
PHP_SUBST(BZ2_SHARED_LIBADD)
|
||||
fi
|
||||
@@ -22,8 +22,7 @@ $blaat2 = bzdecompress(bzcompress($blaat));
|
||||
$tests = <<<TESTS
|
||||
\$blaat === \$blaat2
|
||||
TESTS;
|
||||
|
||||
include('tests/quicktester.inc');
|
||||
include(dirname(__FILE__) . '/../../../tests/quicktester.inc');
|
||||
|
||||
--EXPECT--
|
||||
OK
|
||||
@@ -161,7 +161,7 @@ PHP_FUNCTION(cal_info)
|
||||
}
|
||||
convert_to_long_ex(cal);
|
||||
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
|
||||
zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
|
||||
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ PHP_FUNCTION(cal_days_in_month)
|
||||
convert_to_long_ex(year);
|
||||
|
||||
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
|
||||
zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
|
||||
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ PHP_FUNCTION(cal_to_jd)
|
||||
convert_to_long_ex(year);
|
||||
|
||||
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
|
||||
zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
|
||||
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ PHP_FUNCTION(cal_from_jd)
|
||||
convert_to_long_ex(cal);
|
||||
|
||||
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
|
||||
zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
|
||||
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
calendar = &cal_conversion_table[Z_LVAL_PP(cal)];
|
||||
|
||||
+19
-45
@@ -55,7 +55,7 @@
|
||||
#ifdef PHP_WIN32
|
||||
|
||||
#define _WIN32_DCOM
|
||||
|
||||
#define COBJMACROS
|
||||
#include <iostream.h>
|
||||
#include <math.h>
|
||||
#include <ocidl.h>
|
||||
@@ -122,24 +122,7 @@ PHPAPI HRESULT php_COM_invoke(comval *obj, DISPID dispIdMember, WORD wFlags, DIS
|
||||
*ErrString = NULL;
|
||||
/* @todo use DispInvoke here ? */
|
||||
if (C_ISREFD(obj)) {
|
||||
if (C_HASTLIB(obj)) {
|
||||
hr = C_TYPEINFO_VT(obj)->Invoke(C_TYPEINFO(obj), C_DISPATCH(obj), dispIdMember, wFlags, pDispParams, pVarResult, &ExceptInfo, &ArgErr);
|
||||
if (FAILED(hr) && (hr != DISP_E_EXCEPTION)) {
|
||||
hr = C_DISPATCH_VT(obj)->Invoke(C_DISPATCH(obj), dispIdMember, &IID_NULL, LOCALE_SYSTEM_DEFAULT, wFlags, pDispParams, pVarResult, &ExceptInfo, &ArgErr);
|
||||
if (SUCCEEDED(hr)) {
|
||||
/*
|
||||
* ITypLib doesn't work
|
||||
* Release ITypeLib and fall back to IDispatch
|
||||
*/
|
||||
|
||||
C_TYPEINFO_VT(obj)->Release(C_TYPEINFO(obj));
|
||||
C_HASTLIB(obj) = FALSE;
|
||||
C_TYPEINFO(obj) = NULL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
hr = C_DISPATCH_VT(obj)->Invoke(C_DISPATCH(obj), dispIdMember, &IID_NULL, LOCALE_SYSTEM_DEFAULT, wFlags, pDispParams, pVarResult, &ExceptInfo, &ArgErr);
|
||||
}
|
||||
hr = C_DISPATCH_VT(obj)->Invoke(C_DISPATCH(obj), dispIdMember, &IID_NULL, LOCALE_SYSTEM_DEFAULT, wFlags, pDispParams, pVarResult, &ExceptInfo, &ArgErr);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
switch (hr) {
|
||||
@@ -1866,7 +1849,7 @@ PHPAPI pval php_COM_get_property_handler(zend_property_reference *property_refer
|
||||
|
||||
obj = obj_prop;
|
||||
php_COM_set(obj, &V_DISPATCH(var_result), TRUE TSRMLS_CC);
|
||||
VariantInit(var_result); // to protect C_DISPATCH(obj) from being freed when var_result is destructed
|
||||
VariantInit(var_result); /* to protect C_DISPATCH(obj) from being freed when var_result is destructed */
|
||||
} else {
|
||||
php_variant_to_pval(var_result, &retval, codepage TSRMLS_CC);
|
||||
|
||||
@@ -1951,7 +1934,7 @@ PHPAPI int php_COM_set_property_handler(zend_property_reference *property_refere
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
VariantInit(var_result); // to protect C_DISPATCH(obj) from being freed when var_result is destructed
|
||||
VariantInit(var_result); /* to protect C_DISPATCH(obj) from being freed when var_result is destructed */
|
||||
zval_dtor(&overloaded_property->element);
|
||||
}
|
||||
FREE_VARIANT(var_result);
|
||||
@@ -2224,7 +2207,6 @@ static ITypeLib *php_COM_find_typelib(char *search_string, int mode TSRMLS_DC)
|
||||
|
||||
PHPAPI int php_COM_load_typelib(ITypeLib *TypeLib, int mode TSRMLS_DC)
|
||||
{
|
||||
ITypeComp *TypeComp;
|
||||
int i;
|
||||
int interfaces;
|
||||
|
||||
@@ -2232,40 +2214,33 @@ PHPAPI int php_COM_load_typelib(ITypeLib *TypeLib, int mode TSRMLS_DC)
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
interfaces = TypeLib->lpVtbl->GetTypeInfoCount(TypeLib);
|
||||
interfaces = ITypeLib_GetTypeInfoCount(TypeLib);
|
||||
|
||||
TypeLib->lpVtbl->GetTypeComp(TypeLib, &TypeComp);
|
||||
for (i=0; i<interfaces; i++) {
|
||||
TYPEKIND pTKind;
|
||||
|
||||
TypeLib->lpVtbl->GetTypeInfoType(TypeLib, i, &pTKind);
|
||||
if (pTKind==TKIND_ENUM) {
|
||||
ITypeLib_GetTypeInfoType(TypeLib, i, &pTKind);
|
||||
if (pTKind == TKIND_ENUM) {
|
||||
ITypeInfo *TypeInfo;
|
||||
VARDESC *pVarDesc;
|
||||
UINT NameCount;
|
||||
int j;
|
||||
#if 0
|
||||
BSTR bstr_EnumId;
|
||||
char *EnumId;
|
||||
|
||||
TypeLib->lpVtbl->GetDocumentation(TypeLib, i, &bstr_EnumId, NULL, NULL, NULL);
|
||||
EnumId = php_OLECHAR_to_char(bstr_EnumId, NULL, codepage);
|
||||
printf("Enumeration %d - %s:\n", i, EnumId);
|
||||
efree(EnumId);
|
||||
#endif
|
||||
ITypeLib_GetTypeInfo(TypeLib, i, &TypeInfo);
|
||||
|
||||
TypeLib->lpVtbl->GetTypeInfo(TypeLib, i, &TypeInfo);
|
||||
|
||||
j=0;
|
||||
while (SUCCEEDED(TypeInfo->lpVtbl->GetVarDesc(TypeInfo, j, &pVarDesc))) {
|
||||
for (j = 0; ; j++) {
|
||||
BSTR bstr_ids;
|
||||
zend_constant c;
|
||||
zval exists, results, value;
|
||||
char *const_name;
|
||||
|
||||
TypeInfo->lpVtbl->GetNames(TypeInfo, pVarDesc->memid, &bstr_ids, 1, &NameCount);
|
||||
if (NameCount!=1) {
|
||||
j++;
|
||||
if (FAILED(ITypeInfo_GetVarDesc(TypeInfo, j, &pVarDesc))) {
|
||||
break;
|
||||
}
|
||||
|
||||
ITypeInfo_GetNames(TypeInfo, pVarDesc->memid, &bstr_ids, 1, &NameCount);
|
||||
if (NameCount != 1) {
|
||||
ITypeInfo_ReleaseVarDesc(TypeInfo, pVarDesc);
|
||||
continue;
|
||||
}
|
||||
const_name = php_OLECHAR_to_char(bstr_ids, &c.name_len, codepage TSRMLS_CC);
|
||||
@@ -2282,7 +2257,7 @@ PHPAPI int php_COM_load_typelib(ITypeLib *TypeLib, int mode TSRMLS_DC)
|
||||
php_error(E_WARNING, "%s(): Type library value %s is already defined and has a different value", get_active_function_name(TSRMLS_C), c.name);
|
||||
}
|
||||
free(c.name);
|
||||
j++;
|
||||
ITypeInfo_ReleaseVarDesc(TypeInfo, pVarDesc);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2296,10 +2271,9 @@ PHPAPI int php_COM_load_typelib(ITypeLib *TypeLib, int mode TSRMLS_DC)
|
||||
|
||||
zend_register_constant(&c TSRMLS_CC);
|
||||
}
|
||||
|
||||
j++;
|
||||
ITypeInfo_ReleaseVarDesc(TypeInfo, pVarDesc);
|
||||
}
|
||||
TypeInfo->lpVtbl->Release(TypeInfo);
|
||||
ITypeInfo_Release(TypeInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -181,7 +181,7 @@ static pval php_VARIANT_get_property_handler(zend_property_reference *property_r
|
||||
|
||||
case OE_IS_OBJECT:
|
||||
if (!strcmp(Z_STRVAL(overloaded_property->element), "value")) {
|
||||
// var_arg can't be an idispatch, so we don't care for the implicit AddRef() call here
|
||||
/* var_arg can't be an idispatch, so we don't care for the implicit AddRef() call here */
|
||||
php_variant_to_pval(var_arg, &result, codepage TSRMLS_CC);
|
||||
} else if (!strcmp(Z_STRVAL(overloaded_property->element), "type")) {
|
||||
ZVAL_LONG(&result, V_VT(var_arg))
|
||||
|
||||
@@ -119,7 +119,7 @@ PHPAPI void php_pval_to_variant_ex2(pval *pval_arg, VARIANT *var_arg, VARTYPE ty
|
||||
var_arg = V_VARIANTREF(var_arg); /* put the array in that VARIANT */
|
||||
}
|
||||
if (!type) {
|
||||
// if no type is given we take the variant type
|
||||
/* if no type is given we take the variant type */
|
||||
type = VT_VARIANT;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -280,7 +280,7 @@ static HRESULT STDMETHODCALLTYPE disp_invokeex(
|
||||
ZVAL_NULL(zarg);
|
||||
}
|
||||
} else {
|
||||
// arg can't be an idispatch, so we don't care for the implicit AddRef() call here
|
||||
/* arg can't be an idispatch, so we don't care for the implicit AddRef() call here */
|
||||
if (FAILURE == php_variant_to_pval(arg, zarg, codepage TSRMLS_CC)) {
|
||||
trace("failed to convert arg %d to zval\n", i);
|
||||
ZVAL_NULL(zarg);
|
||||
|
||||
+51
-60
@@ -1,91 +1,82 @@
|
||||
dnl $Id$
|
||||
|
||||
AC_DEFUN(CPDF_TEMP_SUBST,[
|
||||
old_LIBS=$LIBS
|
||||
$1
|
||||
LIBS=$old_LIBS
|
||||
])
|
||||
|
||||
AC_DEFUN(CPDF_JPEG_TEST,[
|
||||
CPDF_TEMP_SUBST([
|
||||
AC_ARG_WITH(jpeg-dir,
|
||||
[ --with-jpeg-dir[=DIR] CPDF: Set the path to libjpeg install prefix.],[
|
||||
for i in $withval /usr/local /usr; do
|
||||
if test -f "$i/lib/libjpeg.$SHLIB_SUFFIX_NAME" -o -f "$i/lib/libjpeg.a"; then
|
||||
CPDF_JPEG_DIR=$i
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if test -z "$CPDF_JPEG_DIR"; then
|
||||
AC_MSG_CHECKING([for libjpeg (needed by cpdflib 2.x)])
|
||||
AC_MSG_ERROR([libjpeg.(a|so) not found.])
|
||||
AC_ARG_WITH(jpeg-dir,
|
||||
[ --with-jpeg-dir[=DIR] CPDF: Set the path to libjpeg install prefix.],[
|
||||
for i in $withval /usr/local /usr; do
|
||||
if test -f "$i/lib/libjpeg.$SHLIB_SUFFIX_NAME" -o -f "$i/lib/libjpeg.a"; then
|
||||
CPDF_JPEG_DIR=$i
|
||||
break;
|
||||
fi
|
||||
LIBS="$LIBS -L$CPDF_JPEG_DIR/lib"
|
||||
],)
|
||||
AC_CHECK_LIB(jpeg,jpeg_read_header, ,[AC_MSG_ERROR(Problem with libjpeg.(a|so). Please check config.log for more information.)],)
|
||||
done
|
||||
if test -z "$CPDF_JPEG_DIR"; then
|
||||
PHP_ADD_LIBRARY(jpeg)
|
||||
else
|
||||
PHP_ADD_LIBRARY_WITH_PATH(jpeg, $CPDF_JPEG_DIR/lib)
|
||||
AC_MSG_CHECKING([for libjpeg (needed by cpdflib 2.x)])
|
||||
AC_MSG_ERROR([libjpeg.(a|so) not found.])
|
||||
fi
|
||||
])
|
||||
PHP_CHECK_LIBRARY(jpeg, jpeg_read_header, [
|
||||
PHP_ADD_LIBRARY_WITH_PATH(jpeg, $CPDF_JPEG_DIR/lib, CPDF_SHARED_LIBADD)
|
||||
] ,[
|
||||
AC_MSG_ERROR([CPDF: Problem with libjpeg.(a|so). Please check config.log for more information.])
|
||||
], [
|
||||
-L$CPDF_JPEG_DIR/lib
|
||||
])
|
||||
],)
|
||||
])
|
||||
|
||||
AC_DEFUN(CPDF_TIFF_TEST,[
|
||||
CPDF_TEMP_SUBST([
|
||||
AC_ARG_WITH(tiff-dir,
|
||||
[ --with-tiff-dir[=DIR] CPDF: Set the path to libtiff install prefix.],[
|
||||
for i in $withval /usr/local /usr; do
|
||||
if test -f "$i/lib/libtiff.$SHLIB_SUFFIX_NAME" -o -f "$i/lib/libtiff.a"; then
|
||||
CPDF_TIFF_DIR=$i
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if test -z "$CPDF_TIFF_DIR"; then
|
||||
AC_MSG_CHECKING([for libtiff (needed by cpdflib 2.x)])
|
||||
AC_MSG_ERROR([libtiff.(a|so) not found.])
|
||||
AC_ARG_WITH(tiff-dir,
|
||||
[ --with-tiff-dir[=DIR] CPDF: Set the path to libtiff install prefix.],[
|
||||
for i in $withval /usr/local /usr; do
|
||||
if test -f "$i/lib/libtiff.$SHLIB_SUFFIX_NAME" -o -f "$i/lib/libtiff.a"; then
|
||||
CPDF_TIFF_DIR=$i
|
||||
break;
|
||||
fi
|
||||
LIBS="$LIBS -L$CPDF_TIFF_DIR/lib"
|
||||
],)
|
||||
AC_CHECK_LIB(tiff,TIFFOpen, ,[AC_MSG_ERROR(Problem with libtiff.(a|so). Please check config.log for more information.)],)
|
||||
done
|
||||
if test -z "$CPDF_TIFF_DIR"; then
|
||||
PHP_ADD_LIBRARY(tiff)
|
||||
else
|
||||
PHP_ADD_LIBRARY_WITH_PATH(tiff, $CPDF_TIFF_DIR/lib)
|
||||
AC_MSG_CHECKING([for libtiff (needed by cpdflib 2.x)])
|
||||
AC_MSG_ERROR([libtiff.(a|so) not found.])
|
||||
fi
|
||||
])
|
||||
PHP_CHECK_LIBRARY(tiff, TIFFOpen, [
|
||||
PHP_ADD_LIBRARY_WITH_PATH(tiff, $CPDF_TIFF_DIR/lib, CPDF_SHARED_LIBADD)
|
||||
] ,[
|
||||
AC_MSG_ERROR([CPDF: Problem with libtiff.(a|so). Please check config.log for more information.])
|
||||
], [
|
||||
-L$CPDF_TIFF_DIR/lib
|
||||
])
|
||||
],)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(for cpdflib support)
|
||||
AC_ARG_WITH(cpdflib,
|
||||
[ --with-cpdflib[=DIR] Include cpdflib support (requires cpdflib >= 2).],
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
PHP_NEW_EXTENSION(cpdf, cpdf.c)
|
||||
PHP_WITH_SHARED
|
||||
if test "$withval" != "no"; then
|
||||
cpdf_withval=$withval
|
||||
PHP_NEW_EXTENSION(cpdf, cpdf.c, $ext_shared,, \\$(GDLIB_CFLAGS))
|
||||
PHP_SUBST(CPDF_SHARED_LIBADD)
|
||||
CPDF_JPEG_TEST
|
||||
CPDF_TIFF_TEST
|
||||
for i in $withval /usr /usr/local; do
|
||||
|
||||
for i in $cpdf_withval /usr/local /usr; do
|
||||
if test -f "$i/include/cpdflib.h"; then
|
||||
CPDFLIB_INCLUDE=$i/include
|
||||
AC_MSG_CHECKING(for cpdflib.h)
|
||||
AC_MSG_RESULT([in $i/include])
|
||||
CPDF_TEMP_SUBST([
|
||||
LIBS="$LIBS -L$i/lib"
|
||||
AC_CHECK_LIB(cpdf, cpdf_open, [AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])],
|
||||
[AC_MSG_ERROR([Cpdflib module requires cpdflib >= 2.])])
|
||||
])
|
||||
if test "$i" != "/usr" -a "$i" != "/usr/local"; then
|
||||
PHP_ADD_LIBRARY_WITH_PATH(cpdf, $i/lib)
|
||||
|
||||
PHP_CHECK_LIBRARY(cpdf, cpdf_open, [
|
||||
PHP_ADD_INCLUDE($CPDFLIB_INCLUDE)
|
||||
else
|
||||
PHP_ADD_LIBRARY(cpdf)
|
||||
fi
|
||||
PHP_ADD_LIBRARY_WITH_PATH(cpdf, $i/lib, CPDF_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])
|
||||
], [
|
||||
AC_MSG_ERROR([Cpdflib module requires cpdflib >= 2.])
|
||||
], [
|
||||
-L$i/lib $CPDF_SHARED_LIBADD
|
||||
])
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$CPDFLIB_INCLUDE"; then
|
||||
AC_MSG_CHECKING(for cpdflib.h)
|
||||
AC_MSG_ERROR([not found])
|
||||
|
||||
+84
-69
@@ -222,7 +222,7 @@ PHP_MSHUTDOWN_FUNCTION(cpdf)
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/* {{{ proto void cpdf_global_set_document_limits(int maxPages, int maxFonts, int maxImages, int maxAnnots, int maxObjects)
|
||||
/* {{{ proto bool cpdf_global_set_document_limits(int maxPages, int maxFonts, int maxImages, int maxAnnots, int maxObjects)
|
||||
Sets document settings for all documents */
|
||||
PHP_FUNCTION(cpdf_global_set_document_limits)
|
||||
{
|
||||
@@ -356,7 +356,7 @@ PHP_FUNCTION(cpdf_set_keywords)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_set_viewer_preferences(int pdfdoc, array preferences)
|
||||
/* {{{ proto bool cpdf_set_viewer_preferences(int pdfdoc, array preferences)
|
||||
How to show the document in the viewer */
|
||||
PHP_FUNCTION(cpdf_set_viewer_preferences)
|
||||
{
|
||||
@@ -476,6 +476,7 @@ PHP_FUNCTION(cpdf_open)
|
||||
php_error(E_WARNING, "%s(): Writing to stdout as described in the ClibPDF manual is not possible if php is used as an Apache module. Write to a memory stream and use cpdf_output_buffer() instead.", get_active_function_name(TSRMLS_C));
|
||||
#endif
|
||||
if (php_check_open_basedir(Z_STRVAL_P(arg2) TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(Z_STRVAL_P(arg2), "rb+", CHECKUID_CHECK_MODE_PARAM))) {
|
||||
cpdf_close(cpdf);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -514,7 +515,7 @@ PHP_FUNCTION(cpdf_close)
|
||||
/* }}} */
|
||||
|
||||
#define BUFFERLEN 40
|
||||
/* {{{ proto void cpdf_page_init(int pdfdoc, int pagenr, int orientation, int height, int width [, float unit])
|
||||
/* {{{ proto bool cpdf_page_init(int pdfdoc, int pagenr, int orientation, int height, int width [, float unit])
|
||||
Starts page */
|
||||
PHP_FUNCTION(cpdf_page_init)
|
||||
{
|
||||
@@ -559,7 +560,7 @@ PHP_FUNCTION(cpdf_page_init)
|
||||
/* }}} */
|
||||
#undef BUFFERLEN
|
||||
|
||||
/* {{{ proto void cpdf_finalize_page(int pdfdoc, int pagenr)
|
||||
/* {{{ proto bool cpdf_finalize_page(int pdfdoc, int pagenr)
|
||||
Ends the page to save memory */
|
||||
PHP_FUNCTION(cpdf_finalize_page)
|
||||
{
|
||||
@@ -587,7 +588,7 @@ PHP_FUNCTION(cpdf_finalize_page)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_set_current_page(int pdfdoc, int pagenr)
|
||||
/* {{{ proto bool cpdf_set_current_page(int pdfdoc, int pagenr)
|
||||
Sets page for output */
|
||||
PHP_FUNCTION(cpdf_set_current_page)
|
||||
{
|
||||
@@ -615,7 +616,7 @@ PHP_FUNCTION(cpdf_set_current_page)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_begin_text(int pdfdoc)
|
||||
/* {{{ proto bool cpdf_begin_text(int pdfdoc)
|
||||
Starts text section */
|
||||
PHP_FUNCTION(cpdf_begin_text)
|
||||
{
|
||||
@@ -641,7 +642,7 @@ PHP_FUNCTION(cpdf_begin_text)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_end_text(int pdfdoc)
|
||||
/* {{{ proto bool cpdf_end_text(int pdfdoc)
|
||||
Ends text section */
|
||||
PHP_FUNCTION(cpdf_end_text)
|
||||
{
|
||||
@@ -667,7 +668,7 @@ PHP_FUNCTION(cpdf_end_text)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_show(int pdfdoc, string text)
|
||||
/* {{{ proto bool cpdf_show(int pdfdoc, string text)
|
||||
Output text at current position */
|
||||
PHP_FUNCTION(cpdf_show)
|
||||
{
|
||||
@@ -694,7 +695,7 @@ PHP_FUNCTION(cpdf_show)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_show_xy(int pdfdoc, string text, float x-koor, float y-koor [, int mode])
|
||||
/* {{{ proto bool cpdf_show_xy(int pdfdoc, string text, float x-koor, float y-koor [, int mode])
|
||||
Output text at position */
|
||||
PHP_FUNCTION(cpdf_show_xy)
|
||||
{
|
||||
@@ -732,7 +733,7 @@ PHP_FUNCTION(cpdf_show_xy)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_continue_text(int pdfdoc, string text)
|
||||
/* {{{ proto bool cpdf_continue_text(int pdfdoc, string text)
|
||||
Outputs text in next line */
|
||||
PHP_FUNCTION(cpdf_continue_text)
|
||||
{
|
||||
@@ -759,7 +760,7 @@ PHP_FUNCTION(cpdf_continue_text)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_text(int pdfdoc, string text [, float x-koor, float y-koor [, int mode [, float orientation [, int alignmode]]]])
|
||||
/* {{{ proto bool cpdf_text(int pdfdoc, string text [, float x-koor, float y-koor [, int mode [, float orientation [, int alignmode]]]])
|
||||
Outputs text */
|
||||
PHP_FUNCTION(cpdf_text)
|
||||
{
|
||||
@@ -849,7 +850,7 @@ PHP_FUNCTION(cpdf_text)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_set_font(int pdfdoc, string font, float size, string encoding)
|
||||
/* {{{ proto bool cpdf_set_font(int pdfdoc, string font, float size, string encoding)
|
||||
Selects the current font face, size and encoding */
|
||||
PHP_FUNCTION(cpdf_set_font)
|
||||
{
|
||||
@@ -883,7 +884,7 @@ PHP_FUNCTION(cpdf_set_font)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_set_font_directories(int pdfdoc, string pfmdir, string pfbdir)
|
||||
/* {{{ proto bool cpdf_set_font_directories(int pdfdoc, string pfmdir, string pfbdir)
|
||||
Sets directories to search when using external fonts */
|
||||
PHP_FUNCTION(cpdf_set_font_directories)
|
||||
{
|
||||
@@ -911,7 +912,7 @@ PHP_FUNCTION(cpdf_set_font_directories)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_set_font_map_file(int pdfdoc, string filename)
|
||||
/* {{{ proto bool cpdf_set_font_map_file(int pdfdoc, string filename)
|
||||
Sets fontname to filename translation map when using external fonts */
|
||||
PHP_FUNCTION(cpdf_set_font_map_file)
|
||||
{
|
||||
@@ -942,7 +943,7 @@ PHP_FUNCTION(cpdf_set_font_map_file)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_set_leading(int pdfdoc, float distance)
|
||||
/* {{{ proto bool cpdf_set_leading(int pdfdoc, float distance)
|
||||
Sets distance between text lines */
|
||||
PHP_FUNCTION(cpdf_set_leading)
|
||||
{
|
||||
@@ -969,7 +970,7 @@ PHP_FUNCTION(cpdf_set_leading)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_set_text_rendering(int pdfdoc, int rendermode)
|
||||
/* {{{ proto bool cpdf_set_text_rendering(int pdfdoc, int rendermode)
|
||||
Determines how text is rendered */
|
||||
PHP_FUNCTION(cpdf_set_text_rendering)
|
||||
{
|
||||
@@ -996,7 +997,7 @@ PHP_FUNCTION(cpdf_set_text_rendering)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_set_horiz_scaling(int pdfdoc, float scale)
|
||||
/* {{{ proto bool cpdf_set_horiz_scaling(int pdfdoc, float scale)
|
||||
Sets horizontal scaling of text */
|
||||
PHP_FUNCTION(cpdf_set_horiz_scaling)
|
||||
{
|
||||
@@ -1023,7 +1024,7 @@ PHP_FUNCTION(cpdf_set_horiz_scaling)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_set_text_rise(int pdfdoc, float value)
|
||||
/* {{{ proto bool cpdf_set_text_rise(int pdfdoc, float value)
|
||||
Sets the text rise */
|
||||
PHP_FUNCTION(cpdf_set_text_rise)
|
||||
{
|
||||
@@ -1050,7 +1051,7 @@ PHP_FUNCTION(cpdf_set_text_rise)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_set_text_matrix(int pdfdoc, arry matrix)
|
||||
/* {{{ proto bool cpdf_set_text_matrix(int pdfdoc, arry matrix)
|
||||
Sets the text matrix */
|
||||
PHP_FUNCTION(cpdf_set_text_matrix)
|
||||
{
|
||||
@@ -1103,7 +1104,7 @@ PHP_FUNCTION(cpdf_set_text_matrix)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_set_text_pos(int pdfdoc, float x, float y [, int mode])
|
||||
/* {{{ proto bool cpdf_set_text_pos(int pdfdoc, float x, float y [, int mode])
|
||||
Sets the position of text for the next cpdf_show call */
|
||||
PHP_FUNCTION(cpdf_set_text_pos)
|
||||
{
|
||||
@@ -1140,7 +1141,7 @@ PHP_FUNCTION(cpdf_set_text_pos)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_rotate_text(int pdfdoc, float angle)
|
||||
/* {{{ proto bool cpdf_rotate_text(int pdfdoc, float angle)
|
||||
Sets text rotation angle */
|
||||
PHP_FUNCTION(cpdf_rotate_text)
|
||||
{
|
||||
@@ -1167,7 +1168,7 @@ PHP_FUNCTION(cpdf_rotate_text)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_set_char_spacing(int pdfdoc, float space)
|
||||
/* {{{ proto bool cpdf_set_char_spacing(int pdfdoc, float space)
|
||||
Sets character spacing */
|
||||
PHP_FUNCTION(cpdf_set_char_spacing)
|
||||
{
|
||||
@@ -1194,7 +1195,7 @@ PHP_FUNCTION(cpdf_set_char_spacing)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_set_word_spacing(int pdfdoc, float space)
|
||||
/* {{{ proto bool cpdf_set_word_spacing(int pdfdoc, float space)
|
||||
Sets spacing between words */
|
||||
PHP_FUNCTION(cpdf_set_word_spacing)
|
||||
{
|
||||
@@ -1249,7 +1250,7 @@ PHP_FUNCTION(cpdf_stringwidth)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_save(int pdfdoc)
|
||||
/* {{{ proto bool cpdf_save(int pdfdoc)
|
||||
Saves current enviroment */
|
||||
PHP_FUNCTION(cpdf_save)
|
||||
{
|
||||
@@ -1275,7 +1276,7 @@ PHP_FUNCTION(cpdf_save)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_restore(int pdfdoc)
|
||||
/* {{{ proto bool cpdf_restore(int pdfdoc)
|
||||
Restores formerly saved enviroment */
|
||||
PHP_FUNCTION(cpdf_restore)
|
||||
{
|
||||
@@ -1301,7 +1302,7 @@ PHP_FUNCTION(cpdf_restore)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_translate(int pdfdoc, float x, float y)
|
||||
/* {{{ proto bool cpdf_translate(int pdfdoc, float x, float y)
|
||||
Sets origin of coordinate system */
|
||||
PHP_FUNCTION(cpdf_translate)
|
||||
{
|
||||
@@ -1329,7 +1330,7 @@ PHP_FUNCTION(cpdf_translate)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_scale(int pdfdoc, float x_scale, float y_scale)
|
||||
/* {{{ proto bool cpdf_scale(int pdfdoc, float x_scale, float y_scale)
|
||||
Sets scaling */
|
||||
PHP_FUNCTION(cpdf_scale)
|
||||
{
|
||||
@@ -1357,7 +1358,7 @@ PHP_FUNCTION(cpdf_scale)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_rotate(int pdfdoc, float angle)
|
||||
/* {{{ proto bool cpdf_rotate(int pdfdoc, float angle)
|
||||
Sets rotation */
|
||||
PHP_FUNCTION(cpdf_rotate)
|
||||
{
|
||||
@@ -1384,7 +1385,7 @@ PHP_FUNCTION(cpdf_rotate)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_setflat(int pdfdoc, float value)
|
||||
/* {{{ proto bool cpdf_setflat(int pdfdoc, float value)
|
||||
Sets flatness */
|
||||
PHP_FUNCTION(cpdf_setflat)
|
||||
{
|
||||
@@ -1416,7 +1417,7 @@ PHP_FUNCTION(cpdf_setflat)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_setlinejoin(int pdfdoc, int value)
|
||||
/* {{{ proto bool cpdf_setlinejoin(int pdfdoc, int value)
|
||||
Sets linejoin parameter */
|
||||
PHP_FUNCTION(cpdf_setlinejoin)
|
||||
{
|
||||
@@ -1448,7 +1449,7 @@ PHP_FUNCTION(cpdf_setlinejoin)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_setlinecap(int pdfdoc, int value)
|
||||
/* {{{ proto bool cpdf_setlinecap(int pdfdoc, int value)
|
||||
Sets linecap parameter */
|
||||
PHP_FUNCTION(cpdf_setlinecap)
|
||||
{
|
||||
@@ -1480,7 +1481,7 @@ PHP_FUNCTION(cpdf_setlinecap)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_setmiterlimit(int pdfdoc, float value)
|
||||
/* {{{ proto bool cpdf_setmiterlimit(int pdfdoc, float value)
|
||||
Sets miter limit */
|
||||
PHP_FUNCTION(cpdf_setmiterlimit)
|
||||
{
|
||||
@@ -1512,7 +1513,7 @@ PHP_FUNCTION(cpdf_setmiterlimit)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_setlinewidth(int pdfdoc, float width)
|
||||
/* {{{ proto bool cpdf_setlinewidth(int pdfdoc, float width)
|
||||
Sets line width */
|
||||
PHP_FUNCTION(cpdf_setlinewidth)
|
||||
{
|
||||
@@ -1540,7 +1541,7 @@ PHP_FUNCTION(cpdf_setlinewidth)
|
||||
/* }}} */
|
||||
|
||||
#define BUFFERLEN 20
|
||||
/* {{{ proto void cpdf_setdash(int pdfdoc, long white, long black)
|
||||
/* {{{ proto bool cpdf_setdash(int pdfdoc, long white, long black)
|
||||
Sets dash pattern */
|
||||
PHP_FUNCTION(cpdf_setdash)
|
||||
{
|
||||
@@ -1571,7 +1572,7 @@ PHP_FUNCTION(cpdf_setdash)
|
||||
/* }}} */
|
||||
#undef BUFFERLEN
|
||||
|
||||
/* {{{ proto void cpdf_moveto(int pdfdoc, float x, float y [, int mode])
|
||||
/* {{{ proto bool cpdf_moveto(int pdfdoc, float x, float y [, int mode])
|
||||
Sets current point */
|
||||
PHP_FUNCTION(cpdf_moveto)
|
||||
{
|
||||
@@ -1608,7 +1609,7 @@ PHP_FUNCTION(cpdf_moveto)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_rmoveto(int pdfdoc, float x, float y [, int mode])
|
||||
/* {{{ proto bool cpdf_rmoveto(int pdfdoc, float x, float y [, int mode])
|
||||
Sets current point */
|
||||
PHP_FUNCTION(cpdf_rmoveto)
|
||||
{
|
||||
@@ -1645,7 +1646,7 @@ PHP_FUNCTION(cpdf_rmoveto)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_curveto(int pdfdoc, float x1, float y1, float x2, float y2, float x3, float y3 [, int mode])
|
||||
/* {{{ proto bool cpdf_curveto(int pdfdoc, float x1, float y1, float x2, float y2, float x3, float y3 [, int mode])
|
||||
Draws a curve */
|
||||
PHP_FUNCTION(cpdf_curveto)
|
||||
{
|
||||
@@ -1696,7 +1697,7 @@ PHP_FUNCTION(cpdf_curveto)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_lineto(int pdfdoc, float x, float y [, int mode])
|
||||
/* {{{ proto bool cpdf_lineto(int pdfdoc, float x, float y [, int mode])
|
||||
Draws a line */
|
||||
PHP_FUNCTION(cpdf_lineto)
|
||||
{
|
||||
@@ -1733,7 +1734,7 @@ PHP_FUNCTION(cpdf_lineto)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_rlineto(int pdfdoc, float x, float y [, int mode])
|
||||
/* {{{ proto bool cpdf_rlineto(int pdfdoc, float x, float y [, int mode])
|
||||
Draws a line relative to current point */
|
||||
PHP_FUNCTION(cpdf_rlineto)
|
||||
{
|
||||
@@ -1770,7 +1771,7 @@ PHP_FUNCTION(cpdf_rlineto)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_circle(int pdfdoc, float x, float y, float radius [, int mode])
|
||||
/* {{{ proto bool cpdf_circle(int pdfdoc, float x, float y, float radius [, int mode])
|
||||
Draws a circle */
|
||||
PHP_FUNCTION(cpdf_circle)
|
||||
{
|
||||
@@ -1808,7 +1809,7 @@ PHP_FUNCTION(cpdf_circle)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_arc(int pdfdoc, float x, float y, float radius, float start, float end [, int mode])
|
||||
/* {{{ proto bool cpdf_arc(int pdfdoc, float x, float y, float radius, float start, float end [, int mode])
|
||||
Draws an arc */
|
||||
PHP_FUNCTION(cpdf_arc)
|
||||
{
|
||||
@@ -1848,7 +1849,7 @@ PHP_FUNCTION(cpdf_arc)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_rect(int pdfdoc, float x, float y, float width, float height [, int mode])
|
||||
/* {{{ proto bool cpdf_rect(int pdfdoc, float x, float y, float width, float height [, int mode])
|
||||
Draws a rectangle */
|
||||
PHP_FUNCTION(cpdf_rect)
|
||||
{
|
||||
@@ -1893,7 +1894,7 @@ PHP_FUNCTION(cpdf_rect)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_newpath(int pdfdoc)
|
||||
/* {{{ proto bool cpdf_newpath(int pdfdoc)
|
||||
Starts new path */
|
||||
PHP_FUNCTION(cpdf_newpath)
|
||||
{
|
||||
@@ -1919,7 +1920,7 @@ PHP_FUNCTION(cpdf_newpath)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_closepath(int pdfdoc)
|
||||
/* {{{ proto bool cpdf_closepath(int pdfdoc)
|
||||
Close path */
|
||||
PHP_FUNCTION(cpdf_closepath)
|
||||
{
|
||||
@@ -1945,7 +1946,7 @@ PHP_FUNCTION(cpdf_closepath)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_closepath_stroke(int pdfdoc)
|
||||
/* {{{ proto bool cpdf_closepath_stroke(int pdfdoc)
|
||||
Close path and draw line along path */
|
||||
PHP_FUNCTION(cpdf_closepath_stroke)
|
||||
{
|
||||
@@ -1972,7 +1973,7 @@ PHP_FUNCTION(cpdf_closepath_stroke)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_stroke(int pdfdoc)
|
||||
/* {{{ proto bool cpdf_stroke(int pdfdoc)
|
||||
Draws line along path path */
|
||||
PHP_FUNCTION(cpdf_stroke)
|
||||
{
|
||||
@@ -1998,7 +1999,7 @@ PHP_FUNCTION(cpdf_stroke)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_fill(int pdfdoc)
|
||||
/* {{{ proto bool cpdf_fill(int pdfdoc)
|
||||
Fills current path */
|
||||
PHP_FUNCTION(cpdf_fill)
|
||||
{
|
||||
@@ -2024,7 +2025,7 @@ PHP_FUNCTION(cpdf_fill)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_fill_stroke(int pdfdoc)
|
||||
/* {{{ proto bool cpdf_fill_stroke(int pdfdoc)
|
||||
Fills and stroke current path */
|
||||
PHP_FUNCTION(cpdf_fill_stroke)
|
||||
{
|
||||
@@ -2051,7 +2052,7 @@ PHP_FUNCTION(cpdf_fill_stroke)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_closepath_fill_stroke(int pdfdoc)
|
||||
/* {{{ proto bool cpdf_closepath_fill_stroke(int pdfdoc)
|
||||
Close, fill and stroke current path */
|
||||
PHP_FUNCTION(cpdf_closepath_fill_stroke)
|
||||
{
|
||||
@@ -2079,7 +2080,7 @@ PHP_FUNCTION(cpdf_closepath_fill_stroke)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_clip(int pdfdoc)
|
||||
/* {{{ proto bool cpdf_clip(int pdfdoc)
|
||||
Clips to current path */
|
||||
PHP_FUNCTION(cpdf_clip)
|
||||
{
|
||||
@@ -2105,7 +2106,7 @@ PHP_FUNCTION(cpdf_clip)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_setgray_fill(int pdfdoc, float value)
|
||||
/* {{{ proto bool cpdf_setgray_fill(int pdfdoc, float value)
|
||||
Sets filling color to gray value */
|
||||
PHP_FUNCTION(cpdf_setgray_fill)
|
||||
{
|
||||
@@ -2132,7 +2133,7 @@ PHP_FUNCTION(cpdf_setgray_fill)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_setgray_stroke(int pdfdoc, float value)
|
||||
/* {{{ proto bool cpdf_setgray_stroke(int pdfdoc, float value)
|
||||
Sets drawing color to gray value */
|
||||
PHP_FUNCTION(cpdf_setgray_stroke)
|
||||
{
|
||||
@@ -2159,7 +2160,7 @@ PHP_FUNCTION(cpdf_setgray_stroke)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_setgray(int pdfdoc, float value)
|
||||
/* {{{ proto bool cpdf_setgray(int pdfdoc, float value)
|
||||
Sets drawing and filling color to gray value */
|
||||
PHP_FUNCTION(cpdf_setgray)
|
||||
{
|
||||
@@ -2186,7 +2187,7 @@ PHP_FUNCTION(cpdf_setgray)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_setrgbcolor_fill(int pdfdoc, float red, float green, float blue)
|
||||
/* {{{ proto bool cpdf_setrgbcolor_fill(int pdfdoc, float red, float green, float blue)
|
||||
Sets filling color to rgb color value */
|
||||
PHP_FUNCTION(cpdf_setrgbcolor_fill)
|
||||
{
|
||||
@@ -2215,7 +2216,7 @@ PHP_FUNCTION(cpdf_setrgbcolor_fill)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_setrgbcolor_stroke(int pdfdoc, float red, float green, float blue)
|
||||
/* {{{ proto bool cpdf_setrgbcolor_stroke(int pdfdoc, float red, float green, float blue)
|
||||
Sets drawing color to RGB color value */
|
||||
PHP_FUNCTION(cpdf_setrgbcolor_stroke)
|
||||
{
|
||||
@@ -2244,7 +2245,7 @@ PHP_FUNCTION(cpdf_setrgbcolor_stroke)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_setrgbcolor(int pdfdoc, float red, float green, float blue)
|
||||
/* {{{ proto bool cpdf_setrgbcolor(int pdfdoc, float red, float green, float blue)
|
||||
Sets drawing and filling color to RGB color value */
|
||||
PHP_FUNCTION(cpdf_setrgbcolor)
|
||||
{
|
||||
@@ -2273,7 +2274,7 @@ PHP_FUNCTION(cpdf_setrgbcolor)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_set_page_animation(int pdfdoc, int transition, float duration, float direction, int orientation, int inout)
|
||||
/* {{{ proto bool cpdf_set_page_animation(int pdfdoc, int transition, float duration, float direction, int orientation, int inout)
|
||||
Sets transition between pages */
|
||||
PHP_FUNCTION(cpdf_set_page_animation)
|
||||
{
|
||||
@@ -2305,7 +2306,7 @@ PHP_FUNCTION(cpdf_set_page_animation)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto array cpdf_finalize(int pdfdoc)
|
||||
/* {{{ proto bool cpdf_finalize(int pdfdoc)
|
||||
Creates PDF doc in memory */
|
||||
PHP_FUNCTION(cpdf_finalize)
|
||||
{
|
||||
@@ -2331,7 +2332,7 @@ PHP_FUNCTION(cpdf_finalize)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto array cpdf_output_buffer(int pdfdoc)
|
||||
/* {{{ proto bool cpdf_output_buffer(int pdfdoc)
|
||||
Returns the internal memory stream as string */
|
||||
PHP_FUNCTION(cpdf_output_buffer)
|
||||
{
|
||||
@@ -2360,7 +2361,7 @@ PHP_FUNCTION(cpdf_output_buffer)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto array cpdf_save_to_file(int pdfdoc, string filename)
|
||||
/* {{{ proto bool cpdf_save_to_file(int pdfdoc, string filename)
|
||||
Saves the internal memory stream to a file */
|
||||
PHP_FUNCTION(cpdf_save_to_file)
|
||||
{
|
||||
@@ -2396,7 +2397,7 @@ PHP_FUNCTION(cpdf_save_to_file)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void cpdf_import_jpeg(int pdfdoc, string filename, float x, float y, float angle, float width, float height, float x_scale, float y_scale, int gsave [, int mode])
|
||||
/* {{{ proto bool cpdf_import_jpeg(int pdfdoc, string filename, float x, float y, float angle, float width, float height, float x_scale, float y_scale, int gsave [, int mode])
|
||||
Includes JPEG image */
|
||||
PHP_FUNCTION(cpdf_import_jpeg)
|
||||
{
|
||||
@@ -2469,7 +2470,7 @@ PHP_FUNCTION(cpdf_import_jpeg)
|
||||
/* }}} */
|
||||
|
||||
#if HAVE_LIBGD13
|
||||
/* {{{ proto void cpdf_place_inline_image(int pdfdoc, int gdimage, float x, float y, float angle, fload width, float height, int gsave [, int mode])
|
||||
/* {{{ proto bool cpdf_place_inline_image(int pdfdoc, int gdimage, float x, float y, float angle, fload width, float height, int gsave [, int mode])
|
||||
Includes image */
|
||||
PHP_FUNCTION(cpdf_place_inline_image)
|
||||
{
|
||||
@@ -2521,16 +2522,30 @@ PHP_FUNCTION(cpdf_place_inline_image)
|
||||
}
|
||||
|
||||
count = 3 * im->sx * im->sy;
|
||||
if(NULL == (buffer = (unsigned char *) emalloc(count)))
|
||||
RETURN_FALSE;
|
||||
buffer = (unsigned char *) safe_emalloc(3 * im->sx, im->sy, 0);
|
||||
|
||||
ptr = buffer;
|
||||
for(i=0; i<im->sy; i++) {
|
||||
for(j=0; j<im->sx; j++) {
|
||||
color = im->pixels[i][j];
|
||||
*ptr++ = im->red[color];
|
||||
*ptr++ = im->green[color];
|
||||
*ptr++ = im->blue[color];
|
||||
#if HAVE_LIBGD20
|
||||
if(gdImageTrueColor(im)) {
|
||||
if (im->tpixels && gdImageBoundsSafe(im, j, i)) {
|
||||
color = gdImageTrueColorPixel(im, j, i);
|
||||
*ptr++ = (color >> 16) & 0xFF;
|
||||
*ptr++ = (color >> 8) & 0xFF;
|
||||
*ptr++ = color & 0xFF;
|
||||
}
|
||||
} else {
|
||||
#endif
|
||||
if (im->pixels && gdImageBoundsSafe(im, j, i)) {
|
||||
color = im->pixels[i][j];
|
||||
*ptr++ = im->red[color];
|
||||
*ptr++ = im->green[color];
|
||||
*ptr++ = im->blue[color];
|
||||
}
|
||||
#if HAVE_LIBGD20
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2561,7 +2576,7 @@ PHP_FUNCTION(cpdf_place_inline_image)
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
/* {{{ proto void cpdf_add_annotation(int pdfdoc, float xll, float yll, float xur, float xur, string title, string text [, int mode])
|
||||
/* {{{ proto bool cpdf_add_annotation(int pdfdoc, float xll, float yll, float xur, float xur, string title, string text [, int mode])
|
||||
Sets annotation */
|
||||
PHP_FUNCTION(cpdf_add_annotation)
|
||||
{
|
||||
|
||||
+18
-19
@@ -7,27 +7,26 @@ PHP_ARG_WITH(crack, for CRACKlib support,
|
||||
|
||||
if test "$PHP_CRACK" != "no"; then
|
||||
|
||||
for i in /usr/local/lib /usr/lib $PHP_CRACK/lib $PHP_CRACK/cracklib; do
|
||||
test -f $i/libcrack.$SHLIB_SUFFIX_NAME -o -f $i/libcrack.a && CRACK_LIBDIR=$i
|
||||
done
|
||||
for i in $PHP_CRACK/lib $PHP_CRACK/cracklib /usr/local/lib /usr/lib; do
|
||||
test -f $i/libcrack.$SHLIB_SUFFIX_NAME -o -f $i/libcrack.a && CRACK_LIBDIR=$i && break
|
||||
done
|
||||
|
||||
for i in /usr/local/include /usr/include $PHP_CRACK/include $PHP_CRACK/cracklib; do
|
||||
test -f $i/packer.h && CRACK_INCLUDEDIR=$i
|
||||
done
|
||||
if test -z "$CRACK_LIBDIR"; then
|
||||
AC_MSG_ERROR(Cannot find the cracklib library file)
|
||||
fi
|
||||
|
||||
for i in $PHP_CRACK/include $PHP_CRACK/cracklib /usr/local/include /usr/include; do
|
||||
test -f $i/packer.h && CRACK_INCLUDEDIR=$i && break
|
||||
done
|
||||
|
||||
if test -z "$CRACK_LIBDIR"; then
|
||||
AC_MSG_ERROR(Cannot find the cracklib library file)
|
||||
fi
|
||||
if test -z "$CRACK_INCLUDEDIR"; then
|
||||
AC_MSG_ERROR(Cannot find a cracklib header file)
|
||||
fi
|
||||
|
||||
if test -z "$CRACK_INCLUDEDIR"; then
|
||||
AC_MSG_ERROR(Cannot find a cracklib header file)
|
||||
fi
|
||||
PHP_ADD_INCLUDE($CRACK_INCLUDEDIR)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(crack, $CRACK_LIBDIR, CRACK_SHARED_LIBADD)
|
||||
|
||||
PHP_ADD_INCLUDE($CRACK_INCLUDEDIR)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(crack, $CRACK_LIBDIR, CRACK_SHARED_LIBADD)
|
||||
|
||||
PHP_NEW_EXTENSION(crack, crack.c, $ext_shared)
|
||||
PHP_SUBST(CRACK_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_CRACK, 1, [ ])
|
||||
PHP_NEW_EXTENSION(crack, crack.c, $ext_shared)
|
||||
PHP_SUBST(CRACK_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_CRACK, 1, [ ])
|
||||
fi
|
||||
|
||||
+19
-8
@@ -29,6 +29,9 @@
|
||||
|
||||
#include <packer.h>
|
||||
|
||||
extern char * FascistLook(PWDICT *pwp, char *instring);
|
||||
extern int PWClose(PWDICT *pwp);
|
||||
|
||||
ZEND_DECLARE_MODULE_GLOBALS(crack)
|
||||
|
||||
/* True global resources - no need for thread safety here */
|
||||
@@ -69,11 +72,16 @@ long _crack_open_dict(char *dictpath TSRMLS_DC)
|
||||
long resource;
|
||||
|
||||
if (CRACKG(current_id) != -1) {
|
||||
zend_error(E_WARNING, "Can not use more than one open dictionary with this implementation of libcrack");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can not use more than one open dictionary with this implementation of libcrack");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((PG(safe_mode) && (!php_checkuid(dictpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(dictpath TSRMLS_CC)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (NULL == (pwdict = PWOpen(dictpath, "r"))) {
|
||||
zend_error(E_WARNING, "Unable to open a crack dictionary");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open a crack dictionary");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -140,7 +148,7 @@ ZEND_MODULE_INFO_D(crack)
|
||||
DISPLAY_INI_ENTRIES();
|
||||
}
|
||||
|
||||
/* {{{ proto string crack_opendict(string dictionary)
|
||||
/* {{{ proto resource crack_opendict(string dictionary)
|
||||
Opens a new cracklib dictionary */
|
||||
ZEND_FUNCTION(crack_opendict)
|
||||
{
|
||||
@@ -156,12 +164,12 @@ ZEND_FUNCTION(crack_opendict)
|
||||
if (-1 == (resource = _crack_open_dict(Z_STRVAL_PP(dictpath) TSRMLS_CC))) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
RETURN_RESOURCE(resource);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string crack_closedict([int link_identifier])
|
||||
/* {{{ proto bool crack_closedict([resource dictionary])
|
||||
Closes an open cracklib dictionary */
|
||||
ZEND_FUNCTION(crack_closedict)
|
||||
{
|
||||
@@ -184,6 +192,10 @@ ZEND_FUNCTION(crack_closedict)
|
||||
break;
|
||||
}
|
||||
|
||||
if (id < 1) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
ZEND_FETCH_RESOURCE(pwdict, PWDICT *, dictionary, id, "cracklib dictionary", le_crack);
|
||||
if (CRACKG(current_id) == id) {
|
||||
CRACKG(current_id) = -1;
|
||||
@@ -194,7 +206,7 @@ ZEND_FUNCTION(crack_closedict)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string crack_check([int dictionary,] string password)
|
||||
/* {{{ proto bool crack_check([resource dictionary,] string password)
|
||||
Performs an obscure check with the given password */
|
||||
ZEND_FUNCTION(crack_check)
|
||||
{
|
||||
@@ -218,7 +230,6 @@ ZEND_FUNCTION(crack_check)
|
||||
if (zend_get_parameters_ex(2, &dictionary, &password) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
id = -1;
|
||||
break;
|
||||
default:
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -256,7 +267,7 @@ ZEND_FUNCTION(crack_getlastmessage)
|
||||
}
|
||||
|
||||
if (NULL == CRACKG(last_message)) {
|
||||
zend_error(E_WARNING, "No obscure checks in this session");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No obscure checks in this session");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
+8
-2
@@ -97,7 +97,13 @@ PHP_MINFO_FUNCTION(ctype)
|
||||
return; \
|
||||
switch (Z_TYPE_P(c)) { \
|
||||
case IS_LONG: \
|
||||
RETURN_BOOL(iswhat(Z_LVAL_P(c))); \
|
||||
if (Z_LVAL_P(c) <= 255 && Z_LVAL_P(c) >= 0) { \
|
||||
RETURN_BOOL(iswhat(Z_LVAL_P(c))); \
|
||||
} else if (Z_LVAL_P(c) >= -128) { \
|
||||
RETURN_BOOL(iswhat(Z_LVAL_P(c) + 256)); \
|
||||
} \
|
||||
SEPARATE_ZVAL(&c); \
|
||||
convert_to_string(c); \
|
||||
case IS_STRING: \
|
||||
{ \
|
||||
char *p; \
|
||||
@@ -105,7 +111,7 @@ PHP_MINFO_FUNCTION(ctype)
|
||||
p=Z_STRVAL_P(c); \
|
||||
len = Z_STRLEN_P(c); \
|
||||
for(n=0;n<len;n++) { \
|
||||
if(!iswhat(*p++)) RETURN_FALSE; \
|
||||
if(!iswhat((int)*(unsigned char *)(p++))) RETURN_FALSE; \
|
||||
} \
|
||||
RETURN_TRUE; \
|
||||
} \
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #25745 (ctype functions fail with non-ascii characters)
|
||||
--FILE--
|
||||
<?php
|
||||
$funcs = array(
|
||||
"ctype_alnum", "ctype_alpha", "ctype_cntrl", "ctype_digit",
|
||||
"ctype_graph", "ctype_lower", "ctype_print", "ctype_punct",
|
||||
"ctype_space", "ctype_upper", "ctype_xdigit"
|
||||
);
|
||||
|
||||
foreach ($funcs as $ctype_func) {
|
||||
for ($i = 0; $i < 256; $i++) {
|
||||
$a = $ctype_func($i);
|
||||
$b = $ctype_func(chr($i));
|
||||
if ($a != $b) {
|
||||
echo "broken... $ctype_func($i) = $a, $ctype_func(chr($i)) = $b\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
+123
-29
@@ -22,6 +22,10 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
|
||||
#if HAVE_CURL
|
||||
@@ -30,13 +34,17 @@
|
||||
#include <string.h>
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
#include <winsock.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <curl/easy.h>
|
||||
|
||||
/* As of curl 7.11.1 this is no longer defined inside curl.h */
|
||||
#ifndef HttpPost
|
||||
#define HttpPost curl_httppost
|
||||
#endif
|
||||
|
||||
#define SMART_STR_PREALLOC 4096
|
||||
|
||||
#include "ext/standard/php_smart_str.h"
|
||||
@@ -133,7 +141,9 @@ PHP_MINIT_FUNCTION(curl)
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION);
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII);
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_PUT);
|
||||
#if CURLOPT_MUTE != 0
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_MUTE);
|
||||
#endif
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_USERPWD);
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERPWD);
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_RANGE);
|
||||
@@ -191,10 +201,28 @@ PHP_MINIT_FUNCTION(curl)
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_SSLENGINE);
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_SSLENGINE_DEFAULT);
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_CRLF);
|
||||
#ifdef CURLOPT_ENCODING
|
||||
REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
|
||||
REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE);
|
||||
REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD);
|
||||
#if LIBCURL_VERSION_NUM >= 0x070a00
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_ENCODING);
|
||||
#endif
|
||||
|
||||
#if LIBCURL_VERSION_NUM > 0x070a05 /* CURLOPT_HTTPAUTH is available since curl 7.10.6 */
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_HTTPAUTH);
|
||||
/* http authentication options */
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_BASIC);
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_DIGEST);
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_GSSNEGOTIATE);
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_NTLM);
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_ANY);
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_ANYSAFE);
|
||||
#endif
|
||||
|
||||
#if LIBCURL_VERSION_NUM > 0x070a06 /* CURLOPT_PROXYAUTH is available since curl 7.10.7 */
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_PROXYAUTH);
|
||||
#endif
|
||||
|
||||
/* Constants effecting the way CURLOPT_CLOSEPOLICY works */
|
||||
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_RECENTLY_USED);
|
||||
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_TRAFFIC);
|
||||
@@ -277,6 +305,35 @@ PHP_MINIT_FUNCTION(curl)
|
||||
REGISTER_CURL_CONSTANT(CURLE_TELNET_OPTION_SYNTAX);
|
||||
REGISTER_CURL_CONSTANT(CURLE_OBSOLETE);
|
||||
REGISTER_CURL_CONSTANT(CURLE_SSL_PEER_CERTIFICATE);
|
||||
REGISTER_CURL_CONSTANT(CURLE_GOT_NOTHING);
|
||||
REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_NOTFOUND);
|
||||
REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_SETFAILED);
|
||||
REGISTER_CURL_CONSTANT(CURLE_SEND_ERROR);
|
||||
REGISTER_CURL_CONSTANT(CURLE_RECV_ERROR);
|
||||
#ifdef CURLE_SHARE_IN_USE
|
||||
REGISTER_CURL_CONSTANT(CURLE_SHARE_IN_USE);
|
||||
#endif
|
||||
#ifdef CURLE_SSL_CERTPROBLEM
|
||||
REGISTER_CURL_CONSTANT(CURLE_SSL_CERTPROBLEM);
|
||||
#endif
|
||||
#ifdef CURLE_SSL_CIPHER
|
||||
REGISTER_CURL_CONSTANT(CURLE_SSL_CIPHER);
|
||||
#endif
|
||||
#ifdef CURLE_SSL_CACERT
|
||||
REGISTER_CURL_CONSTANT(CURLE_SSL_CACERT);
|
||||
#endif
|
||||
#ifdef CURLE_BAD_CONTENT_ENCODING
|
||||
REGISTER_CURL_CONSTANT(CURLE_BAD_CONTENT_ENCODING);
|
||||
#endif
|
||||
#ifdef CURLE_LDAP_INVALID_URL
|
||||
REGISTER_CURL_CONSTANT(CURLE_LDAP_INVALID_URL);
|
||||
#endif
|
||||
#ifdef CURLE_FILESIZE_EXCEEDED
|
||||
REGISTER_CURL_CONSTANT(CURLE_FILESIZE_EXCEEDED);
|
||||
#endif
|
||||
#ifdef CURLE_FTP_SSL_FAILED
|
||||
REGISTER_CURL_CONSTANT(CURLE_FTP_SSL_FAILED);
|
||||
#endif
|
||||
|
||||
REGISTER_CURL_CONSTANT(CURL_NETRC_OPTIONAL);
|
||||
REGISTER_CURL_CONSTANT(CURL_NETRC_IGNORED);
|
||||
@@ -349,7 +406,6 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
|
||||
zval *argv[2];
|
||||
zval *retval;
|
||||
int error;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
MAKE_STD_ZVAL(argv[0]);
|
||||
MAKE_STD_ZVAL(argv[1]);
|
||||
@@ -369,6 +425,9 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
|
||||
length = -1;
|
||||
}
|
||||
else {
|
||||
if (Z_TYPE_P(retval) != IS_LONG) {
|
||||
convert_to_long_ex(&retval);
|
||||
}
|
||||
length = Z_LVAL_P(retval);
|
||||
}
|
||||
|
||||
@@ -401,7 +460,6 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
|
||||
case PHP_CURL_USER: {
|
||||
zval *argv[3];
|
||||
zval *retval;
|
||||
int length;
|
||||
int error;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
@@ -423,11 +481,9 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
|
||||
if (error == FAILURE) {
|
||||
php_error(E_WARNING, "%s(): Cannot call the CURLOPT_READFUNCTION",
|
||||
get_active_function_name(TSRMLS_C));
|
||||
length = -1;
|
||||
}
|
||||
else {
|
||||
memcpy(data, Z_STRVAL_P(retval), size * nmemb);
|
||||
length = Z_STRLEN_P(retval);
|
||||
} else if (Z_TYPE_P(retval) == IS_STRING) {
|
||||
length = MIN(size * nmemb, Z_STRLEN_P(retval));
|
||||
memcpy(data, Z_STRVAL_P(retval), length);
|
||||
}
|
||||
|
||||
zval_ptr_dtor(&argv[0]);
|
||||
@@ -486,6 +542,9 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
|
||||
length = -1;
|
||||
}
|
||||
else {
|
||||
if (Z_TYPE_P(retval) != IS_LONG) {
|
||||
convert_to_long_ex(&retval);
|
||||
}
|
||||
length = Z_LVAL_P(retval);
|
||||
}
|
||||
zval_ptr_dtor(&argv[0]);
|
||||
@@ -493,13 +552,18 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
|
||||
zval_ptr_dtor(&retval);
|
||||
break;
|
||||
}
|
||||
|
||||
case PHP_CURL_IGNORE:
|
||||
return length;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
return length;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#if CURLOPT_PASSWDFUNCTION != 0
|
||||
/* {{{ curl_passwd
|
||||
*/
|
||||
static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
|
||||
@@ -509,7 +573,7 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
|
||||
zval *argv[3];
|
||||
zval *retval = NULL;
|
||||
int error;
|
||||
int ret = 0;
|
||||
int ret = -1;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
MAKE_STD_ZVAL(argv[0]);
|
||||
@@ -527,17 +591,15 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
|
||||
retval, 2, argv TSRMLS_CC);
|
||||
if (error == FAILURE) {
|
||||
php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_PASSWDFUNCTION", get_active_function_name(TSRMLS_C));
|
||||
ret = -1;
|
||||
}
|
||||
else {
|
||||
} else if (Z_TYPE_P(retval) == IS_STRING) {
|
||||
if (Z_STRLEN_P(retval) > buflen) {
|
||||
php_error(E_WARNING, "%s(): Returned password is too long for libcurl to handle",
|
||||
get_active_function_name(TSRMLS_C));
|
||||
ret = -1;
|
||||
}
|
||||
else {
|
||||
strlcpy(buf, Z_STRVAL_P(retval), buflen);
|
||||
} else {
|
||||
strlcpy(buf, Z_STRVAL_P(retval), Z_STRLEN_P(retval));
|
||||
}
|
||||
} else {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "User handler '%s' did not return a string.", Z_STRVAL_P(func));
|
||||
}
|
||||
|
||||
zval_ptr_dtor(&argv[0]);
|
||||
@@ -548,6 +610,7 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
|
||||
return ret;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
/* {{{ curl_free_string
|
||||
*/
|
||||
@@ -574,7 +637,7 @@ static void curl_free_slist(void **slist)
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto array curl_version(void)
|
||||
/* {{{ proto string curl_version(void)
|
||||
Return cURL version information. */
|
||||
PHP_FUNCTION(curl_version)
|
||||
{
|
||||
@@ -693,7 +756,9 @@ PHP_FUNCTION(curl_setopt)
|
||||
case CURLOPT_NETRC:
|
||||
case CURLOPT_FOLLOWLOCATION:
|
||||
case CURLOPT_PUT:
|
||||
case CURLOPT_MUTE:
|
||||
#if CURLOPT_MUTE != 0
|
||||
case CURLOPT_MUTE:
|
||||
#endif
|
||||
case CURLOPT_TIMEOUT:
|
||||
case CURLOPT_FTP_USE_EPSV:
|
||||
case CURLOPT_LOW_SPEED_LIMIT:
|
||||
@@ -717,6 +782,12 @@ PHP_FUNCTION(curl_setopt)
|
||||
case CURLOPT_HTTPGET:
|
||||
case CURLOPT_HTTP_VERSION:
|
||||
case CURLOPT_CRLF:
|
||||
#if LIBCURL_VERSION_NUM > 0x070a05 /* CURLOPT_HTTPAUTH is available since curl 7.10.6 */
|
||||
case CURLOPT_HTTPAUTH:
|
||||
#endif
|
||||
#if LIBCURL_VERSION_NUM > 0x070a06 /* CURLOPT_PROXYAUTH is available since curl 7.10.7 */
|
||||
case CURLOPT_PROXYAUTH:
|
||||
#endif
|
||||
convert_to_long_ex(zvalue);
|
||||
error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
|
||||
break;
|
||||
@@ -729,22 +800,18 @@ PHP_FUNCTION(curl_setopt)
|
||||
case CURLOPT_USERAGENT:
|
||||
case CURLOPT_FTPPORT:
|
||||
case CURLOPT_COOKIE:
|
||||
case CURLOPT_COOKIEFILE:
|
||||
case CURLOPT_REFERER:
|
||||
case CURLOPT_INTERFACE:
|
||||
case CURLOPT_KRB4LEVEL:
|
||||
case CURLOPT_RANDOM_FILE:
|
||||
case CURLOPT_EGDSOCKET:
|
||||
case CURLOPT_CAINFO:
|
||||
case CURLOPT_CAPATH:
|
||||
case CURLOPT_COOKIEJAR:
|
||||
case CURLOPT_SSL_CIPHER_LIST:
|
||||
case CURLOPT_SSLKEY:
|
||||
case CURLOPT_SSLCERT:
|
||||
case CURLOPT_SSLKEYTYPE:
|
||||
case CURLOPT_SSLKEYPASSWD:
|
||||
case CURLOPT_SSLKEYPASSWD:
|
||||
case CURLOPT_SSLENGINE:
|
||||
#ifdef CURLOPT_ENCODING
|
||||
#if LIBCURL_VERSION_NUM >= 0x070a00
|
||||
case CURLOPT_ENCODING:
|
||||
#endif
|
||||
case CURLOPT_SSLENGINE_DEFAULT: {
|
||||
@@ -807,7 +874,9 @@ PHP_FUNCTION(curl_setopt)
|
||||
|
||||
if (Z_LVAL_PP(zvalue)) {
|
||||
ch->handlers->write->method = PHP_CURL_RETURN;
|
||||
}
|
||||
} else {
|
||||
ch->handlers->write->method = PHP_CURL_STDOUT;
|
||||
}
|
||||
break;
|
||||
case CURLOPT_BINARYTRANSFER:
|
||||
convert_to_long_ex(zvalue);
|
||||
@@ -840,6 +909,7 @@ PHP_FUNCTION(curl_setopt)
|
||||
ch->handlers->write_header->func = *zvalue;
|
||||
ch->handlers->write_header->method = PHP_CURL_USER;
|
||||
break;
|
||||
#if CURLOPT_PASSWDFUNCTION != 0
|
||||
case CURLOPT_PASSWDFUNCTION:
|
||||
if (ch->handlers->passwd) {
|
||||
zval_ptr_dtor(&ch->handlers->passwd);
|
||||
@@ -849,6 +919,7 @@ PHP_FUNCTION(curl_setopt)
|
||||
error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDFUNCTION, curl_passwd);
|
||||
error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDDATA, (void *) ch);
|
||||
break;
|
||||
#endif
|
||||
case CURLOPT_POSTFIELDS:
|
||||
if (Z_TYPE_PP(zvalue) == IS_ARRAY || Z_TYPE_PP(zvalue) == IS_OBJECT) {
|
||||
zval **current;
|
||||
@@ -891,7 +962,7 @@ PHP_FUNCTION(curl_setopt)
|
||||
error = curl_formadd(&first, &last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, string_key_len - 1,
|
||||
CURLFORM_PTRCONTENTS, postval,
|
||||
CURLFORM_COPYCONTENTS, postval,
|
||||
CURLFORM_CONTENTSLENGTH, Z_STRLEN_PP(current),
|
||||
CURLFORM_END);
|
||||
}
|
||||
@@ -954,6 +1025,28 @@ PHP_FUNCTION(curl_setopt)
|
||||
|
||||
error = curl_easy_setopt(ch->cp, option, slist);
|
||||
|
||||
break;
|
||||
}
|
||||
/* the following options deal with files, therefor safe_mode & open_basedir checks
|
||||
* are required.
|
||||
*/
|
||||
case CURLOPT_COOKIEJAR:
|
||||
case CURLOPT_SSLCERT:
|
||||
case CURLOPT_RANDOM_FILE:
|
||||
case CURLOPT_COOKIEFILE: {
|
||||
char *copystr = NULL;
|
||||
|
||||
convert_to_string_ex(zvalue);
|
||||
|
||||
if (php_check_open_basedir(Z_STRVAL_PP(zvalue) TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(Z_STRVAL_PP(zvalue), "rb+", CHECKUID_CHECK_MODE_PARAM))) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
|
||||
|
||||
error = curl_easy_setopt(ch->cp, option, copystr);
|
||||
zend_llist_add_element(&ch->to_free.str, ©str);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1003,7 +1096,8 @@ PHP_FUNCTION(curl_exec)
|
||||
|
||||
error = curl_easy_perform(ch->cp);
|
||||
SAVE_CURL_ERROR(ch, error);
|
||||
if (error != CURLE_OK) {
|
||||
/* CURLE_PARTIAL_FILE is returned by HEAD requests */
|
||||
if (error != CURLE_OK && error != CURLE_PARTIAL_FILE) {
|
||||
if (ch->handlers->write->buf.len > 0) {
|
||||
smart_str_free(&ch->handlers->write->buf);
|
||||
}
|
||||
@@ -1023,7 +1117,7 @@ PHP_FUNCTION(curl_exec)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string curl_getinfo(resource ch, int opt)
|
||||
/* {{{ proto mixed curl_getinfo(resource ch, int opt)
|
||||
Get information regarding a specific transfer */
|
||||
PHP_FUNCTION(curl_getinfo)
|
||||
{
|
||||
|
||||
+2
-2
@@ -113,7 +113,7 @@ BSC32=bscmake.exe
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 php4ts_debug.lib libcurl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"..\..\Debug_TS/php_curl.dll" /libpath:"..\..\Debug_TS"
|
||||
# SUBTRACT BASE LINK32 /pdb:none
|
||||
# ADD LINK32 php4ts_debug.lib libcurl.lib ssleay32.lib libeay32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /dll /incremental:yes /debug /machine:I386 /nodefaultlib:"MSVCRTD" /out:"..\..\Debug_TS/php_curl.dll" /libpath:"..\..\Debug_TS" /libpath:"..\..\..\php_build\curl\lib"
|
||||
# ADD LINK32 php4ts_debug.lib libcurl.lib ssleay32.lib libeay32.lib msvcrt.lib ws2_32.lib winmm.lib zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /dll /incremental:yes /debug /machine:I386 /nodefaultlib:"MSVCRTD" /out:"..\..\Debug_TS/php_curl.dll" /libpath:"..\..\Debug_TS" /libpath:"..\..\..\php_build\curl\lib"
|
||||
# SUBTRACT LINK32 /pdb:none /nodefaultlib
|
||||
|
||||
!ELSEIF "$(CFG)" == "curl - Win32 Release_TS_SSL"
|
||||
@@ -142,7 +142,7 @@ BSC32=bscmake.exe
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 php4ts.lib libcurl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /nodefaultlib:"msvcrt.lib" /out:"..\..\Release_TS/php_curl.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
|
||||
# SUBTRACT BASE LINK32 /pdb:none
|
||||
# ADD LINK32 php4ts.lib libcurl.lib ssleay32.lib libeay32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /dll /machine:I386 /nodefaultlib:"MSVCRT" /out:"..\..\Release_TS/php_curl.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" /libpath:"..\..\..\php_build\curl\lib"
|
||||
# ADD LINK32 php4ts.lib libcurl.lib ssleay32.lib libeay32.lib msvcrt.lib ws2_32.lib winmm.lib zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /dll /machine:I386 /nodefaultlib:"MSVCRT" /out:"..\..\Release_TS/php_curl.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" /libpath:"..\..\..\php_build\curl\lib"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
@@ -307,7 +307,7 @@ PHPAPI php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *fil
|
||||
curl_easy_setopt(curlstream->curl, CURLOPT_PROGRESSDATA, stream);
|
||||
curl_easy_setopt(curlstream->curl, CURLOPT_NOPROGRESS, 0);
|
||||
|
||||
curl_easy_setopt(curlstream->curl, CURLOPT_USERAGENT, "PHP/" PHP_VERSION);
|
||||
curl_easy_setopt(curlstream->curl, CURLOPT_USERAGENT, FG(user_agent) ? FG(user_agent) : "PHP/" PHP_VERSION);
|
||||
|
||||
/* TODO: read cookies and options from context */
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ dnl $Id$
|
||||
dnl
|
||||
|
||||
PHP_ARG_WITH(cyrus, for cyrus imap support,
|
||||
[ --with-cyrus[=dir] Include Cyrus IMAP support])
|
||||
[ --with-cyrus[=DIR] Include Cyrus IMAP support])
|
||||
|
||||
if test "$PHP_CYRUS" != "no"; then
|
||||
found_cyrus=no
|
||||
|
||||
+42
-42
@@ -53,7 +53,7 @@ zend_module_entry cyrus_module_entry = {
|
||||
cyrus_functions,
|
||||
PHP_MINIT(cyrus),
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(cyrus),
|
||||
NO_VERSION_YET,
|
||||
@@ -71,7 +71,7 @@ static void cyrus_free(zend_rsrc_list_entry *rsrc)
|
||||
if (conn->client)
|
||||
imclient_close(conn->client);
|
||||
|
||||
if (conn->host)
|
||||
if (conn->host)
|
||||
efree(conn->host);
|
||||
|
||||
if (conn->port)
|
||||
@@ -79,16 +79,16 @@ static void cyrus_free(zend_rsrc_list_entry *rsrc)
|
||||
|
||||
efree(conn);
|
||||
}
|
||||
|
||||
|
||||
PHP_MINIT_FUNCTION(cyrus)
|
||||
{
|
||||
le_cyrus = zend_register_list_destructors_ex(cyrus_free, NULL,
|
||||
le_cyrus = zend_register_list_destructors_ex(cyrus_free, NULL,
|
||||
le_cyrus_name, module_number);
|
||||
|
||||
REGISTER_LONG_CONSTANT("CYRUS_CONN_NONSYNCLITERAL",
|
||||
REGISTER_LONG_CONSTANT("CYRUS_CONN_NONSYNCLITERAL",
|
||||
IMCLIENT_CONN_NONSYNCLITERAL,
|
||||
CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CYRUS_CONN_INITIALRESPONSE",
|
||||
REGISTER_LONG_CONSTANT("CYRUS_CONN_INITIALRESPONSE",
|
||||
IMCLIENT_CONN_INITIALRESPONSE,
|
||||
CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("CYRUS_CALLBACK_NUMBERED", CALLBACK_NUMBERED,
|
||||
@@ -125,7 +125,7 @@ PHP_FUNCTION(cyrus_connect)
|
||||
int flags = 0;
|
||||
int error;
|
||||
int argc = ZEND_NUM_ARGS();
|
||||
|
||||
|
||||
if (argc < 0 || argc > 3 ||
|
||||
zend_get_parameters_ex(argc, &z_host, &z_port, &z_flags) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -169,7 +169,7 @@ PHP_FUNCTION(cyrus_connect)
|
||||
case -1:
|
||||
php_error(E_WARNING, "%s(): Invalid hostname: %s", get_active_function_name(TSRMLS_C), host);
|
||||
RETURN_FALSE;
|
||||
|
||||
|
||||
case -2:
|
||||
php_error(E_WARNING, "%s(): Invalid port: %d", get_active_function_name(TSRMLS_C), port);
|
||||
RETURN_FALSE;
|
||||
@@ -181,14 +181,14 @@ PHP_FUNCTION(cyrus_connect)
|
||||
/* }}} */
|
||||
|
||||
|
||||
static void cyrus_capable_callback(struct imclient *client, void *rock,
|
||||
static void cyrus_capable_callback(struct imclient *client, void *rock,
|
||||
struct imclient_reply *reply)
|
||||
{
|
||||
char *token = NULL;
|
||||
char *token_buf;
|
||||
char *mechanism = rock;
|
||||
|
||||
|
||||
|
||||
/* We need to split the reply up by the whitespace */
|
||||
token = php_strtok_r(reply->text, " ", &token_buf);
|
||||
while (token != NULL) {
|
||||
@@ -202,7 +202,7 @@ static void cyrus_capable_callback(struct imclient *client, void *rock,
|
||||
}
|
||||
|
||||
|
||||
/* {{{ proto bool cyrus_authenticate( resource connection [, string mechlist [, string service [, string user [, int minssf [, int maxssf]]]]])
|
||||
/* {{{ proto void cyrus_authenticate( resource connection [, string mechlist [, string service [, string user [, int minssf [, int maxssf]]]]])
|
||||
Authenticate agaings a Cyrus IMAP server */
|
||||
PHP_FUNCTION(cyrus_authenticate)
|
||||
{
|
||||
@@ -235,26 +235,26 @@ PHP_FUNCTION(cyrus_authenticate)
|
||||
else {
|
||||
char tmp_mechlist[100];
|
||||
int pos = 0;
|
||||
|
||||
|
||||
/* NULL out the buffer, ensures it has a safe ending and allows us to
|
||||
* test properly for the end of the buffer
|
||||
*/
|
||||
memset(tmp_mechlist, 0, sizeof tmp_mechlist);
|
||||
|
||||
/* We'll be calling the "CAPABILITY" command, which will give us a list
|
||||
* of the types of authorization the server is capable of
|
||||
* of the types of authorization the server is capable of
|
||||
*/
|
||||
imclient_addcallback(conn->client, "CAPABILITY", 0,
|
||||
imclient_addcallback(conn->client, "CAPABILITY", 0,
|
||||
cyrus_capable_callback, (void *) tmp_mechlist, 0);
|
||||
imclient_send(conn->client, NULL, NULL, "CAPABILITY");
|
||||
|
||||
/* Grab the end of string position into pos */
|
||||
while (tmp_mechlist[pos++] != 0)
|
||||
while (tmp_mechlist[pos++] != 0)
|
||||
;
|
||||
|
||||
/* Tack on PLAIN to whatever the auth string is */
|
||||
memcpy(tmp_mechlist + pos, " PLAIN", 6);
|
||||
|
||||
|
||||
/* Copy it onto the main buffer */
|
||||
mechlist = estrndup(tmp_mechlist, pos + 6);
|
||||
}
|
||||
@@ -277,22 +277,22 @@ PHP_FUNCTION(cyrus_authenticate)
|
||||
/* XXX: UGLY, but works, determines the username to use */
|
||||
user = (char *) sapi_getenv("USER", 4);
|
||||
if (! user) {
|
||||
user = (char *) getenv("USER");
|
||||
if (! user) {
|
||||
user = (char *) sapi_getenv("LOGNAME", 7);
|
||||
user = (char *) getenv("USER");
|
||||
if (! user) {
|
||||
user = (char *) getenv("LOGNAME");
|
||||
if (! user) {
|
||||
struct passwd *pwd = getpwuid(getuid());
|
||||
if (! pwd) {
|
||||
php_error(E_WARNING, "%s(): Couldn't determine user id", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
user = (char *) sapi_getenv("LOGNAME", 7);
|
||||
if (! user) {
|
||||
user = (char *) getenv("LOGNAME");
|
||||
if (! user) {
|
||||
struct passwd *pwd = getpwuid(getuid());
|
||||
if (! pwd) {
|
||||
php_error(E_WARNING, "%s(): Couldn't determine user id", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
user = estrdup(pwd->pw_name);
|
||||
}
|
||||
}
|
||||
|
||||
user = estrdup(pwd->pw_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@ PHP_FUNCTION(cyrus_authenticate)
|
||||
maxssf = 1000;
|
||||
}
|
||||
|
||||
imclient_authenticate(conn->client, mechlist, service,
|
||||
imclient_authenticate(conn->client, mechlist, service,
|
||||
user, minssf, maxssf);
|
||||
|
||||
efree(mechlist);
|
||||
@@ -324,8 +324,8 @@ PHP_FUNCTION(cyrus_authenticate)
|
||||
/* }}} */
|
||||
|
||||
|
||||
static void cyrus_generic_callback(struct imclient *client,
|
||||
void *rock,
|
||||
static void cyrus_generic_callback(struct imclient *client,
|
||||
void *rock,
|
||||
struct imclient_reply *reply)
|
||||
{
|
||||
php_cyrus_callback *callback = rock;
|
||||
@@ -356,7 +356,7 @@ static void cyrus_generic_callback(struct imclient *client,
|
||||
argv[2] = &text;
|
||||
argv[3] = &msgno;
|
||||
|
||||
if (call_user_function_ex(EG(function_table), NULL, callback->function,
|
||||
if (call_user_function_ex(EG(function_table), NULL, callback->function,
|
||||
&retval, 4, argv, 0, NULL TSRMLS_CC) == FAILURE) {
|
||||
php_error(E_WARNING, "%s(): Couldn't call the %s handler",
|
||||
get_active_function_name(TSRMLS_C), callback->trigger);
|
||||
@@ -374,8 +374,8 @@ static void cyrus_generic_callback(struct imclient *client,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* {{{ proto bool cyrus_bind( resource connection, array callbacks)
|
||||
|
||||
/* {{{ proto bool cyrus_bind( resource connection, array callbacks)
|
||||
Bind callbacks to a Cyrus IMAP connection */
|
||||
PHP_FUNCTION(cyrus_bind)
|
||||
{
|
||||
@@ -397,7 +397,7 @@ PHP_FUNCTION(cyrus_bind)
|
||||
|
||||
hash = HASH_OF(*z_callback);
|
||||
if (! hash) {
|
||||
php_error(E_WARNING,
|
||||
php_error(E_WARNING,
|
||||
"%s(): Second argument must be an array or object", get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -407,9 +407,9 @@ PHP_FUNCTION(cyrus_bind)
|
||||
zend_hash_move_forward(hash)) {
|
||||
SEPARATE_ZVAL(tmp);
|
||||
zend_hash_get_current_key(hash, &string_key, &num_key, 0);
|
||||
if (! string_key)
|
||||
if (! string_key)
|
||||
continue;
|
||||
|
||||
|
||||
if (! strcasecmp(string_key, "trigger")) {
|
||||
convert_to_string_ex(tmp);
|
||||
callback.trigger = estrndup(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
|
||||
@@ -436,7 +436,7 @@ PHP_FUNCTION(cyrus_bind)
|
||||
|
||||
callback.le = conn->id;
|
||||
|
||||
imclient_addcallback(conn->client, callback.trigger, callback.flags,
|
||||
imclient_addcallback(conn->client, callback.trigger, callback.flags,
|
||||
cyrus_generic_callback, (void **) &callback, 0);
|
||||
|
||||
RETURN_TRUE;
|
||||
@@ -458,14 +458,14 @@ PHP_FUNCTION(cyrus_unbind)
|
||||
ZEND_FETCH_RESOURCE(conn, php_cyrus *, z_conn, -1, le_cyrus_name, le_cyrus);
|
||||
convert_to_string_ex(trigger_name);
|
||||
|
||||
imclient_addcallback(conn->client, Z_STRVAL_PP(trigger_name), 0,
|
||||
imclient_addcallback(conn->client, Z_STRVAL_PP(trigger_name), 0,
|
||||
NULL, NULL, 0);
|
||||
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool cyrus_query( resource connection, string query)
|
||||
/* {{{ proto bool cyrus_query( resource connection, string query)
|
||||
Send a query to a Cyrus IMAP server */
|
||||
PHP_FUNCTION(cyrus_query)
|
||||
{
|
||||
@@ -480,7 +480,7 @@ PHP_FUNCTION(cyrus_query)
|
||||
ZEND_FETCH_RESOURCE(conn, php_cyrus *, z_conn, -1, le_cyrus_name, le_cyrus);
|
||||
convert_to_string_ex(query);
|
||||
|
||||
imclient_send(conn->client, NULL, NULL, Z_STRVAL_PP(query));
|
||||
imclient_send(conn->client, NULL, NULL, Z_STRVAL_PP(query));
|
||||
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ AC_DEFUN(AC_PREFERRED_DB_LIB,[
|
||||
|
||||
|
||||
PHP_ARG_WITH(db, for xDBM support,
|
||||
[ --with-db Include old xDBM support (deprecated use --with-dba)])
|
||||
[ --with-db Include old xDBM support (deprecated, use --enable-dba instead)])
|
||||
|
||||
if test "$PHP_DB" != "no"; then
|
||||
|
||||
|
||||
+7
-7
@@ -513,7 +513,7 @@ PHP_FUNCTION(dbminsert)
|
||||
|
||||
info = php_find_dbm(id TSRMLS_CC);
|
||||
if (!info) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -539,7 +539,7 @@ PHP_FUNCTION(dbmreplace)
|
||||
|
||||
info = php_find_dbm(id TSRMLS_CC);
|
||||
if (!info) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -607,7 +607,7 @@ PHP_FUNCTION(dbmfetch)
|
||||
|
||||
info = php_find_dbm(id TSRMLS_CC);
|
||||
if (!info) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -683,7 +683,7 @@ PHP_FUNCTION(dbmexists)
|
||||
|
||||
info = php_find_dbm(id TSRMLS_CC);
|
||||
if (!info) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -732,7 +732,7 @@ PHP_FUNCTION(dbmdelete)
|
||||
|
||||
info = php_find_dbm(id TSRMLS_CC);
|
||||
if (!info) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -779,7 +779,7 @@ PHP_FUNCTION(dbmfirstkey)
|
||||
|
||||
info = php_find_dbm(id TSRMLS_CC);
|
||||
if (!info) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -841,7 +841,7 @@ PHP_FUNCTION(dbmnextkey)
|
||||
|
||||
info = php_find_dbm(id TSRMLS_CC);
|
||||
if (!info) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
These functions build the foundation for accessing Berkeley DB style
|
||||
databases.
|
||||
|
||||
This is a general abstraction layer for several file-based databases. As
|
||||
such, functionality is limited to a common subset of features supported
|
||||
by modern databases such as Sleepycat Software's DB2. (This is not to be
|
||||
confused with IBM's DB2 software, which is supported through the ODBC
|
||||
functions.)
|
||||
|
||||
This extensions allows to work with the following databases:
|
||||
dbm DBM is the oldest (original) type of Berkeley DB style databases.
|
||||
You should avoid it, if possible. We do not support the
|
||||
compatibility functions built into DB2 and gdbm, because they are
|
||||
only compatible on the source code level, but cannot handle the
|
||||
original dbm format.
|
||||
ndbm NDBM is a newer type and more flexible than dbm. It still has
|
||||
most of the arbitrary limits of dbm (therefore it is deprecated).
|
||||
gdbm GDBM is the GNU database manager.
|
||||
db2 DB2 is Sleepycat Software's DB2. It's described as "a programmatic
|
||||
toolkit that provides high-performance built-in database support
|
||||
for both standalone and client/server applications.
|
||||
db3 DB3 is Sleepycat Software's DB3.
|
||||
db4 DB4 is Sleepycat Software's DB4. This is available since PHP 5.0.
|
||||
cdb CDB is "a fast, reliable, lightweight package for creating and
|
||||
reading constant databases." It is from the author of qmail and
|
||||
can be found at http://cr.yp.to/cdb.html. Since it is constant,
|
||||
we support only reading operations. And since PHP 4.3.0 we support
|
||||
writing (not updating) through the internal cdb library.
|
||||
cdb_make Since PHP 4.3.0 we support creation (not updating) of cdb files
|
||||
when the bundled cdb library is used.
|
||||
flatfile This is available since PHP 4.3.0 for compatibility with the
|
||||
deprecated dbm extension only and should be avoided. However you
|
||||
may use this where files were created in this format. That happens
|
||||
when configure could not find any external library.
|
||||
inifile This is available since PHP 4.3.3 to be able to modify php.ini
|
||||
files from within PHP scripts. When working with ini files you
|
||||
can pass arrays of the form array(0=>group,1=>value_name) or
|
||||
strings of the form "[group]value_name" where group is optional.
|
||||
|
||||
|
||||
After configuring and compiling PHP you must execute the following test
|
||||
from commandline:
|
||||
php run-tests.php ext/dba.
|
||||
This shows whether your combination of handlers works. Most problematic
|
||||
are dbm and ndbm which conflict with many installations. The reason for
|
||||
this is that on several systems these libraries are part of more than one
|
||||
other library. The configuration test only prevents you from configuring
|
||||
malfaunctioning single handlers but not combinations.
|
||||
+61
-46
@@ -26,10 +26,10 @@ dnl Standard check
|
||||
AC_DEFUN(PHP_DBA_STD_CHECK,[
|
||||
THIS_RESULT="yes"
|
||||
if test -z "$THIS_INCLUDE"; then
|
||||
AC_MSG_ERROR(cannot find necessary header file(s))
|
||||
AC_MSG_ERROR([DBA: Could not find necessary header file(s).])
|
||||
fi
|
||||
if test -z "$THIS_LIBS"; then
|
||||
AC_MSG_ERROR(cannot find necessary library)
|
||||
AC_MSG_ERROR([DBA: Could not find necessary library.])
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -79,13 +79,11 @@ AC_ARG_WITH(gdbm,
|
||||
|
||||
if test -n "$THIS_INCLUDE"; then
|
||||
unset ac_cv_lib_gdbm_gdbm_open
|
||||
PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[
|
||||
AC_CHECK_LIB(gdbm, gdbm_open, [
|
||||
AC_DEFINE_UNQUOTED(GDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
|
||||
AC_DEFINE(DBA_GDBM, 1, [ ])
|
||||
THIS_LIBS=gdbm
|
||||
])
|
||||
])
|
||||
PHP_CHECK_LIBRARY(gdbm, gdbm_open, [
|
||||
AC_DEFINE_UNQUOTED(GDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
|
||||
AC_DEFINE(DBA_GDBM, 1, [ ])
|
||||
THIS_LIBS=gdbm
|
||||
], [], [-L$THIS_PREFIX/lib])
|
||||
fi
|
||||
|
||||
PHP_DBA_STD_ASSIGN
|
||||
@@ -113,14 +111,14 @@ AC_ARG_WITH(ndbm,
|
||||
|
||||
if test -n "$THIS_INCLUDE"; then
|
||||
for LIB in ndbm db1 c; do
|
||||
PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[
|
||||
AC_CHECK_LIB($LIB, dbm_open, [
|
||||
AC_DEFINE_UNQUOTED(NDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
|
||||
AC_DEFINE(DBA_NDBM,1, [ ])
|
||||
THIS_LIBS=$LIB
|
||||
break
|
||||
])
|
||||
])
|
||||
PHP_CHECK_LIBRARY($LIB, dbm_open, [
|
||||
AC_DEFINE_UNQUOTED(NDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
|
||||
AC_DEFINE(DBA_NDBM, 1, [ ])
|
||||
THIS_LIBS=$LIB
|
||||
], [], [-L$THIS_PREFIX/lib])
|
||||
if test -n "$THIS_LIBS"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -200,7 +198,7 @@ AC_ARG_WITH(db4,
|
||||
[ --with-db4[=DIR] DBA: Include Berkeley DB4 support],[
|
||||
if test "$withval" != "no"; then
|
||||
PHP_DBA_STD_BEGIN
|
||||
for i in $withval /usr/local/BerkeleyDB.4.1 /usr/local/BerkeleyDB.4.0 /usr/local /usr; do
|
||||
for i in $withval /usr/local/BerkeleyDB.4.2 /usr/local/BerkeleyDB.4.1 /usr/local/BerkeleyDB.4.0 /usr/local /usr; do
|
||||
if test -f "$i/db4/db.h"; then
|
||||
THIS_PREFIX=$i
|
||||
THIS_INCLUDE=$i/db4/db.h
|
||||
@@ -223,7 +221,7 @@ AC_ARG_WITH(db4,
|
||||
break
|
||||
fi
|
||||
done
|
||||
PHP_DBA_DB_CHECK(4, db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
|
||||
PHP_DBA_DB_CHECK(4, db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
|
||||
fi
|
||||
])
|
||||
AC_DBA_STD_RESULT(db4,Berkeley DB4)
|
||||
@@ -260,7 +258,7 @@ AC_ARG_WITH(db3,
|
||||
done
|
||||
PHP_DBA_DB_CHECK(3, db-3.3 db-3.2 db-3.1 db-3.0 db-3 db3 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
|
||||
fi
|
||||
])
|
||||
])
|
||||
AC_DBA_STD_RESULT(db3,Berkeley DB3)
|
||||
|
||||
AC_ARG_WITH(db2,
|
||||
@@ -316,24 +314,22 @@ AC_ARG_WITH(dbm,
|
||||
|
||||
if test -n "$THIS_INCLUDE"; then
|
||||
for LIB in dbm c gdbm; do
|
||||
PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[
|
||||
AC_CHECK_LIB($LIB, dbminit, [
|
||||
AC_MSG_CHECKING(for DBM using GDBM)
|
||||
AC_DEFINE_UNQUOTED(DBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
|
||||
if test "$LIB" = "gdbm"; then
|
||||
AC_DEFINE_UNQUOTED(DBM_VERSION, "GDBM", [ ])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(DBM_VERSION, "DBM", [ ])
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_DEFINE(DBA_DBM,1,[ ])
|
||||
THIS_LIBS=$LIB
|
||||
])
|
||||
if test -n "$THIS_LIBS"; then
|
||||
break
|
||||
PHP_CHECK_LIBRARY($LIB, dbminit, [
|
||||
AC_MSG_CHECKING(for DBM using GDBM)
|
||||
AC_DEFINE_UNQUOTED(DBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
|
||||
if test "$LIB" = "gdbm"; then
|
||||
AC_DEFINE_UNQUOTED(DBM_VERSION, "GDBM", [ ])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(DBM_VERSION, "DBM", [ ])
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
])
|
||||
AC_DEFINE(DBA_DBM, 1, [ ])
|
||||
THIS_LIBS=$LIB
|
||||
], [], [-L$THIS_PREFIX/lib])
|
||||
if test -n "$THIS_LIBS"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -368,14 +364,14 @@ AC_ARG_WITH(cdb,
|
||||
|
||||
if test -n "$THIS_INCLUDE"; then
|
||||
for LIB in cdb c; do
|
||||
PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[
|
||||
AC_CHECK_LIB($LIB, cdb_read, [
|
||||
AC_DEFINE_UNQUOTED(CDB_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
|
||||
AC_DEFINE(DBA_CDB,1,[ ])
|
||||
THIS_LIBS=$LIB
|
||||
break
|
||||
])
|
||||
])
|
||||
PHP_CHECK_LIBRARY($LIB, cdb_read, [
|
||||
AC_DEFINE_UNQUOTED(CDB_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
|
||||
AC_DEFINE(DBA_CDB, 1, [ ])
|
||||
THIS_LIBS=$LIB
|
||||
], [], [-L$THIS_PREFIX/lib])
|
||||
if test -n "$THIS_LIBS"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -390,6 +386,24 @@ AC_ARG_WITH(cdb,
|
||||
])
|
||||
AC_DBA_STD_RESULT(cdb)
|
||||
|
||||
AC_DEFUN(PHP_DBA_BUILTIN_INI,[
|
||||
AC_DEFINE(DBA_INIFILE, 1, [ ])
|
||||
ini_sources="libinifile/inifile.c"
|
||||
THIS_RESULT="builtin"
|
||||
])
|
||||
|
||||
AC_ARG_WITH(inifile,
|
||||
[ --with-inifile DBA: Include INI support],[
|
||||
if test "$withval" != "no"; then
|
||||
PHP_DBA_BUILTIN_INI
|
||||
fi
|
||||
],[
|
||||
if test "$PHP_DBA" != "no" -o "$HAVE_DBA" = "1"; then
|
||||
PHP_DBA_BUILTIN_INI
|
||||
fi
|
||||
])
|
||||
AC_DBA_STD_RESULT(inifile,INI File)
|
||||
|
||||
AC_DEFUN(PHP_DBA_BUILTIN_FLATFILE,[
|
||||
AC_DEFINE(DBA_FLATFILE, 1, [ ])
|
||||
flat_sources="libflatfile/flatfile.c"
|
||||
@@ -415,7 +429,8 @@ AC_MSG_CHECKING(whether to enable DBA interface)
|
||||
if test "$HAVE_DBA" = "1"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_DBA, 1, [ ])
|
||||
PHP_NEW_EXTENSION(dba, dba.c dba_cdb.c dba_db2.c dba_dbm.c dba_gdbm.c dba_ndbm.c dba_db3.c dba_db4.c dba_flatfile.c $cdb_sources $flat_sources, $ext_shared)
|
||||
PHP_NEW_EXTENSION(dba, dba.c dba_cdb.c dba_db2.c dba_dbm.c dba_gdbm.c dba_ndbm.c dba_db3.c dba_db4.c dba_flatfile.c dba_inifile.c $cdb_sources $flat_sources $ini_sources, $ext_shared)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/libinifile)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/libcdb)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/libflatfile)
|
||||
PHP_SUBST(DBA_SHARED_LIBADD)
|
||||
|
||||
+268
-53
@@ -27,7 +27,7 @@
|
||||
|
||||
#if HAVE_DBA
|
||||
|
||||
#include "ext/standard/flock_compat.h"
|
||||
#include "php_ini.h"
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#ifdef HAVE_SYS_FILE_H
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "php_dba.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "ext/standard/php_string.h"
|
||||
#include "ext/standard/flock_compat.h"
|
||||
|
||||
#include "php_gdbm.h"
|
||||
#include "php_ndbm.h"
|
||||
@@ -46,14 +47,13 @@
|
||||
#include "php_db3.h"
|
||||
#include "php_db4.h"
|
||||
#include "php_flatfile.h"
|
||||
#include "php_inifile.h"
|
||||
|
||||
/* {{{ dba_functions[]
|
||||
*/
|
||||
function_entry dba_functions[] = {
|
||||
PHP_FE(dba_open, NULL)
|
||||
PHP_FE(dba_popen, NULL)
|
||||
/* Disabled until 4.3.1, when persistent STDIO streams are implemented. */
|
||||
/* PHP_FE(dba_popen, NULL) */
|
||||
PHP_FE(dba_close, NULL)
|
||||
PHP_FE(dba_delete, NULL)
|
||||
PHP_FE(dba_exists, NULL)
|
||||
@@ -105,15 +105,56 @@ ZEND_GET_MODULE(dba)
|
||||
WRONG_PARAM_COUNT; \
|
||||
}
|
||||
|
||||
/* {{{ php_dba_myke_key */
|
||||
static size_t php_dba_make_key(zval **key, char **key_str, char **key_free TSRMLS_DC)
|
||||
{
|
||||
if (Z_TYPE_PP(key) == IS_ARRAY) {
|
||||
zval **group, **name;
|
||||
HashPosition pos;
|
||||
size_t len;
|
||||
|
||||
if (zend_hash_num_elements(Z_ARRVAL_PP(key)) != 2) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Key does not have exactly two elements: (key, name)");
|
||||
return -1;
|
||||
}
|
||||
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(key), &pos);
|
||||
zend_hash_get_current_data_ex(Z_ARRVAL_PP(key), (void **) &group, &pos);
|
||||
zend_hash_move_forward_ex(Z_ARRVAL_PP(key), &pos);
|
||||
zend_hash_get_current_data_ex(Z_ARRVAL_PP(key), (void **) &name, &pos);
|
||||
convert_to_string_ex(group);
|
||||
convert_to_string_ex(name);
|
||||
if (Z_STRLEN_PP(group) == 0) {
|
||||
*key_str = Z_STRVAL_PP(name);
|
||||
*key_free = NULL;
|
||||
return Z_STRLEN_PP(name);
|
||||
}
|
||||
len = spprintf(key_str, 0, "[%s]%s", Z_STRVAL_PP(group), Z_STRVAL_PP(name));
|
||||
*key_free = *key_str;
|
||||
return len;
|
||||
} else {
|
||||
convert_to_string_ex(key);
|
||||
*key_str = Z_STRVAL_PP(key);
|
||||
*key_free = NULL;
|
||||
return Z_STRLEN_PP(key);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#define DBA_GET2 \
|
||||
zval **key; \
|
||||
char *key_str, *key_free; \
|
||||
size_t key_len; \
|
||||
if(ac != 2 || zend_get_parameters_ex(ac, &key, &id) != SUCCESS) { \
|
||||
WRONG_PARAM_COUNT; \
|
||||
} \
|
||||
convert_to_string_ex(key)
|
||||
if ((key_len = php_dba_make_key(key, &key_str, &key_free TSRMLS_CC)) == 0) {\
|
||||
RETURN_FALSE; \
|
||||
}
|
||||
|
||||
#define DBA_GET2_3 \
|
||||
zval **key; \
|
||||
char *key_str, *key_free; \
|
||||
size_t key_len; \
|
||||
zval **tmp; \
|
||||
int skip = 0; \
|
||||
switch(ac) { \
|
||||
@@ -132,7 +173,21 @@ ZEND_GET_MODULE(dba)
|
||||
default: \
|
||||
WRONG_PARAM_COUNT; \
|
||||
} \
|
||||
convert_to_string_ex(key)
|
||||
if ((key_len = php_dba_make_key(key, &key_str, &key_free TSRMLS_CC)) == 0) {\
|
||||
RETURN_FALSE; \
|
||||
}
|
||||
|
||||
#define DBA_GET3 \
|
||||
zval **key, **val; \
|
||||
char *key_str, *key_free; \
|
||||
size_t key_len; \
|
||||
if(ac != 3 || zend_get_parameters_ex(ac, &key, &val, &id) != SUCCESS) { \
|
||||
WRONG_PARAM_COUNT; \
|
||||
} \
|
||||
convert_to_string_ex(val); \
|
||||
if ((key_len = php_dba_make_key(key, &key_str, &key_free TSRMLS_CC)) == 0) {\
|
||||
RETURN_FALSE; \
|
||||
}
|
||||
|
||||
#define DBA_ID_GET \
|
||||
ZEND_FETCH_RESOURCE2(info, dba_info *, id, -1, "DBA identifier", le_db, le_pdb);
|
||||
@@ -140,7 +195,10 @@ ZEND_GET_MODULE(dba)
|
||||
#define DBA_ID_GET1 DBA_ID_PARS; DBA_GET1; DBA_ID_GET
|
||||
#define DBA_ID_GET2 DBA_ID_PARS; DBA_GET2; DBA_ID_GET
|
||||
#define DBA_ID_GET2_3 DBA_ID_PARS; DBA_GET2_3; DBA_ID_GET
|
||||
#define DBA_ID_GET3 DBA_ID_PARS; DBA_GET3; DBA_ID_GET
|
||||
|
||||
#define DBA_ID_DONE \
|
||||
if (key_free) efree(key_free)
|
||||
/* a DBA handler must have specific routines */
|
||||
|
||||
#define DBA_NAMED_HND(alias, name, flags) \
|
||||
@@ -188,14 +246,68 @@ static dba_handler handler[] = {
|
||||
#if DBA_DB4
|
||||
DBA_HND(db4, DBA_LOCK_ALL) /* No lock in lib */
|
||||
#endif
|
||||
#if DBA_INIFILE
|
||||
DBA_HND(inifile, DBA_STREAM_OPEN|DBA_LOCK_ALL) /* No lock in lib */
|
||||
#endif
|
||||
#if DBA_FLATFILE
|
||||
DBA_HND(flatfile, DBA_STREAM_OPEN|DBA_LOCK_ALL) /* No lock in lib */
|
||||
#endif
|
||||
{ NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
#if DBA_FLATFILE
|
||||
#define DBA_DEFAULT "flatfile"
|
||||
#elif DBA_DB4
|
||||
#define DBA_DEFAULT "db4"
|
||||
#elif DBA_DB3
|
||||
#define DBA_DEFAULT "db3"
|
||||
#elif DBA_DB2
|
||||
#define DBA_DEFAULT "db2"
|
||||
#elif DBA_GDBM
|
||||
#define DBA_DEFAULT "gdbm"
|
||||
#elif DBA_NBBM
|
||||
#define DBA_DEFAULT "ndbm"
|
||||
#elif DBA_DBM
|
||||
#define DBA_DEFAULT "dbm"
|
||||
#else
|
||||
#define DBA_DEFAULT ""
|
||||
#endif
|
||||
/* cdb/cdb_make and ini are no option here */
|
||||
|
||||
ZEND_BEGIN_MODULE_GLOBALS(dba)
|
||||
char *default_handler;
|
||||
dba_handler *default_hptr;
|
||||
ZEND_END_MODULE_GLOBALS(dba)
|
||||
|
||||
ZEND_DECLARE_MODULE_GLOBALS(dba)
|
||||
|
||||
#ifdef ZTS
|
||||
#define DBA_G(v) TSRMG(dba_globals_id, zend_dba_globals *, v)
|
||||
#else
|
||||
#define DBA_G(v) (dba_globals.v)
|
||||
#endif
|
||||
|
||||
static int le_db;
|
||||
static int le_pdb;
|
||||
|
||||
/* {{{ dba_fetch_resource
|
||||
PHPAPI void dba_fetch_resource(dba_info **pinfo, zval **id TSRMLS_DC)
|
||||
{
|
||||
dba_info *info;
|
||||
DBA_ID_FETCH
|
||||
*pinfo = info;
|
||||
}
|
||||
*/
|
||||
/* }}} */
|
||||
|
||||
/* {{{ dba_get_handler
|
||||
PHPAPI dba_handler *dba_get_handler(const char* handler_name)
|
||||
{
|
||||
dba_handler *hptr;
|
||||
for (hptr = handler; hptr->name && strcasecmp(hptr->name, handler_name); hptr++);
|
||||
return hptr;
|
||||
}
|
||||
*/
|
||||
/* }}} */
|
||||
|
||||
/* {{{ dba_close
|
||||
@@ -209,7 +321,11 @@ static void dba_close(dba_info *info TSRMLS_DC)
|
||||
pefree(info->path, info->flags&DBA_PERSISTENT);
|
||||
}
|
||||
if (info->fp && info->fp!=info->lock.fp) {
|
||||
php_stream_close(info->fp);
|
||||
if(info->flags&DBA_PERSISTENT) {
|
||||
php_stream_pclose(info->fp);
|
||||
} else {
|
||||
php_stream_close(info->fp);
|
||||
}
|
||||
}
|
||||
if (info->lock.fd) {
|
||||
php_flock(info->lock.fd, LOCK_UN);
|
||||
@@ -217,7 +333,11 @@ static void dba_close(dba_info *info TSRMLS_DC)
|
||||
info->lock.fd = 0;
|
||||
}
|
||||
if (info->lock.fp) {
|
||||
php_stream_close(info->lock.fp);
|
||||
if(info->flags&DBA_PERSISTENT) {
|
||||
php_stream_pclose(info->lock.fp);
|
||||
} else {
|
||||
php_stream_close(info->lock.fp);
|
||||
}
|
||||
}
|
||||
if (info->lock.name) {
|
||||
pefree(info->lock.name, info->flags&DBA_PERSISTENT);
|
||||
@@ -253,10 +373,47 @@ static void dba_close_pe_rsrc(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ PHP_INI
|
||||
*/
|
||||
ZEND_INI_MH(OnUpdateDefaultHandler)
|
||||
{
|
||||
dba_handler *hptr;
|
||||
|
||||
if (!strlen(new_value)) {
|
||||
DBA_G(default_hptr) = NULL;
|
||||
return OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
|
||||
}
|
||||
|
||||
for (hptr = handler; hptr->name && strcasecmp(hptr->name, new_value); hptr++);
|
||||
|
||||
if (!hptr->name) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No such handler: %s", new_value);
|
||||
return FAILURE;
|
||||
}
|
||||
DBA_G(default_hptr) = hptr;
|
||||
return OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
|
||||
}
|
||||
|
||||
PHP_INI_BEGIN()
|
||||
STD_PHP_INI_ENTRY("dba.default_handler", DBA_DEFAULT, PHP_INI_ALL, OnUpdateDefaultHandler, default_handler, zend_dba_globals, dba_globals)
|
||||
PHP_INI_END()
|
||||
/* }}} */
|
||||
|
||||
/* {{{ php_dba_init_globals
|
||||
*/
|
||||
static void php_dba_init_globals(zend_dba_globals *dba_globals)
|
||||
{
|
||||
dba_globals->default_handler = "";
|
||||
dba_globals->default_hptr = NULL;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ PHP_MINIT_FUNCTION
|
||||
*/
|
||||
PHP_MINIT_FUNCTION(dba)
|
||||
{
|
||||
ZEND_INIT_MODULE_GLOBALS(dba, php_dba_init_globals, NULL);
|
||||
REGISTER_INI_ENTRIES();
|
||||
le_db = zend_register_list_destructors_ex(dba_close_rsrc, NULL, "dba", module_number);
|
||||
le_pdb = zend_register_list_destructors_ex(dba_close_pe_rsrc, dba_close_rsrc, "dba persistent", module_number);
|
||||
return SUCCESS;
|
||||
@@ -267,6 +424,7 @@ PHP_MINIT_FUNCTION(dba)
|
||||
*/
|
||||
PHP_MSHUTDOWN_FUNCTION(dba)
|
||||
{
|
||||
UNREGISTER_INI_ENTRIES();
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -302,17 +460,9 @@ PHP_MINFO_FUNCTION(dba)
|
||||
*/
|
||||
static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
|
||||
{
|
||||
DBA_ID_PARS;
|
||||
zval **val, **key;
|
||||
char *v;
|
||||
int len;
|
||||
|
||||
if(ac != 3 || zend_get_parameters_ex(ac, &key, &val, &id) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_string_ex(key);
|
||||
convert_to_string_ex(val);
|
||||
DBA_ID_GET;
|
||||
DBA_ID_GET3;
|
||||
|
||||
DBA_WRITE_CHECK;
|
||||
|
||||
@@ -320,15 +470,20 @@ static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
|
||||
len = Z_STRLEN_PP(val);
|
||||
v = estrndup(Z_STRVAL_PP(val), len);
|
||||
php_stripslashes(v, &len TSRMLS_CC);
|
||||
if(info->hnd->update(info, VALLEN(key), v, len, mode TSRMLS_CC) == SUCCESS) {
|
||||
if(info->hnd->update(info, key_str, key_len, v, len, mode TSRMLS_CC) == SUCCESS) {
|
||||
efree(v);
|
||||
DBA_ID_DONE;
|
||||
RETURN_TRUE;
|
||||
}
|
||||
efree(v);
|
||||
} else {
|
||||
if(info->hnd->update(info, VALLEN(key), VALLEN(val), mode TSRMLS_CC) == SUCCESS)
|
||||
if(info->hnd->update(info, key_str, key_len, VALLEN(val), mode TSRMLS_CC) == SUCCESS)
|
||||
{
|
||||
DBA_ID_DONE;
|
||||
RETURN_TRUE;
|
||||
}
|
||||
}
|
||||
DBA_ID_DONE;
|
||||
RETURN_FALSE;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -377,7 +532,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
char mode[4], *pmode, *lock_file_mode = NULL;
|
||||
int persistent_flag = persistent ? STREAM_OPEN_PERSISTENT : 0;
|
||||
|
||||
if(ac < 3) {
|
||||
if(ac < 2) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
@@ -398,7 +553,8 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
list_entry *le;
|
||||
|
||||
/* calculate hash */
|
||||
key = emalloc(keylen);
|
||||
key = safe_emalloc(keylen, 1, 1);
|
||||
key[keylen] = '\0';
|
||||
keylen = 0;
|
||||
|
||||
for(i = 0; i < ac; i++) {
|
||||
@@ -421,7 +577,16 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
}
|
||||
}
|
||||
|
||||
for (hptr = handler; hptr->name && strcasecmp(hptr->name, Z_STRVAL_PP(args[2])); hptr++);
|
||||
if (ac==2) {
|
||||
hptr = DBA_G(default_hptr);
|
||||
if (!hptr) {
|
||||
php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "No default handler selected");
|
||||
FREENOW;
|
||||
RETURN_FALSE;
|
||||
}
|
||||
} else {
|
||||
for (hptr = handler; hptr->name && strcasecmp(hptr->name, Z_STRVAL_PP(args[2])); hptr++);
|
||||
}
|
||||
|
||||
if (!hptr->name) {
|
||||
php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "No such handler: %s", Z_STRVAL_PP(args[2]));
|
||||
@@ -483,20 +648,39 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
lock_mode = (lock_flag & DBA_LOCK_WRITER) ? LOCK_EX : 0;
|
||||
file_mode = "r+b";
|
||||
break;
|
||||
case 'c':
|
||||
modenr = DBA_CREAT;
|
||||
lock_mode = (lock_flag & DBA_LOCK_CREAT) ? LOCK_EX : 0;
|
||||
if (lock_mode) {
|
||||
if (lock_dbf) {
|
||||
/* the create/append check will be done on the lock
|
||||
* when the lib opens the file it is already created
|
||||
*/
|
||||
file_mode = "r+b"; /* read & write, seek 0 */
|
||||
lock_file_mode = "a+b"; /* append */
|
||||
} else {
|
||||
file_mode = "a+b"; /* append */
|
||||
lock_file_mode = "w+b"; /* create/truncate */
|
||||
}
|
||||
} else {
|
||||
file_mode = "a+b";
|
||||
}
|
||||
/* In case of the 'a+b' append mode, the handler is responsible
|
||||
* to handle any rewind problems (see flatfile handler).
|
||||
*/
|
||||
break;
|
||||
case 'n':
|
||||
modenr = DBA_TRUNC;
|
||||
lock_mode = (lock_flag & DBA_LOCK_TRUNC) ? LOCK_EX : 0;
|
||||
file_mode = "w+b";
|
||||
break;
|
||||
case 'c':
|
||||
modenr = DBA_CREAT;
|
||||
lock_mode = (lock_flag & DBA_LOCK_CREAT) ? LOCK_EX : 0;
|
||||
file_mode = "a+b";
|
||||
break;
|
||||
default:
|
||||
modenr = 0;
|
||||
lock_mode = 0;
|
||||
file_mode = "";
|
||||
php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "Illegal DBA mode");
|
||||
FREENOW;
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (!lock_file_mode) {
|
||||
lock_file_mode = file_mode;
|
||||
}
|
||||
if (*pmode=='d' || *pmode=='l' || *pmode=='-') {
|
||||
pmode++; /* done already - skip here */
|
||||
@@ -504,7 +688,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
if (*pmode=='t') {
|
||||
pmode++;
|
||||
if (!lock_flag) {
|
||||
php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "You cannot combine modifiers - (no lock) and t (test lock)", hptr->name);
|
||||
php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "You cannot combine modifiers - (no lock) and t (test lock)");
|
||||
FREENOW;
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -522,7 +706,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
lock_mode |= LOCK_NB; /* test =: non blocking */
|
||||
}
|
||||
}
|
||||
if (*pmode || !modenr) {
|
||||
if (*pmode) {
|
||||
php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "Illegal DBA mode");
|
||||
FREENOW;
|
||||
RETURN_FALSE;
|
||||
@@ -554,7 +738,6 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
if (!error && lock_mode) {
|
||||
if (lock_dbf) {
|
||||
info->lock.name = pestrdup(info->path, persistent);
|
||||
lock_file_mode = file_mode;
|
||||
} else {
|
||||
spprintf(&info->lock.name, 0, "%s.lck", info->path);
|
||||
if (!strcmp(file_mode, "r")) {
|
||||
@@ -577,13 +760,13 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
FREENOW;
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (php_stream_cast(info->lock.fp, PHP_STREAM_AS_FD, (void*)&info->lock.fd, 1) == FAILURE) {
|
||||
if (php_stream_cast(info->lock.fp, PHP_STREAM_AS_FD, (void*)&info->lock.fd, 1) == FAILURE) {
|
||||
dba_close(info TSRMLS_CC);
|
||||
/* stream operation already wrote an error message */
|
||||
FREENOW;
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (php_flock(info->lock.fd, lock_mode)) {
|
||||
if (php_flock(info->lock.fd, lock_mode)) {
|
||||
error = "Unable to establish lock"; /* force failure exit */
|
||||
}
|
||||
}
|
||||
@@ -633,7 +816,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
/* }}} */
|
||||
#undef FREENOW
|
||||
|
||||
/* {{{ proto int dba_popen(string path, string mode, string handlername [, string ...])
|
||||
/* {{{ proto resource dba_popen(string path, string mode [, string handlername, string ...])
|
||||
Opens path using the specified handler in mode persistently */
|
||||
PHP_FUNCTION(dba_popen)
|
||||
{
|
||||
@@ -641,7 +824,7 @@ PHP_FUNCTION(dba_popen)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int dba_open(string path, string mode, string handlername [, string ...])
|
||||
/* {{{ proto resource dba_open(string path, string mode [, string handlername, string ...])
|
||||
Opens path using the specified handler in mode*/
|
||||
PHP_FUNCTION(dba_open)
|
||||
{
|
||||
@@ -659,20 +842,22 @@ PHP_FUNCTION(dba_close)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool dba_exists(string key, int handle)
|
||||
/* {{{ proto bool dba_exists(string key, resource handle)
|
||||
Checks, if the specified key exists */
|
||||
PHP_FUNCTION(dba_exists)
|
||||
{
|
||||
DBA_ID_GET2;
|
||||
|
||||
if(info->hnd->exists(info, VALLEN(key) TSRMLS_CC) == SUCCESS) {
|
||||
if(info->hnd->exists(info, key_str, key_len TSRMLS_CC) == SUCCESS) {
|
||||
DBA_ID_DONE;
|
||||
RETURN_TRUE;
|
||||
}
|
||||
DBA_ID_DONE;
|
||||
RETURN_FALSE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string dba_fetch(string key, [int skip ,] int handle)
|
||||
/* {{{ proto string dba_fetch(string key, [int skip ,] resource handle)
|
||||
Fetches the data associated with key */
|
||||
PHP_FUNCTION(dba_fetch)
|
||||
{
|
||||
@@ -680,20 +865,43 @@ PHP_FUNCTION(dba_fetch)
|
||||
int len = 0;
|
||||
DBA_ID_GET2_3;
|
||||
|
||||
if (ac==3 && strcmp(info->hnd->name, "cdb")) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Handler %s does not support optional skip parameter", info->hnd->name);
|
||||
if (ac==3) {
|
||||
if (!strcmp(info->hnd->name, "cdb")) {
|
||||
if (skip < 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Handler %s accepts only skip values greater than or equal to zero, using skip=0", info->hnd->name);
|
||||
skip = 0;
|
||||
}
|
||||
} else if (!strcmp(info->hnd->name, "inifile")) {
|
||||
/* "-1" is compareable to 0 but allows a non restrictive
|
||||
* access which is fater. For example 'inifile' uses this
|
||||
* to allow faster access when the key was already found
|
||||
* using firstkey/nextkey. However explicitly setting the
|
||||
* value to 0 ensures the first value.
|
||||
*/
|
||||
if (skip < -1) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Handler %s accepts only skip value -1 and greater, using skip=0", info->hnd->name);
|
||||
skip = 0;
|
||||
}
|
||||
} else {
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Handler %s does not support optional skip parameter, the value will be ignored", info->hnd->name);
|
||||
skip = 0;
|
||||
}
|
||||
} else {
|
||||
skip = 0;
|
||||
}
|
||||
if((val = info->hnd->fetch(info, VALLEN(key), skip, &len TSRMLS_CC)) != NULL) {
|
||||
if((val = info->hnd->fetch(info, key_str, key_len, skip, &len TSRMLS_CC)) != NULL) {
|
||||
if (val && PG(magic_quotes_runtime)) {
|
||||
val = php_addslashes(val, len, &len, 1 TSRMLS_CC);
|
||||
}
|
||||
DBA_ID_DONE;
|
||||
RETURN_STRINGL(val, len, 0);
|
||||
}
|
||||
DBA_ID_DONE;
|
||||
RETURN_FALSE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string dba_firstkey(int handle)
|
||||
/* {{{ proto string dba_firstkey(resource handle)
|
||||
Resets the internal key pointer and returns the first key */
|
||||
PHP_FUNCTION(dba_firstkey)
|
||||
{
|
||||
@@ -708,7 +916,7 @@ PHP_FUNCTION(dba_firstkey)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string dba_nextkey(int handle)
|
||||
/* {{{ proto string dba_nextkey(resource handle)
|
||||
Returns the next key */
|
||||
PHP_FUNCTION(dba_nextkey)
|
||||
{
|
||||
@@ -723,37 +931,44 @@ PHP_FUNCTION(dba_nextkey)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool dba_delete(string key, int handle)
|
||||
Deletes the entry associated with key */
|
||||
/* {{{ proto bool dba_delete(string key, resource handle)
|
||||
Deletes the entry associated with key
|
||||
If inifile: remove all other key lines */
|
||||
PHP_FUNCTION(dba_delete)
|
||||
{
|
||||
DBA_ID_GET2;
|
||||
|
||||
DBA_WRITE_CHECK;
|
||||
|
||||
if(info->hnd->delete(info, VALLEN(key) TSRMLS_CC) == SUCCESS)
|
||||
if(info->hnd->delete(info, key_str, key_len TSRMLS_CC) == SUCCESS)
|
||||
{
|
||||
DBA_ID_DONE;
|
||||
RETURN_TRUE;
|
||||
}
|
||||
DBA_ID_DONE;
|
||||
RETURN_FALSE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool dba_insert(string key, string value, int handle)
|
||||
Inserts value as key, returns false, if key exists already */
|
||||
/* {{{ proto bool dba_insert(string key, string value, resource handle)
|
||||
If not inifile: Insert value as key, return false, if key exists already
|
||||
If inifile: Add vakue as key (next instance of key) */
|
||||
PHP_FUNCTION(dba_insert)
|
||||
{
|
||||
php_dba_update(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool dba_replace(string key, string value, int handle)
|
||||
Inserts value as key, replaces key, if key exists already */
|
||||
/* {{{ proto bool dba_replace(string key, string value, resource handle)
|
||||
Inserts value as key, replaces key, if key exists already
|
||||
If inifile: remove all other key lines */
|
||||
PHP_FUNCTION(dba_replace)
|
||||
{
|
||||
php_dba_update(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool dba_optimize(int handle)
|
||||
/* {{{ proto bool dba_optimize(resource handle)
|
||||
Optimizes (e.g. clean up, vacuum) database */
|
||||
PHP_FUNCTION(dba_optimize)
|
||||
{
|
||||
@@ -767,7 +982,7 @@ PHP_FUNCTION(dba_optimize)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool dba_sync(int handle)
|
||||
/* {{{ proto bool dba_sync(resource handle)
|
||||
Synchronizes database */
|
||||
PHP_FUNCTION(dba_sync)
|
||||
{
|
||||
|
||||
+18
-2
@@ -44,7 +44,7 @@ RSC=rc.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBA=1 /D DBA_DB3=1 /D DB3_INCLUDE_FILE="db.h" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D DBA_DB3=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBA=1 /D DBA_FLATFILE=1 /D DBA_CDB=1 /D DBA_CDB_MAKE=1 /D DBA_CDB_BUILTIN=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D DBA_DB3=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBA=1 /D DBA_FLATFILE=1 /D DBA_CDB=1 /D DBA_CDB_MAKE=1 /D DBA_CDB_BUILTIN=1 /D DBA_INIFILE=1 /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x407 /d "NDEBUG"
|
||||
@@ -71,7 +71,7 @@ LINK32=link.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBA=1 /D "DBA_DB3" /D DB3_INCLUDE_FILE="db.h" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "DBA_DB3" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBA=1 /D DBA_FLATFILE=1 /D DBA_CDB=1 /D DBA_CDB_MAKE=1 /D DBA_CDB_BUILTIN=1 /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "DBA_DB3" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBA=1 /D DBA_FLATFILE=1 /D DBA_CDB=1 /D DBA_CDB_MAKE=1 /D DBA_CDB_BUILTIN=1 /D DBA_INIFILE=1 /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x407 /d "_DEBUG"
|
||||
@@ -130,6 +130,10 @@ SOURCE=.\dba_gdbm.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dba_inifile.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dba_ndbm.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -138,6 +142,10 @@ SOURCE=.\libflatfile\flatfile.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libinifile\inifile.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libcdb\uint32.c
|
||||
# End Source File
|
||||
# End Group
|
||||
@@ -186,12 +194,20 @@ SOURCE=.\php_gdbm.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\php_inifile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\php_ndbm.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libcdb\uint32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libinifile\inifile.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -53,6 +53,10 @@ DBA_OPEN_FUNC(db2)
|
||||
struct stat check_stat;
|
||||
int s = VCWD_STAT(info->path, &check_stat);
|
||||
|
||||
if (!s && !check_stat.st_size) {
|
||||
info->mode = DBA_TRUNC; /* force truncate */
|
||||
}
|
||||
|
||||
type = info->mode == DBA_READER ? DB_UNKNOWN :
|
||||
info->mode == DBA_TRUNC ? DB_BTREE :
|
||||
s ? DB_BTREE : DB_UNKNOWN;
|
||||
|
||||
+6
-2
@@ -62,9 +62,13 @@ DBA_OPEN_FUNC(db3)
|
||||
struct stat check_stat;
|
||||
int s = VCWD_STAT(info->path, &check_stat);
|
||||
|
||||
type = info->mode == DBA_READER ? DB_UNKNOWN :
|
||||
if (!s && !check_stat.st_size) {
|
||||
info->mode = DBA_TRUNC; /* force truncate */
|
||||
}
|
||||
|
||||
type = info->mode == DBA_READER ? DB_UNKNOWN :
|
||||
info->mode == DBA_TRUNC ? DB_BTREE :
|
||||
s? DB_BTREE : DB_UNKNOWN;
|
||||
s ? DB_BTREE : DB_UNKNOWN;
|
||||
|
||||
gmode = info->mode == DBA_READER ? DB_RDONLY :
|
||||
(info->mode == DBA_CREAT && s) ? DB_CREATE :
|
||||
|
||||
+6
-2
@@ -62,9 +62,13 @@ DBA_OPEN_FUNC(db4)
|
||||
struct stat check_stat;
|
||||
int s = VCWD_STAT(info->path, &check_stat);
|
||||
|
||||
type = info->mode == DBA_READER ? DB_UNKNOWN :
|
||||
if (!s && !check_stat.st_size) {
|
||||
info->mode = DBA_TRUNC; /* force truncate */
|
||||
}
|
||||
|
||||
type = info->mode == DBA_READER ? DB_UNKNOWN :
|
||||
info->mode == DBA_TRUNC ? DB_BTREE :
|
||||
s? DB_BTREE : DB_UNKNOWN;
|
||||
s ? DB_BTREE : DB_UNKNOWN;
|
||||
|
||||
gmode = info->mode == DBA_READER ? DB_RDONLY :
|
||||
(info->mode == DBA_CREAT && s) ? DB_CREATE :
|
||||
|
||||
+38
-11
@@ -41,6 +41,25 @@
|
||||
|
||||
DBA_OPEN_FUNC(flatfile)
|
||||
{
|
||||
int fd;
|
||||
#ifdef F_SETFL
|
||||
int flags;
|
||||
#endif
|
||||
|
||||
if (info->mode != DBA_READER) {
|
||||
if (SUCCESS != php_stream_cast(info->fp, PHP_STREAM_AS_FD, (void*)&fd, 1)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not cast stream");
|
||||
return FAILURE;
|
||||
}
|
||||
#ifdef F_SETFL
|
||||
/* Needed becasue some systems do not allow to write to the original
|
||||
* file contents with O_APPEND being set.
|
||||
*/
|
||||
flags = fcntl(fd, F_SETFL);
|
||||
fcntl(fd, F_SETFL, flags & ~O_APPEND);
|
||||
#endif
|
||||
}
|
||||
|
||||
info->dbf = pemalloc(sizeof(flatfile), info->flags&DBA_PERSISTENT);
|
||||
memset(info->dbf, 0, sizeof(flatfile));
|
||||
|
||||
@@ -53,8 +72,9 @@ DBA_CLOSE_FUNC(flatfile)
|
||||
{
|
||||
FLATFILE_DATA;
|
||||
|
||||
if (dba->nextkey.dptr)
|
||||
if (dba->nextkey.dptr) {
|
||||
efree(dba->nextkey.dptr);
|
||||
}
|
||||
pefree(dba, info->flags&DBA_PERSISTENT);
|
||||
}
|
||||
|
||||
@@ -67,8 +87,10 @@ DBA_FETCH_FUNC(flatfile)
|
||||
FLATFILE_GKEY;
|
||||
|
||||
gval = flatfile_fetch(dba, gkey TSRMLS_CC);
|
||||
if(gval.dptr) {
|
||||
if(newlen) *newlen = gval.dsize;
|
||||
if (gval.dptr) {
|
||||
if (newlen) {
|
||||
*newlen = gval.dsize;
|
||||
}
|
||||
new = estrndup(gval.dptr, gval.dsize);
|
||||
efree(gval.dptr);
|
||||
}
|
||||
@@ -104,7 +126,7 @@ DBA_EXISTS_FUNC(flatfile)
|
||||
FLATFILE_GKEY;
|
||||
|
||||
gval = flatfile_fetch(dba, gkey TSRMLS_CC);
|
||||
if(gval.dptr) {
|
||||
if (gval.dptr) {
|
||||
efree(gval.dptr);
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -122,12 +144,14 @@ DBA_FIRSTKEY_FUNC(flatfile)
|
||||
{
|
||||
FLATFILE_DATA;
|
||||
|
||||
if (dba->nextkey.dptr)
|
||||
if (dba->nextkey.dptr) {
|
||||
efree(dba->nextkey.dptr);
|
||||
}
|
||||
dba->nextkey = flatfile_firstkey(dba TSRMLS_CC);
|
||||
if(dba->nextkey.dptr) {
|
||||
if(newlen)
|
||||
if (dba->nextkey.dptr) {
|
||||
if (newlen) {
|
||||
*newlen = dba->nextkey.dsize;
|
||||
}
|
||||
return estrndup(dba->nextkey.dptr, dba->nextkey.dsize);
|
||||
}
|
||||
return NULL;
|
||||
@@ -137,15 +161,18 @@ DBA_NEXTKEY_FUNC(flatfile)
|
||||
{
|
||||
FLATFILE_DATA;
|
||||
|
||||
if(!dba->nextkey.dptr)
|
||||
if (!dba->nextkey.dptr) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (dba->nextkey.dptr)
|
||||
if (dba->nextkey.dptr) {
|
||||
efree(dba->nextkey.dptr);
|
||||
}
|
||||
dba->nextkey = flatfile_nextkey(dba TSRMLS_CC);
|
||||
if(dba->nextkey.dptr) {
|
||||
if(newlen)
|
||||
if (dba->nextkey.dptr) {
|
||||
if (newlen) {
|
||||
*newlen = dba->nextkey.dsize;
|
||||
}
|
||||
return estrndup(dba->nextkey.dptr, dba->nextkey.dsize);
|
||||
}
|
||||
return NULL;
|
||||
|
||||
+10
-2
@@ -40,7 +40,12 @@
|
||||
inifile *dba = info->dbf
|
||||
|
||||
#define INIFILE_GKEY \
|
||||
key_type ini_key = inifile_key_split((char*)key) /* keylen not needed here */
|
||||
key_type ini_key; \
|
||||
if (!key) { \
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No key specified"); \
|
||||
return 0; \
|
||||
} \
|
||||
ini_key = inifile_key_split((char*)key) /* keylen not needed here */
|
||||
|
||||
#define INIFILE_DONE \
|
||||
inifile_key_free(&ini_key)
|
||||
@@ -119,9 +124,12 @@ DBA_EXISTS_FUNC(inifile)
|
||||
|
||||
DBA_DELETE_FUNC(inifile)
|
||||
{
|
||||
int res;
|
||||
|
||||
INIFILE_DATA;
|
||||
INIFILE_GKEY;
|
||||
int res = inifile_delete(dba, &ini_key TSRMLS_CC);
|
||||
|
||||
res = inifile_delete(dba, &ini_key TSRMLS_CC);
|
||||
|
||||
INIFILE_DONE;
|
||||
return (res == -1 ? FAILURE : SUCCESS);
|
||||
|
||||
@@ -87,10 +87,6 @@ inifile * inifile_alloc(php_stream *fp, int readonly, int persistent TSRMLS_DC)
|
||||
int fd = 0;
|
||||
|
||||
if (!readonly) {
|
||||
if (!php_stream_truncate_supported(fp)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't truncate this stream");
|
||||
return NULL;
|
||||
}
|
||||
if (SUCCESS != php_stream_cast(fp, PHP_STREAM_AS_FD, (void*)&fd, 1)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not cast stream");
|
||||
return NULL;
|
||||
@@ -158,7 +154,7 @@ static char *etrim(const char *str)
|
||||
return NULL;
|
||||
}
|
||||
val = (char*)str;
|
||||
while (strchr(" \t\r\n", *val)) {
|
||||
while (*val && strchr(" \t\r\n", *val)) {
|
||||
val++;
|
||||
}
|
||||
l = strlen(val);
|
||||
@@ -320,7 +316,8 @@ static int inifile_truncate(inifile *dba, size_t size TSRMLS_DC)
|
||||
{
|
||||
int res;
|
||||
|
||||
if ((res=php_stream_truncate_set_size(dba->fp, size)) != 0) {
|
||||
php_stream_flush(dba->fp);
|
||||
if ((res=ftruncate(dba->fd, size)) != 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error in ftruncate: %d", res);
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -502,7 +499,7 @@ static int inifile_delete_replace_append(inifile *dba, const key_type *key, cons
|
||||
ret = FAILURE;
|
||||
} else {
|
||||
php_stream_seek(dba->fp, 0, SEEK_END);
|
||||
if (pos_grp_next != php_stream_tell(dba->fp)) {
|
||||
if (pos_grp_next != (size_t)php_stream_tell(dba->fp)) {
|
||||
php_stream_seek(dba->fp, pos_grp_next, SEEK_SET);
|
||||
if (!php_stream_copy_to_stream(dba->fp, fp_tmp, PHP_STREAM_COPY_ALL)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not copy remainder to temporary stream");
|
||||
|
||||
@@ -37,9 +37,9 @@ database file created
|
||||
database file created
|
||||
array(3) {
|
||||
[%d]=>
|
||||
string(%d) "%sext/dba/tests/test0.dbm"
|
||||
string(%d) "%s/dba/tests/test0.dbm"
|
||||
[%d]=>
|
||||
string(%d) "%sext/dba/tests/test1.dbm"
|
||||
string(%d) "%s/dba/tests/test1.dbm"
|
||||
[%d]=>
|
||||
string(%d) "%sext/dba/tests/test2.dbm"
|
||||
}
|
||||
string(%d) "%s/dba/tests/test2.dbm"
|
||||
}
|
||||
@@ -14,7 +14,7 @@ magic_quotes_runtime=1
|
||||
require_once('test.inc');
|
||||
echo "database handler: $handler\n";
|
||||
// print md5 checksum of test.cdb which is generated by cdb_make program
|
||||
var_dump(md5(implode('',file(dirname(__FILE__).'/test.cdb'))));
|
||||
var_dump(md5_file(dirname(__FILE__).'/test.cdb'));
|
||||
if (($db_make=dba_open($db_file, "n", $handler))!==FALSE) {
|
||||
dba_insert("1", "1", $db_make);
|
||||
dba_insert("2", "2", $db_make);
|
||||
@@ -26,7 +26,7 @@ magic_quotes_runtime=1
|
||||
// dba_replace cdb_make doesn't know replace
|
||||
dba_close($db_make);
|
||||
// write md5 checksum of generated database file
|
||||
var_dump(md5(implode('',file($db_file))));
|
||||
var_dump(md5_file($db_file));
|
||||
// no need to test created database: this is done by dba_cdb_read.phpt
|
||||
} else {
|
||||
echo "Error creating database\n";
|
||||
@@ -34,5 +34,5 @@ magic_quotes_runtime=1
|
||||
?>
|
||||
--EXPECT--
|
||||
database handler: cdb_make
|
||||
string(32) "723d19f39c1b15b3b455dd64323148d1"
|
||||
string(32) "723d19f39c1b15b3b455dd64323148d1"
|
||||
string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5"
|
||||
string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5"
|
||||
@@ -36,7 +36,7 @@
|
||||
echo "Error creating database\n";
|
||||
}
|
||||
if ($handler != 'cdb') {
|
||||
$db_writer = dba_open($db_filename, 'w'.$lock_flag, $handler);
|
||||
$db_writer = dba_open($db_filename, 'c'.$lock_flag, $handler);
|
||||
if (($dba_reader = @dba_open($db_filename, 'r'.$lock_flag.($lock_flag ? 't' : ''), $handler))===false) {
|
||||
echo "Read during write: not allowed\n";
|
||||
} else {
|
||||
|
||||
+4
-4
@@ -298,7 +298,7 @@ PHP_FUNCTION(dbase_add_record)
|
||||
tmp = **field;
|
||||
zval_copy_ctor(&tmp);
|
||||
convert_to_string(&tmp);
|
||||
sprintf(t_cp, cur_f->db_format, Z_STRVAL(tmp));
|
||||
snprintf(t_cp, cur_f->db_flen+1, cur_f->db_format, Z_STRVAL(tmp));
|
||||
zval_dtor(&tmp);
|
||||
t_cp += cur_f->db_flen;
|
||||
}
|
||||
@@ -310,7 +310,7 @@ PHP_FUNCTION(dbase_add_record)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
put_dbf_info(dbh);
|
||||
put_dbf_info(dbh);
|
||||
efree(cp);
|
||||
|
||||
RETURN_TRUE;
|
||||
@@ -369,7 +369,7 @@ PHP_FUNCTION(dbase_replace_record)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_string_ex(field);
|
||||
sprintf(t_cp, cur_f->db_format, Z_STRVAL_PP(field));
|
||||
snprintf(t_cp, cur_f->db_flen+1, cur_f->db_format, Z_STRVAL_PP(field));
|
||||
t_cp += cur_f->db_flen;
|
||||
}
|
||||
|
||||
@@ -674,7 +674,7 @@ PHP_FUNCTION(dbase_create)
|
||||
|
||||
/* field type */
|
||||
if (zend_hash_index_find(Z_ARRVAL_PP (field), 1, (void **)&value) == FAILURE) {
|
||||
php_error(E_WARNING, "expected field type as sececond element of list in field %d", i);
|
||||
php_error(E_WARNING, "expected field type as second element of list in field %d", i);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_string_ex(value);
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author : Marc Boeren <marc@guidance.nl> |
|
||||
| Frank M. Kromann <frank@frontbase.com> |
|
||||
| Frank M. Kromann <frank@kromann.info> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author : Marc Boeren <marc@guidance.nl> |
|
||||
| Frank M. Kromann <frank@frontbase.com> |
|
||||
| Frank M. Kromann <frank@kromann.info> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
+32
-8
@@ -31,6 +31,15 @@
|
||||
#include <fcntl.h>
|
||||
#include <termios.h>
|
||||
|
||||
/* e.g. IRIX does not have CRTSCTS */
|
||||
#ifndef CRTSCTS
|
||||
# ifdef CNEW_RTSCTS
|
||||
# define CRTSCTS CNEW_RTSCTS
|
||||
# else
|
||||
# define CRTSCTS 0
|
||||
# endif /* CNEW_RTSCTS */
|
||||
#endif /* !CRTSCTS */
|
||||
|
||||
#define le_fd_name "Direct I/O File Descriptor"
|
||||
static int le_fd;
|
||||
|
||||
@@ -43,7 +52,7 @@ function_entry dio_functions[] = {
|
||||
PHP_FE(dio_read, NULL)
|
||||
PHP_FE(dio_write, NULL)
|
||||
PHP_FE(dio_close, NULL)
|
||||
PHP_FE(dio_tcsetattr, NULL)
|
||||
PHP_FE(dio_tcsetattr, NULL)
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
@@ -154,6 +163,10 @@ PHP_FUNCTION(dio_open)
|
||||
return;
|
||||
}
|
||||
|
||||
if (php_check_open_basedir(file_name TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(file_name, "wb+", CHECKUID_CHECK_MODE_PARAM))) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (ZEND_NUM_ARGS() == 3) {
|
||||
fd = open(file_name, flags, mode);
|
||||
} else {
|
||||
@@ -161,7 +174,7 @@ PHP_FUNCTION(dio_open)
|
||||
}
|
||||
|
||||
if (fd == -1) {
|
||||
php_error(E_WARNING, "%s(): cannot open file %s with flags %d and permissions %d: %s",
|
||||
php_error(E_WARNING, "%s(): cannot open file %s with flags %ld and permissions %ld: %s",
|
||||
get_active_function_name(TSRMLS_C), file_name, flags, mode, strerror(errno));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -186,6 +199,11 @@ PHP_FUNCTION(dio_read)
|
||||
}
|
||||
ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd);
|
||||
|
||||
if (bytes <= 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than 0.");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
data = emalloc(bytes + 1);
|
||||
res = read(f->fd, data, bytes);
|
||||
if (res <= 0) {
|
||||
@@ -214,6 +232,12 @@ PHP_FUNCTION(dio_write)
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &r_fd, &data, &data_len, &trunc_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (trunc_len < 0 || trunc_len > data_len) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "length must be greater or equal to zero and less then the length of the specified string.");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd);
|
||||
|
||||
res = write(f->fd, data, trunc_len ? trunc_len : data_len);
|
||||
@@ -240,7 +264,7 @@ PHP_FUNCTION(dio_truncate)
|
||||
ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd);
|
||||
|
||||
if (ftruncate(f->fd, offset) == -1) {
|
||||
php_error(E_WARNING, "%s(): couldn't truncate %d to %d bytes: %s",
|
||||
php_error(E_WARNING, "%s(): couldn't truncate %d to %ld bytes: %s",
|
||||
get_active_function_name(TSRMLS_C), f->fd, offset, strerror(errno));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -426,13 +450,13 @@ PHP_FUNCTION(dio_tcsetattr)
|
||||
long BAUD,DATABITS,STOPBITS,PARITYON,PARITY;
|
||||
HashTable *fh;
|
||||
zval **element;
|
||||
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz", &r_fd, &arg) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd);
|
||||
|
||||
|
||||
|
||||
if (Z_TYPE_P(arg) != IS_ARRAY) {
|
||||
zend_error(E_WARNING,"tcsetattr, third argument should be an associative array");
|
||||
return;
|
||||
@@ -464,8 +488,8 @@ PHP_FUNCTION(dio_tcsetattr)
|
||||
Parity = Z_LVAL_PP(element);
|
||||
}
|
||||
|
||||
/* assign to correct values... */
|
||||
switch (Baud_Rate) {
|
||||
/* assign to correct values... */
|
||||
switch (Baud_Rate) {
|
||||
case 38400:
|
||||
BAUD = B38400;
|
||||
break;
|
||||
@@ -561,7 +585,7 @@ PHP_FUNCTION(dio_tcsetattr)
|
||||
zend_error(E_WARNING, "invalid parity %d", Parity);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
newtio.c_cflag = BAUD | CRTSCTS | DATABITS | STOPBITS | PARITYON | PARITY | CLOCAL | CREAD;
|
||||
newtio.c_iflag = IGNPAR;
|
||||
newtio.c_oflag = 0;
|
||||
|
||||
@@ -44,7 +44,7 @@ RSC=rc.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_DOMXML" /D ZTS=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DOMXML_EXPORTS" /D "COMPILE_DL_DOMXML" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DOMXML=1 /D HAVE_DOMXSLT=1 /D LIBXML_STATIC=1 /D LIBXSLT_STATIC=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DOMXML_EXPORTS" /D "COMPILE_DL_DOMXML" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DOMXML=1 /D HAVE_DOMXSLT=1 /D LIBXML_STATIC=1 /D LIBXSLT_STATIC=1 /D "LIBXML_THREAD_ENABLED" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x406 /d "NDEBUG"
|
||||
@@ -72,7 +72,7 @@ LINK32=link.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "mssql-70" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_DOMXML" /D ZTS=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DOMXML_EXPORTS" /D "COMPILE_DL_DOMXML" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DOMXML=1 /D HAVE_DOMXSLT=1 /D LIBXML_STATIC=1 /D LIBXSLT_STATIC=1 /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DOMXML_EXPORTS" /D "COMPILE_DL_DOMXML" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DOMXML=1 /D HAVE_DOMXSLT=1 /D LIBXML_STATIC=1 /D LIBXSLT_STATIC=1 /D "LIBXML_THREAD_ENABLED" /FR /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x406 /d "NDEBUG"
|
||||
@@ -82,7 +82,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 php4ts_debug.lib libxml2_a.lib libxslt_a.lib iconv.lib resolv.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /out:"..\..\Debug_TS/php_domxml.dll" /libpath:"..\..\Debug_TS" /libpath:"..\..\..\bindlib_w32\Release" /libpath:"..\..\..\php_build\lib\libxslt"
|
||||
# ADD LINK32 php4ts_debug.lib libxml2_a.lib libxslt_a.lib iconv.lib resolv.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /nodefaultlib:"msvcrt" /out:"..\..\Debug_TS/php_domxml.dll" /libpath:"..\..\Debug_TS" /libpath:"..\..\..\bindlib_w32\Release" /libpath:"..\..\..\php_build\lib\libxslt"
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
+358
-308
File diff suppressed because it is too large.
Load diff
@@ -24,6 +24,7 @@
|
||||
#if HAVE_DOMXML
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/parserInternals.h>
|
||||
#include <libxml/SAX.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/xinclude.h>
|
||||
@@ -74,6 +75,8 @@ PHPAPI zval *php_domobject_new(xmlNodePtr obj, int *found, zval* in TSRMLS_DC);
|
||||
/* directory functions */
|
||||
PHP_MINIT_FUNCTION(domxml);
|
||||
PHP_MSHUTDOWN_FUNCTION(domxml);
|
||||
PHP_RINIT_FUNCTION(domxml);
|
||||
PHP_RSHUTDOWN_FUNCTION(domxml);
|
||||
PHP_MINFO_FUNCTION(domxml);
|
||||
PHP_FUNCTION(domxml_version);
|
||||
PHP_FUNCTION(xmldoc);
|
||||
@@ -245,4 +248,4 @@ typedef struct {
|
||||
#endif /* HAVE_DOMXML */
|
||||
#define phpext_domxml_ptr domxml_module_ptr
|
||||
|
||||
#endif /* _PHP_DIR_H */
|
||||
#endif /* _PHP_DOMXML_H */
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output method="text" encoding="UTF-8"/>
|
||||
|
||||
<xsl:key name="area" match="ROW" use="substring(translate(AREA_NAME, '"', ''), 1, 1)"/>
|
||||
|
||||
<xsl:template match="*">
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<AREA_NAME>
|
||||
<ROW>
|
||||
<AREA_CODE>13</AREA_CODE>
|
||||
<AREA_NAME>"Автово" м.</AREA_NAME>
|
||||
<AREA_NAME_ENG>m."Avtovo"</AREA_NAME_ENG>
|
||||
</ROW>
|
||||
</AREA_NAME>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Attributes via append_child not supported (bug #23326)
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$document = domxml_new_doc('1.0');
|
||||
$test = $document->create_element('test');
|
||||
$j = 0;
|
||||
for($i=0;$i<10;$i++)
|
||||
{
|
||||
if( $j < 5 )
|
||||
$j = $i;
|
||||
$test->append_child($document->create_attribute("key$j", $i));
|
||||
}
|
||||
$document->append_child($test);
|
||||
echo $document->dump_mem(1);
|
||||
?>
|
||||
--EXPECT--
|
||||
<?xml version="1.0"?>
|
||||
<test key0="0" key1="1" key2="2" key3="3" key4="4" key5="9"/>
|
||||
@@ -0,0 +1,37 @@
|
||||
--TEST--
|
||||
Bug #25900 (DomDocument->get_elements_by_tagname() doesn't work with default ns)
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$xml = <<<HERE
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<foo xmlns="http://www.example.com/ns/foo">
|
||||
<bar><test1 /></bar>
|
||||
<bar><test2 /></bar>
|
||||
</foo>
|
||||
HERE;
|
||||
|
||||
function dump($elems) {
|
||||
foreach ($elems as $elem) {
|
||||
var_dump($elem->node_name());
|
||||
if ($elem->node_type() == XML_ELEMENT_NODE) {
|
||||
dump($elem->child_nodes());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$dom = xmldoc($xml);
|
||||
$doc = $dom->document_element();
|
||||
dump($dom->get_elements_by_tagname('bar'));
|
||||
dump($doc->get_elements_by_tagname('bar'));
|
||||
?>
|
||||
--EXPECT--
|
||||
string(3) "bar"
|
||||
string(5) "test1"
|
||||
string(3) "bar"
|
||||
string(5) "test2"
|
||||
string(3) "bar"
|
||||
string(5) "test1"
|
||||
string(3) "bar"
|
||||
string(5) "test2"
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Bug #26384 (domxslt->process causes segfault with xsl:key)
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc');
|
||||
if (!function_exists("domxml_xslt_stylesheet_file")) { die("skip No XSLT support found");};
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$xml = domxml_open_mem(file_get_contents(dirname(__FILE__)."/area_name.xml"));
|
||||
$xslt = domxml_xslt_stylesheet_file(dirname(__FILE__).'/area_list.xsl');
|
||||
print $xslt->process($xml, Array(), null, null);
|
||||
|
||||
--EXPECT--
|
||||
Object
|
||||
@@ -1,8 +1,8 @@
|
||||
/* character-class table */
|
||||
static struct cclass {
|
||||
char *name;
|
||||
char *chars;
|
||||
char *multis;
|
||||
unsigned char *name;
|
||||
unsigned char *chars;
|
||||
unsigned char *multis;
|
||||
} cclasses[] = {
|
||||
{"alnum", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", ""},
|
||||
{"alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
||||
|
||||
@@ -124,9 +124,9 @@ FILE *d;
|
||||
break;
|
||||
case OCHAR:
|
||||
if (strchr("\\|()^$.[+*?{}!<> ", (char)opnd) != NULL)
|
||||
fprintf(d, "\\%c", (char)opnd);
|
||||
fprintf(d, "\\%c", (unsigned char)opnd);
|
||||
else
|
||||
fprintf(d, "%s", regchar((char)opnd));
|
||||
fprintf(d, "%s", regchar((unsigned char)opnd));
|
||||
break;
|
||||
case OBOL:
|
||||
fprintf(d, "^");
|
||||
@@ -228,11 +228,11 @@ FILE *d;
|
||||
- regchar - make a character printable
|
||||
== static char *regchar(int ch);
|
||||
*/
|
||||
static char * /* -> representation */
|
||||
static unsigned char * /* -> representation */
|
||||
regchar(ch)
|
||||
int ch;
|
||||
{
|
||||
static char buf[10];
|
||||
static unsigned char buf[10];
|
||||
|
||||
if (isprint(ch) || ch == ' ')
|
||||
sprintf(buf, "%c", ch);
|
||||
|
||||
+63
-63
@@ -33,11 +33,11 @@ struct match {
|
||||
struct re_guts *g;
|
||||
int eflags;
|
||||
regmatch_t *pmatch; /* [nsub+1] (0 element unused) */
|
||||
char *offp; /* offsets work from here */
|
||||
char *beginp; /* start of string -- virtual NUL precedes */
|
||||
char *endp; /* end of string -- virtual NUL here */
|
||||
char *coldp; /* can be no match starting before here */
|
||||
char **lastpos; /* [nplus+1] */
|
||||
unsigned char *offp; /* offsets work from here */
|
||||
unsigned char *beginp; /* start of string -- virtual NUL precedes */
|
||||
unsigned char *endp; /* end of string -- virtual NUL here */
|
||||
unsigned char *coldp; /* can be no match starting before here */
|
||||
unsigned char **lastpos; /* [nplus+1] */
|
||||
STATEVARS;
|
||||
states st; /* current states */
|
||||
states fresh; /* states for a fresh start */
|
||||
@@ -65,20 +65,20 @@ struct match {
|
||||
static int /* 0 success, REG_NOMATCH failure */
|
||||
matcher(g, string, nmatch, pmatch, eflags)
|
||||
register struct re_guts *g;
|
||||
char *string;
|
||||
unsigned char *string;
|
||||
size_t nmatch;
|
||||
regmatch_t pmatch[];
|
||||
int eflags;
|
||||
{
|
||||
register char *endp;
|
||||
register unsigned char *endp;
|
||||
register size_t i;
|
||||
struct match mv;
|
||||
register struct match *m = &mv;
|
||||
register char *dp;
|
||||
register unsigned char *dp;
|
||||
const register sopno gf = g->firststate+1; /* +1 for OEND */
|
||||
const register sopno gl = g->laststate;
|
||||
char *start;
|
||||
char *stop;
|
||||
unsigned char *start;
|
||||
unsigned char *stop;
|
||||
|
||||
/* simplify the situation where possible */
|
||||
if (g->cflags®_NOSUB)
|
||||
@@ -156,10 +156,10 @@ int eflags;
|
||||
dp = dissect(m, m->coldp, endp, gf, gl);
|
||||
} else {
|
||||
if (g->nplus > 0 && m->lastpos == NULL)
|
||||
m->lastpos = (char **)malloc((g->nplus+1) *
|
||||
sizeof(char *));
|
||||
m->lastpos = (unsigned char **)malloc((g->nplus+1) *
|
||||
sizeof(unsigned char *));
|
||||
if (g->nplus > 0 && m->lastpos == NULL) {
|
||||
free(m->pmatch);
|
||||
free((char *)m->pmatch);
|
||||
STATETEARDOWN(m);
|
||||
return(REG_ESPACE);
|
||||
}
|
||||
@@ -225,30 +225,30 @@ int eflags;
|
||||
|
||||
/*
|
||||
- dissect - figure out what matched what, no back references
|
||||
== static char *dissect(register struct match *m, char *start, \
|
||||
== char *stop, sopno startst, sopno stopst);
|
||||
== static unsigned char *dissect(register struct match *m, unsigned char *start, \
|
||||
== unsigned char *stop, sopno startst, sopno stopst);
|
||||
*/
|
||||
static char * /* == stop (success) always */
|
||||
static unsigned char * /* == stop (success) always */
|
||||
dissect(m, start, stop, startst, stopst)
|
||||
register struct match *m;
|
||||
char *start;
|
||||
char *stop;
|
||||
unsigned char *start;
|
||||
unsigned char *stop;
|
||||
sopno startst;
|
||||
sopno stopst;
|
||||
{
|
||||
register int i;
|
||||
register sopno ss; /* start sop of current subRE */
|
||||
register sopno es; /* end sop of current subRE */
|
||||
register char *sp; /* start of string matched by it */
|
||||
register char *stp; /* string matched by it cannot pass here */
|
||||
register char *rest; /* start of rest of string */
|
||||
register char *tail; /* string unmatched by rest of RE */
|
||||
register unsigned char *sp; /* start of string matched by it */
|
||||
register unsigned char *stp; /* string matched by it cannot pass here */
|
||||
register unsigned char *rest; /* start of rest of string */
|
||||
register unsigned char *tail; /* string unmatched by rest of RE */
|
||||
register sopno ssub; /* start sop of subsubRE */
|
||||
register sopno esub; /* end sop of subsubRE */
|
||||
register char *ssp; /* start of string matched by subsubRE */
|
||||
register char *sep; /* end of string matched by subsubRE */
|
||||
register char *oldssp; /* previous ssp */
|
||||
register char *dp;
|
||||
register unsigned char *ssp; /* start of string matched by subsubRE */
|
||||
register unsigned char *sep; /* end of string matched by subsubRE */
|
||||
register unsigned char *oldssp; /* previous ssp */
|
||||
register unsigned char *dp;
|
||||
|
||||
AT("diss", start, stop, startst, stopst);
|
||||
sp = start;
|
||||
@@ -413,25 +413,25 @@ sopno stopst;
|
||||
|
||||
/*
|
||||
- backref - figure out what matched what, figuring in back references
|
||||
== static char *backref(register struct match *m, char *start, \
|
||||
== char *stop, sopno startst, sopno stopst, sopno lev);
|
||||
== static unsigned char *backref(register struct match *m, unsigned char *start, \
|
||||
== unsigned char *stop, sopno startst, sopno stopst, sopno lev);
|
||||
*/
|
||||
static char * /* == stop (success) or NULL (failure) */
|
||||
static unsigned char * /* == stop (success) or NULL (failure) */
|
||||
backref(m, start, stop, startst, stopst, lev)
|
||||
register struct match *m;
|
||||
char *start;
|
||||
char *stop;
|
||||
unsigned char *start;
|
||||
unsigned char *stop;
|
||||
sopno startst;
|
||||
sopno stopst;
|
||||
sopno lev; /* PLUS nesting level */
|
||||
{
|
||||
register int i;
|
||||
register sopno ss; /* start sop of current subRE */
|
||||
register char *sp; /* start of string matched by it */
|
||||
register unsigned char *sp; /* start of string matched by it */
|
||||
register sopno ssub; /* start sop of subsubRE */
|
||||
register sopno esub; /* end sop of subsubRE */
|
||||
register char *ssp; /* start of string matched by subsubRE */
|
||||
register char *dp;
|
||||
register unsigned char *ssp; /* start of string matched by subsubRE */
|
||||
register unsigned char *dp;
|
||||
register size_t len;
|
||||
register int hard;
|
||||
register sop s;
|
||||
@@ -446,7 +446,7 @@ sopno lev; /* PLUS nesting level */
|
||||
for (ss = startst; !hard && ss < stopst; ss++)
|
||||
switch (OP(s = m->g->strip[ss])) {
|
||||
case OCHAR:
|
||||
if (sp == stop || *sp++ != (char)OPND(s))
|
||||
if (sp == stop || *sp++ != (unsigned char)OPND(s))
|
||||
return(NULL);
|
||||
break;
|
||||
case OANY:
|
||||
@@ -613,31 +613,31 @@ sopno lev; /* PLUS nesting level */
|
||||
/* "can't happen" */
|
||||
assert(nope);
|
||||
/* NOTREACHED */
|
||||
return((char *)NULL); /* dummy */
|
||||
return((unsigned char *)NULL); /* dummy */
|
||||
}
|
||||
|
||||
/*
|
||||
- fast - step through the string at top speed
|
||||
== static char *fast(register struct match *m, char *start, \
|
||||
== char *stop, sopno startst, sopno stopst);
|
||||
== static unsigned char *fast(register struct match *m, unsigned char *start, \
|
||||
== unsigned char *stop, sopno startst, sopno stopst);
|
||||
*/
|
||||
static char * /* where tentative match ended, or NULL */
|
||||
static unsigned char * /* where tentative match ended, or NULL */
|
||||
fast(m, start, stop, startst, stopst)
|
||||
register struct match *m;
|
||||
char *start;
|
||||
char *stop;
|
||||
unsigned char *start;
|
||||
unsigned char *stop;
|
||||
sopno startst;
|
||||
sopno stopst;
|
||||
{
|
||||
register states st = m->st;
|
||||
register states fresh = m->fresh;
|
||||
register states tmp = m->tmp;
|
||||
register char *p = start;
|
||||
register unsigned char *p = start;
|
||||
register int c = (start == m->beginp) ? OUT : *(start-1);
|
||||
register int lastc; /* previous c */
|
||||
register int flagch;
|
||||
register int i;
|
||||
register char *coldp; /* last p after which no match was underway */
|
||||
register unsigned char *coldp; /* last p after which no match was underway */
|
||||
|
||||
CLEAR(st);
|
||||
SET1(st, startst);
|
||||
@@ -709,26 +709,26 @@ sopno stopst;
|
||||
|
||||
/*
|
||||
- slow - step through the string more deliberately
|
||||
== static char *slow(register struct match *m, char *start, \
|
||||
== char *stop, sopno startst, sopno stopst);
|
||||
== static unsigned char *slow(register struct match *m, unsigned char *start, \
|
||||
== unsigned char *stop, sopno startst, sopno stopst);
|
||||
*/
|
||||
static char * /* where it ended */
|
||||
static unsigned char * /* where it ended */
|
||||
slow(m, start, stop, startst, stopst)
|
||||
register struct match *m;
|
||||
char *start;
|
||||
char *stop;
|
||||
unsigned char *start;
|
||||
unsigned char *stop;
|
||||
sopno startst;
|
||||
sopno stopst;
|
||||
{
|
||||
register states st = m->st;
|
||||
register states empty = m->empty;
|
||||
register states tmp = m->tmp;
|
||||
register char *p = start;
|
||||
register unsigned char *p = start;
|
||||
register int c = (start == m->beginp) ? OUT : *(start-1);
|
||||
register int lastc; /* previous c */
|
||||
register int flagch;
|
||||
register int i;
|
||||
register char *matchp; /* last p at which a match ended */
|
||||
register unsigned char *matchp; /* last p at which a match ended */
|
||||
|
||||
AT("slow", start, stop, startst, stopst);
|
||||
CLEAR(st);
|
||||
@@ -805,8 +805,8 @@ sopno stopst;
|
||||
== #define BOW (BOL+4)
|
||||
== #define EOW (BOL+5)
|
||||
== #define CODEMAX (BOL+5) // highest code used
|
||||
== #define NONCHAR(c) ((c) > CHAR_MAX)
|
||||
== #define NNONCHAR (CODEMAX-CHAR_MAX)
|
||||
== #define NONCHAR(c) ((c) > UCHAR_MAX)
|
||||
== #define NNONCHAR (CODEMAX-UCHAR_MAX)
|
||||
*/
|
||||
static states
|
||||
step(g, start, stop, bef, ch, aft)
|
||||
@@ -832,8 +832,8 @@ register states aft; /* states already known reachable after */
|
||||
break;
|
||||
case OCHAR:
|
||||
/* only characters can match */
|
||||
assert(!NONCHAR(ch) || ch != (char)OPND(s));
|
||||
if (ch == (char)OPND(s))
|
||||
assert(!NONCHAR(ch) || ch != (unsigned char)OPND(s));
|
||||
if (ch == (unsigned char)OPND(s))
|
||||
FWD(aft, bef, 1);
|
||||
break;
|
||||
case OBOL:
|
||||
@@ -926,14 +926,14 @@ register states aft; /* states already known reachable after */
|
||||
/*
|
||||
- print - print a set of states
|
||||
== #ifdef REDEBUG
|
||||
== static void print(struct match *m, char *caption, states st, \
|
||||
== static void print(struct match *m, unsigned char *caption, states st, \
|
||||
== int ch, FILE *d);
|
||||
== #endif
|
||||
*/
|
||||
static void
|
||||
print(m, caption, st, ch, d)
|
||||
struct match *m;
|
||||
char *caption;
|
||||
unsigned char *caption;
|
||||
states st;
|
||||
int ch;
|
||||
FILE *d;
|
||||
@@ -959,16 +959,16 @@ FILE *d;
|
||||
/*
|
||||
- at - print current situation
|
||||
== #ifdef REDEBUG
|
||||
== static void at(struct match *m, char *title, char *start, char *stop, \
|
||||
== static void at(struct match *m, unsigned char *title, unsigned char *start, unsigned char *stop, \
|
||||
== sopno startst, sopno stopst);
|
||||
== #endif
|
||||
*/
|
||||
static void
|
||||
at(m, title, start, stop, startst, stopst)
|
||||
struct match *m;
|
||||
char *title;
|
||||
char *start;
|
||||
char *stop;
|
||||
unsigned char *title;
|
||||
unsigned char *start;
|
||||
unsigned char *stop;
|
||||
sopno startst;
|
||||
sopno stopst;
|
||||
{
|
||||
@@ -985,7 +985,7 @@ sopno stopst;
|
||||
/*
|
||||
- pchar - make a character printable
|
||||
== #ifdef REDEBUG
|
||||
== static char *pchar(int ch);
|
||||
== static unsigned char *pchar(int ch);
|
||||
== #endif
|
||||
*
|
||||
* Is this identical to regchar() over in debug.c? Well, yes. But a
|
||||
@@ -993,11 +993,11 @@ sopno stopst;
|
||||
* a matching debug.o, and this is convenient. It all disappears in
|
||||
* the non-debug compilation anyway, so it doesn't matter much.
|
||||
*/
|
||||
static char * /* -> representation */
|
||||
static unsigned char * /* -> representation */
|
||||
pchar(ch)
|
||||
int ch;
|
||||
{
|
||||
static char pbuf[10];
|
||||
static unsigned char pbuf[10];
|
||||
|
||||
if (isprint(ch) || ch == ' ')
|
||||
sprintf(pbuf, "%c", ch);
|
||||
|
||||
+10
-10
@@ -4,11 +4,11 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* === engine.c === */
|
||||
static int matcher(register struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[], int eflags);
|
||||
static char *dissect(register struct match *m, char *start, char *stop, sopno startst, sopno stopst);
|
||||
static char *backref(register struct match *m, char *start, char *stop, sopno startst, sopno stopst, sopno lev);
|
||||
static char *fast(register struct match *m, char *start, char *stop, sopno startst, sopno stopst);
|
||||
static char *slow(register struct match *m, char *start, char *stop, sopno startst, sopno stopst);
|
||||
static int matcher(register struct re_guts *g, unsigned char *string, size_t nmatch, regmatch_t pmatch[], int eflags);
|
||||
static unsigned char *dissect(register struct match *m, unsigned char *start, unsigned char *stop, sopno startst, sopno stopst);
|
||||
static unsigned char *backref(register struct match *m, unsigned char *start, unsigned char *stop, sopno startst, sopno stopst, sopno lev);
|
||||
static unsigned char *fast(register struct match *m, unsigned char *start, unsigned char *stop, sopno startst, sopno stopst);
|
||||
static unsigned char *slow(register struct match *m, unsigned char *start, unsigned char *stop, sopno startst, sopno stopst);
|
||||
static states step(register struct re_guts *g, sopno start, sopno stop, register states bef, int ch, register states aft);
|
||||
#define BOL (OUT+1)
|
||||
#define EOL (BOL+1)
|
||||
@@ -17,16 +17,16 @@ static states step(register struct re_guts *g, sopno start, sopno stop, register
|
||||
#define BOW (BOL+4)
|
||||
#define EOW (BOL+5)
|
||||
#define CODEMAX (BOL+5) /* highest code used */
|
||||
#define NONCHAR(c) ((c) > CHAR_MAX)
|
||||
#define NNONCHAR (CODEMAX-CHAR_MAX)
|
||||
#define NONCHAR(c) ((c) > UCHAR_MAX)
|
||||
#define NNONCHAR (CODEMAX-UCHAR_MAX)
|
||||
#ifdef REDEBUG
|
||||
static void print(struct match *m, char *caption, states st, int ch, FILE *d);
|
||||
static void print(struct match *m, unsigned char *caption, states st, int ch, FILE *d);
|
||||
#endif
|
||||
#ifdef REDEBUG
|
||||
static void at(struct match *m, char *title, char *start, char *stop, sopno startst, sopno stopst);
|
||||
static void at(struct match *m, unsigned char *title, unsigned char *start, unsigned char *stop, sopno startst, sopno stopst);
|
||||
#endif
|
||||
#ifdef REDEBUG
|
||||
static char *pchar(int ch);
|
||||
static unsigned char *pchar(int ch);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
+45
-45
@@ -19,8 +19,8 @@
|
||||
* other clumsinesses
|
||||
*/
|
||||
struct parse {
|
||||
char *next; /* next character in RE */
|
||||
char *end; /* end of string (-> NUL normally) */
|
||||
unsigned char *next; /* next character in RE */
|
||||
unsigned char *end; /* end of string (-> NUL normally) */
|
||||
int error; /* has an error been seen? */
|
||||
sop *strip; /* malloced strip */
|
||||
sopno ssize; /* malloced strip size (allocated) */
|
||||
@@ -34,7 +34,7 @@ struct parse {
|
||||
|
||||
#include "regcomp.ih"
|
||||
|
||||
static char nuls[10]; /* place to point scanner in event of error */
|
||||
static unsigned char nuls[10]; /* place to point scanner in event of error */
|
||||
|
||||
/*
|
||||
* macros for use with parse structure
|
||||
@@ -127,7 +127,7 @@ int cflags;
|
||||
|
||||
/* set things up */
|
||||
p->g = g;
|
||||
p->next = (char *)pattern; /* convenience; we do not modify it */
|
||||
p->next = (unsigned char *)pattern; /* convenience; we do not modify it */
|
||||
p->end = p->next + len;
|
||||
p->error = 0;
|
||||
p->ncsalloc = 0;
|
||||
@@ -147,7 +147,7 @@ int cflags;
|
||||
g->mlen = 0;
|
||||
g->nsub = 0;
|
||||
g->ncategories = 1; /* category 0 is "everything else" */
|
||||
g->categories = &g->catspace[-(CHAR_MIN)];
|
||||
g->categories = &g->catspace[0];
|
||||
(void) memset((char *)g->catspace, 0, NC*sizeof(cat_t));
|
||||
g->backrefs = 0;
|
||||
|
||||
@@ -193,7 +193,7 @@ p_ere(p, stop)
|
||||
register struct parse *p;
|
||||
int stop; /* character this ERE should end at */
|
||||
{
|
||||
register char c;
|
||||
register unsigned char c;
|
||||
register sopno prevback = 0;
|
||||
register sopno prevfwd = 0;
|
||||
register sopno conc;
|
||||
@@ -238,7 +238,7 @@ static void
|
||||
p_ere_exp(p)
|
||||
register struct parse *p;
|
||||
{
|
||||
register char c;
|
||||
register unsigned char c;
|
||||
register sopno pos;
|
||||
register int count;
|
||||
register int count2;
|
||||
@@ -518,7 +518,7 @@ int starordinary; /* is a leading * an ordinary character? */
|
||||
REQUIRE(starordinary, REG_BADRPT);
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
ordinary(p, (char)c); /* takes off BACKSL, if any */
|
||||
ordinary(p, (unsigned char)c); /* takes off BACKSL, if any */
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -657,8 +657,8 @@ p_b_term(p, cs)
|
||||
register struct parse *p;
|
||||
register cset *cs;
|
||||
{
|
||||
register char c;
|
||||
register char start, finish;
|
||||
register unsigned char c;
|
||||
register unsigned char start, finish;
|
||||
register int i;
|
||||
|
||||
/* classify what we've got */
|
||||
@@ -723,11 +723,11 @@ p_b_cclass(p, cs)
|
||||
register struct parse *p;
|
||||
register cset *cs;
|
||||
{
|
||||
register char *sp = p->next;
|
||||
register unsigned char *sp = p->next;
|
||||
register struct cclass *cp;
|
||||
register size_t len;
|
||||
register char *u;
|
||||
register char c;
|
||||
register unsigned char *u;
|
||||
register unsigned char c;
|
||||
|
||||
while (MORE() && isalpha(PEEK()))
|
||||
NEXT();
|
||||
@@ -759,7 +759,7 @@ p_b_eclass(p, cs)
|
||||
register struct parse *p;
|
||||
register cset *cs;
|
||||
{
|
||||
register char c;
|
||||
register unsigned char c;
|
||||
|
||||
c = p_b_coll_elem(p, '=');
|
||||
CHadd(cs, c);
|
||||
@@ -769,11 +769,11 @@ register cset *cs;
|
||||
- p_b_symbol - parse a character or [..]ed multicharacter collating symbol
|
||||
== static char p_b_symbol(register struct parse *p);
|
||||
*/
|
||||
static char /* value of symbol */
|
||||
static unsigned char /* value of symbol */
|
||||
p_b_symbol(p)
|
||||
register struct parse *p;
|
||||
{
|
||||
register char value;
|
||||
register unsigned char value;
|
||||
|
||||
REQUIRE(MORE(), REG_EBRACK);
|
||||
if (!EATTWO('[', '.'))
|
||||
@@ -789,12 +789,12 @@ register struct parse *p;
|
||||
- p_b_coll_elem - parse a collating-element name and look it up
|
||||
== static char p_b_coll_elem(register struct parse *p, int endc);
|
||||
*/
|
||||
static char /* value of collating element */
|
||||
static unsigned char /* value of collating element */
|
||||
p_b_coll_elem(p, endc)
|
||||
register struct parse *p;
|
||||
int endc; /* name ended by endc,']' */
|
||||
{
|
||||
register char *sp = p->next;
|
||||
register unsigned char *sp = p->next;
|
||||
register struct cname *cp;
|
||||
register int len;
|
||||
|
||||
@@ -818,7 +818,7 @@ int endc; /* name ended by endc,']' */
|
||||
- othercase - return the case counterpart of an alphabetic
|
||||
== static char othercase(int ch);
|
||||
*/
|
||||
static char /* if no counterpart, return ch */
|
||||
static unsigned char /* if no counterpart, return ch */
|
||||
othercase(ch)
|
||||
int ch;
|
||||
{
|
||||
@@ -842,9 +842,9 @@ bothcases(p, ch)
|
||||
register struct parse *p;
|
||||
int ch;
|
||||
{
|
||||
register char *oldnext = p->next;
|
||||
register char *oldend = p->end;
|
||||
char bracket[3];
|
||||
register unsigned char *oldnext = p->next;
|
||||
register unsigned char *oldend = p->end;
|
||||
unsigned char bracket[3];
|
||||
|
||||
assert(othercase(ch) != ch); /* p_bracket() would recurse */
|
||||
p->next = bracket;
|
||||
@@ -888,9 +888,9 @@ static void
|
||||
nonnewline(p)
|
||||
register struct parse *p;
|
||||
{
|
||||
register char *oldnext = p->next;
|
||||
register char *oldend = p->end;
|
||||
char bracket[4];
|
||||
register unsigned char *oldnext = p->next;
|
||||
register unsigned char *oldend = p->end;
|
||||
unsigned char bracket[4];
|
||||
|
||||
p->next = bracket;
|
||||
p->end = bracket+3;
|
||||
@@ -1015,19 +1015,19 @@ register struct parse *p;
|
||||
if (p->g->sets == NULL)
|
||||
p->g->sets = (cset *)malloc(nc * sizeof(cset));
|
||||
else
|
||||
p->g->sets = (cset *)realloc((char *)p->g->sets,
|
||||
p->g->sets = (cset *)realloc((unsigned char *)p->g->sets,
|
||||
nc * sizeof(cset));
|
||||
if (p->g->setbits == NULL)
|
||||
p->g->setbits = (uch *)malloc(nbytes);
|
||||
else {
|
||||
p->g->setbits = (uch *)realloc((char *)p->g->setbits,
|
||||
p->g->setbits = (uch *)realloc((unsigned char *)p->g->setbits,
|
||||
nbytes);
|
||||
/* xxx this isn't right if setbits is now NULL */
|
||||
for (i = 0; i < no; i++)
|
||||
p->g->sets[i].ptr = p->g->setbits + css*(i/CHAR_BIT);
|
||||
}
|
||||
if (p->g->sets != NULL && p->g->setbits != NULL)
|
||||
(void) memset((char *)p->g->setbits + (nbytes - css),
|
||||
(void) memset((unsigned char *)p->g->setbits + (nbytes - css),
|
||||
0, css);
|
||||
else {
|
||||
no = 0;
|
||||
@@ -1120,7 +1120,7 @@ register cset *cs;
|
||||
|
||||
for (i = 0; i < css; i++)
|
||||
if (CHIN(cs, i))
|
||||
return((char)i);
|
||||
return((unsigned char)i);
|
||||
assert(never);
|
||||
return(0); /* arbitrary */
|
||||
}
|
||||
@@ -1153,7 +1153,7 @@ static void
|
||||
mcadd(p, cs, cp)
|
||||
register struct parse *p;
|
||||
register cset *cs;
|
||||
register char *cp;
|
||||
register unsigned char *cp;
|
||||
{
|
||||
register size_t oldend = cs->smultis;
|
||||
|
||||
@@ -1174,14 +1174,14 @@ register char *cp;
|
||||
#if 0
|
||||
/*
|
||||
- mcsub - subtract a collating element from a cset
|
||||
== static void mcsub(register cset *cs, register char *cp);
|
||||
== static void mcsub(register cset *cs, register unsigned char *cp);
|
||||
*/
|
||||
static void
|
||||
mcsub(cs, cp)
|
||||
register cset *cs;
|
||||
register char *cp;
|
||||
register unsigned cset *cs;
|
||||
register unsigned char *cp;
|
||||
{
|
||||
register char *fp = mcfind(cs, cp);
|
||||
register unsigned char *fp = mcfind(cs, cp);
|
||||
register size_t len = strlen(fp);
|
||||
|
||||
assert(fp != NULL);
|
||||
@@ -1201,12 +1201,12 @@ register char *cp;
|
||||
|
||||
/*
|
||||
- mcin - is a collating element in a cset?
|
||||
== static int mcin(register cset *cs, register char *cp);
|
||||
== static int mcin(register cset *cs, register unsigned char *cp);
|
||||
*/
|
||||
static int
|
||||
mcin(cs, cp)
|
||||
register cset *cs;
|
||||
register char *cp;
|
||||
register unsigned char *cp;
|
||||
{
|
||||
return(mcfind(cs, cp) != NULL);
|
||||
}
|
||||
@@ -1214,14 +1214,14 @@ register char *cp;
|
||||
|
||||
/*
|
||||
- mcfind - find a collating element in a cset
|
||||
== static char *mcfind(register cset *cs, register char *cp);
|
||||
== static unsigned char *mcfind(register cset *cs, register unsigned char *cp);
|
||||
*/
|
||||
static char *
|
||||
static unsigned char *
|
||||
mcfind(cs, cp)
|
||||
register cset *cs;
|
||||
register char *cp;
|
||||
register unsigned char *cp;
|
||||
{
|
||||
register char *p;
|
||||
register unsigned char *p;
|
||||
|
||||
if (cs->multis == NULL)
|
||||
return(NULL);
|
||||
@@ -1322,11 +1322,11 @@ register struct re_guts *g;
|
||||
if (p->error != 0)
|
||||
return;
|
||||
|
||||
for (c = CHAR_MIN; c <= CHAR_MAX; c++)
|
||||
for (c = 0; c <= UCHAR_MAX; c++)
|
||||
if (cats[c] == 0 && isinsets(g, c)) {
|
||||
cat = g->ncategories++;
|
||||
cats[c] = cat;
|
||||
for (c2 = c+1; c2 <= CHAR_MAX; c2++)
|
||||
for (c2 = c+1; c2 <= UCHAR_MAX; c2++)
|
||||
if (cats[c2] == 0 && samesets(g, c, c2))
|
||||
cats[c2] = cat;
|
||||
}
|
||||
@@ -1477,7 +1477,7 @@ register struct parse *p;
|
||||
register struct re_guts *g;
|
||||
{
|
||||
g->nstates = p->slen;
|
||||
g->strip = (sop *)realloc((char *)p->strip, p->slen * sizeof(sop));
|
||||
g->strip = (sop *)realloc((unsigned char *)p->strip, p->slen * sizeof(sop));
|
||||
if (g->strip == NULL) {
|
||||
SETERROR(REG_ESPACE);
|
||||
g->strip = p->strip;
|
||||
@@ -1504,7 +1504,7 @@ register struct re_guts *g;
|
||||
register sop *newstart = NULL;
|
||||
register sopno newlen;
|
||||
register sop s;
|
||||
register char *cp;
|
||||
register unsigned char *cp;
|
||||
register sopno i;
|
||||
|
||||
/* avoid making error situations worse */
|
||||
@@ -1565,7 +1565,7 @@ register struct re_guts *g;
|
||||
while (OP(s = *scan++) != OCHAR)
|
||||
continue;
|
||||
assert(cp < g->must + g->mlen);
|
||||
*cp++ = (char)OPND(s);
|
||||
*cp++ = (unsigned char)OPND(s);
|
||||
}
|
||||
assert(cp == g->must + g->mlen);
|
||||
*cp++ = '\0'; /* just on general principles */
|
||||
|
||||
@@ -14,9 +14,9 @@ static void p_bracket(register struct parse *p);
|
||||
static void p_b_term(register struct parse *p, register cset *cs);
|
||||
static void p_b_cclass(register struct parse *p, register cset *cs);
|
||||
static void p_b_eclass(register struct parse *p, register cset *cs);
|
||||
static char p_b_symbol(register struct parse *p);
|
||||
static char p_b_coll_elem(register struct parse *p, int endc);
|
||||
static char othercase(int ch);
|
||||
static unsigned char p_b_symbol(register struct parse *p);
|
||||
static unsigned char p_b_coll_elem(register struct parse *p, int endc);
|
||||
static unsigned char othercase(int ch);
|
||||
static void bothcases(register struct parse *p, int ch);
|
||||
static void ordinary(register struct parse *p, register int ch);
|
||||
static void nonnewline(register struct parse *p);
|
||||
@@ -27,11 +27,11 @@ static void freeset(register struct parse *p, register cset *cs);
|
||||
static int freezeset(register struct parse *p, register cset *cs);
|
||||
static int firstch(register struct parse *p, register cset *cs);
|
||||
static int nch(register struct parse *p, register cset *cs);
|
||||
static void mcadd(register struct parse *p, register cset *cs, register char *cp);
|
||||
static void mcadd(register struct parse *p, register cset *cs, register unsigned char *cp);
|
||||
#if 0
|
||||
static void mcsub(register cset *cs, register char *cp);
|
||||
static int mcin(register cset *cs, register char *cp);
|
||||
static char *mcfind(register cset *cs, register char *cp);
|
||||
static void mcsub(register cset *cs, register unsigned char *cp);
|
||||
static int mcin(register cset *cs, register unsigned char *cp);
|
||||
static unsigned char *mcfind(register cset *cs, register unsigned char *cp);
|
||||
#endif
|
||||
static void mcinvert(register struct parse *p, register cset *cs);
|
||||
static void mccase(register struct parse *p, register cset *cs);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
= typedef struct {
|
||||
= int re_magic;
|
||||
= size_t re_nsub; // number of parenthesized subexpressions
|
||||
= const char *re_endp; // end pointer for REG_PEND
|
||||
= const unsigned char *re_endp; // end pointer for REG_PEND
|
||||
= struct re_guts *re_g; // none of your business :-)
|
||||
= } regex_t;
|
||||
= typedef struct {
|
||||
@@ -90,7 +90,7 @@ typedef struct {
|
||||
uch mask; /* bit within array */
|
||||
uch hash; /* hash code */
|
||||
size_t smultis;
|
||||
char *multis; /* -> char[smulti] ab\0cd\0ef\0\0 */
|
||||
unsigned char *multis; /* -> char[smulti] ab\0cd\0ef\0\0 */
|
||||
} cset;
|
||||
/* note that CHadd and CHsub are unsafe, and CHIN doesn't yield 0/1 */
|
||||
#define CHadd(cs, c) ((cs)->ptr[(uch)(c)] |= (cs)->mask, (cs)->hash += (c))
|
||||
@@ -125,8 +125,8 @@ struct re_guts {
|
||||
int nbol; /* number of ^ used */
|
||||
int neol; /* number of $ used */
|
||||
int ncategories; /* how many character categories */
|
||||
cat_t *categories; /* ->catspace[-CHAR_MIN] */
|
||||
char *must; /* match must contain this string */
|
||||
cat_t *categories; /* ->catspace[-UCHAR_MIN] */
|
||||
unsigned char *must; /* match must contain this string */
|
||||
int mlen; /* length of must */
|
||||
size_t nsub; /* copy of re_nsub */
|
||||
int backrefs; /* does it use back references? */
|
||||
@@ -136,5 +136,5 @@ struct re_guts {
|
||||
};
|
||||
|
||||
/* misc utilities */
|
||||
#define OUT (CHAR_MAX+1) /* a non-character value */
|
||||
#define OUT (UCHAR_MAX+1) /* a non-character value */
|
||||
#define ISWORD(c) (isalnum(c) || (c) == '_')
|
||||
@@ -67,14 +67,14 @@ static int nope = 0; /* for use in asserts; shuts lint up */
|
||||
#undef SNAMES
|
||||
|
||||
/* macros for manipulating states, large version */
|
||||
#define states char *
|
||||
#define states unsigned char *
|
||||
#define CLEAR(v) memset(v, 0, m->g->nstates)
|
||||
#define SET0(v, n) ((v)[n] = 0)
|
||||
#define SET1(v, n) ((v)[n] = 1)
|
||||
#define ISSET(v, n) ((v)[n])
|
||||
#define ASSIGN(d, s) memcpy(d, s, m->g->nstates)
|
||||
#define EQ(a, b) (memcmp(a, b, m->g->nstates) == 0)
|
||||
#define STATEVARS int vn; char *space
|
||||
#define STATEVARS int vn; unsigned char *space
|
||||
#define STATESETUP(m, nv) { (m)->space = malloc((nv)*(m)->g->nstates); \
|
||||
if ((m)->space == NULL) return(REG_ESPACE); \
|
||||
(m)->vn = 0; }
|
||||
@@ -132,7 +132,7 @@ int eflags;
|
||||
eflags = GOODFLAGS(eflags);
|
||||
|
||||
if (g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags®_LARGE))
|
||||
return(smatcher(g, (char *)string, nmatch, pmatch, eflags));
|
||||
return(smatcher(g, (unsigned char *)string, nmatch, pmatch, eflags));
|
||||
else
|
||||
return(lmatcher(g, (char *)string, nmatch, pmatch, eflags));
|
||||
return(lmatcher(g, (unsigned char *)string, nmatch, pmatch, eflags));
|
||||
}
|
||||
+120
-207
@@ -70,6 +70,10 @@
|
||||
|
||||
typedef unsigned char uchar;
|
||||
|
||||
#ifndef safe_emalloc
|
||||
# define safe_emalloc(a,b,c) emalloc((a)*(b)+(c))
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
# define TRUE 1
|
||||
# define FALSE 0
|
||||
@@ -130,22 +134,22 @@ ZEND_DECLARE_MODULE_GLOBALS(exif)
|
||||
/* {{{ PHP_INI
|
||||
*/
|
||||
|
||||
ZEND_API ZEND_INI_MH(OnUpdateEncode)
|
||||
ZEND_INI_MH(OnUpdateEncode)
|
||||
{
|
||||
#if EXIF_USE_MBSTRING
|
||||
if (new_value && strlen(new_value) && !php_mb_check_encoding_list(new_value TSRMLS_CC)) {
|
||||
php_error_docref( NULL TSRMLS_CC, E_WARNING, "Illegal encoding ignored: '%s'", new_value);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Illegal encoding ignored: '%s'", new_value);
|
||||
return FAILURE;
|
||||
}
|
||||
#endif
|
||||
return OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
|
||||
}
|
||||
|
||||
ZEND_API ZEND_INI_MH(OnUpdateDecode)
|
||||
ZEND_INI_MH(OnUpdateDecode)
|
||||
{
|
||||
#if EXIF_USE_MBSTRING
|
||||
if (!php_mb_check_encoding_list(new_value TSRMLS_CC)) {
|
||||
php_error_docref( NULL TSRMLS_CC, E_WARNING, "Illegal encoding ignored: '%s'", new_value);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Illegal encoding ignored: '%s'", new_value);
|
||||
return FAILURE;
|
||||
}
|
||||
#endif
|
||||
@@ -234,17 +238,15 @@ static size_t php_strnlen(char* str, size_t maxlen) {
|
||||
|
||||
/* {{{ error messages
|
||||
*/
|
||||
static const char * EXIF_ERROR_EALLOC = "Cannot allocate memory for all data";
|
||||
static const char * EXIF_ERROR_FILEEOF = "Unexpected end of file reached";
|
||||
static const char * EXIF_ERROR_CORRUPT = "File structure corrupted";
|
||||
static const char * EXIF_ERROR_THUMBEOF = "Thumbnail goes IFD boundary or end of file reached";
|
||||
static const char * EXIF_ERROR_FSREALLOC = "Illegal reallocating of undefined file section";
|
||||
|
||||
#define EXIF_ERRLOG_EALLOC php_error_docref(NULL TSRMLS_CC, E_ERROR, EXIF_ERROR_EALLOC);
|
||||
#define EXIF_ERRLOG_FILEEOF php_error_docref(NULL TSRMLS_CC, E_WARNING, EXIF_ERROR_FILEEOF);
|
||||
#define EXIF_ERRLOG_CORRUPT php_error_docref(NULL TSRMLS_CC, E_WARNING, EXIF_ERROR_CORRUPT);
|
||||
#define EXIF_ERRLOG_THUMBEOF php_error_docref(NULL TSRMLS_CC, E_WARNING, EXIF_ERROR_THUMBEOF);
|
||||
#define EXIF_ERRLOG_FSREALLOC php_error_docref(NULL TSRMLS_CC, E_WARNING, EXIF_ERROR_FSREALLOC);
|
||||
#define EXIF_ERRLOG_FILEEOF php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", EXIF_ERROR_FILEEOF);
|
||||
#define EXIF_ERRLOG_CORRUPT php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", EXIF_ERROR_CORRUPT);
|
||||
#define EXIF_ERRLOG_THUMBEOF php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", EXIF_ERROR_THUMBEOF);
|
||||
#define EXIF_ERRLOG_FSREALLOC php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", EXIF_ERROR_FSREALLOC);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ format description defines
|
||||
@@ -993,11 +995,11 @@ static unsigned char* exif_char_dump(unsigned char * addr, int len, int offset)
|
||||
p += sprintf(buf+p, "\n%08X: ", i+offset);
|
||||
}
|
||||
if (i<len) {
|
||||
c = *addr++;
|
||||
c = *addr++;
|
||||
p += sprintf(buf+p, "%02X ", c);
|
||||
tmp[i%16] = c>=32 ? c : '.';
|
||||
tmp[(i%16)+1] = '\0';
|
||||
} else {
|
||||
} else {
|
||||
p += sprintf(buf+p, " ");
|
||||
}
|
||||
if (i%16==15) {
|
||||
@@ -1137,12 +1139,12 @@ static double exif_convert_any_format(void *value, int format, int motorola_inte
|
||||
/* Not sure if this is correct (never seen float used in Exif format) */
|
||||
case TAG_FMT_SINGLE:
|
||||
#ifdef EXIF_DEBUG
|
||||
php_error_docref( NULL TSRMLS_CC, E_NOTICE, "Found value of type single");
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Found value of type single");
|
||||
#endif
|
||||
return (double)*(float *)value;
|
||||
case TAG_FMT_DOUBLE:
|
||||
#ifdef EXIF_DEBUG
|
||||
php_error_docref( NULL TSRMLS_CC, E_NOTICE, "Found value of type double");
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Found value of type double");
|
||||
#endif
|
||||
return *(double *)value;
|
||||
}
|
||||
@@ -1186,12 +1188,12 @@ static size_t exif_convert_any_to_int(void *value, int format, int motorola_inte
|
||||
/* Not sure if this is correct (never seen float used in Exif format) */
|
||||
case TAG_FMT_SINGLE:
|
||||
#ifdef EXIF_DEBUG
|
||||
php_error_docref( NULL TSRMLS_CC, E_NOTICE, "Found value of type single");
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Found value of type single");
|
||||
#endif
|
||||
return (size_t)*(float *)value;
|
||||
case TAG_FMT_DOUBLE:
|
||||
#ifdef EXIF_DEBUG
|
||||
php_error_docref( NULL TSRMLS_CC, E_NOTICE, "Found value of type double");
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Found value of type double");
|
||||
#endif
|
||||
return (size_t)*(double *)value;
|
||||
}
|
||||
@@ -1299,7 +1301,7 @@ static char *exif_get_sectionname(int section)
|
||||
return "";
|
||||
}
|
||||
|
||||
static const tag_table_type exif_get_tag_table(int section)
|
||||
static tag_table_type exif_get_tag_table(int section)
|
||||
{
|
||||
switch(section) {
|
||||
case SECTION_FILE: return &tag_table_IFD[0];
|
||||
@@ -1332,10 +1334,6 @@ static char *exif_get_sectionlist(int sectionlist TSRMLS_DC)
|
||||
len += strlen(exif_get_sectionname(i))+2;
|
||||
}
|
||||
sections = safe_emalloc(len, 1, 1);
|
||||
if (!sections) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return NULL;
|
||||
}
|
||||
sections[0] = '\0';
|
||||
len = 0;
|
||||
for(i=0; i<SECTION_COUNT; i++) {
|
||||
@@ -1468,9 +1466,6 @@ static int exif_file_sections_add(image_info_type *ImageInfo, int type, size_t s
|
||||
int count = ImageInfo->file.count;
|
||||
|
||||
tmp = erealloc(ImageInfo->file.list, (count+1)*sizeof(file_section));
|
||||
if (tmp == NULL) {
|
||||
return 0;
|
||||
}
|
||||
ImageInfo->file.list = tmp;
|
||||
ImageInfo->file.list[count].type = 0xFFFF;
|
||||
ImageInfo->file.list[count].data = NULL;
|
||||
@@ -1479,9 +1474,7 @@ static int exif_file_sections_add(image_info_type *ImageInfo, int type, size_t s
|
||||
if (!size) {
|
||||
data = NULL;
|
||||
} else if (data == NULL) {
|
||||
if ((data = emalloc(size)) == NULL) {
|
||||
return -1;
|
||||
}
|
||||
data = emalloc(size);
|
||||
}
|
||||
ImageInfo->file.list[count].type = type;
|
||||
ImageInfo->file.list[count].data = data;
|
||||
@@ -1497,14 +1490,14 @@ static int exif_file_sections_realloc(image_info_type *ImageInfo, int section_in
|
||||
{
|
||||
void *tmp;
|
||||
|
||||
/* This is not a malloc/realloc check. It is a plausibility check for the
|
||||
* function parameters (requirements engineering).
|
||||
*/
|
||||
if (section_index >= ImageInfo->file.count) {
|
||||
EXIF_ERRLOG_FSREALLOC
|
||||
return -1;
|
||||
}
|
||||
if (!(tmp = erealloc(ImageInfo->file.list[section_index].data, size)) && size) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return -1;
|
||||
}
|
||||
tmp = erealloc(ImageInfo->file.list[section_index].data, size);
|
||||
ImageInfo->file.list[section_index].data = tmp;
|
||||
ImageInfo->file.list[section_index].size = size;
|
||||
return 0;
|
||||
@@ -1532,7 +1525,7 @@ static int exif_file_sections_free(image_info_type *ImageInfo)
|
||||
/* {{{ exif_iif_add_value
|
||||
Add a value to image_info
|
||||
*/
|
||||
static void exif_iif_add_value(image_info_type *image_info, int section_index, char *name, int tag, int format, size_t length, void* value, int motorola_intel TSRMLS_DC)
|
||||
static void exif_iif_add_value(image_info_type *image_info, int section_index, char *name, int tag, int format, int length, void* value, int motorola_intel TSRMLS_DC)
|
||||
{
|
||||
size_t idex;
|
||||
void *vptr;
|
||||
@@ -1545,10 +1538,6 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
|
||||
}
|
||||
|
||||
list = erealloc(image_info->info_list[section_index].list, (image_info->info_list[section_index].count+1)*sizeof(image_info_data));
|
||||
if (!list) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return;
|
||||
}
|
||||
image_info->info_list[section_index].list = list;
|
||||
|
||||
info_data = &image_info->info_list[section_index].list[image_info->info_list[section_index].count];
|
||||
@@ -1556,27 +1545,22 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
|
||||
info_data->format = format;
|
||||
info_data->length = length;
|
||||
info_data->name = estrdup(name);
|
||||
if (!info_data->name) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return;
|
||||
}
|
||||
info_value = &info_data->value;
|
||||
|
||||
switch (format) {
|
||||
case TAG_FMT_STRING:
|
||||
if (value) {
|
||||
length = php_strnlen(value, length);
|
||||
if (PG(magic_quotes_runtime)) {
|
||||
info_value->s = php_addslashes(value, length, &length, 0 TSRMLS_CC);
|
||||
} else {
|
||||
info_value->s = estrndup(value, length);
|
||||
}
|
||||
info_data->length = length;
|
||||
info_value->s = estrndup(value, length);
|
||||
} else {
|
||||
info_data->length = 0;
|
||||
info_value->s = estrdup("");
|
||||
}
|
||||
if (!info_value->s) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
info_data->length = 0;
|
||||
break; /* better return with "" instead of possible causing problems */
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1593,15 +1577,17 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
|
||||
break;
|
||||
case TAG_FMT_UNDEFINED:
|
||||
if (value) {
|
||||
info_value->s = estrndup(value, length);
|
||||
/* do not recompute length here */
|
||||
if (PG(magic_quotes_runtime)) {
|
||||
info_value->s = php_addslashes(value, length, &length, 0 TSRMLS_CC);
|
||||
} else {
|
||||
info_value->s = estrndup(value, length);
|
||||
}
|
||||
info_data->length = length;
|
||||
} else {
|
||||
info_data->length = 0;
|
||||
info_value->s = estrdup("");
|
||||
}
|
||||
if (!info_value->s) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case TAG_FMT_USHORT:
|
||||
@@ -1616,15 +1602,11 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
|
||||
break;
|
||||
} else
|
||||
if (length>1) {
|
||||
info_data->value.list = safe_emalloc(length, sizeof(image_info_value), 1);
|
||||
if (!info_data->value.list) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return;
|
||||
}
|
||||
info_value->list = safe_emalloc(length, sizeof(image_info_value), 0);
|
||||
} else {
|
||||
info_value = &info_data->value;
|
||||
}
|
||||
for (idex=0,vptr=value; idex<length; idex++,vptr=(char *) vptr + php_tiff_bytes_per_format[format]) {
|
||||
for (idex=0,vptr=value; idex<(size_t)length; idex++,vptr=(char *) vptr + php_tiff_bytes_per_format[format]) {
|
||||
if (length>1) {
|
||||
info_value = &info_data->value.list[idex];
|
||||
}
|
||||
@@ -1657,13 +1639,13 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
|
||||
|
||||
case TAG_FMT_SINGLE:
|
||||
#ifdef EXIF_DEBUG
|
||||
php_error_docref( NULL TSRMLS_CC, E_WARNING, "Found value of type single");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Found value of type single");
|
||||
#endif
|
||||
info_value->f = *(float *)value;
|
||||
|
||||
case TAG_FMT_DOUBLE:
|
||||
#ifdef EXIF_DEBUG
|
||||
php_error_docref( NULL TSRMLS_CC, E_WARNING, "Found value of type double");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Found value of type double");
|
||||
#endif
|
||||
info_value->d = *(double *)value;
|
||||
break;
|
||||
@@ -1680,7 +1662,7 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
|
||||
*/
|
||||
static void exif_iif_add_tag(image_info_type *image_info, int section_index, char *name, int tag, int format, size_t length, void* value TSRMLS_DC)
|
||||
{
|
||||
exif_iif_add_value(image_info, section_index, name, tag, format, length, value, image_info->motorola_intel TSRMLS_CC);
|
||||
exif_iif_add_value(image_info, section_index, name, tag, format, (int)length, value, image_info->motorola_intel TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1693,10 +1675,6 @@ static void exif_iif_add_int(image_info_type *image_info, int section_index, cha
|
||||
image_info_data *list;
|
||||
|
||||
list = erealloc(image_info->info_list[section_index].list, (image_info->info_list[section_index].count+1)*sizeof(image_info_data));
|
||||
if (!list) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return;
|
||||
}
|
||||
image_info->info_list[section_index].list = list;
|
||||
|
||||
info_data = &image_info->info_list[section_index].list[image_info->info_list[section_index].count];
|
||||
@@ -1704,10 +1682,6 @@ static void exif_iif_add_int(image_info_type *image_info, int section_index, cha
|
||||
info_data->format = TAG_FMT_SLONG;
|
||||
info_data->length = 1;
|
||||
info_data->name = estrdup(name);
|
||||
if (!info_data->name) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return;
|
||||
}
|
||||
info_data->value.i = value;
|
||||
image_info->sections_found |= 1<<section_index;
|
||||
image_info->info_list[section_index].count++;
|
||||
@@ -1724,24 +1698,16 @@ static void exif_iif_add_str(image_info_type *image_info, int section_index, cha
|
||||
|
||||
if (value) {
|
||||
list = erealloc(image_info->info_list[section_index].list, (image_info->info_list[section_index].count+1)*sizeof(image_info_data));
|
||||
if (!list) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return;
|
||||
}
|
||||
image_info->info_list[section_index].list = list;
|
||||
info_data = &image_info->info_list[section_index].list[image_info->info_list[section_index].count];
|
||||
info_data->tag = TAG_NONE;
|
||||
info_data->format = TAG_FMT_STRING;
|
||||
info_data->length = 1;
|
||||
info_data->name = estrdup(name);
|
||||
if (!info_data->name) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return;
|
||||
}
|
||||
info_data->value.s = estrdup(value);
|
||||
if (!info_data->value.s) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return;
|
||||
if (PG(magic_quotes_runtime)) {
|
||||
info_data->value.s = php_addslashes(value, strlen(value), NULL, 0 TSRMLS_CC);
|
||||
} else {
|
||||
info_data->value.s = estrdup(value);
|
||||
}
|
||||
image_info->sections_found |= 1<<section_index;
|
||||
image_info->info_list[section_index].count++;
|
||||
@@ -1777,27 +1743,23 @@ static void exif_iif_add_buffer(image_info_type *image_info, int section_index,
|
||||
|
||||
if (value) {
|
||||
list = erealloc(image_info->info_list[section_index].list, (image_info->info_list[section_index].count+1)*sizeof(image_info_data));
|
||||
if (!list) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return;
|
||||
}
|
||||
image_info->info_list[section_index].list = list;
|
||||
info_data = &image_info->info_list[section_index].list[image_info->info_list[section_index].count];
|
||||
info_data->tag = TAG_NONE;
|
||||
info_data->format = TAG_FMT_UNDEFINED;
|
||||
info_data->length = length;
|
||||
info_data->name = estrdup(name);
|
||||
if (!info_data->name) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return;
|
||||
if (PG(magic_quotes_runtime)) {
|
||||
#ifdef EXIF_DEBUG
|
||||
exif_error_docref(NULL TSRMLS_CC, image_info, E_NOTICE, "Adding %s as buffer%s", name, exif_char_dump(value, length, 0));
|
||||
#endif
|
||||
info_data->value.s = php_addslashes(value, length, &length, 0 TSRMLS_CC);
|
||||
info_data->length = length;
|
||||
} else {
|
||||
info_data->value.s = safe_emalloc(length, 1, 1);
|
||||
memcpy(info_data->value.s, value, length);
|
||||
info_data->value.s[length] = 0;
|
||||
}
|
||||
info_data->value.s = safe_emalloc(length, 1, 1);
|
||||
if (!info_data->value.s) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return;
|
||||
}
|
||||
memcpy(info_data->value.s, value, length);
|
||||
info_data->value.s[length] = 0;
|
||||
image_info->sections_found |= 1<<section_index;
|
||||
image_info->info_list[section_index].count++;
|
||||
}
|
||||
@@ -1857,7 +1819,7 @@ static void exif_iif_free(image_info_type *image_info, int section_index) {
|
||||
static void add_assoc_image_info(pval *value, int sub_array, image_info_type *image_info, int section_index TSRMLS_DC)
|
||||
{
|
||||
char buffer[64], *val, *name, uname[64];
|
||||
int i, ap, l, b, idx=0, done, unknown=0;
|
||||
int i, ap, l, b, idx=0, unknown=0;
|
||||
#ifdef EXIF_DEBUG
|
||||
int info_tag;
|
||||
#endif
|
||||
@@ -1866,7 +1828,7 @@ static void add_assoc_image_info(pval *value, int sub_array, image_info_type *im
|
||||
pval *tmpi, *array = NULL;
|
||||
|
||||
#ifdef EXIF_DEBUG
|
||||
/* php_error_docref( NULL TSRMLS_CC, E_NOTICE, "Adding %d infos from section %s", image_info->info_list[section_index].count, exif_get_sectionname(section_index));*/
|
||||
/* php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Adding %d infos from section %s", image_info->info_list[section_index].count, exif_get_sectionname(section_index));*/
|
||||
#endif
|
||||
if (image_info->info_list[section_index].count) {
|
||||
if (sub_array) {
|
||||
@@ -1877,7 +1839,6 @@ static void add_assoc_image_info(pval *value, int sub_array, image_info_type *im
|
||||
}
|
||||
|
||||
for(i=0; i<image_info->info_list[section_index].count; i++) {
|
||||
done = 0;
|
||||
info_data = &image_info->info_list[section_index].list[i];
|
||||
#ifdef EXIF_DEBUG
|
||||
info_tag = info_data->tag; /* conversion */
|
||||
@@ -1888,7 +1849,7 @@ static void add_assoc_image_info(pval *value, int sub_array, image_info_type *im
|
||||
name = uname;
|
||||
}
|
||||
#ifdef EXIF_DEBUG
|
||||
/* php_error_docref( NULL TSRMLS_CC, E_NOTICE, "Adding infos: tag(0x%04X,%12s,L=0x%04X): %s", info_tag, exif_get_tagname(info_tag, buffer, -12, exif_get_tag_table(section_index) TSRMLS_CC), info_data->length, info_data->format==TAG_FMT_STRING?(info_value&&info_value->s?info_value->s:"<no data>"):exif_get_tagformat(info_data->format));*/
|
||||
/* php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Adding infos: tag(0x%04X,%12s,L=0x%04X): %s", info_tag, exif_get_tagname(info_tag, buffer, -12, exif_get_tag_table(section_index) TSRMLS_CC), info_data->length, info_data->format==TAG_FMT_STRING?(info_value&&info_value->s?info_value->s:"<no data>"):exif_get_tagformat(info_data->format));*/
|
||||
#endif
|
||||
if (info_data->length==0) {
|
||||
add_assoc_null(tmpi, name);
|
||||
@@ -2158,12 +2119,12 @@ static void exif_process_CME (image_info_type *image_info, char *value, size_t l
|
||||
exif_iif_add_tag(image_info, SECTION_COMMENT, "Comment", TAG_COMPUTED_VALUE, TAG_FMT_STRING, length, value);
|
||||
break;
|
||||
default:
|
||||
php_error_docref( NULL TSRMLS_CC, E_NOTICE, "Undefined JPEG2000 comment encoding");
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Undefined JPEG2000 comment encoding");
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
exif_iif_add_tag(image_info, SECTION_COMMENT, "Comment", TAG_COMPUTED_VALUE, TAG_FMT_UNDEFINED, 0, NULL);
|
||||
php_error_docref( NULL TSRMLS_CC, E_NOTICE, "JPEG2000 comment section to small");
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "JPEG2000 comment section to small");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -2256,7 +2217,7 @@ static char * exif_get_markername(int marker)
|
||||
#endif
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string|false exif_tagname(index)
|
||||
/* {{{ proto string exif_tagname(index)
|
||||
Get headername for index or false if not defined */
|
||||
PHP_FUNCTION(exif_tagname)
|
||||
{
|
||||
@@ -2290,10 +2251,6 @@ static void* exif_ifd_make_value(image_info_data *info_data, int motorola_intel
|
||||
|
||||
byte_count = php_tiff_bytes_per_format[info_data->format] * info_data->length;
|
||||
value_ptr = emalloc(max(byte_count, 4));
|
||||
if (!value_ptr) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return NULL;
|
||||
}
|
||||
memset(value_ptr, 0, 4);
|
||||
if (!info_data->length) {
|
||||
return value_ptr;
|
||||
@@ -2400,13 +2357,6 @@ static void exif_thumbnail_build(image_info_type *ImageInfo TSRMLS_DC) {
|
||||
}
|
||||
new_move = new_size;
|
||||
new_data = erealloc(ImageInfo->Thumbnail.data, ImageInfo->Thumbnail.size+new_size);
|
||||
if (!new_data) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
efree(ImageInfo->Thumbnail.data);
|
||||
ImageInfo->Thumbnail.data = NULL;
|
||||
ImageInfo->Thumbnail.size = 0;
|
||||
return;
|
||||
}
|
||||
ImageInfo->Thumbnail.data = new_data;
|
||||
memmove(ImageInfo->Thumbnail.data + new_move, ImageInfo->Thumbnail.data, ImageInfo->Thumbnail.size);
|
||||
ImageInfo->Thumbnail.size += new_size;
|
||||
@@ -2435,13 +2385,6 @@ static void exif_thumbnail_build(image_info_type *ImageInfo TSRMLS_DC) {
|
||||
php_ifd_set16u(new_data + 2, info_data->format, ImageInfo->motorola_intel);
|
||||
php_ifd_set32u(new_data + 4, info_data->length, ImageInfo->motorola_intel);
|
||||
value_ptr = exif_ifd_make_value(info_data, ImageInfo->motorola_intel TSRMLS_CC);
|
||||
if (!value_ptr) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
efree(ImageInfo->Thumbnail.data);
|
||||
ImageInfo->Thumbnail.data = NULL;
|
||||
ImageInfo->Thumbnail.size = 0;
|
||||
return;
|
||||
}
|
||||
if (byte_count <= 4) {
|
||||
memmove(new_data+8, value_ptr, 4);
|
||||
} else {
|
||||
@@ -2489,9 +2432,6 @@ static void exif_thumbnail_extract(image_info_type *ImageInfo, char *offset, siz
|
||||
return;
|
||||
}
|
||||
ImageInfo->Thumbnail.data = estrndup(offset + ImageInfo->Thumbnail.offset, ImageInfo->Thumbnail.size);
|
||||
if (!ImageInfo->Thumbnail.data) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
}
|
||||
exif_thumbnail_build(ImageInfo TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2506,10 +2446,6 @@ static int exif_process_undefined(char **result, char *value, size_t byte_count
|
||||
*/
|
||||
if (byte_count) {
|
||||
(*result) = estrndup(value, byte_count); /* NULL @ byte_count!!! */
|
||||
if (!*result) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return 0;
|
||||
}
|
||||
return byte_count+1;
|
||||
}
|
||||
return 0;
|
||||
@@ -2550,10 +2486,6 @@ static int exif_process_string(char **result, char *value, size_t byte_count TSR
|
||||
return exif_process_undefined(result, value, byte_count TSRMLS_CC);
|
||||
}
|
||||
(*result) = estrndup("", 1); /* force empty string */
|
||||
if (!*result) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return 0;
|
||||
}
|
||||
return byte_count+1;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2565,6 +2497,7 @@ static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoP
|
||||
int a;
|
||||
|
||||
#if EXIF_USE_MBSTRING
|
||||
char *decode;
|
||||
size_t len;;
|
||||
#endif
|
||||
|
||||
@@ -2576,11 +2509,23 @@ static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoP
|
||||
szValuePtr = szValuePtr+8;
|
||||
ByteCount -= 8;
|
||||
#if EXIF_USE_MBSTRING
|
||||
if (ImageInfo->motorola_intel) {
|
||||
*pszInfoPtr = php_mb_convert_encoding(szValuePtr, ByteCount, ImageInfo->encode_unicode, ImageInfo->decode_unicode_be, &len TSRMLS_CC);
|
||||
/* First try to detect BOM: ZERO WIDTH NOBREAK SPACE (FEFF 16)
|
||||
* since we have no encoding support for the BOM yet we skip that.
|
||||
*/
|
||||
if (!memcmp(szValuePtr, "\xFE\xFF", 2)) {
|
||||
decode = "UCS-2BE";
|
||||
szValuePtr = szValuePtr+2;
|
||||
ByteCount -= 2;
|
||||
} else if (!memcmp(szValuePtr, "\xFF\xFE", 2)) {
|
||||
decode = "UCS-2LE";
|
||||
szValuePtr = szValuePtr+2;
|
||||
ByteCount -= 2;
|
||||
} else if (ImageInfo->motorola_intel) {
|
||||
decode = ImageInfo->decode_unicode_be;
|
||||
} else {
|
||||
*pszInfoPtr = php_mb_convert_encoding(szValuePtr, ByteCount, ImageInfo->encode_unicode, ImageInfo->decode_unicode_le, &len TSRMLS_CC);
|
||||
decode = ImageInfo->decode_unicode_le;
|
||||
}
|
||||
*pszInfoPtr = php_mb_convert_encoding(szValuePtr, ByteCount, ImageInfo->encode_unicode, decode, &len TSRMLS_CC);
|
||||
return len;
|
||||
#else
|
||||
return exif_process_string_raw(pszInfoPtr, szValuePtr, ByteCount);
|
||||
@@ -2767,7 +2712,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
|
||||
// JPEG does not use absolute pointers instead its pointers are relative to the start
|
||||
// of the TIFF header in APP1 section.
|
||||
*/
|
||||
if (offset_val<0 || offset_val+byte_count>ImageInfo->FileSize || (ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_II && ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_MM)) {
|
||||
if (offset_val+byte_count>ImageInfo->FileSize || (ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_II && ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_MM)) {
|
||||
if (value_ptr < dir_entry) {
|
||||
/* we can read this if offset_val > 0 */
|
||||
/* some files have their values in other parts of the file */
|
||||
@@ -2782,10 +2727,6 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
|
||||
if (byte_count>sizeof(cbuf)) {
|
||||
/* mark as outside range and get buffer */
|
||||
value_ptr = emalloc(byte_count);
|
||||
if (!value_ptr) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return FALSE;
|
||||
}
|
||||
outside = value_ptr;
|
||||
} else {
|
||||
/*
|
||||
@@ -2871,12 +2812,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
|
||||
/* When there are any characters after the first NUL */
|
||||
ImageInfo->CopyrightPhotographer = estrdup(value_ptr);
|
||||
ImageInfo->CopyrightEditor = estrdup(value_ptr+length+1);
|
||||
ImageInfo->Copyright = safe_emalloc(strlen(value_ptr)+3, 1, strlen(value_ptr+length+1));
|
||||
if (!ImageInfo->Copyright) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
} else {
|
||||
sprintf(ImageInfo->Copyright, "%s, %s", value_ptr, value_ptr+length+1);
|
||||
}
|
||||
spprintf(&ImageInfo->Copyright, 0, "%s, %s", value_ptr, value_ptr+length+1);
|
||||
/* format = TAG_FMT_UNDEFINED; this musn't be ASCII */
|
||||
/* but we are not supposed to change this */
|
||||
/* keep in mind that image_info does not store editor value */
|
||||
@@ -2896,14 +2832,10 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
|
||||
case TAG_XP_KEYWORDS:
|
||||
case TAG_XP_SUBJECT:
|
||||
tmp_xp = (xp_field_type*)erealloc(ImageInfo->xp_fields.list, sizeof(xp_field_type)*(ImageInfo->xp_fields.count+1));
|
||||
if (!tmp_xp) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
} else {
|
||||
ImageInfo->sections_found |= FOUND_WINXP;
|
||||
ImageInfo->xp_fields.list = tmp_xp;
|
||||
ImageInfo->xp_fields.count++;
|
||||
exif_process_unicode(ImageInfo, &(ImageInfo->xp_fields.list[ImageInfo->xp_fields.count-1]), tag, value_ptr, byte_count TSRMLS_CC);
|
||||
}
|
||||
ImageInfo->sections_found |= FOUND_WINXP;
|
||||
ImageInfo->xp_fields.list = tmp_xp;
|
||||
ImageInfo->xp_fields.count++;
|
||||
exif_process_unicode(ImageInfo, &(ImageInfo->xp_fields.list[ImageInfo->xp_fields.count-1]), tag, value_ptr, byte_count TSRMLS_CC);
|
||||
break;
|
||||
|
||||
case TAG_FNUMBER:
|
||||
@@ -3180,7 +3112,7 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo TSRMLS_DC)
|
||||
{
|
||||
int section, sn;
|
||||
int marker = 0, last_marker = M_PSEUDO, comment_correction=1;
|
||||
int ll, lh;
|
||||
unsigned int ll, lh;
|
||||
uchar *Data;
|
||||
size_t fpos, size, got, itemlen;
|
||||
jpeg_sof_info sof_info;
|
||||
@@ -3236,17 +3168,14 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo TSRMLS_DC)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ((sn=exif_file_sections_add(ImageInfo, marker, itemlen+1, NULL))==-1) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return FALSE;
|
||||
}
|
||||
sn = exif_file_sections_add(ImageInfo, marker, itemlen+1, NULL);
|
||||
Data = ImageInfo->file.list[sn].data;
|
||||
|
||||
/* Store first two pre-read bytes. */
|
||||
Data[0] = (uchar)lh;
|
||||
Data[1] = (uchar)ll;
|
||||
|
||||
got = php_stream_read(ImageInfo->infile, Data+2, itemlen-2); /* Read the whole section. */
|
||||
got = php_stream_read(ImageInfo->infile, (char*)(Data+2), itemlen-2); /* Read the whole section. */
|
||||
if (got != itemlen-2) {
|
||||
exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_WARNING, "error reading from file: got=x%04X(=%d) != itemlen-2=x%04X(=%d)", got, got, itemlen-2, itemlen-2);
|
||||
return FALSE;
|
||||
@@ -3262,12 +3191,9 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo TSRMLS_DC)
|
||||
/* Determine how much file is left. */
|
||||
fpos = php_stream_tell(ImageInfo->infile);
|
||||
size = ImageInfo->FileSize - fpos;
|
||||
if ((sn=exif_file_sections_add(ImageInfo, M_PSEUDO, size, NULL))==-1) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return FALSE;
|
||||
}
|
||||
sn = exif_file_sections_add(ImageInfo, M_PSEUDO, size, NULL);
|
||||
Data = ImageInfo->file.list[sn].data;
|
||||
got = php_stream_read(ImageInfo->infile, Data, size);
|
||||
got = php_stream_read(ImageInfo->infile, (char*)Data, size);
|
||||
if (got != size) {
|
||||
EXIF_ERRLOG_FILEEOF
|
||||
return FALSE;
|
||||
@@ -3338,7 +3264,7 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo TSRMLS_DC)
|
||||
* scan JPEG in thumbnail (memory) */
|
||||
static int exif_scan_thumbnail(image_info_type *ImageInfo TSRMLS_DC)
|
||||
{
|
||||
uchar c, *data = ImageInfo->Thumbnail.data;
|
||||
uchar c, *data = (uchar*)ImageInfo->Thumbnail.data;
|
||||
int n, marker;
|
||||
size_t length=2, pos=0;
|
||||
jpeg_sof_info sof_info;
|
||||
@@ -3430,15 +3356,12 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
|
||||
tag_table_type tag_table = exif_get_tag_table(section_index);
|
||||
|
||||
if (ImageInfo->FileSize >= dir_offset+2) {
|
||||
if ((sn=exif_file_sections_add(ImageInfo, M_PSEUDO, 2, NULL))==-1) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
return FALSE;
|
||||
}
|
||||
sn = exif_file_sections_add(ImageInfo, M_PSEUDO, 2, NULL);
|
||||
#ifdef EXIF_DEBUG
|
||||
exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "read from TIFF: filesize(x%04X), IFD dir(x%04X + x%04X)", ImageInfo->FileSize, dir_offset, 2);
|
||||
#endif
|
||||
php_stream_seek(ImageInfo->infile, dir_offset, SEEK_SET); /* we do not know the order of sections */
|
||||
php_stream_read(ImageInfo->infile, ImageInfo->file.list[sn].data, 2);
|
||||
php_stream_read(ImageInfo->infile, (char*)ImageInfo->file.list[sn].data, 2);
|
||||
num_entries = php_ifd_get16u(ImageInfo->file.list[sn].data, ImageInfo->motorola_intel);
|
||||
dir_size = 2/*num dir entries*/ +12/*length of entry*/*num_entries +4/* offset to next ifd (points to thumbnail or NULL)*/;
|
||||
if (ImageInfo->FileSize >= dir_offset+dir_size) {
|
||||
@@ -3448,8 +3371,8 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
|
||||
if (exif_file_sections_realloc(ImageInfo, sn, dir_size TSRMLS_CC)) {
|
||||
return FALSE;
|
||||
}
|
||||
php_stream_read(ImageInfo->infile, ImageInfo->file.list[sn].data+2, dir_size-2);
|
||||
/*exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "Dump: %s", exif_char_dump(ImageInfo->file.list[sn].data, dir_size, 0));*/
|
||||
php_stream_read(ImageInfo->infile, (char*)(ImageInfo->file.list[sn].data+2), dir_size-2);
|
||||
/*exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Dump: %s", exif_char_dump(ImageInfo->file.list[sn].data, dir_size, 0));*/
|
||||
next_offset = php_ifd_get32u(ImageInfo->file.list[sn].data + dir_size - 4, ImageInfo->motorola_intel);
|
||||
#ifdef EXIF_DEBUG
|
||||
exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "read from TIFF done, next offset x%04X", next_offset);
|
||||
@@ -3537,7 +3460,7 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
|
||||
#ifdef EXIF_DEBUG
|
||||
exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "read from TIFF: filesize(x%04X), IFD(x%04X + x%04X)", ImageInfo->FileSize, dir_offset, ifd_size);
|
||||
#endif
|
||||
php_stream_read(ImageInfo->infile, ImageInfo->file.list[sn].data+dir_size, ifd_size-dir_size);
|
||||
php_stream_read(ImageInfo->infile, (char*)(ImageInfo->file.list[sn].data+dir_size), ifd_size-dir_size);
|
||||
#ifdef EXIF_DEBUG
|
||||
exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "read from TIFF, done");
|
||||
#endif
|
||||
@@ -3587,16 +3510,12 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
|
||||
#endif
|
||||
if (!ImageInfo->Thumbnail.data) {
|
||||
ImageInfo->Thumbnail.data = emalloc(ImageInfo->Thumbnail.size);
|
||||
if (!ImageInfo->Thumbnail.data) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
} else {
|
||||
php_stream_seek(ImageInfo->infile, ImageInfo->Thumbnail.offset, SEEK_SET);
|
||||
fgot = php_stream_read(ImageInfo->infile, ImageInfo->Thumbnail.data, ImageInfo->Thumbnail.size);
|
||||
if (fgot < ImageInfo->Thumbnail.size) {
|
||||
EXIF_ERRLOG_THUMBEOF
|
||||
}
|
||||
exif_thumbnail_build(ImageInfo TSRMLS_CC);
|
||||
php_stream_seek(ImageInfo->infile, ImageInfo->Thumbnail.offset, SEEK_SET);
|
||||
fgot = php_stream_read(ImageInfo->infile, ImageInfo->Thumbnail.data, ImageInfo->Thumbnail.size);
|
||||
if (fgot < ImageInfo->Thumbnail.size) {
|
||||
EXIF_ERRLOG_THUMBEOF
|
||||
}
|
||||
exif_thumbnail_build(ImageInfo TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3604,8 +3523,8 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
|
||||
exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "next IFD: %s done", exif_get_sectionname(sub_section_index));
|
||||
#endif
|
||||
} else {
|
||||
if (!exif_process_IFD_TAG(ImageInfo, dir_entry,
|
||||
ImageInfo->file.list[sn].data-dir_offset,
|
||||
if (!exif_process_IFD_TAG(ImageInfo, (char*)dir_entry,
|
||||
(char*)(ImageInfo->file.list[sn].data-dir_offset),
|
||||
ifd_size, 0, section_index, 0, tag_table TSRMLS_CC)) {
|
||||
return FALSE;
|
||||
}
|
||||
@@ -3624,16 +3543,12 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
|
||||
#endif
|
||||
if (!ImageInfo->Thumbnail.data && ImageInfo->Thumbnail.offset && ImageInfo->Thumbnail.size && ImageInfo->read_thumbnail) {
|
||||
ImageInfo->Thumbnail.data = emalloc(ImageInfo->Thumbnail.size);
|
||||
if (!ImageInfo->Thumbnail.data) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
} else {
|
||||
php_stream_seek(ImageInfo->infile, ImageInfo->Thumbnail.offset, SEEK_SET);
|
||||
fgot = php_stream_read(ImageInfo->infile, ImageInfo->Thumbnail.data, ImageInfo->Thumbnail.size);
|
||||
if (fgot < ImageInfo->Thumbnail.size) {
|
||||
EXIF_ERRLOG_THUMBEOF
|
||||
}
|
||||
exif_thumbnail_build(ImageInfo TSRMLS_CC);
|
||||
php_stream_seek(ImageInfo->infile, ImageInfo->Thumbnail.offset, SEEK_SET);
|
||||
fgot = php_stream_read(ImageInfo->infile, ImageInfo->Thumbnail.data, ImageInfo->Thumbnail.size);
|
||||
if (fgot < ImageInfo->Thumbnail.size) {
|
||||
EXIF_ERRLOG_THUMBEOF
|
||||
}
|
||||
exif_thumbnail_build(ImageInfo TSRMLS_CC);
|
||||
}
|
||||
#ifdef EXIF_DEBUG
|
||||
exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "read next IFD (THUMBNAIL) done");
|
||||
@@ -3666,7 +3581,7 @@ static int exif_scan_FILE_header(image_info_type *ImageInfo TSRMLS_DC)
|
||||
|
||||
if (ImageInfo->FileSize >= 2) {
|
||||
php_stream_seek(ImageInfo->infile, 0, SEEK_SET);
|
||||
php_stream_read(ImageInfo->infile, file_header, 2);
|
||||
php_stream_read(ImageInfo->infile, (char*)file_header, 2);
|
||||
if ((file_header[0]==0xff) && (file_header[1]==M_SOI)) {
|
||||
ImageInfo->FileType = IMAGE_FILETYPE_JPEG;
|
||||
if (exif_scan_JPEG_header(ImageInfo TSRMLS_CC)) {
|
||||
@@ -3776,12 +3691,12 @@ static int exif_read_file(image_info_type *ImageInfo, char *FileName, int read_t
|
||||
ImageInfo->read_all = read_all;
|
||||
ImageInfo->Thumbnail.filetype = IMAGE_FILETYPE_UNKNOWN;
|
||||
|
||||
ImageInfo->encode_unicode = estrdup(EXIF_G(encode_unicode));
|
||||
ImageInfo->decode_unicode_be = estrdup(EXIF_G(decode_unicode_be));
|
||||
ImageInfo->decode_unicode_le = estrdup(EXIF_G(decode_unicode_le));
|
||||
ImageInfo->encode_jis = estrdup(EXIF_G(encode_jis));
|
||||
ImageInfo->decode_jis_be = estrdup(EXIF_G(decode_jis_be));
|
||||
ImageInfo->decode_jis_le = estrdup(EXIF_G(decode_jis_le));
|
||||
ImageInfo->encode_unicode = safe_estrdup(EXIF_G(encode_unicode));
|
||||
ImageInfo->decode_unicode_be = safe_estrdup(EXIF_G(decode_unicode_be));
|
||||
ImageInfo->decode_unicode_le = safe_estrdup(EXIF_G(decode_unicode_le));
|
||||
ImageInfo->encode_jis = safe_estrdup(EXIF_G(encode_jis));
|
||||
ImageInfo->decode_jis_be = safe_estrdup(EXIF_G(decode_jis_be));
|
||||
ImageInfo->decode_jis_le = safe_estrdup(EXIF_G(decode_jis_le));
|
||||
|
||||
if (php_stream_is(ImageInfo->infile, PHP_STREAM_IS_STDIO)) {
|
||||
if (VCWD_STAT(FileName, &st) >= 0) {
|
||||
@@ -3806,7 +3721,7 @@ static int exif_read_file(image_info_type *ImageInfo, char *FileName, int read_t
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto array|false exif_read_data(string filename [, sections_needed [, sub_arrays[, read_thumbnail]]])
|
||||
/* {{{ proto array exif_read_data(string filename [, sections_needed [, sub_arrays[, read_thumbnail]]])
|
||||
Reads header data from the JPEG/TIFF image filename and optionally reads the internal thumbnails */
|
||||
PHP_FUNCTION(exif_read_data)
|
||||
{
|
||||
@@ -3826,10 +3741,6 @@ PHP_FUNCTION(exif_read_data)
|
||||
if(ac >= 2) {
|
||||
convert_to_string_ex(p_sections_needed);
|
||||
sections_str = safe_emalloc(strlen(Z_STRVAL_PP(p_sections_needed)), 1, 3);
|
||||
if (!sections_str) {
|
||||
EXIF_ERRLOG_EALLOC
|
||||
RETURN_FALSE;
|
||||
}
|
||||
sprintf(sections_str, ",%s,", Z_STRVAL_PP(p_sections_needed));
|
||||
/* sections_str DOES start with , and SPACES are NOT allowed in names */
|
||||
s = sections_str;
|
||||
@@ -3879,15 +3790,17 @@ PHP_FUNCTION(exif_read_data)
|
||||
exif_error_docref(NULL TSRMLS_CC, &ImageInfo, E_NOTICE, "sections found: %s", sections_str[0] ? sections_str : "None");
|
||||
#endif
|
||||
|
||||
ImageInfo.sections_found |= FOUND_COMPUTED;/* do not inform about in debug*/
|
||||
ImageInfo.sections_found |= FOUND_COMPUTED|FOUND_FILE;/* do not inform about in debug*/
|
||||
|
||||
if (ret==FALSE || (sections_needed && !(sections_needed&ImageInfo.sections_found)) || array_init(return_value) == FAILURE) {
|
||||
if (ret==FALSE || (sections_needed && !(sections_needed&ImageInfo.sections_found))) {
|
||||
/* array_init must be checked at last! otherwise the array must be freed if a later test fails. */
|
||||
exif_discard_imageinfo(&ImageInfo);
|
||||
EFREE_IF(sections_str);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
#ifdef EXIF_DEBUG
|
||||
exif_error_docref(NULL TSRMLS_CC, &ImageInfo, E_NOTICE, "generate section FILE");
|
||||
#endif
|
||||
@@ -4001,7 +3914,7 @@ PHP_FUNCTION(exif_read_data)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string|false exif_thumbnail(string filename [, &width, &height [, &imagetype]])
|
||||
/* {{{ proto string exif_thumbnail(string filename [, &width, &height [, &imagetype]])
|
||||
Reads the embedded thumbnail */
|
||||
PHP_FUNCTION(exif_thumbnail)
|
||||
{
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ RSC=rc.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_EXIF" /D ZTS=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXIF_EXPORTS" /D "COMPILE_DL_EXIF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_EXIF=1 /D "LIBZEND_EXPORTS" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXIF_EXPORTS" /D "COMPILE_DL_EXIF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_EXIF=1 /FR /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x406 /d "NDEBUG"
|
||||
@@ -71,7 +71,7 @@ LINK32=link.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_EXIF" /D ZTS=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXIF_EXPORTS" /D "COMPILE_DL_EXIF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_EXIF=1 /D "LIBZEND_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXIF_EXPORTS" /D "COMPILE_DL_EXIF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_EXIF=1 /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x406 /d "NDEBUG"
|
||||
|
||||
+1
-1
@@ -150,7 +150,7 @@ if test "\$PHP_$EXTNAME" != "no"; then
|
||||
dnl # --with-$extname -> add include path
|
||||
dnl PHP_ADD_INCLUDE(\$${EXTNAME}_DIR/include)
|
||||
|
||||
dnl # --with-$extname -> chech for lib and symbol presence
|
||||
dnl # --with-$extname -> check for lib and symbol presence
|
||||
dnl LIBNAME=$extname # you may want to change this
|
||||
dnl LIBSYMBOL=$extname # you most likely want to change this
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ if (php_sapi_name() != "cli") {
|
||||
1) Make sure you have CygWin installed
|
||||
2) Adjust the $cygwin_path to match your installation
|
||||
3) Change the environment cariable PATHEXT to include .PHP
|
||||
4) run ext_skel --ext_name=...
|
||||
4) run ext_skel --extname=...
|
||||
the first time you run this script you will be asked to
|
||||
associate it with a program. chooses the CLI version of php.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ if test "$PHP_FBSQL" != "no"; then
|
||||
FBSQL_INSTALLATION_DIR=""
|
||||
if test "$PHP_FBSQL" = "yes"; then
|
||||
|
||||
for i in /Local/Library /usr /usr/local /opt /Library /usr/lib; do
|
||||
for i in /Local/Library /usr/local /usr /opt /Library /usr/lib; do
|
||||
if test -f $i/FrontBase/include/FBCAccess/FBCAccess.h; then
|
||||
FBSQL_INSTALLATION_DIR=$i/FrontBase
|
||||
break
|
||||
|
||||
+2
-2
@@ -107,7 +107,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib php4ts_debug.lib FBCAccess.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"LIBC" /out:"..\..\Debug_TS/php_fbsql.dll" /pdbtype:sept /libpath:"..\..\Debug_TS" /libpath:"\usr\FrontBase\lib"
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib php4ts_debug.lib FBCAccess.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"LIBC" /out:"..\..\Debug_TS/php_fbsql.dll" /pdbtype:sept /libpath:"..\..\Debug_TS" /libpath:"\usr\FrontBase\lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "fbsql - Win32 Release_TS"
|
||||
|
||||
@@ -133,7 +133,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib FBCAccess.lib wsock32.lib /nologo /dll /machine:I386 /nodefaultlib:"LIBC" /out:"..\..\Release_TS/php_fbsql.dll" /libpath:"..\..\Release_TS" /libpath:"\usr\FrontBase\lib" /libpath:"..\..\Release_TS_inline"
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib FBCAccess.lib ws2_32.lib /nologo /dll /machine:I386 /nodefaultlib:"LIBC" /out:"..\..\Release_TS/php_fbsql.dll" /libpath:"..\..\Release_TS" /libpath:"\usr\FrontBase\lib" /libpath:"..\..\Release_TS_inline"
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
+87
-85
@@ -12,7 +12,7 @@
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Frank M. Kromann <frank@frontbase.com> |
|
||||
| Author: Frank M. Kromann <frank@kromann.info> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -83,30 +83,28 @@ typedef struct PHPFBLink PHPFBLink;
|
||||
required buffereing from of results.
|
||||
|
||||
In the PHP code the 3 above a data structures are referenced by means of integers in the
|
||||
range from 1 to som configurable maximum. You can put a limit to the number of links, databases
|
||||
and results. The integer identifications is implemented by insertion in the list, which is passed
|
||||
range from 1 to som configurable maximum. You can put a limit to the number of links, databases
|
||||
and results. The integer identifications is implemented by insertion in the list, which is passed
|
||||
as an argument to all the functions, please note the list is polymorph.
|
||||
|
||||
Database objects and link objects are all reused, base on the host name user name, host name database name
|
||||
user name. So connecting twice to the same database as the same user will return the same database id.
|
||||
user name. So connecting twice to the same database as the same user will return the same database id.
|
||||
We use the same coding for that as fbsql does, explioiting the underlying implementation of the lists.
|
||||
|
||||
Persistent objects are put in the persistent list as well, but only by name, if you connect to a persistent object
|
||||
and it is not in the list it is simply added and get a new index, and refcounted. Tricky, tricky ...
|
||||
and it is not in the list it is simply added and get a new index, and refcounted. Tricky, tricky ...
|
||||
*/
|
||||
|
||||
/* Some functions which should be exported from FBCAccess */
|
||||
|
||||
void* fbaObjectAtIndex();
|
||||
void fbaRelease();
|
||||
unsigned int fbaCount();
|
||||
void* fbaObjectAtIndex();
|
||||
void fbaRelease();
|
||||
unsigned int fbaCount();
|
||||
|
||||
struct FBCAutoStartInfo {
|
||||
FBArray* infoLines;
|
||||
FBArray* infoLines;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct PHPFBResult
|
||||
{
|
||||
PHPFBLink* link; /* The link for the result, may be NULL if no link */
|
||||
@@ -115,7 +113,7 @@ struct PHPFBResult
|
||||
FBCMetaData* ResultmetaData; /* The metadata describing the result */
|
||||
FBCRowHandler* rowHandler; /* The row handler, the Frontbase structure used for accessing rows in the result */
|
||||
unsigned int batchSize; /* The number of row to fetch when expanding the number of rows in the row handler */
|
||||
unsigned int rowCount; /* The number of rows in the results set. The number of row is not in */
|
||||
unsigned int rowCount; /* The number of rows in the results set. The number of row is not in */
|
||||
/* general known when the select is done, one typically needs to fetch all the row
|
||||
to figure out how many row you got. When the rowCount is unknown the value is
|
||||
0x7ffffffff */
|
||||
@@ -280,10 +278,10 @@ static void phpfbReleaseResult(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
FBCMetaData *md = fbcdcCancelFetch(result->link->connection, result->fetchHandle);
|
||||
fbcmdRelease(md);
|
||||
}
|
||||
if (result->rowHandler) fbcrhRelease(result->rowHandler);
|
||||
if (result->ResultmetaData) fbcmdRelease(result->ResultmetaData);
|
||||
if (result->list) fbcplRelease(result->list);
|
||||
if (result->array) fbaRelease(result->array);
|
||||
if (result->rowHandler) fbcrhRelease(result->rowHandler);
|
||||
if (result->ResultmetaData) fbcmdRelease(result->ResultmetaData);
|
||||
if (result->list) fbcplRelease(result->list);
|
||||
if (result->array) fbaRelease(result->array);
|
||||
efree(result);
|
||||
}
|
||||
}
|
||||
@@ -358,9 +356,9 @@ static void phpfbQuery(INTERNAL_FUNCTION_PARAMETERS, char* sql, PHPFBLink* link)
|
||||
/* {{{ PHP_INI
|
||||
*/
|
||||
PHP_INI_BEGIN()
|
||||
STD_PHP_INI_BOOLEAN ("fbsql.allow_persistent", "1", PHP_INI_SYSTEM, OnUpdateInt, allowPersistent, zend_fbsql_globals, fbsql_globals)
|
||||
STD_PHP_INI_BOOLEAN ("fbsql.generate_warnings", "0", PHP_INI_SYSTEM, OnUpdateInt, generateWarnings, zend_fbsql_globals, fbsql_globals)
|
||||
STD_PHP_INI_BOOLEAN ("fbsql.autocommit", "1", PHP_INI_SYSTEM, OnUpdateInt, autoCommit, zend_fbsql_globals, fbsql_globals)
|
||||
STD_PHP_INI_BOOLEAN ("fbsql.allow_persistent", "1", PHP_INI_SYSTEM, OnUpdateBool, allowPersistent, zend_fbsql_globals, fbsql_globals)
|
||||
STD_PHP_INI_BOOLEAN ("fbsql.generate_warnings", "0", PHP_INI_SYSTEM, OnUpdateBool, generateWarnings, zend_fbsql_globals, fbsql_globals)
|
||||
STD_PHP_INI_BOOLEAN ("fbsql.autocommit", "1", PHP_INI_SYSTEM, OnUpdateBool, autoCommit, zend_fbsql_globals, fbsql_globals)
|
||||
STD_PHP_INI_ENTRY_EX ("fbsql.max_persistent", "-1", PHP_INI_SYSTEM, OnUpdateInt, maxPersistent, zend_fbsql_globals, fbsql_globals, display_link_numbers)
|
||||
STD_PHP_INI_ENTRY_EX ("fbsql.max_links", "128", PHP_INI_SYSTEM, OnUpdateInt, maxLinks, zend_fbsql_globals, fbsql_globals, display_link_numbers)
|
||||
STD_PHP_INI_ENTRY_EX ("fbsql.max_connections", "128", PHP_INI_SYSTEM, OnUpdateInt, maxConnections, zend_fbsql_globals, fbsql_globals, display_link_numbers)
|
||||
@@ -389,7 +387,7 @@ static void php_fbsql_init_globals(zend_fbsql_globals *fbsql_globals)
|
||||
fbsql_globals->persistentCount = 0;
|
||||
fbsql_globals->linkCount = 0;
|
||||
}
|
||||
|
||||
|
||||
PHP_MINIT_FUNCTION(fbsql)
|
||||
{
|
||||
ZEND_INIT_MODULE_GLOBALS(fbsql, php_fbsql_init_globals, NULL);
|
||||
@@ -397,7 +395,7 @@ PHP_MINIT_FUNCTION(fbsql)
|
||||
REGISTER_INI_ENTRIES();
|
||||
|
||||
fbcInitialize();
|
||||
|
||||
fbcehSetMultiThreaded(True);
|
||||
le_result = zend_register_list_destructors_ex(phpfbReleaseResult, NULL, "fbsql result", module_number);
|
||||
le_link = zend_register_list_destructors_ex(phpfbReleaseLink, NULL, "fbsql link", module_number);
|
||||
le_plink = zend_register_list_destructors_ex(NULL, phpfbReleasePLink, "fbsql plink", module_number);
|
||||
@@ -497,12 +495,12 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
if (argc >= 2)
|
||||
{
|
||||
convert_to_string_ex(argv[1]);
|
||||
userName = Z_STRVAL_PP(argv[1]);
|
||||
}
|
||||
userName = Z_STRVAL_PP(argv[1]);
|
||||
}
|
||||
if (argc == 3)
|
||||
{
|
||||
convert_to_string_ex(argv[2]);
|
||||
userPassword = Z_STRVAL_PP(argv[2]);
|
||||
userPassword = Z_STRVAL_PP(argv[2]);
|
||||
}
|
||||
|
||||
if (hostName == NULL) hostName = FB_SQL_G(hostName);
|
||||
@@ -543,7 +541,7 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
phpLink->userPassword = strdup(userPassword);
|
||||
phpLink->databasePassword = strdup(FB_SQL_G(databasePassword));
|
||||
phpLink->databaseName = NULL;
|
||||
phpLink->execHandler = fbcehHandlerForHost(hostName, 128);
|
||||
phpLink->execHandler = NULL;
|
||||
phpLink->affectedRows = 0;
|
||||
phpLink->autoCommit = FB_SQL_G(autoCommit);
|
||||
phpLink->errorNo = 0;
|
||||
@@ -604,7 +602,7 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
phpLink->userPassword = strdup(userPassword);
|
||||
phpLink->databasePassword = strdup(FB_SQL_G(databasePassword));
|
||||
phpLink->databaseName = NULL;
|
||||
phpLink->execHandler = fbcehHandlerForHost(hostName, 128);
|
||||
phpLink->execHandler = NULL;
|
||||
phpLink->affectedRows = 0;
|
||||
phpLink->autoCommit = FB_SQL_G(autoCommit);
|
||||
phpLink->errorNo = 0;
|
||||
@@ -613,7 +611,7 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
|
||||
ZEND_REGISTER_RESOURCE(return_value, phpLink, le_link);
|
||||
|
||||
le.ptr = (void *)Z_LVAL_P(return_value);
|
||||
le.ptr = (void *)Z_LVAL_P(return_value);
|
||||
Z_TYPE(le) = le_index_ptr;
|
||||
if (zend_hash_update(&EG(regular_list), name, strlen(name) + 1, &le, sizeof(le), NULL)==FAILURE)
|
||||
{
|
||||
@@ -751,7 +749,7 @@ static int php_fbsql_select_db(char *databaseName, PHPFBLink *link TSRMLS_DC)
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No message");
|
||||
}
|
||||
link->errorText = strdup(emg);
|
||||
link->errorNo = fbcemdErrorCodeAtIndex(emd, 0);;
|
||||
link->errorNo = fbcemdErrorCodeAtIndex(emd, 0);;
|
||||
free(emg);
|
||||
fbcemdRelease(emd);
|
||||
fbcmdRelease(md);
|
||||
@@ -786,7 +784,7 @@ static int php_fbsql_select_db(char *databaseName, PHPFBLink *link TSRMLS_DC)
|
||||
|
||||
void phpfbestrdup(const char * s, int* length, char** value)
|
||||
{
|
||||
int l = s?strlen(s):0;
|
||||
int l = s?strlen(s):0;
|
||||
if (value)
|
||||
{
|
||||
char* r = emalloc(l+1);
|
||||
@@ -794,7 +792,7 @@ void phpfbestrdup(const char * s, int* length, char** value)
|
||||
strcpy(r, s);
|
||||
else
|
||||
r[0] = 0;
|
||||
*value = r;
|
||||
*value = r;
|
||||
}
|
||||
*length = l;
|
||||
}
|
||||
@@ -1215,7 +1213,12 @@ PHP_FUNCTION(fbsql_database)
|
||||
if (phpLink->databaseName) free(phpLink->databaseName);
|
||||
phpLink->databaseName = strdup(Z_STRVAL_PP(dbname));
|
||||
}
|
||||
RETURN_STRING(phpLink->databaseName, 1);
|
||||
if (phpLink->databaseName) {
|
||||
RETURN_STRING(phpLink->databaseName, 1);
|
||||
}
|
||||
else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1290,7 +1293,7 @@ PHP_FUNCTION(fbsql_username)
|
||||
/* {{{ proto string fbsql_password(resource link_identifier [, string password])
|
||||
Get or set the user password used with a connection */
|
||||
PHP_FUNCTION(fbsql_password)
|
||||
{
|
||||
{
|
||||
PHPFBLink* phpLink = NULL;
|
||||
zval **fbsql_link_index = NULL, **password = NULL;
|
||||
|
||||
@@ -1359,17 +1362,6 @@ PHP_FUNCTION(fbsql_select_db)
|
||||
}
|
||||
ZEND_FETCH_RESOURCE2(phpLink, PHPFBLink *, fbsql_link_index, id, "FrontBase-Link", le_link, le_plink);
|
||||
|
||||
if (phpLink->execHandler == NULL)
|
||||
{
|
||||
int port = atoi(name);
|
||||
if (port == 0 || port > 64535) {
|
||||
if (FB_SQL_G(generateWarnings)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot connect to FBExec for database '%s'. (%s)", name, fbcehClassErrorMessage());
|
||||
}
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!php_fbsql_select_db(name, phpLink TSRMLS_CC)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -1469,6 +1461,7 @@ PHP_FUNCTION(fbsql_create_db)
|
||||
convert_to_string_ex(database_name);
|
||||
databaseName = Z_STRVAL_PP(database_name);
|
||||
|
||||
if (phpLink->execHandler == NULL) phpLink->execHandler = fbcehHandlerForHost(phpLink->hostName, 128);
|
||||
status = fbcehStatusForDatabaseNamed(phpLink->execHandler, databaseName);
|
||||
if (status != FBUnknownStatus)
|
||||
{
|
||||
@@ -1542,6 +1535,7 @@ PHP_FUNCTION(fbsql_drop_db)
|
||||
convert_to_string_ex(database_name);
|
||||
databaseName = Z_STRVAL_PP(database_name);
|
||||
|
||||
if (phpLink->execHandler == NULL) phpLink->execHandler = fbcehHandlerForHost(phpLink->hostName, 128);
|
||||
status = fbcehStatusForDatabaseNamed(phpLink->execHandler, databaseName);
|
||||
if (status != FBStopped)
|
||||
{
|
||||
@@ -1616,6 +1610,7 @@ PHP_FUNCTION(fbsql_start_db)
|
||||
convert_to_string_ex(database_name);
|
||||
databaseName = Z_STRVAL_PP(database_name);
|
||||
|
||||
if (phpLink->execHandler == NULL) phpLink->execHandler = fbcehHandlerForHost(phpLink->hostName, 128);
|
||||
status = fbcehStatusForDatabaseNamed(phpLink->execHandler, databaseName);
|
||||
if ((status != FBStopped) && (status != FBRunning) && (status != FBStarting))
|
||||
{
|
||||
@@ -1752,6 +1747,7 @@ PHP_FUNCTION(fbsql_db_status)
|
||||
convert_to_string_ex(database_name);
|
||||
databaseName = Z_STRVAL_PP(database_name);
|
||||
|
||||
if (phpLink->execHandler == NULL) phpLink->execHandler = fbcehHandlerForHost(phpLink->hostName, 128);
|
||||
if (phpLink->execHandler) {
|
||||
RETURN_LONG(fbcehStatusForDatabaseNamed(phpLink->execHandler, databaseName));
|
||||
}
|
||||
@@ -1795,7 +1791,7 @@ int mdOk(PHPFBLink* link, FBCMetaData* md, char* sql)
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No message");
|
||||
}
|
||||
link->errorText = strdup(emg);
|
||||
link->errorNo = fbcemdErrorCodeAtIndex(emd, 0);;
|
||||
link->errorNo = fbcemdErrorCodeAtIndex(emd, 0);;
|
||||
free(emg);
|
||||
fbcemdRelease(emd);
|
||||
result = 0;
|
||||
@@ -1806,7 +1802,7 @@ int mdOk(PHPFBLink* link, FBCMetaData* md, char* sql)
|
||||
|
||||
static void phpfbQuery(INTERNAL_FUNCTION_PARAMETERS, char* sql, PHPFBLink* link)
|
||||
{
|
||||
PHPFBResult* result = NULL;
|
||||
PHPFBResult* result = NULL;
|
||||
FBCMetaData* md, *meta;
|
||||
char* tp;
|
||||
char* fh;
|
||||
@@ -1827,7 +1823,7 @@ static void phpfbQuery(INTERNAL_FUNCTION_PARAMETERS, char* sql, PHPFBLink* link)
|
||||
else
|
||||
md = meta;
|
||||
|
||||
tp = fbcmdStatementType(md);
|
||||
tp = fbcmdStatementType(md);
|
||||
|
||||
if ((tp[0] == 'C') || (tp[0] == 'R'))
|
||||
{
|
||||
@@ -1866,7 +1862,7 @@ static void phpfbQuery(INTERNAL_FUNCTION_PARAMETERS, char* sql, PHPFBLink* link)
|
||||
fbcrhConvertToOutputCharSet(fbcdcOutputCharacterSet(link->connection), (unsigned char *)r);
|
||||
if ((result->list = fbcplParse(r)))
|
||||
{
|
||||
result->rowCount = fbcplCount(result->list);
|
||||
result->rowCount = fbcplCount(result->list);
|
||||
result->columnCount = 7;
|
||||
}
|
||||
}
|
||||
@@ -1964,7 +1960,7 @@ PHP_FUNCTION(fbsql_db_query)
|
||||
Retreive a list of all databases on the server */
|
||||
PHP_FUNCTION(fbsql_list_dbs)
|
||||
{
|
||||
PHPFBResult* phpResult;
|
||||
PHPFBResult* phpResult;
|
||||
PHPFBLink* phpLink = NULL;
|
||||
zval **fbsql_link_index = NULL;
|
||||
int id;
|
||||
@@ -1986,6 +1982,7 @@ PHP_FUNCTION(fbsql_list_dbs)
|
||||
}
|
||||
ZEND_FETCH_RESOURCE2(phpLink, PHPFBLink *, fbsql_link_index, id, "FrontBase-Link", le_link, le_plink);
|
||||
|
||||
if (phpLink->execHandler == NULL) phpLink->execHandler = fbcehHandlerForHost(phpLink->hostName, 128);
|
||||
phpResult = emalloc(sizeof(PHPFBResult));
|
||||
phpResult->link = phpLink;
|
||||
phpResult->fetchHandle = NULL;
|
||||
@@ -2053,10 +2050,10 @@ PHP_FUNCTION(fbsql_list_tables)
|
||||
PHP_FUNCTION(fbsql_list_fields)
|
||||
{
|
||||
PHPFBLink* phpLink = NULL;
|
||||
zval **fbsql_link_index = NULL, **database_name, **table_name;
|
||||
zval **fbsql_link_index = NULL, **database_name, **table_name;
|
||||
int id;
|
||||
char *databaseName, *tableName;
|
||||
char sql[1024];
|
||||
char sql[1024];
|
||||
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
case 2:
|
||||
@@ -2160,8 +2157,8 @@ PHP_FUNCTION(fbsql_errno)
|
||||
Enable or disable FrontBase warnings */
|
||||
PHP_FUNCTION(fbsql_warnings)
|
||||
{
|
||||
int argc = ARG_COUNT(ht);
|
||||
zval **argv[1];
|
||||
int argc = ARG_COUNT(ht);
|
||||
zval **argv[1];
|
||||
|
||||
if ((argc < 0) || (argc > 1)) WRONG_PARAM_COUNT;
|
||||
if (zend_get_parameters_ex(argc, &argv[0])==FAILURE) RETURN_FALSE;
|
||||
@@ -2265,12 +2262,12 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
phpfbestrdup("True", length, value);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case FB_PrimaryKey:
|
||||
case FB_Integer:
|
||||
{
|
||||
int v = *((int*)data);
|
||||
char b[128];
|
||||
int v = *((int*)data);
|
||||
char b[128];
|
||||
sprintf(b, "%d", v);
|
||||
phpfbestrdup(b, length, value);
|
||||
}
|
||||
@@ -2278,8 +2275,8 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
#ifdef FB_TinyInteger
|
||||
case FB_TinyInteger:
|
||||
{
|
||||
short int v = *((short int*)data);
|
||||
char b[128];
|
||||
short int v = *((FBTinyInteger*)data);
|
||||
char b[128];
|
||||
sprintf(b, "%d", v);
|
||||
phpfbestrdup(b, length, value);
|
||||
}
|
||||
@@ -2289,7 +2286,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
case FB_LongInteger:
|
||||
{
|
||||
FBLongInteger v = *((FBLongInteger*)data);
|
||||
char b[128];
|
||||
char b[128];
|
||||
#ifdef PHP_WIN32
|
||||
sprintf(b, "%I64i", v);
|
||||
#else
|
||||
@@ -2302,7 +2299,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
case FB_SmallInteger:
|
||||
{
|
||||
short v = *((short*)data);
|
||||
char b[128];
|
||||
char b[128];
|
||||
sprintf(b, "%d", v);
|
||||
phpfbestrdup(b, length, value);
|
||||
}
|
||||
@@ -2315,7 +2312,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
case FB_Decimal:
|
||||
{
|
||||
double v = *((double*)data);
|
||||
char b[128];
|
||||
char b[128];
|
||||
sprintf(b, "%f", v);
|
||||
phpfbestrdup(b, length, value);
|
||||
}
|
||||
@@ -2332,13 +2329,13 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
case FB_Bit:
|
||||
case FB_VBit:
|
||||
{
|
||||
const FBCColumnMetaData* clmd = fbcmdColumnMetaDataAtIndex(md, column);
|
||||
const FBCColumnMetaData* clmd = fbcmdColumnMetaDataAtIndex(md, column);
|
||||
struct bitValue
|
||||
{
|
||||
unsigned int nBytes;
|
||||
unsigned int nBytes;
|
||||
unsigned char* bytes;
|
||||
};
|
||||
struct bitValue* ptr = data;
|
||||
struct bitValue* ptr = data;
|
||||
unsigned nBits = ptr->nBytes * 8;
|
||||
|
||||
if (dtc == FB_Bit) nBits = fbcdmdLength(fbccmdDatatype(clmd));
|
||||
@@ -2349,7 +2346,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
*length = l*2+3+1;
|
||||
if (value)
|
||||
{
|
||||
char* r = emalloc(l*2+3+1);
|
||||
char* r = emalloc(l*2+3+1);
|
||||
r[0] = 'X';
|
||||
r[1] = '\'';
|
||||
for (i = 0; i < nBits / 8; i++)
|
||||
@@ -2361,7 +2358,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
}
|
||||
r[i*2+2] = '\'';
|
||||
r[i*2+3] = 0;
|
||||
*value = r;
|
||||
*value = r;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2371,7 +2368,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
*length = l*2+3+1;
|
||||
if (value)
|
||||
{
|
||||
char* r = emalloc(l*2+3+1);
|
||||
char* r = emalloc(l*2+3+1);
|
||||
r[0] = 'B';
|
||||
r[1] = '\'';
|
||||
for (i = 0; i < nBits; i++)
|
||||
@@ -2382,7 +2379,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
}
|
||||
r[i*2+2] = '\'';
|
||||
r[i*2+3] = 0;
|
||||
*value = r;
|
||||
*value = r;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2402,7 +2399,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
case FB_YearMonth:
|
||||
{
|
||||
char b[128];
|
||||
int v = *((unsigned int*)data);
|
||||
int v = *((unsigned int*)data);
|
||||
sprintf(b, "%d", v);
|
||||
phpfbestrdup(b, length, value);
|
||||
}
|
||||
@@ -2455,14 +2452,14 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
|
||||
|
||||
/* {{{ phpfbSqlResult
|
||||
*/
|
||||
void phpfbSqlResult(INTERNAL_FUNCTION_PARAMETERS, PHPFBResult* result, int rowIndex, int columnIndex)
|
||||
void phpfbSqlResult(INTERNAL_FUNCTION_PARAMETERS, PHPFBResult* result, int rowIndex, int columnIndex)
|
||||
{
|
||||
void** row;
|
||||
if (result->list)
|
||||
{
|
||||
FBCPList* columns = (FBCPList*)fbcplValueForKey(result->list, "COLUMNS");
|
||||
FBCPList* column = (FBCPList*)fbcplValueAtIndex(columns, result->rowIndex);
|
||||
if (columnIndex == 0)
|
||||
if (columnIndex == 0)
|
||||
{ /* Name */
|
||||
FBCPList* name = (FBCPList*)fbcplValueForKey(column, "NAME");
|
||||
RETURN_STRING((char *)fbcplString((FBCPList*)name), 1);
|
||||
@@ -2521,7 +2518,7 @@ void phpfbSqlResult(INTERNAL_FUNCTION_PARAMETERS, PHPFBResult* result, int rowIn
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto mixed fbsql_result(int result [, int row [, mixed field]])
|
||||
??? */
|
||||
PHP_FUNCTION(fbsql_result)
|
||||
@@ -2560,7 +2557,7 @@ PHP_FUNCTION(fbsql_result)
|
||||
rowIndex = Z_LVAL_PP(row);
|
||||
}
|
||||
|
||||
columnIndex = result->columnIndex;
|
||||
columnIndex = result->columnIndex;
|
||||
if (field)
|
||||
{
|
||||
if ((Z_TYPE_PP(field) == IS_STRING) && (result->metaData))
|
||||
@@ -2584,8 +2581,8 @@ PHP_FUNCTION(fbsql_result)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
phpfbSqlResult(INTERNAL_FUNCTION_PARAM_PASSTHRU, result, rowIndex, columnIndex);
|
||||
|
||||
result->columnIndex++;
|
||||
@@ -2616,9 +2613,9 @@ PHP_FUNCTION(fbsql_next_result)
|
||||
}
|
||||
ZEND_FETCH_RESOURCE(result, PHPFBResult *, fbsql_result_index, -1, "FrontBase-Result", le_result);
|
||||
|
||||
result->currentResult++;
|
||||
result->currentResult++;
|
||||
if (result->currentResult < result->selectResults) {
|
||||
if (result->fetchHandle) {
|
||||
if (result->fetchHandle) {
|
||||
FBCMetaData *md = fbcdcCancelFetch(result->link->connection, result->fetchHandle);
|
||||
fbcmdRelease(md);
|
||||
}
|
||||
@@ -2706,7 +2703,7 @@ PHP_FUNCTION(fbsql_num_fields)
|
||||
Fetch a row of data. Returns an indexed array */
|
||||
PHP_FUNCTION(fbsql_fetch_row)
|
||||
{
|
||||
php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, FBSQL_NUM);
|
||||
php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, FBSQL_NUM, 1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -2714,7 +2711,7 @@ PHP_FUNCTION(fbsql_fetch_row)
|
||||
Detch a row of data. Returns an assoc array */
|
||||
PHP_FUNCTION(fbsql_fetch_assoc)
|
||||
{
|
||||
php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, FBSQL_ASSOC);
|
||||
php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, FBSQL_ASSOC, 1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -2722,7 +2719,7 @@ PHP_FUNCTION(fbsql_fetch_assoc)
|
||||
Fetch a row of data. Returns an object */
|
||||
PHP_FUNCTION(fbsql_fetch_object)
|
||||
{
|
||||
php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, FBSQL_ASSOC);
|
||||
php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, FBSQL_ASSOC, 2);
|
||||
if (Z_TYPE_P(return_value)==IS_ARRAY) {
|
||||
object_and_properties_init(return_value, ZEND_STANDARD_CLASS_DEF_PTR, Z_ARRVAL_P(return_value));
|
||||
}
|
||||
@@ -2733,7 +2730,7 @@ PHP_FUNCTION(fbsql_fetch_object)
|
||||
Fetches a result row as an array (associative, numeric or both)*/
|
||||
PHP_FUNCTION(fbsql_fetch_array)
|
||||
{
|
||||
php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, FBSQL_BOTH);
|
||||
php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, FBSQL_BOTH, 2);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -2781,7 +2778,7 @@ static void _parse_list(zval** return_value, FBCPList* list)
|
||||
}
|
||||
}
|
||||
|
||||
static void php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
|
||||
static void php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type, int expected_args)
|
||||
{
|
||||
|
||||
PHPFBResult* result = NULL;
|
||||
@@ -2790,6 +2787,10 @@ static void php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
|
||||
int i;
|
||||
void **row;
|
||||
|
||||
if (ZEND_NUM_ARGS() > expected_args) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
case 1:
|
||||
if (zend_get_parameters_ex(1, &fbsql_result_index)==FAILURE) {
|
||||
@@ -2923,7 +2924,7 @@ static void php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
|
||||
{
|
||||
if (row[i])
|
||||
{
|
||||
char* value;
|
||||
char* value;
|
||||
unsigned int length;
|
||||
unsigned int c = 0;
|
||||
phpfbColumnAsString(result, i, row[i], &length, &value TSRMLS_CC);
|
||||
@@ -3019,7 +3020,7 @@ PHP_FUNCTION(fbsql_fetch_lengths)
|
||||
if (array_init(return_value)==FAILURE) RETURN_FALSE;
|
||||
for (i=0; i < result->columnCount; i++)
|
||||
{
|
||||
unsigned length = 0;
|
||||
unsigned length = 0;
|
||||
if (result->row[i]) phpfbColumnAsString(result, i, result->row[i], &length, NULL TSRMLS_CC);
|
||||
add_index_long(return_value, i, length);
|
||||
}
|
||||
@@ -3410,9 +3411,9 @@ PHP_FUNCTION(fbsql_field_flags)
|
||||
PHP_FUNCTION(fbsql_table_name)
|
||||
{
|
||||
PHPFBResult* result = NULL;
|
||||
zval **fbsql_result_index = NULL, **table_index;
|
||||
zval **fbsql_result_index = NULL, **table_index;
|
||||
unsigned index;
|
||||
char* value;
|
||||
char* value;
|
||||
unsigned int length;
|
||||
void** row;
|
||||
|
||||
@@ -3498,6 +3499,7 @@ PHP_FUNCTION(fbsql_get_autostart_info)
|
||||
}
|
||||
ZEND_FETCH_RESOURCE2(phpLink, PHPFBLink *, fbsql_link_index, id, "FrontBase-Link", le_link, le_plink);
|
||||
|
||||
if (phpLink->execHandler == NULL) phpLink->execHandler = fbcehHandlerForHost(phpLink->hostName, 128);
|
||||
if (phpLink->execHandler == NULL) {
|
||||
if (FB_SQL_G(generateWarnings))
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No valid Exec handler available for this connection");
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Frank M. Kromann <frank@frontbase.com> |
|
||||
| Author: Frank M. Kromann <frank@kromann.info> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -101,7 +101,7 @@ PHP_FUNCTION(fbsql_warnings);
|
||||
PHP_FUNCTION(fbsql_get_autostart_info);
|
||||
/* PHP_FUNCTION(fbsql_set_autostart_info); */
|
||||
|
||||
static void php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type);
|
||||
static void php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type, int expected_args);
|
||||
static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent);
|
||||
|
||||
ZEND_BEGIN_MODULE_GLOBALS(fbsql)
|
||||
|
||||
+7
-7
@@ -8,22 +8,22 @@ PHP_ARG_WITH(fdftk, for FDF support,
|
||||
if test "$PHP_FDFTK" != "no"; then
|
||||
|
||||
case $host_os in
|
||||
aix*)
|
||||
aix*[)]
|
||||
libtype=aix
|
||||
;;
|
||||
solaris* )
|
||||
solaris*[)]
|
||||
libtype=solaris
|
||||
;;
|
||||
linux*)
|
||||
linux*[)]
|
||||
libtype=linux
|
||||
;;
|
||||
*)
|
||||
*[)]
|
||||
AC_MSG_ERROR([The fdf toolkit is not available for $host_os.])
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$PHP_FDFTK" = "yes"; then
|
||||
PHP_FDFTK="/usr /usr/local ../FDFToolkitForUNIX ext/fdf/FDFToolkitForUNIX ../fdftk ext/fdf/fdftk"
|
||||
PHP_FDFTK="/usr/local /usr ../FDFToolkitForUNIX ext/fdf/FDFToolkitForUNIX ../fdftk ext/fdf/fdftk"
|
||||
fi
|
||||
|
||||
for dir in $PHP_FDFTK; do
|
||||
@@ -65,9 +65,9 @@ if test "$PHP_FDFTK" != "no"; then
|
||||
AC_MSG_ERROR(no usable fdf library found)
|
||||
fi
|
||||
|
||||
PHP_ADD_LIBRARY_WITH_PATH($FDFLIBRARY, $FDFTK_LIB_DIR, FDFTK_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY_WITH_PATH($FDFLIBRARY, $FDFTK_LIB_DIR, FDF_SHARED_LIBADD)
|
||||
|
||||
PHP_NEW_EXTENSION(fdf, fdf.c, $ext_shared)
|
||||
PHP_SUBST(FDFTK_SHARED_LIBADD)
|
||||
PHP_SUBST(FDF_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_FDFLIB,1,[ ])
|
||||
fi
|
||||
+20
-2
@@ -39,6 +39,10 @@
|
||||
#include "php_variables.h"
|
||||
#include "php_fdf.h"
|
||||
|
||||
#ifndef S_ISDIR
|
||||
#define S_ISDIR(m) (((m) & _S_IFDIR) == _S_IFDIR)
|
||||
#endif
|
||||
|
||||
static int le_fdf;
|
||||
|
||||
SAPI_POST_HANDLER_FUNC(fdf_post_handler);
|
||||
@@ -125,10 +129,17 @@ static sapi_post_entry php_fdf_post_entry = {
|
||||
fdf_post_handler
|
||||
};
|
||||
|
||||
static void php_fdf_init_globals(zend_fdf_globals *fdf_globals)
|
||||
{
|
||||
memset(fdf_globals, 0, sizeof(*fdf_globals));
|
||||
}
|
||||
|
||||
/* {{{ PHP_MINIT_FUNCTION
|
||||
*/
|
||||
PHP_MINIT_FUNCTION(fdf)
|
||||
{
|
||||
ZEND_INIT_MODULE_GLOBALS(fdf, php_fdf_init_globals, NULL);
|
||||
|
||||
le_fdf = zend_register_list_destructors_ex(phpi_FDFClose, NULL, "fdf", module_number);
|
||||
|
||||
/* add handler for Acrobat FDF form post requests */
|
||||
@@ -371,13 +382,12 @@ PHP_FUNCTION(fdf_get_value)
|
||||
}
|
||||
which++;
|
||||
} while (err == FDFErcOK);
|
||||
if(err == FDFErcNoValue) err = FDFErcOK;
|
||||
efree(buffer);
|
||||
buffer = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
if(err != FDFErcOK) {
|
||||
if ((err != FDFErcOK) && (err != FDFErcNoValue)) {
|
||||
if(buffer) efree(buffer);
|
||||
FDF_FAILURE(err);
|
||||
}
|
||||
@@ -711,6 +721,10 @@ PHP_FUNCTION(fdf_set_file)
|
||||
return;
|
||||
}
|
||||
|
||||
if (php_check_open_basedir(filename TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(filename, "wb+", CHECKUID_CHECK_MODE_PARAM))) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
ZEND_FETCH_RESOURCE(fdf, FDFDoc *, &r_fdf, -1, "fdf", le_fdf);
|
||||
|
||||
err = FDFSetFile(fdf, filename);
|
||||
@@ -1471,6 +1485,10 @@ PHP_FUNCTION(fdf_get_attachment) {
|
||||
|
||||
ZEND_FETCH_RESOURCE(fdf, FDFDoc *, &r_fdf, -1, "fdf", le_fdf);
|
||||
|
||||
if (php_check_open_basedir(savepath TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(savepath, "wb+", CHECKUID_CHECK_MODE_PARAM))) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
strncpy(pathbuf , savepath, MAXPATHLEN-1);
|
||||
pathbuf[MAXPATHLEN-1] = '\0';
|
||||
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ RSC=rc.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_FDF" /D ZTS=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_FDF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_FDFLIB=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_FDF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_FDFLIB=1 /D "HAVE_FDFTK_5" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x406 /d "NDEBUG"
|
||||
@@ -72,7 +72,7 @@ LINK32=link.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "mssql-70" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_FDF" /D ZTS=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_FDF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_FDFLIB=1 /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_FDF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_FDFLIB=1 /D "HAVE_FDFTK_5" /FR /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x406 /d "NDEBUG"
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
--TEST--
|
||||
Adobe Form Data Format functions
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("fdf")) print "skip"; ?>
|
||||
--POST--
|
||||
--GET--
|
||||
--FILE--
|
||||
<?php
|
||||
echo is_resource(fdf_create()) ? "OK" : "FAILURE";
|
||||
?>
|
||||
--EXPECT--
|
||||
OK
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
FDF open/save and set/get values
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("fdf")) print "skip"; ?>
|
||||
--POST--
|
||||
--GET--
|
||||
--FILE--
|
||||
<?php
|
||||
$f1 = fdf_create();
|
||||
fdf_set_value($f1, "foo", "bar");
|
||||
fdf_set_value($f1, "bar", "foo");
|
||||
$f2 = fdf_open_string(fdf_save_string($f1));
|
||||
fdf_close($f1);
|
||||
for ($field = fdf_next_field_name($f2); $field; $field = fdf_next_field_name($f2, $field)) {
|
||||
echo "$field: ". fdf_get_value($f2, $field) . "\n";
|
||||
}
|
||||
fdf_close($f2);
|
||||
?>
|
||||
--EXPECT--
|
||||
foo: bar
|
||||
bar: foo
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
FDF read file
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("fdf")) print "skip"; ?>
|
||||
--POST--
|
||||
--GET--
|
||||
--FILE--
|
||||
<?php
|
||||
$fdf = fdf_open("ext/fdf/tests/simple.fdf");
|
||||
for ($field = fdf_next_field_name($fdf); $field; $field = fdf_next_field_name($fdf, $field)) {
|
||||
echo "$field: ". fdf_get_value($fdf, $field) . "\n";
|
||||
}
|
||||
fdf_close($fdf);
|
||||
?>
|
||||
--EXPECT--
|
||||
foo: bar
|
||||
bar: foo
|
||||
@@ -0,0 +1,18 @@
|
||||
%FDF-1.2
|
||||
%âãÏÓ
|
||||
1 0 obj
|
||||
<<
|
||||
/FDF << /Fields 2 0 R >>
|
||||
>>
|
||||
endobj
|
||||
2 0 obj
|
||||
[
|
||||
<< /T (foo)/V (bar)>> << /T (bar)/V (foo)>>
|
||||
]
|
||||
endobj
|
||||
trailer
|
||||
<<
|
||||
/Root 1 0 R
|
||||
|
||||
>>
|
||||
%%EOF
|
||||
@@ -2,8 +2,6 @@ dnl
|
||||
dnl $Id$
|
||||
dnl
|
||||
|
||||
AC_ARG_WITH(filepro,[],[enable_filepro=$withval])
|
||||
|
||||
PHP_ARG_ENABLE(filepro,whether to enable the bundled filePro support,
|
||||
[ --enable-filepro Enable the bundled read-only filePro support.])
|
||||
|
||||
|
||||
@@ -386,7 +386,7 @@ PHP_FUNCTION(filepro_fieldname)
|
||||
}
|
||||
|
||||
php_error(E_WARNING,
|
||||
"%s(): Unable to locate field number %d.", get_active_function_name(TSRMLS_C),
|
||||
"%s(): Unable to locate field number %ld.", get_active_function_name(TSRMLS_C),
|
||||
Z_LVAL_P(fno));
|
||||
|
||||
RETVAL_FALSE;
|
||||
@@ -426,7 +426,7 @@ PHP_FUNCTION(filepro_fieldtype)
|
||||
}
|
||||
}
|
||||
php_error(E_WARNING,
|
||||
"%s(): Unable to locate field number %d.", get_active_function_name(TSRMLS_C),
|
||||
"%s(): Unable to locate field number %ld.", get_active_function_name(TSRMLS_C),
|
||||
Z_LVAL_P(fno));
|
||||
RETVAL_FALSE;
|
||||
}
|
||||
@@ -465,7 +465,7 @@ PHP_FUNCTION(filepro_fieldwidth)
|
||||
}
|
||||
}
|
||||
php_error(E_WARNING,
|
||||
"%s(): Unable to locate field number %d.", get_active_function_name(TSRMLS_C),
|
||||
"%s(): Unable to locate field number %ld.", get_active_function_name(TSRMLS_C),
|
||||
Z_LVAL_P(fno));
|
||||
RETVAL_FALSE;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <fribidi/fribidi.h>
|
||||
|
||||
/* The fribidi guys dont believe in BC */
|
||||
#ifdef FRIBIDI_CHAR_SET_UTF8
|
||||
#ifndef FRIBIDI_MICRO_VERSION_STR
|
||||
#define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
|
||||
#define FRIBIDI_CHARSET_ISO8859_6 FRIBIDI_CHAR_SET_ISO8859_6
|
||||
#define FRIBIDI_CHARSET_ISO8859_8 FRIBIDI_CHAR_SET_ISO8859_8
|
||||
@@ -212,7 +212,11 @@ PHP_FUNCTION(fribidi_log2vis)
|
||||
|
||||
out_string = (char *) emalloc(sizeof(char)*alloc_len);
|
||||
|
||||
#if FRIBIDI_MAJOR_VERSION == 0 && FRIBIDI_MINOR_VERSION <= 10
|
||||
fribidi_log2vis(u_logical_str, len, &base_dir, u_visual_str, position_L_to_V_list, position_V_to_L_list, embedding_level_list);
|
||||
#else
|
||||
fribidi_log2vis(NULL, u_logical_str, len, &base_dir, u_visual_str, position_L_to_V_list, position_V_to_L_list, embedding_level_list);
|
||||
#endif
|
||||
|
||||
/* convert back to original char set */
|
||||
switch(Z_LVAL_PP(charset)) {
|
||||
|
||||
Loaded 100 of 1051 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user